diff options
author | Jakov Smolic <jakov.smolic@sartura.hr> | 2021-02-17 10:36:10 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-02-17 10:36:10 +0100 |
commit | a7c3ce7ad6d180012f9917bd51724ae31d32194f (patch) | |
tree | 4e491ca814555898d47e673aa5e9c18ea511ff45 /dev-lang/snobol | |
parent | dev-embedded/avra: Remove old (diff) | |
download | gentoo-a7c3ce7ad6d180012f9917bd51724ae31d32194f.tar.gz gentoo-a7c3ce7ad6d180012f9917bd51724ae31d32194f.tar.bz2 gentoo-a7c3ce7ad6d180012f9917bd51724ae31d32194f.zip |
dev-lang/snobol: Port to EAPI 7
Closes: https://bugs.gentoo.org/712278
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-lang/snobol')
-rw-r--r-- | dev-lang/snobol/files/snobol-1.4.1-fno-common.patch | 31 | ||||
-rw-r--r-- | dev-lang/snobol/metadata.xml | 8 | ||||
-rw-r--r-- | dev-lang/snobol/snobol-1.4.1-r1.ebuild (renamed from dev-lang/snobol/snobol-1.4.1.ebuild) | 41 |
3 files changed, 56 insertions, 24 deletions
diff --git a/dev-lang/snobol/files/snobol-1.4.1-fno-common.patch b/dev-lang/snobol/files/snobol-1.4.1-fno-common.patch new file mode 100644 index 000000000000..8814867c2ae7 --- /dev/null +++ b/dev-lang/snobol/files/snobol-1.4.1-fno-common.patch @@ -0,0 +1,31 @@ +--- a/include/macros.h ++++ b/include/macros.h +@@ -192,7 +192,7 @@ extern volatile int math_error; + #define RETURN(VALUE) {RSTSTK(); return (VALUE);} + #endif /* TRACE_DEPTH not defined */ + +-struct descr _NORET[1]; ++extern struct descr _NORET[1]; + #define NORET ((ptr_t)_NORET) + + /****************/ +--- a/isnobol4.c ++++ b/isnobol4.c +@@ -4,6 +4,7 @@ + + # include "mlink.h" + # include "parms.h" ++extern struct descr _NORET[1]; + static int + ENDALL(retval) + ret_t retval; +--- a/main.c ++++ b/main.c +@@ -46,6 +46,7 @@ struct vars *varp; + const char vers[] = VERSION; + const char vdate[] = VERSION_DATE; + const char snoname[] = "CSNOBOL4"; ++struct descr _NORET[1]; + + int + main(argc, argv) diff --git a/dev-lang/snobol/metadata.xml b/dev-lang/snobol/metadata.xml index a4e0d354f696..4073267daf2a 100644 --- a/dev-lang/snobol/metadata.xml +++ b/dev-lang/snobol/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>robbat2@gentoo.org</email> - <name>Robin H. Johnson</name> - </maintainer> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> </pkgmetadata> diff --git a/dev-lang/snobol/snobol-1.4.1.ebuild b/dev-lang/snobol/snobol-1.4.1-r1.ebuild index 24b2727cb01f..d213113e1228 100644 --- a/dev-lang/snobol/snobol-1.4.1.ebuild +++ b/dev-lang/snobol/snobol-1.4.1-r1.ebuild @@ -1,10 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -MY_P="${PN}4-${PV}" +inherit toolchain-funcs +MY_P="${PN}4-${PV}" DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines" HOMEPAGE="http://www.snobol4.org/csnobol4/" SRC_URI="ftp://ftp.snobol4.org/snobol/old/${MY_P}.tar.gz" @@ -14,39 +15,39 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc" -DEPEND=" - sys-devel/gcc - sys-devel/m4 - sys-libs/gdbm[berkdb] -" -S=${WORKDIR}/${MY_P} +DEPEND="sys-libs/gdbm[berkdb]" +RDEPEND="${DEPEND}" +BDEPEND="sys-devel/m4" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) src_prepare() { - sed -e '/autoconf/s:autoconf:./autoconf:g' \ - -i configure || die 'autoconf sed failed' - sed -e 's/$(INSTALL) -s/$(INSTALL)/' \ - -i Makefile2.m4 || die 'strip sed failed' - echo "ADD_OPT([${CFLAGS}])" >>${S}/local-config - echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >>${S}/local-config - echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >>${S}/local-config + default + sed -i -e '/autoconf/s:autoconf:./autoconf:g' configure || die + sed -i -e 's/$(INSTALL) -s/$(INSTALL)/' Makefile2.m4 || die + echo "ADD_OPT([${CFLAGS}])" >> local-config || die + echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >> local-config || die + echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >> local-config || die # this cannot work and will cause funny sandbox violations sed -i -e 's~/usr/bin/emerge info~~' timing || die "Failed to exorcise the sandbox violations" } src_configure() { + tc-export CC ./configure --prefix="${EPREFIX}/usr" \ --snolibdir="${EPREFIX}/usr/lib/snobol4" \ --mandir="${EPREFIX}/usr/share/man" \ - --add-cflags="${CFLAGS}" + --add-cflags="${CFLAGS}" || die } src_install() { emake DESTDIR="${D}" install - rm "${ED%/}"/usr/lib/snobol4/{load.txt,README} + rm "${ED}"/usr/lib/snobol4/{load.txt,README} || die dodoc doc/*txt - - use doc && dohtml doc/*html + use doc && dodoc -r doc/*html } |