1 |
commit: 1bd791dae28b9af2b3e933939335a53fa303cfc9 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 30 20:37:20 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 20:37:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bd791da |
7 |
|
8 |
media-libs/freetype: Fixed build with sys-devel/slibtool |
9 |
|
10 |
Closes: https://bugs.gentoo.org/775881 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../freetype-2.10.4-dont_hardcode_libtool.patch | 42 ++++++++++++++++ |
14 |
.../files/freetype-2.10.4-slibtool_build_fix.patch | 40 +++++++++++++++ |
15 |
.../files/ft2demos-2.10.4-install_target.patch | 58 ++++++++++++++++++++++ |
16 |
media-libs/freetype/freetype-2.10.4.ebuild | 16 +++--- |
17 |
4 files changed, 148 insertions(+), 8 deletions(-) |
18 |
|
19 |
diff --git a/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch b/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..310b5aaca93 |
22 |
--- /dev/null |
23 |
+++ b/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch |
24 |
@@ -0,0 +1,42 @@ |
25 |
+From 597566b2301deeff4e9832aebdab1bf659a2accf Mon Sep 17 00:00:00 2001 |
26 |
+From: orbea <orbea@××××××.net> |
27 |
+Date: Mon, 22 Mar 2021 16:15:37 -0700 |
28 |
+Subject: [PATCH] * Makefile, mac/Makefile (LINK_CMD): Don't hard-code |
29 |
+ `libtool`. |
30 |
+ |
31 |
+--- |
32 |
+ Makefile | 3 +-- |
33 |
+ mac/Makefile | 3 +-- |
34 |
+ 2 files changed, 2 insertions(+), 4 deletions(-) |
35 |
+ |
36 |
+diff --git a/Makefile b/Makefile |
37 |
+index 810142f..949402f 100644 |
38 |
+--- a/Makefile |
39 |
++++ b/Makefile |
40 |
+@@ -165,8 +165,7 @@ else |
41 |
+ |
42 |
+ ifeq ($(PLATFORM),unix) |
43 |
+ override CC = $(CCraw) |
44 |
+- LINK_CMD = $(subst /,$(SEP),$(OBJ_BUILD)/libtool) \ |
45 |
+- --mode=link $(CC) \ |
46 |
++ LINK_CMD = $(LIBTOOL) --mode=link $(CC) \ |
47 |
+ $(subst /,$(COMPILER_SEP),$(LDFLAGS)) |
48 |
+ LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(LIB_CLOCK_GETTIME) |
49 |
+ else |
50 |
+diff --git a/mac/Makefile b/mac/Makefile |
51 |
+index 73ae99c..52038a4 100644 |
52 |
+--- a/mac/Makefile |
53 |
++++ b/mac/Makefile |
54 |
+@@ -68,8 +68,7 @@ else |
55 |
+ LINK_ITEMS = $T$(subst /,$(COMPILER_SEP),$@ $<) |
56 |
+ |
57 |
+ CC = $(CCraw) |
58 |
+- LINK_CMD = $(subst /,$(SEP),$(OBJ_BUILD)/libtool) \ |
59 |
+- --mode=link $(CC) \ |
60 |
++ LINK_CMD = $(LIBTOOL) --mode=link $(CC) \ |
61 |
+ $(subst /,$(COMPILER_SEP),$(LDFLAGS)) |
62 |
+ ifeq ($(findstring CoreServices,$(LDFLAGS)),) |
63 |
+ LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(MATH) \ |
64 |
+-- |
65 |
+GitLab |
66 |
+ |
67 |
|
68 |
diff --git a/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch b/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch |
69 |
new file mode 100644 |
70 |
index 00000000000..895a86c444d |
71 |
--- /dev/null |
72 |
+++ b/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch |
73 |
@@ -0,0 +1,40 @@ |
74 |
+From 8e9447b32dae7e6c95bee3f878ee1877f9b628a4 Mon Sep 17 00:00:00 2001 |
75 |
+From: orbea <orbea@××××××.net> |
76 |
+Date: Mon, 22 Mar 2021 16:15:09 -0700 |
77 |
+Subject: [PATCH] [graph] Fix build with `slibtool`. |
78 |
+ |
79 |
+* graph/rules.mk (GRAPH_LIB): Handle the case specially where |
80 |
+`LIBTOOL` is defined. |
81 |
+(COMPILE_GRAPH_LIB) <LIBTOOL>: Enable use of `dlopen`. |
82 |
+--- |
83 |
+ rules.mk | 5 +++-- |
84 |
+ 1 file changed, 3 insertions(+), 2 deletions(-) |
85 |
+ |
86 |
+diff --git a/graph/rules.mk b/graph/rules.mk |
87 |
+index 4903a38..a3f0de1 100644 |
88 |
+--- a/graph/rules.mk |
89 |
++++ b/graph/rules.mk |
90 |
+@@ -12,7 +12,6 @@ |
91 |
+ |
92 |
+ |
93 |
+ GRAPH_INCLUDES := $(subst /,$(COMPILER_SEP),$(TOP_DIR_2)/graph) |
94 |
+-GRAPH_LIB := $(OBJ_DIR_2)/graph.$(SA) |
95 |
+ |
96 |
+ GRAPH := $(TOP_DIR_2)/graph |
97 |
+ |
98 |
+@@ -46,9 +45,11 @@ GRAPH_OBJS := $(OBJ_DIR_2)/gblblit.$(O) \ |
99 |
+ # this value can be modified by the system-specific graphics drivers. |
100 |
+ # |
101 |
+ ifneq ($(LIBTOOL),) |
102 |
+- COMPILE_GRAPH_LIB = $(LIBTOOL) --mode=link $(CCraw) -static \ |
103 |
++ GRAPH_LIB := $(OBJ_DIR_2)/graph.$(A) |
104 |
++ COMPILE_GRAPH_LIB = $(LIBTOOL) --mode=link $(CCraw) -module -static \ |
105 |
+ -o $(subst /,$(COMPILER_SEP),$@ $(GRAPH_OBJS)) |
106 |
+ else |
107 |
++ GRAPH_LIB := $(OBJ_DIR_2)/graph.$(SA) |
108 |
+ COMPILE_GRAPH_LIB = ar -r $(subst /,$(COMPILER_SEP),$@ $(GRAPH_OBJS)) |
109 |
+ endif |
110 |
+ |
111 |
+-- |
112 |
+GitLab |
113 |
+ |
114 |
|
115 |
diff --git a/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch b/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch |
116 |
new file mode 100644 |
117 |
index 00000000000..f3d7f8de43e |
118 |
--- /dev/null |
119 |
+++ b/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch |
120 |
@@ -0,0 +1,58 @@ |
121 |
+From b88cd2f027e77bd26d1334fc13c4eda796423d19 Mon Sep 17 00:00:00 2001 |
122 |
+From: orbea <orbea@××××××.net> |
123 |
+Date: Wed, 24 Mar 2021 09:04:41 -0700 |
124 |
+Subject: [PATCH] [build] Add an `install` target for binaries and man pages. |
125 |
+ |
126 |
+* Makefile (MANPAGES): New variable. |
127 |
+(install) <unix>: New target. |
128 |
+--- |
129 |
+ Makefile | 19 ++++++++++++++++++- |
130 |
+ 1 file changed, 18 insertions(+), 1 deletion(-) |
131 |
+ |
132 |
+diff --git a/Makefile b/Makefile |
133 |
+index 949402f..8352f61 100644 |
134 |
+--- a/Makefile |
135 |
++++ b/Makefile |
136 |
+@@ -194,7 +194,7 @@ else |
137 |
+ $(LINK_LIBS) $(subst /,$(COMPILER_SEP),$(GRAPH_LIB)) \ |
138 |
+ $(GRAPH_LINK) $(MATH) |
139 |
+ |
140 |
+- .PHONY: exes clean distclean |
141 |
++ .PHONY: exes clean distclean install |
142 |
+ |
143 |
+ |
144 |
+ ################################################################### |
145 |
+@@ -317,6 +317,11 @@ else |
146 |
+ # EXES += fttimer |
147 |
+ # EXES += testname |
148 |
+ |
149 |
++ # Not all demo programs have a man page; we thus check for existence in a |
150 |
++ # loop. |
151 |
++ # |
152 |
++ MANPAGES := $(foreach man,$(EXES),$(wildcard $(TOP_DIR_2)/man/$(man).1)) |
153 |
++ |
154 |
+ exes: $(EXES:%=$(BIN_DIR_2)/%$E) |
155 |
+ |
156 |
+ |
157 |
+@@ -567,6 +572,18 @@ else |
158 |
+ $(GRAPH_LIB) $(COMMON_OBJ) $(FTCOMMON_OBJ) |
159 |
+ $(LINK_NEW) |
160 |
+ |
161 |
++ ifeq ($(PLATFORM),unix) |
162 |
++ install: exes |
163 |
++ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) \ |
164 |
++ $(DESTDIR)$(mandir)/man1 |
165 |
++ $(foreach bin,$(EXES), \ |
166 |
++ $(LIBTOOL) --mode=install \ |
167 |
++ $(INSTALL) $(BIN_DIR_2)/$(bin) \ |
168 |
++ $(DESTDIR)$(bindir)/$(bin);) |
169 |
++ $(foreach man,$(MANPAGES), \ |
170 |
++ $(INSTALL) $(man) \ |
171 |
++ $(DESTDIR)$(mandir)/man1/$(notdir $(man));) |
172 |
++ endif |
173 |
+ endif |
174 |
+ |
175 |
+ |
176 |
+-- |
177 |
+GitLab |
178 |
+ |
179 |
|
180 |
diff --git a/media-libs/freetype/freetype-2.10.4.ebuild b/media-libs/freetype/freetype-2.10.4.ebuild |
181 |
index 6ede5206ae8..2a38b5388be 100644 |
182 |
--- a/media-libs/freetype/freetype-2.10.4.ebuild |
183 |
+++ b/media-libs/freetype/freetype-2.10.4.ebuild |
184 |
@@ -148,6 +148,11 @@ src_prepare() { |
185 |
if ! use X; then |
186 |
sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die |
187 |
fi |
188 |
+ |
189 |
+ # Taken from upstream (https://bugs.gentoo.org/775881) |
190 |
+ eapply "${FILESDIR}/${P}-slibtool_build_fix.patch" |
191 |
+ eapply "${FILESDIR}/${P}-dont_hardcode_libtool.patch" |
192 |
+ eapply "${FILESDIR}/ft2demos-2.10.4-install_target.patch" |
193 |
cd "${S}" || die |
194 |
fi |
195 |
|
196 |
@@ -204,15 +209,10 @@ multilib_src_compile() { |
197 |
multilib_src_install() { |
198 |
default |
199 |
|
200 |
- if multilib_is_native_abi && use utils; then |
201 |
+ if multilib_is_native_abi && use utils ; then |
202 |
einfo "Installing utils" |
203 |
- rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die |
204 |
- dodir /usr/bin #654780 |
205 |
- local ft2demo |
206 |
- for ft2demo in ../ft2demos-${PV}/bin/*; do |
207 |
- ./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \ |
208 |
- "${ED}"/usr/bin || die |
209 |
- done |
210 |
+ emake DESTDIR="${D}" FT2DEMOS=1 \ |
211 |
+ TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install |
212 |
fi |
213 |
} |