1 |
commit: fed7eb00df36cec72f22422b72973fe1723d5d86 |
2 |
Author: John Helmert III <jchelmert3 <AT> posteo <DOT> net> |
3 |
AuthorDate: Sat Oct 10 03:15:13 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 10 04:58:29 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fed7eb00 |
7 |
|
8 |
media-gfx/sam2p: correct compiler configuration |
9 |
|
10 |
Closes: https://bugs.gentoo.org/746638 |
11 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
12 |
Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/17869 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
media-gfx/sam2p/files/sam2p-build-fixes.patch | 53 ++++++++++++++++++++++ |
17 |
media-gfx/sam2p/files/sam2p-configure-strip.patch | 30 ------------ |
18 |
...718.ebuild => sam2p-0.49.4_p20190718-r1.ebuild} | 8 ++-- |
19 |
3 files changed, 57 insertions(+), 34 deletions(-) |
20 |
|
21 |
diff --git a/media-gfx/sam2p/files/sam2p-build-fixes.patch b/media-gfx/sam2p/files/sam2p-build-fixes.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..6a1c8017512 |
24 |
--- /dev/null |
25 |
+++ b/media-gfx/sam2p/files/sam2p-build-fixes.patch |
26 |
@@ -0,0 +1,53 @@ |
27 |
+Make stripping configurable, correct CC/CXX/CFLAGS/CXXFLAGS handling, add |
28 |
+missing include |
29 |
+ |
30 |
+diff --git a/Makefile b/Makefile |
31 |
+index 1433167..38bb7cc 100644 |
32 |
+--- a/Makefile |
33 |
++++ b/Makefile |
34 |
+@@ -28,12 +28,13 @@ ifeq ($(MAKECMDGOALS),Makedep.force) |
35 |
+ MAKE_DIST=000 |
36 |
+ endif |
37 |
+ |
38 |
++GCC_STRIP ?= -s |
39 |
+ BASH=bash |
40 |
+ PERL_BADLANG=x |
41 |
+ export PERL_BADLANG |
42 |
+ |
43 |
+ CXXX=$(CXD_assert) |
44 |
+-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS) |
45 |
++LDALL=$(LDXX) $(GCC_STRIP) $(LDFLAGS) $(LIBS) |
46 |
+ ifeq ($(ENABLE_DEBUG), no) |
47 |
+ CXXX=$(CXD_no) |
48 |
+ endif |
49 |
+@@ -46,8 +47,8 @@ CXXX=$(CXD_checker) |
50 |
+ LDALL=checkerg++ $(LDFLAGS) $(LIBS) |
51 |
+ endif |
52 |
+ |
53 |
+-CXXALL=$(CXXX) $(CXXFLAGS) $(CXXFLAGSB) |
54 |
+-CCALL =$(CXXX) $(CXXFLAGS) $(CXXFLAGSB) |
55 |
++CXXALL=$(CXX) $(CXXFLAGS) $(CXXFLAGSB) |
56 |
++CCALL =$(CC) $(CFLAGS) $(CXXFLAGSB) |
57 |
+ CXDFAL=$(CXXFLAGS) $(CXXFLAGSB) $(LDFLAGS) $(LIBS) |
58 |
+ |
59 |
+ .PHONY: clean dist dist-noautoconf dist-more allclean distclean dist-install |
60 |
+@@ -67,7 +68,7 @@ ifeq ($(MAKE_DIST),) |
61 |
+ # |
62 |
+ # echo to config.h is needed to make config.h younger than config.h.in; |
63 |
+ # configure doesn't change the timestamp of config.h if it's unchanged. |
64 |
+- Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; ./configure MAKE=$(MAKE) --enable-gif --enable-lzw && echo "" >>config.h |
65 |
++ Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; |
66 |
+ Makehelp:; |
67 |
+ include Makehelp # Defines CXX. File generated by ./configure. |
68 |
+ include Makedep # Contains ALL+=... . |
69 |
+@@ -101,8 +102,8 @@ IDE_MODES := release debug |
70 |
+ IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS)) |
71 |
+ IDE_TARGETS_release := $(TARGETS) |
72 |
+ |
73 |
+-CXD_assert =$(CXX) -s -O2 |
74 |
+-CXD_no =$(CXX) -s -DNDEBUG -O3 |
75 |
++CXD_assert =$(CXX) $(GCC_STRIP) $(CXXFLAGS) |
76 |
++CXD_no =$(CXX) $(GCC_STRIP) $(CXXFLAGS) |
77 |
+ # CXD_yes =$(CXX) $(GFLAG) -lefence |
78 |
+ CXD_yes =$(CXX) $(GFLAG) |
79 |
+ CXD_checker=checkerg++ $(GFLAG) |
80 |
|
81 |
diff --git a/media-gfx/sam2p/files/sam2p-configure-strip.patch b/media-gfx/sam2p/files/sam2p-configure-strip.patch |
82 |
deleted file mode 100644 |
83 |
index be78fad0f73..00000000000 |
84 |
--- a/media-gfx/sam2p/files/sam2p-configure-strip.patch |
85 |
+++ /dev/null |
86 |
@@ -1,30 +0,0 @@ |
87 |
-diff --git a/Makefile b/Makefile |
88 |
-index 1433167..b662e33 100644 |
89 |
---- a/Makefile |
90 |
-+++ b/Makefile |
91 |
-@@ -28,12 +28,13 @@ ifeq ($(MAKECMDGOALS),Makedep.force) |
92 |
- MAKE_DIST=000 |
93 |
- endif |
94 |
- |
95 |
-+GCC_STRIP ?= -s |
96 |
- BASH=bash |
97 |
- PERL_BADLANG=x |
98 |
- export PERL_BADLANG |
99 |
- |
100 |
- CXXX=$(CXD_assert) |
101 |
--LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS) |
102 |
-+LDALL=$(LDXX) $(GCC_STRIP) $(LDFLAGS) $(LIBS) |
103 |
- ifeq ($(ENABLE_DEBUG), no) |
104 |
- CXXX=$(CXD_no) |
105 |
- endif |
106 |
-@@ -101,8 +102,8 @@ IDE_MODES := release debug |
107 |
- IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS)) |
108 |
- IDE_TARGETS_release := $(TARGETS) |
109 |
- |
110 |
--CXD_assert =$(CXX) -s -O2 |
111 |
--CXD_no =$(CXX) -s -DNDEBUG -O3 |
112 |
-+CXD_assert =$(CXX) $(GCC_STRIP) $(CXXFLAGS) |
113 |
-+CXD_no =$(CXX) $(GCC_STRIP) $(CXXFLAGS) |
114 |
- # CXD_yes =$(CXX) $(GFLAG) -lefence |
115 |
- CXD_yes =$(CXX) $(GFLAG) |
116 |
- CXD_checker=checkerg++ $(GFLAG) |
117 |
|
118 |
diff --git a/media-gfx/sam2p/sam2p-0.49.4_p20190718.ebuild b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild |
119 |
similarity index 84% |
120 |
rename from media-gfx/sam2p/sam2p-0.49.4_p20190718.ebuild |
121 |
rename to media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild |
122 |
index 2460983318f..e95883c8eca 100644 |
123 |
--- a/media-gfx/sam2p/sam2p-0.49.4_p20190718.ebuild |
124 |
+++ b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild |
125 |
@@ -21,7 +21,7 @@ BDEPEND="dev-lang/perl" |
126 |
|
127 |
S="${WORKDIR}/${PN}-${COMMIT}" |
128 |
|
129 |
-PATCHES=( "${FILESDIR}"/${PN}-configure-strip.patch ) |
130 |
+PATCHES=( "${FILESDIR}"/${PN}-build-fixes.patch ) |
131 |
|
132 |
src_prepare() { |
133 |
default |
134 |
@@ -29,15 +29,15 @@ src_prepare() { |
135 |
# configure.in files are deprecated |
136 |
mv configure.{in,ac} || die |
137 |
|
138 |
- # upstream thinks they're being helpful by running configure with `make` |
139 |
- sed -i '/Makedep/s/ .\/configure.*//' Makefile || die |
140 |
+ # missing include for memset |
141 |
+ sed -i '1s;^;#include <string.h>\n;' pts_defl.c |
142 |
|
143 |
# eautoreconf is still needed or you get bad warnings |
144 |
eautoreconf |
145 |
} |
146 |
|
147 |
src_configure() { |
148 |
- tc-export CXX |
149 |
+ tc-export CC CXX |
150 |
|
151 |
econf \ |
152 |
--enable-lzw \ |