commit:     301cf07863551d5e8b1ddaa51b4ac73081f040c6
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 12:28:57 2017 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 12:28:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=301cf078

dev-lang/teyjus: Bump to 2.1. Fix build with ocaml 4.03 and above.

Thanks to Toralf Forster for reporting.

Gentoo-bug: 591368

Package-Manager: portage-2.3.3

 dev-lang/teyjus/Manifest                           |  1 +
 dev-lang/teyjus/teyjus-2.0.2.ebuild                | 26 ++++++++++-----
 .../{teyjus-2.0.2.ebuild => teyjus-2.1.ebuild}     | 39 ++++++++++++----------
 3 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest
index 722e1eb..3567b49 100644
--- a/dev-lang/teyjus/Manifest
+++ b/dev-lang/teyjus/Manifest
@@ -1 +1,2 @@
+DIST teyjus-2.1.tar.gz 723763 SHA256 
c9883a6e5a351dcc0ec5139824953434539e6b730476e171567b878ddee5230d SHA512 
1f71d19502f4f4da00f635d2c3d4e141403182d65f039e0d43660edf84c5fcd900e7225ac92dc5bdbe0c8379c4e2ce6e27879af504fcfafddf2695a0c8a13379
 WHIRLPOOL 
c02fba5be6325300c01b9c06878917c62f71aafe822bd26693c2bd8da56f5314b41c65aaf4d045c525434f9453a8bb831bc25629acec96474f2c59988fe6fad3
 DIST teyjus-source-2.0-b2.tar.gz 465815 SHA256 
f589fb460d7095a6e674b7a6413772c41b98654c38602c3e8c477a976da99052 SHA512 
071a25cd5341f7562f07dcaae1f87c35eb394ddab94a5160826c7fb2d9a51efea909b41947205503ebcc58df04388baf9eaf9f5a614186701940da29db1c1b29
 WHIRLPOOL 
0dfd8128d194ef5d6cf4fdf6d75c4c654ab834af6c090f595b2defd91645cc0fca4ae4a8483c7a77b4a7e8dae5b3c31069bf85d240538db2f88df69d6f7f42d0

diff --git a/dev-lang/teyjus/teyjus-2.0.2.ebuild 
b/dev-lang/teyjus/teyjus-2.0.2.ebuild
index bb03ce1..65c04a8 100644
--- a/dev-lang/teyjus/teyjus-2.0.2.ebuild
+++ b/dev-lang/teyjus/teyjus-2.0.2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="5"
+EAPI="6"
 
-inherit base elisp-common multilib versionator
+inherit elisp-common multilib versionator
 
 MY_PN="${PN}-source"
 MY_P=$(version_format_string '${MY_PN}-$1.$2-b$3')
@@ -18,8 +18,8 @@ KEYWORDS="~amd64 ~x86"
 LICENSE="GPL-3"
 IUSE="emacs examples +ocamlopt"
 
-RDEPEND=">=sys-devel/binutils-2.17
-       >=sys-devel/gcc-2.95.3
+RDEPEND=">=sys-devel/binutils-2.17:*
+       >=sys-devel/gcc-2.95.3:*
        >=dev-lang/ocaml-3.10[ocamlopt?]
        emacs? ( virtual/emacs )"
 DEPEND="${RDEPEND}
@@ -27,12 +27,11 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${PN}
 
