1 |
Which means that glibc needs to be masked as it's static-linking is |
2 |
broken. |
3 |
|
4 |
I considered dietlibc as a replacement to klibc but: |
5 |
- dietlibc is maintained-needed too |
6 |
- it could be a elibc_glibc? in DEPEND but this would probably be a |
7 |
noblah USE flag |
8 |
- it would mean that arches where mksh is believed to work and some of |
9 |
our libc do but not dietlibc or klibc (like alpha with bug #487672) |
10 |
would be prevented from USE=static |
11 |
|
12 |
Closes: https://bugs.gentoo.org/653388 |
13 |
Signed-off-by: Haelwenn (lanodan) Monnier <contact@×××××××××.me> |
14 |
--- |
15 |
app-shells/mksh/mksh-57-r2.ebuild | 49 +++++++++++++++++++++++ |
16 |
app-shells/mksh/mksh-9999.ebuild | 7 +--- |
17 |
profiles/base/package.use.mask | 4 ++ |
18 |
profiles/features/musl/package.use.mask | 3 ++ |
19 |
profiles/features/uclibc/package.use.mask | 3 ++ |
20 |
5 files changed, 61 insertions(+), 5 deletions(-) |
21 |
create mode 100644 app-shells/mksh/mksh-57-r2.ebuild |
22 |
|
23 |
diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..cb6db11f38c |
26 |
--- /dev/null |
27 |
+++ b/app-shells/mksh/mksh-57-r2.ebuild |
28 |
@@ -0,0 +1,49 @@ |
29 |
+# Copyright 1999-2019 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=7 |
33 |
+ |
34 |
+inherit toolchain-funcs |
35 |
+ |
36 |
+if [[ $PV = 9999 ]]; then |
37 |
+ inherit cvs |
38 |
+ ECVS_SERVER="anoncvs.mirbsd.org:/cvs" |
39 |
+ ECVS_MODULE="mksh" |
40 |
+ ECVS_USER="_anoncvs" |
41 |
+ ECVS_AUTH="ext" |
42 |
+ KEYWORDS="" |
43 |
+else |
44 |
+ SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" |
45 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
46 |
+fi |
47 |
+ |
48 |
+DESCRIPTION="MirBSD Korn Shell" |
49 |
+HOMEPAGE="http://mirbsd.de/mksh" |
50 |
+LICENSE="BSD" |
51 |
+SLOT="0" |
52 |
+IUSE="static test" |
53 |
+DEPEND=" |
54 |
+ test? ( |
55 |
+ dev-lang/perl |
56 |
+ sys-apps/ed |
57 |
+ ) |
58 |
+" |
59 |
+S="${WORKDIR}/${PN}" |
60 |
+ |
61 |
+src_compile() { |
62 |
+ tc-export CC |
63 |
+ if use static; then export LDSTATIC="-static"; fi |
64 |
+ export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\"" |
65 |
+ sh Build.sh -r || die |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ into / |
70 |
+ dobin mksh |
71 |
+ doman mksh.1 |
72 |
+ dodoc dot.mkshrc |
73 |
+} |
74 |
+ |
75 |
+src_test() { |
76 |
+ ./test.sh -v || die |
77 |
+} |
78 |
diff --git a/app-shells/mksh/mksh-9999.ebuild b/app-shells/mksh/mksh-9999.ebuild |
79 |
index 3aa638fe245..cb6db11f38c 100644 |
80 |
--- a/app-shells/mksh/mksh-9999.ebuild |
81 |
+++ b/app-shells/mksh/mksh-9999.ebuild |
82 |
@@ -14,7 +14,7 @@ if [[ $PV = 9999 ]]; then |
83 |
KEYWORDS="" |
84 |
else |
85 |
SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" |
86 |
- KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" |
87 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
88 |
fi |
89 |
|
90 |
DESCRIPTION="MirBSD Korn Shell" |
91 |
@@ -22,9 +22,7 @@ HOMEPAGE="http://mirbsd.de/mksh" |
92 |
LICENSE="BSD" |
93 |
SLOT="0" |
94 |
IUSE="static test" |
95 |
-RDEPEND="static? ( dev-libs/klibc )" |
96 |
DEPEND=" |
97 |
- ${RDEPEND} |
98 |
test? ( |
99 |
dev-lang/perl |
100 |
sys-apps/ed |
101 |
@@ -34,8 +32,7 @@ S="${WORKDIR}/${PN}" |
102 |
|
103 |
src_compile() { |
104 |
tc-export CC |
105 |
- # we want to build static with klibc |
106 |
- if use static; then export CC="/usr/bin/klcc"; export LDSTATIC="-static"; fi |
107 |
+ if use static; then export LDSTATIC="-static"; fi |
108 |
export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\"" |
109 |
sh Build.sh -r || die |
110 |
} |
111 |
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask |
112 |
index 34da891f5c1..b46b9e1acc3 100644 |
113 |
--- a/profiles/base/package.use.mask |
114 |
+++ b/profiles/base/package.use.mask |
115 |
@@ -7,6 +7,10 @@ |
116 |
# This file is only for generic masks. For arch-specific masks (i.e. |
117 |
# mask everywhere, unmask on arch/*) use arch/base. |
118 |
|
119 |
+# Haelwenn (lanodan) Monnier <contact@×××××××××.me> (2019-09-19) |
120 |
+# broken static-linking in glibc and maybe others |
121 |
+>app-shells/mksh-57-r1 static |
122 |
+ |
123 |
# Craig Andrews <candrews@g.o> (2019-09-12) |
124 |
# OpenSSL (as of version 1.1.1) doesn't have APIs for QUIC support |
125 |
# see https://github.com/openssl/openssl/pull/8797 |
126 |
diff --git a/profiles/features/musl/package.use.mask b/profiles/features/musl/package.use.mask |
127 |
index 28e05a4e490..42fe7d31b2c 100644 |
128 |
--- a/profiles/features/musl/package.use.mask |
129 |
+++ b/profiles/features/musl/package.use.mask |
130 |
@@ -16,3 +16,6 @@ sys-fs/e2fsprogs nls |
131 |
# as a fail-only stub in musl. breaks horribly if enabled. |
132 |
# bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated) |
133 |
app-shells/bash mem-scramble |
134 |
+ |
135 |
+# static linking works with musl |
136 |
+app-shells/mksh -static |
137 |
diff --git a/profiles/features/uclibc/package.use.mask b/profiles/features/uclibc/package.use.mask |
138 |
index eb7b5dc0216..b00ae69a84a 100644 |
139 |
--- a/profiles/features/uclibc/package.use.mask |
140 |
+++ b/profiles/features/uclibc/package.use.mask |
141 |
@@ -22,3 +22,6 @@ dev-util/geany-plugins gtkspell |
142 |
# 'append-libs', but xfsdump's build system doesn't honor $LIBS. |
143 |
# So this is the best way for now. See 570548. |
144 |
sys-fs/xfsdump nls |
145 |
+ |
146 |
+# static linking works with uClibc |
147 |
+app-shells/mksh -static |
148 |
-- |
149 |
2.21.0 |