public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-shells/scsh/files/, app-shells/scsh/, profiles/arch/amd64/no-multilib/
@ 2021-12-31  0:31 Maciej Barć
  0 siblings, 0 replies; only message in thread
From: Maciej Barć @ 2021-12-31  0:31 UTC (permalink / raw
  To: gentoo-commits

commit:     93fbed6e982f91eb32076fbf42c017cfcdd6c7ac
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 31 00:11:18 2021 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Dec 31 00:31:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93fbed6e

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 <AT> 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 <AT> gentoo.org>

 app-shells/scsh/files/0.6.7-Makefile.in-AR.patch   | 26 ++++++++++
 ...0.6.7-scheme48vm-prelude.h-SMALL_MULTIPLY.patch | 11 ++++
 app-shells/scsh/scsh-0.6.7-r2.ebuild               | 47 ------------------
 app-shells/scsh/scsh-0.6.7-r3.ebuild               | 58 ++++++++++++++++++++++
 profiles/arch/amd64/no-multilib/package.mask       |  1 +
 5 files changed, 96 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}"
+}

diff --git a/profiles/arch/amd64/no-multilib/package.mask b/profiles/arch/amd64/no-multilib/package.mask
index e4411cb89cb1..8ceefa57faa7 100644
--- a/profiles/arch/amd64/no-multilib/package.mask
+++ b/profiles/arch/amd64/no-multilib/package.mask
@@ -31,6 +31,7 @@ app-emulation/crossover-bin
 app-emulation/protontricks
 app-emulation/q4wine
 app-emulation/winetricks
+<=app-shells/scsh-0.6.9
 dev-embedded/libftd2xx
 dev-embedded/openocd
 dev-util/android-ndk


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-31  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-31  0:31 [gentoo-commits] repo/gentoo:master commit in: app-shells/scsh/files/, app-shells/scsh/, profiles/arch/amd64/no-multilib/ Maciej Barć

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox