public inbox for gentoo-proxy-maint@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-proxy-maint] [PATCH 1/2] app-shells/mksh: USE=static now uses the system libc
@ 2019-09-19 17:47 Haelwenn (lanodan) Monnier
  2019-09-19 17:47 ` [gentoo-proxy-maint] [PATCH 2/2] app-shells/mksh: Add USE=lksh Haelwenn (lanodan) Monnier
  2019-10-22 10:25 ` [gentoo-proxy-maint] [PATCH 1/2] app-shells/mksh: USE=static now uses the system libc Michał Górny
  0 siblings, 2 replies; 11+ messages in thread
From: Haelwenn (lanodan) Monnier @ 2019-09-19 17:47 UTC (permalink / raw
  To: gentoo-proxy-maint; +Cc: Haelwenn (lanodan) Monnier

Which means that glibc needs to be masked as it's static-linking is
broken.

I considered dietlibc as a replacement to klibc but:
- dietlibc is maintained-needed too
- it could be a elibc_glibc? in DEPEND but this would probably be a
noblah USE flag
- it would mean that arches where mksh is believed to work and some of
our libc do but not dietlibc or klibc (like alpha with bug #487672)
would be prevented from USE=static

Closes: https://bugs.gentoo.org/653388
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
---
 app-shells/mksh/mksh-57-r2.ebuild         | 49 +++++++++++++++++++++++
 app-shells/mksh/mksh-9999.ebuild          |  7 +---
 profiles/base/package.use.mask            |  4 ++
 profiles/features/musl/package.use.mask   |  3 ++
 profiles/features/uclibc/package.use.mask |  3 ++
 5 files changed, 61 insertions(+), 5 deletions(-)
 create mode 100644 app-shells/mksh/mksh-57-r2.ebuild

diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild
new file mode 100644
index 00000000000..cb6db11f38c
--- /dev/null
+++ b/app-shells/mksh/mksh-57-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+if [[ $PV = 9999 ]]; then
+	inherit cvs
+	ECVS_SERVER="anoncvs.mirbsd.org:/cvs"
+	ECVS_MODULE="mksh"
+	ECVS_USER="_anoncvs"
+	ECVS_AUTH="ext"
+	KEYWORDS=""
+else
+	SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="MirBSD Korn Shell"
+HOMEPAGE="http://mirbsd.de/mksh"
+LICENSE="BSD"
+SLOT="0"
+IUSE="static test"
+DEPEND="
+	test? (
+		dev-lang/perl
+		sys-apps/ed
+	)
+"
+S="${WORKDIR}/${PN}"
+
+src_compile() {
+	tc-export CC
+	if use static; then export LDSTATIC="-static"; fi
+	export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\""
+	sh Build.sh -r || die
+}
+
+src_install() {
+	into /
+	dobin mksh
+	doman mksh.1
+	dodoc dot.mkshrc
+}
+
+src_test() {
+	./test.sh -v || die
+}
diff --git a/app-shells/mksh/mksh-9999.ebuild b/app-shells/mksh/mksh-9999.ebuild
index 3aa638fe245..cb6db11f38c 100644
--- a/app-shells/mksh/mksh-9999.ebuild
+++ b/app-shells/mksh/mksh-9999.ebuild
@@ -14,7 +14,7 @@ if [[ $PV = 9999 ]]; then
 	KEYWORDS=""
 else
 	SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
-	KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
 fi
 
 DESCRIPTION="MirBSD Korn Shell"
@@ -22,9 +22,7 @@ HOMEPAGE="http://mirbsd.de/mksh"
 LICENSE="BSD"
 SLOT="0"
 IUSE="static test"
-RDEPEND="static? ( dev-libs/klibc )"
 DEPEND="
-	${RDEPEND}
 	test? (
 		dev-lang/perl
 		sys-apps/ed
@@ -34,8 +32,7 @@ S="${WORKDIR}/${PN}"
 
 src_compile() {
 	tc-export CC
-	# we want to build static with klibc
-	if use static; then export CC="/usr/bin/klcc"; export LDSTATIC="-static"; fi
+	if use static; then export LDSTATIC="-static"; fi
 	export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\""
 	sh Build.sh -r || die
 }
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 34da891f5c1..b46b9e1acc3 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -7,6 +7,10 @@
 # This file is only for generic masks. For arch-specific masks (i.e.
 # mask everywhere, unmask on arch/*) use arch/base.
 
+# Haelwenn (lanodan) Monnier <contact@hacktivis.me> (2019-09-19)
+# broken static-linking in glibc and maybe others
+>app-shells/mksh-57-r1 static
+
 # Craig Andrews <candrews@gentoo.org> (2019-09-12)
 # OpenSSL (as of version 1.1.1) doesn't have APIs for QUIC support
 # see https://github.com/openssl/openssl/pull/8797
diff --git a/profiles/features/musl/package.use.mask b/profiles/features/musl/package.use.mask
index 28e05a4e490..42fe7d31b2c 100644
--- a/profiles/features/musl/package.use.mask
+++ b/profiles/features/musl/package.use.mask
@@ -16,3 +16,6 @@ sys-fs/e2fsprogs nls
 # as a fail-only stub in musl. breaks horribly if enabled.
 # bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated)
 app-shells/bash mem-scramble
+
+# static linking works with musl
+app-shells/mksh -static
diff --git a/profiles/features/uclibc/package.use.mask b/profiles/features/uclibc/package.use.mask
index eb7b5dc0216..b00ae69a84a 100644
--- a/profiles/features/uclibc/package.use.mask
+++ b/profiles/features/uclibc/package.use.mask
@@ -22,3 +22,6 @@ dev-util/geany-plugins gtkspell
 # 'append-libs', but xfsdump's build system doesn't honor $LIBS.
 # So this is the best way for now.  See 570548.
 sys-fs/xfsdump nls
+
+# static linking works with uClibc
+app-shells/mksh -static
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-01 23:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 17:47 [gentoo-proxy-maint] [PATCH 1/2] app-shells/mksh: USE=static now uses the system libc Haelwenn (lanodan) Monnier
2019-09-19 17:47 ` [gentoo-proxy-maint] [PATCH 2/2] app-shells/mksh: Add USE=lksh Haelwenn (lanodan) Monnier
2019-10-22 10:27   ` Michał Górny
2019-10-22 17:02     ` [gentoo-proxy-maint] [PATCH v2 1/2] app-shells/mksh: USE=static now uses the system libc Haelwenn (lanodan) Monnier
2019-10-22 17:02       ` [gentoo-proxy-maint] [PATCH v2 2/2] app-shells/mksh: Add USE=lksh Haelwenn (lanodan) Monnier
2019-10-23 18:23       ` [gentoo-proxy-maint] [PATCH v2 1/2] app-shells/mksh: USE=static now uses the system libc Michał Górny
2019-11-25  7:27         ` [gentoo-proxy-maint] [PATCH v3 " Haelwenn (lanodan) Monnier
2019-11-25  7:27           ` [gentoo-proxy-maint] [PATCH v3 2/2] app-shells/mksh: Add USE=lksh Haelwenn (lanodan) Monnier
2019-12-01 23:23             ` Michał Górny
2019-10-22 10:25 ` [gentoo-proxy-maint] [PATCH 1/2] app-shells/mksh: USE=static now uses the system libc Michał Górny
2019-10-22 16:38   ` Haelwenn (lanodan) Monnier

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