1 |
commit: 5570cc427432efe0d2dec2f1054ee37ceb08492a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 14 04:29:26 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 14 04:52:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5570cc42 |
7 |
|
8 |
dev-libs/newt: fix libcrypt QA warning false positive |
9 |
|
10 |
* Fix LDFLAGS ordering (respect as-needed, similar to libxml2) |
11 |
* Fix configure with non-Bash (dash here) |
12 |
|
13 |
Closes: https://bugs.gentoo.org/798945 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
.../newt-0.52.21-fix-non-POSIX-backticks.patch | 27 +++++++++++++++++++ |
17 |
.../newt-0.52.21-makefile-LDFLAGS-ordering.patch | 30 ++++++++++++++++++++++ |
18 |
dev-libs/newt/newt-0.52.21-r1.ebuild | 14 ++++++---- |
19 |
3 files changed, 66 insertions(+), 5 deletions(-) |
20 |
|
21 |
diff --git a/dev-libs/newt/files/newt-0.52.21-fix-non-POSIX-backticks.patch b/dev-libs/newt/files/newt-0.52.21-fix-non-POSIX-backticks.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..3d6b87030dd |
24 |
--- /dev/null |
25 |
+++ b/dev-libs/newt/files/newt-0.52.21-fix-non-POSIX-backticks.patch |
26 |
@@ -0,0 +1,27 @@ |
27 |
+From a37a8c15f4653b4edea414f42a0d76f3b1f5652c Mon Sep 17 00:00:00 2001 |
28 |
+From: Sam James <sam@g.o> |
29 |
+Date: Wed, 14 Jul 2021 05:19:25 +0100 |
30 |
+Subject: [PATCH] Fix non-POSIX backticks |
31 |
+ |
32 |
+--- |
33 |
+ configure.ac | 4 ++-- |
34 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
35 |
+ |
36 |
+diff --git a/configure.ac b/configure.ac |
37 |
+index cb2b940..9ba4c64 100644 |
38 |
+--- a/configure.ac |
39 |
++++ b/configure.ac |
40 |
+@@ -23,8 +23,8 @@ AC_CHECK_SIZEOF([void *]) |
41 |
+ AC_MSG_CHECKING([for GNU ld]) |
42 |
+ LD=`$CC -print-prog-name=ld 2>&5` |
43 |
+ |
44 |
+-if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0 -a \ |
45 |
+- test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU gold"` = 0; then |
46 |
++if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0 -a \ |
47 |
++ $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU gold") = 0; then |
48 |
+ # Not |
49 |
+ GNU_LD="" |
50 |
+ AC_MSG_RESULT([no]) |
51 |
+-- |
52 |
+2.32.0 |
53 |
+ |
54 |
|
55 |
diff --git a/dev-libs/newt/files/newt-0.52.21-makefile-LDFLAGS-ordering.patch b/dev-libs/newt/files/newt-0.52.21-makefile-LDFLAGS-ordering.patch |
56 |
new file mode 100644 |
57 |
index 00000000000..f05075adb37 |
58 |
--- /dev/null |
59 |
+++ b/dev-libs/newt/files/newt-0.52.21-makefile-LDFLAGS-ordering.patch |
60 |
@@ -0,0 +1,30 @@ |
61 |
+From 22d44d2cbfcbec216d0028ebdf274247139a8045 Mon Sep 17 00:00:00 2001 |
62 |
+From: Sam James <sam@g.o> |
63 |
+Date: Wed, 14 Jul 2021 05:12:32 +0100 |
64 |
+Subject: [PATCH] Swap order of LDFLAGS and P*FLAGS |
65 |
+ |
66 |
+Needed to respect as-needed. |
67 |
+ |
68 |
+Bug: https://bugs.gentoo.org/798945 |
69 |
+--- |
70 |
+ Makefile.in | 4 ++-- |
71 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
72 |
+ |
73 |
+diff --git a/Makefile.in b/Makefile.in |
74 |
+index 1047efc..f0bc417 100644 |
75 |
+--- a/Makefile.in |
76 |
++++ b/Makefile.in |
77 |
+@@ -97,8 +97,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH) |
78 |
+ PLFLAGS=`$$pyconfig --libs`; \ |
79 |
+ echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ |
80 |
+ $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ |
81 |
+- echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ |
82 |
+- $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ |
83 |
++ echo $(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ |
84 |
++ $(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \ |
85 |
+ done || : |
86 |
+ touch $@ |
87 |
+ |
88 |
+-- |
89 |
+2.32.0 |
90 |
+ |
91 |
|
92 |
diff --git a/dev-libs/newt/newt-0.52.21-r1.ebuild b/dev-libs/newt/newt-0.52.21-r1.ebuild |
93 |
index 4eb95be8623..b2727a258f8 100644 |
94 |
--- a/dev-libs/newt/newt-0.52.21-r1.ebuild |
95 |
+++ b/dev-libs/newt/newt-0.52.21-r1.ebuild |
96 |
@@ -29,6 +29,14 @@ RDEPEND=" |
97 |
" |
98 |
DEPEND="${RDEPEND}" |
99 |
|
100 |
+PATCHES=( |
101 |
+ "${FILESDIR}"/${PN}-0.52.13-gold.patch |
102 |
+ "${FILESDIR}"/${PN}-0.52.14-tcl.patch |
103 |
+ "${FILESDIR}"/${PN}-0.52.21-python-sitedir.patch |
104 |
+ "${FILESDIR}"/${PN}-0.52.21-makefile-LDFLAGS-ordering.patch |
105 |
+ "${FILESDIR}"/${PN}-0.52.21-fix-non-POSIX-backticks.patch |
106 |
+) |
107 |
+ |
108 |
src_prepare() { |
109 |
# bug 73850 |
110 |
if use elibc_uclibc; then |
111 |
@@ -54,11 +62,7 @@ src_prepare() { |
112 |
|| die "sed po/Makefile" |
113 |
fi |
114 |
|
115 |
- eapply \ |
116 |
- "${FILESDIR}"/${PN}-0.52.13-gold.patch \ |
117 |
- "${FILESDIR}"/${PN}-0.52.14-tcl.patch \ |
118 |
- "${FILESDIR}"/${PN}-0.52.21-python-sitedir.patch |
119 |
- eapply_user |
120 |
+ default |
121 |
eautoreconf |
122 |
|
123 |
# can't build out-of-source |