diff options
author | Mark Wright <gienah@gentoo.org> | 2017-01-11 23:28:57 +1100 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2017-01-11 23:28:57 +1100 |
commit | 301cf07863551d5e8b1ddaa51b4ac73081f040c6 (patch) | |
tree | 1921784896000e28306e716244feac4a9c7b2b14 /dev-lang | |
parent | app-emulation/docker: Remove old (diff) | |
download | gentoo-301cf07863551d5e8b1ddaa51b4ac73081f040c6.tar.gz gentoo-301cf07863551d5e8b1ddaa51b4ac73081f040c6.tar.bz2 gentoo-301cf07863551d5e8b1ddaa51b4ac73081f040c6.zip |
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
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/teyjus/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/teyjus/teyjus-2.0.2.ebuild | 26 | ||||
-rw-r--r-- | dev-lang/teyjus/teyjus-2.1.ebuild | 111 |
3 files changed, 130 insertions, 8 deletions
diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest index 722e1eb2bf6c..3567b49c3691 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 bb03ce157141..65c04a8c019e 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.1.ebuild b/dev-lang/teyjus/teyjus-2.1.ebuild new file mode 100644 index 000000000000..3a068638898d --- /dev/null +++ b/dev-lang/teyjus/teyjus-2.1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +inherit elisp-common multilib versionator + +DESCRIPTION="Higher-order logic programming language Lambda Prolog" +HOMEPAGE="http://teyjus.cs.umn.edu/" +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:* + >=dev-lang/ocaml-3.10[ocamlopt?] + emacs? ( virtual/emacs )" +DEPEND="${RDEPEND} + dev-util/omake" + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + default + local cflags="" + for i in ${CFLAGS} + do + cflags="${cflags} -ccopt ${i}" + done + local lflags="" + for i in ${LDFLAGS} + do + lflags="${lflags} -cclib ${i}" + done + 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() { + addpredict "/usr/$(get_libdir)/omake/Pervasives.omc" + addpredict "/usr/$(get_libdir)/omake/build/C.omc" + addpredict "/usr/$(get_libdir)/omake/build/Common.omc" + addpredict "/usr/$(get_libdir)/omake/configure/Configure.omc" + addpredict "/usr/$(get_libdir)/omake/build/OCaml.omc" + omake --verbose all || die "omake all failed" + if use emacs ; then + pushd "${S}/emacs" || die "Could change directory to emacs" + elisp-compile *.el || die "emacs elisp compile failed" + popd + fi +} + +ins_example_dir() { + dodir "/usr/share/${PN}/examples/${1}" + insinto "/usr/share/${PN}/examples/${1}" + cd "${S}/examples/${1}" + doins * +} + +src_install() { + newbin source/tjcc.opt tjcc + newbin source/tjdepend.opt tjdepend + newbin source/tjdis.opt tjdis + newbin source/tjlink.opt tjlink + newbin source/tjsim.opt tjsim + dodoc README.md QUICKSTART + if use emacs ; then + elisp-install ${PN} emacs/*.{el,elc} + cp "${FILESDIR}"/${SITEFILE} "${S}" + sed -e 's@/usr/bin/tjcc@'${EPREFIX}/usr/bin/tjcc'@' -i ${SITEFILE} \ + || die "Could not set tjcc executable path in emacs site file" + elisp-site-file-install ${SITEFILE} + fi + if use examples; then + ins_example_dir "handbook/logic" + ins_example_dir "handbook/progs" + ins_example_dir "misc" + ins_example_dir "ndprover" + ins_example_dir "pcf" + fi +} + +pkg_postinst() { + if use emacs; then + elisp-site-regen + ewarn "For teyjus emacs, add this line to ~/.emacs" + ewarn "" + ewarn "(require 'teyjus)" + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |