diff options
author | Maciej Barć <xgqt@gentoo.org> | 2021-12-31 01:11:18 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2021-12-31 01:31:22 +0100 |
commit | 93fbed6e982f91eb32076fbf42c017cfcdd6c7ac (patch) | |
tree | 98bc58c0405e7d20b4dabdadc10b0c3cf8276d2e /app-shells | |
parent | app-admin/supervisor: drop 4.2.0, 4.2.1 (diff) | |
download | gentoo-93fbed6e982f91eb32076fbf42c017cfcdd6c7ac.tar.gz gentoo-93fbed6e982f91eb32076fbf42c017cfcdd6c7ac.tar.bz2 gentoo-93fbed6e982f91eb32076fbf42c017cfcdd6c7ac.zip |
app-shells/scsh: build only on 32bit arches; tests; format
libcrypt/GCC not being 32bit/multilib bugs:
- https://bugs.gentoo.org/589122
- https://bugs.gentoo.org/710570
- https://bugs.gentoo.org/830282
Thanks for patches:
- SCSH_LIB_DIRS environment variable:
adam@michalik.es
https://bugs.gentoo.org/413791#c0
- scheme48vm-prelude (for tests)
https://bugs.gentoo.org/299414#c2
Closes: https://bugs.gentoo.org/299414
Closes: https://bugs.gentoo.org/413791
Closes: https://bugs.gentoo.org/589122
Closes: https://bugs.gentoo.org/710570
Closes: https://bugs.gentoo.org/722442
Closes: https://bugs.gentoo.org/830282
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/scsh/files/0.6.7-Makefile.in-AR.patch | 26 | ||||
-rw-r--r-- | app-shells/scsh/files/0.6.7-scheme48vm-prelude.h-SMALL_MULTIPLY.patch | 11 | ||||
-rw-r--r-- | app-shells/scsh/scsh-0.6.7-r2.ebuild | 47 | ||||
-rw-r--r-- | app-shells/scsh/scsh-0.6.7-r3.ebuild | 58 |
4 files changed, 95 insertions, 47 deletions
diff --git a/app-shells/scsh/files/0.6.7-Makefile.in-AR.patch b/app-shells/scsh/files/0.6.7-Makefile.in-AR.patch new file mode 100644 index 000000000000..b5dfea96b998 --- /dev/null +++ b/app-shells/scsh/files/0.6.7-Makefile.in-AR.patch @@ -0,0 +1,26 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -259,12 +259,12 @@ $(VM): c/main.o $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) + $(LIBCIG): c/main.o $(OBJS) + # $(CC) -r -o $@ main.o $(OBJS) + $(RM) $@ +- $(AR) $@ c/main.o $(OBJS) ++ $(AR) qc $@ c/main.o $(OBJS) + $(RANLIB) $@ + + $(LIBSCSHVM): c/smain.o $(OBJS) + $(RM) $@ +- $(AR) $@ c/smain.o $(OBJS) ++ $(AR) qc $@ c/smain.o $(OBJS) + $(RANLIB) $@ + + $(LIBSCSH): $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) +@@ -274,7 +274,7 @@ $(LIBSCSH): $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) + $(EXTERNAL_INITIALIZERS) && \ + $(CC) -c $(CFLAGS) -o /tmp/s48_external_$$$$.o \ + /tmp/s48_external_$$$$.c && \ +- $(AR) $@ $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) \ ++ $(AR) qc $@ $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) \ + /tmp/s48_external_$$$$.o && \ + $(RANLIB) $@ && \ + rm -f /tmp/s48_external_$$$$.c /tmp/s48_external_$$$$.o diff --git a/app-shells/scsh/files/0.6.7-scheme48vm-prelude.h-SMALL_MULTIPLY.patch b/app-shells/scsh/files/0.6.7-scheme48vm-prelude.h-SMALL_MULTIPLY.patch new file mode 100644 index 000000000000..98c904a67e9f --- /dev/null +++ b/app-shells/scsh/files/0.6.7-scheme48vm-prelude.h-SMALL_MULTIPLY.patch @@ -0,0 +1,11 @@ +--- a/c/scheme48vm-prelude.h ++++ b/c/scheme48vm-prelude.h +@@ -5,7 +5,7 @@ + #include "c-mods.h" + #include "write-barrier.h" + +-#define SMALL_MULTIPLY(x,y) ((x) * (y)) ++#define SMALL_MULTIPLY(x,y) ((long)((unsigned long)(x) * (unsigned long)(y))) + + #define NO_ERRORS 0 /* extension to errno.h */ + diff --git a/app-shells/scsh/scsh-0.6.7-r2.ebuild b/app-shells/scsh/scsh-0.6.7-r2.ebuild deleted file mode 100644 index 170f8f2f1eac..000000000000 --- a/app-shells/scsh/scsh-0.6.7-r2.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit multilib - -MY_PV="${PV%*.*}" - -DESCRIPTION="Unix shell embedded in Scheme" -HOMEPAGE="http://www.scsh.net/" -SRC_URI="ftp://ftp.scsh.net/pub/scsh/${MY_PV}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 ppc sparc x86" - -DEPEND="!dev-scheme/scheme48" -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}/${PV}-Makefile.in-doc-dir-gentoo.patch" - "${FILESDIR}/${PV}-Makefile.in-LDFLAGS.patch" - "${FILESDIR}/${PV}-Missing-includes.patch" -) - -RESTRICT="test" # some tests don't pass. - -src_prepare() { - default -} - -src_configure() { - use amd64 && multilib_toolchain_setup x86 - SCSH_LIB_DIRS="/usr/$(get_libdir)/${PN}" - econf \ - --libdir=/usr/$(get_libdir) \ - --includedir=/usr/include \ - --with-lib-dirs-list=${SCSH_LIB_DIRS} -} - -src_install() { - emake -j1 DESTDIR="${D}" install - local ENVD="${T}/50scsh" - echo "SCSH_LIB_DIRS=\"${SCSH_LIB_DIRS}\"" > "${ENVD}" || die - doenvd "${ENVD}" -} diff --git a/app-shells/scsh/scsh-0.6.7-r3.ebuild b/app-shells/scsh/scsh-0.6.7-r3.ebuild new file mode 100644 index 000000000000..26d0d047d90b --- /dev/null +++ b/app-shells/scsh/scsh-0.6.7-r3.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# NOTICE: SCSH 0.6.7 is 32bit only +# https://bugs.gentoo.org/589122#c6 + +EAPI=8 + +inherit multilib + +MY_PV="${PV%*.*}" + +DESCRIPTION="Unix shell embedded in Scheme" +HOMEPAGE="https://www.scsh.net/" +SRC_URI="ftp://ftp.scsh.net/pub/scsh/${MY_PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc sparc x86" + +RDEPEND=" + !dev-scheme/scheme48 + virtual/libcrypt:= + amd64? ( virtual/libcrypt:=[abi_x86_32] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PV}-Makefile.in-AR.patch + "${FILESDIR}"/${PV}-Makefile.in-LDFLAGS.patch + "${FILESDIR}"/${PV}-Makefile.in-doc-dir-gentoo.patch + "${FILESDIR}"/${PV}-Missing-includes.patch + "${FILESDIR}"/${PV}-scheme48vm-prelude.h-SMALL_MULTIPLY.patch +) + +src_configure() { + use amd64 && multilib_toolchain_setup x86 + + export SCSH_LIB_DIRS="/usr/$(get_libdir)/${PN}" + + local myconf=( + --includedir=/usr/include + --libdir=/usr/$(get_libdir) + --with-lib-dirs-list=${SCSH_LIB_DIRS} + ) + econf "${myconf[@]}" +} + +src_install() { + emake -j1 DESTDIR="${D}" install + + # Fix doc install dir + mv "${ED}/usr/share/doc/${PN}-${PV}" "${ED}/usr/share/doc/${PF}" || die + + local ENVD="${T}/50scsh" + echo "SCSH_LIB_DIRS='\"${SCSH_LIB_DIRS}\"'" > "${ENVD}" || die + doenvd "${ENVD}" +} |