-PATCHES=("${FILESDIR}/${PN}-2.0.2-flags.patch")
-
 SITEFILE=50${PN}-gentoo.el
 
 src_prepare() {
-       base_src_prepare
+       default
+       eapply "${FILESDIR}/${PN}-2.0.2-flags.patch"
        local cflags=""
        for i in ${CFLAGS}
        do
@@ -48,6 +47,17 @@ src_prepare() {
                -e "s@OCAMLFLAGS +=@OCAMLFLAGS +=${cflags}${lflags}@" \
                -i "${S}/source/OMakefile" \
                || die "Could not set flags in ${S}/teyjus/source/OMakefile"
+       if has_version ">=dev-lang/ocaml-4.03.0"; then
+               # bug 591368
+               pushd "${S}/source" || die
+               sed -e 's@$(FNT)/ccode_stubs@$(FNT)/ccode_stubs_c@' \
+                       -e 's@\(FNT_ML_TO_C\[\] =\)@\1\n    
$(FNT)/ccode_stubs@' \
+                       -i OMakefile || die
+               cd "${S}/source/front" || die
+               mv ccode_stubs.mli ccode_stubs.ml || die
+               mv ccode_stubs.c ccode_stubs_c.c || die
+               popd || die
+       fi
 }
 
 src_compile() {

diff --git a/dev-lang/teyjus/teyjus-2.0.2.ebuild 
b/dev-lang/teyjus/teyjus-2.1.ebuild
similarity index 73%
copy from dev-lang/teyjus/teyjus-2.0.2.ebuild
copy to dev-lang/teyjus/teyjus-2.1.ebuild
index bb03ce1..3a06863 100644
--- a/dev-lang/teyjus/teyjus-2.0.2.ebuild
+++ b/dev-lang/teyjus/teyjus-2.1.ebuild
@@ -1,38 +1,31 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="5"
+EAPI="6"
 
-inherit base elisp-common multilib versionator
-
-MY_PN="${PN}-source"
-MY_P=$(version_format_string '${MY_PN}-$1.$2-b$3')
+inherit elisp-common multilib versionator
 
 DESCRIPTION="Higher-order logic programming language Lambda Prolog"
 HOMEPAGE="http://teyjus.cs.umn.edu/";
-SRC_URI="https://teyjus.googlecode.com/files/${MY_P}.tar.gz";
+SRC_URI="https://github.com/teyjus/teyjus/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 
 SLOT="0/${PV}"
 KEYWORDS="~amd64 ~x86"
 LICENSE="GPL-3"
 IUSE="emacs examples +ocamlopt"
 
-RDEPEND=">=sys-devel/binutils-2.17
-       >=sys-devel/gcc-2.95.3
+RDEPEND=">=sys-devel/binutils-2.17:*
+       >=sys-devel/gcc-2.95.3:*
        >=dev-lang/ocaml-3.10[ocamlopt?]
        emacs? ( virtual/emacs )"
 DEPEND="${RDEPEND}
        dev-util/omake"
 
-S=${WORKDIR}/${PN}
-
-PATCHES=("${FILESDIR}/${PN}-2.0.2-flags.patch")
-
 SITEFILE=50${PN}-gentoo.el
 
 src_prepare() {
-       base_src_prepare
+       default
        local cflags=""
        for i in ${CFLAGS}
        do
@@ -43,11 +36,21 @@ src_prepare() {
        do
                lflags="${lflags} -cclib ${i}"
        done
-       sed -e "s@CFLAGS +=@CFLAGS += ${CFLAGS}@" \
-               -e "s@LDFLAGS +=@LDFLAGS += ${LDFLAGS}@" \
-               -e "s@OCAMLFLAGS +=@OCAMLFLAGS +=${cflags}${lflags}@" \
+       sed     -e "s@\(OCAMLFLAGS= -w -A\)@\1 ${cflags}${lflags}@" \
+               -e "s@\(CFLAGS +=\) -g@\1 ${CFLAGS}\nLDFLAGS += ${LDFLAGS}@" \
                -i "${S}/source/OMakefile" \
                || die "Could not set flags in ${S}/teyjus/source/OMakefile"
+       if has_version ">=dev-lang/ocaml-4.03.0"; then
+               # bug 591368
+               pushd "${S}/source" || die
+               sed -e 's@$(FNT)/ccode_stubs@$(FNT)/ccode_stubs_c@' \
+                       -e 's@\(FNT_ML_TO_C\[\] =\)@\1\n    
$(FNT)/ccode_stubs@' \
+                       -i OMakefile || die
+               cd "${S}/source/front" || die
+               mv ccode_stubs.mli ccode_stubs.ml || die
+               mv ccode_stubs.c ccode_stubs_c.c || die
+               popd || die
+       fi
 }
 
 src_compile() {
@@ -77,7 +80,7 @@ src_install() {
        newbin source/tjdis.opt tjdis
        newbin source/tjlink.opt tjlink
        newbin source/tjsim.opt tjsim
-       dodoc README
+       dodoc README.md QUICKSTART
        if use emacs ; then
                elisp-install ${PN} emacs/*.{el,elc}
                cp "${FILESDIR}"/${SITEFILE} "${S}"

Reply via email to