1 |
commit: 41da1f90ec743ec8303562791b66a93ba068e47b |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 1 18:16:41 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 1 18:20:21 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41da1f90 |
7 |
|
8 |
media-libs/freetype: Bump to version 2.12.1 |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
media-libs/freetype/Manifest | 3 + |
13 |
media-libs/freetype/freetype-2.12.1.ebuild | 257 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 260 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest |
17 |
index 28887f7823f8..c051945d09e0 100644 |
18 |
--- a/media-libs/freetype/Manifest |
19 |
+++ b/media-libs/freetype/Manifest |
20 |
@@ -1,6 +1,9 @@ |
21 |
DIST freetype-2.11.1.tar.xz 2270728 BLAKE2B 15cc03e7b8ba93b2f240b0eee3f1cc07bca77d9ef67a1971d44d6c061a0dff2b13737fa417f7f2dc4e7e6df660223325931f69a107a6b2eaf14425fc71b7ca7b SHA512 0848678482fbe20603a866f02da82c91122014d6f815ba4f1d9c03601c32e3ceb781f721c2b4427b6117d7c9742018af8dbb26566faf018595c70b50f8db3f08 |
22 |
DIST freetype-2.12.0.tar.xz 2340352 BLAKE2B 09227c883e52b4e4aefd68d8e4bfaf36eed0c4d92d22d6f5f88e2a69a94be6040ecff7285ca92f30cd9ce71a4af0ffa74141f3263f7a75e29d87b8a4fe27bf08 SHA512 d2426b46ef56268f5030951840a73be9a626129c6fc6ad2ab06e572c9325d0192f47b007798c2ffa3608fe50e296ad129ac41312b1fd3f8864d7e55e8c237c54 |
23 |
+DIST freetype-2.12.1.tar.xz 2471916 BLAKE2B c4737dc0c6e44e0a911545d604fdb2e8e8b3f5185d3f5dfe4e4561ee2d75b3e5a31afcbb2089306fec4b31ba10324a6ec6499c3735b2b7591c71e96fee4ed278 SHA512 6482de1748dc2cc01e033d21a3b492dadb1f039d13d9179685fdcf985e24d7f587cbca4c27ed8a7fdb7d9ad59612642ac5f4db062443154753295363f45c052f |
24 |
DIST freetype-doc-2.11.1.tar.xz 2038348 BLAKE2B 2248d16bb12b29294226a67a10328c61b064c8e0ad7fb5f004c2e6da1237175f03d51a48d5df03a3de3bbe935307e573014c079c31468c9f59416bc4e9057a9c SHA512 c5e19d98425491682edc58230c48390925cc4b466169f655cf3b8575ba787a70feecdeb7a16224b132dcc32f17b041483d84056cda8e3132d98b531e46a26c36 |
25 |
DIST freetype-doc-2.12.0.tar.xz 2038684 BLAKE2B ac5197f1a31a4c29a218c0a35af4658a289afbea9ad6b5a200dd0518d63a1b647467b3c460b72863a4048269c249ca2fbc83146ba3de6594e00bfa88a701d979 SHA512 49d2ab0f39bafefe18da5bdc28aa11103caa2c130767179945e10183b7efe79b1ee6319e101dd86b7aacd2975d4b206edaf42129dd2516c2424a1d9954c946c6 |
26 |
+DIST freetype-doc-2.12.1.tar.xz 2038632 BLAKE2B 81225caf1a2c586a8a282a22eaaf23412270d19002bc5b07e94d946d41d089f798724982e354d1701488de37c35bf68f36de88796565f0ebaa3f9fb35c51f532 SHA512 276b91b93e375096bc0f9fa76408a6ea9fa89d4d06e9c9179f88d27d41df3f3bc0ce6939ea7a3fd7c93cb694e78fd6bfb154e969188279e2bca82dcc3afd108d |
27 |
DIST ft2demos-2.11.1.tar.xz 257240 BLAKE2B 1d620af52e76d1152a0a6aeeb0036d2423e498e371b75c01c408cc0974845abfe2f3f562ad638ca5640ec1b24023d7a47e1688743ca738c2bb1ceea6ee05cfcf SHA512 93d68daefa8a49b4fc987a7356133299fe2a8e012415ea09ad7616ececcfd978fdf9fc7a2d855f7488f51a497d019acb89ef5774484babae66357b3083a883c5 |
28 |
DIST ft2demos-2.12.0.tar.xz 263612 BLAKE2B d0cc154084a28a965798ba34c00368d70163d748f52fe360a6bd920bc9b6b962492efe05b7206b9bc4c4fd4770aa7db4279a287d6ba65a81daf7fc2b7a679a96 SHA512 70176ad89eab0121e9f5610f777da7e2f8478e24fbe9aded7f7fc3d7685019d40a0d0d6b586f3499f8589a2923082e3a9bc8ddc66482b8898642230bff5eaae2 |
29 |
+DIST ft2demos-2.12.1.tar.xz 263656 BLAKE2B fd48dc68bd832e7532e9fae869a19699ab3337e599118bb9f1b76c3bcdcecec3cd3f55f7387508d29baf85b8de4a549aaa0e8af34d988743b1737458e255bdcf SHA512 cd9356152a64d807c75b797d005ca1dd0bde69cc2fadedec101d125cb54b2aaff1f7afa2f20839caba7db66325df7c11ed4883b7e906110356b28d9900caaae7 |
30 |
|
31 |
diff --git a/media-libs/freetype/freetype-2.12.1.ebuild b/media-libs/freetype/freetype-2.12.1.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..0ac16abb2e83 |
34 |
--- /dev/null |
35 |
+++ b/media-libs/freetype/freetype-2.12.1.ebuild |
36 |
@@ -0,0 +1,257 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+ |
42 |
+inherit autotools flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs |
43 |
+ |
44 |
+DESCRIPTION="High-quality and portable font engine" |
45 |
+HOMEPAGE="https://www.freetype.org/" |
46 |
+IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs svg utils" |
47 |
+ |
48 |
+if [[ "${PV}" != 9999 ]] ; then |
49 |
+ SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz |
50 |
+ mirror://nongnu/freetype/${P/_/}.tar.xz |
51 |
+ utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz |
52 |
+ mirror://nongnu/freetype/ft2demos-${PV}.tar.xz ) |
53 |
+ doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz |
54 |
+ mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )" |
55 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
56 |
+ IUSE+=" doc" |
57 |
+else |
58 |
+ inherit git-r3 |
59 |
+fi |
60 |
+ |
61 |
+LICENSE="|| ( FTL GPL-2+ )" |
62 |
+SLOT="2" |
63 |
+ |
64 |
+RDEPEND=" |
65 |
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
66 |
+ brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] ) |
67 |
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) |
68 |
+ harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] ) |
69 |
+ png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] ) |
70 |
+ utils? ( |
71 |
+ svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] ) |
72 |
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] ) |
73 |
+ ) |
74 |
+" |
75 |
+DEPEND="${RDEPEND}" |
76 |
+BDEPEND=" |
77 |
+ virtual/pkgconfig |
78 |
+" |
79 |
+ |
80 |
+PATCHES=( |
81 |
+) |
82 |
+ |
83 |
+_egit_repo_handler() { |
84 |
+ if [[ "${PV}" == 9999 ]] ; then |
85 |
+ local phase="${1}" |
86 |
+ case ${phase} in |
87 |
+ fetch|unpack) |
88 |
+ :; |
89 |
+ ;; |
90 |
+ *) |
91 |
+ die "Please use this function with either \"fetch\" or \"unpack\"" |
92 |
+ ;; |
93 |
+ esac |
94 |
+ |
95 |
+ local EGIT_REPO_URI |
96 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype.git" |
97 |
+ git-r3_src_${phase} |
98 |
+ if use utils ; then |
99 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype-demos.git" |
100 |
+ local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}" |
101 |
+ git-r3_src_${phase} |
102 |
+ fi |
103 |
+ else |
104 |
+ default |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
+pkg_pretend() { |
109 |
+ if use svg && ! use utils ; then |
110 |
+ einfo "The \"svg\" USE flag only has effect when the \"utils\" USE flag is also enabled." |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+src_fetch() { |
115 |
+ _egit_repo_handler ${EBUILD_PHASE} |
116 |
+} |
117 |
+ |
118 |
+src_unpack() { |
119 |
+ _egit_repo_handler ${EBUILD_PHASE} |
120 |
+ |
121 |
+ if [[ "${PV}" == 9999 ]] ; then |
122 |
+ # Need to copy stuff from dlg subproject (#758902) |
123 |
+ local dlg_inc_dir="${S}/subprojects/dlg/include/dlg" |
124 |
+ local dlg_src_dir="${S}/subprojects/dlg/src/dlg" |
125 |
+ local dlg_dest_dir="${S}/include" |
126 |
+ mkdir -p "${dlg_dest_dir}/dlg" || die |
127 |
+ cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die |
128 |
+ cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die |
129 |
+ fi |
130 |
+} |
131 |
+ |
132 |
+src_prepare() { |
133 |
+ if [[ "${PV}" == 9999 ]] ; then |
134 |
+ # Do NOT automagically mess with submodules!!! |
135 |
+ sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die |
136 |
+ # inspired by shipped autogen.sh script |
137 |
+ eval $(sed -n \ |
138 |
+ -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
139 |
+ -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
140 |
+ -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
141 |
+ include/freetype/freetype.h || die) |
142 |
+ FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}" |
143 |
+ [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}" |
144 |
+ pushd builds/unix &>/dev/null || die |
145 |
+ sed -e "s;@VERSION@;${FREETYPE};" \ |
146 |
+ < configure.raw > configure.ac || die |
147 |
+ # eautoheader produces broken ftconfig.in |
148 |
+ AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf |
149 |
+ unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE |
150 |
+ popd &>/dev/null || die |
151 |
+ fi |
152 |
+ |
153 |
+ default |
154 |
+ |
155 |
+ pushd builds/unix &>/dev/null || die |
156 |
+ # eautoheader produces broken ftconfig.in |
157 |
+ AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf |
158 |
+ popd &>/dev/null || die |
159 |
+ |
160 |
+ # This is the same as the 01 patch from infinality |
161 |
+ sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die |
162 |
+ |
163 |
+ enable_option() { |
164 |
+ sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ |
165 |
+ include/${PN}/config/ftoption.h \ |
166 |
+ || die "unable to enable option $1" |
167 |
+ } |
168 |
+ |
169 |
+ disable_option() { |
170 |
+ sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ |
171 |
+ include/${PN}/config/ftoption.h \ |
172 |
+ || die "unable to disable option $1" |
173 |
+ } |
174 |
+ |
175 |
+ # Will be the new default for >=freetype-2.7.0 |
176 |
+ disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
177 |
+ |
178 |
+ if use infinality && use cleartype-hinting ; then |
179 |
+ enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" |
180 |
+ elif use infinality ; then |
181 |
+ enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" |
182 |
+ elif use cleartype-hinting ; then |
183 |
+ enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
184 |
+ fi |
185 |
+ |
186 |
+ # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1" |
187 |
+ # via environment (new since v2.8) |
188 |
+ enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES |
189 |
+ |
190 |
+ # See https://freetype.org/patents.html (expired!) |
191 |
+ enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING |
192 |
+ |
193 |
+ if ! use adobe-cff ; then |
194 |
+ enable_option CFF_CONFIG_OPTION_OLD_ENGINE |
195 |
+ fi |
196 |
+ |
197 |
+ if use debug ; then |
198 |
+ enable_option FT_DEBUG_LEVEL_TRACE |
199 |
+ enable_option FT_DEBUG_MEMORY |
200 |
+ fi |
201 |
+ |
202 |
+ if use utils ; then |
203 |
+ cd "${WORKDIR}/ft2demos-${PV}" || die |
204 |
+ # Disable tests needing X11 when USE="-X". (bug #177597) |
205 |
+ if ! use X ; then |
206 |
+ sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die |
207 |
+ fi |
208 |
+ cd "${S}" || die |
209 |
+ fi |
210 |
+ |
211 |
+ # we need non-/bin/sh to run configure |
212 |
+ if [[ -n ${CONFIG_SHELL} ]] ; then |
213 |
+ sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \ |
214 |
+ "${S}"/builds/unix/configure || die |
215 |
+ fi |
216 |
+ |
217 |
+ elibtoolize --patch-only |
218 |
+} |
219 |
+ |
220 |
+multilib_src_configure() { |
221 |
+ append-flags -fno-strict-aliasing |
222 |
+ type -P gmake &> /dev/null && export GNUMAKE=gmake |
223 |
+ |
224 |
+ local myeconfargs=( |
225 |
+ --disable-freetype-config |
226 |
+ --enable-shared |
227 |
+ --with-zlib |
228 |
+ $(use_with brotli) |
229 |
+ $(use_with bzip2) |
230 |
+ $(use_with harfbuzz) |
231 |
+ $(use_with png) |
232 |
+ $(use_enable static-libs static) |
233 |
+ $(usex utils $(use_with svg librsvg) --without-librsvg) |
234 |
+ |
235 |
+ # avoid using libpng-config |
236 |
+ LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)" |
237 |
+ LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)" |
238 |
+ ) |
239 |
+ |
240 |
+ case ${CHOST} in |
241 |
+ mingw*|*-mingw*) ;; |
242 |
+ # Workaround windows mis-detection: bug #654712 |
243 |
+ # Have to do it for both ${CHOST}-windres and windres |
244 |
+ *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;; |
245 |
+ esac |
246 |
+ |
247 |
+ export CC_BUILD="$(tc-getBUILD_CC)" |
248 |
+ |
249 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
250 |
+} |
251 |
+ |
252 |
+multilib_src_compile() { |
253 |
+ default |
254 |
+ |
255 |
+ if multilib_is_native_abi && use utils ; then |
256 |
+ einfo "Building utils" |
257 |
+ # fix for Prefix, bug #339334 |
258 |
+ emake \ |
259 |
+ X11_PATH="${EPREFIX}/usr/$(get_libdir)" \ |
260 |
+ FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" |
261 |
+ fi |
262 |
+} |
263 |
+ |
264 |
+multilib_src_install() { |
265 |
+ default |
266 |
+ |
267 |
+ if multilib_is_native_abi && use utils ; then |
268 |
+ einfo "Installing utils" |
269 |
+ emake DESTDIR="${D}" FT2DEMOS=1 \ |
270 |
+ TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install |
271 |
+ fi |
272 |
+} |
273 |
+ |
274 |
+multilib_src_install_all() { |
275 |
+ if use fontforge ; then |
276 |
+ # Probably fontforge needs less but this way makes things simplier... |
277 |
+ einfo "Installing internal headers required for fontforge" |
278 |
+ local header |
279 |
+ find src/truetype include/freetype/internal -name '*.h' | \ |
280 |
+ while read header ; do |
281 |
+ mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die |
282 |
+ cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die |
283 |
+ done |
284 |
+ fi |
285 |
+ |
286 |
+ dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO} |
287 |
+ if [[ "${PV}" != 9999 ]] && use doc ; then |
288 |
+ docinto html |
289 |
+ dodoc -r docs/* |
290 |
+ fi |
291 |
+ |
292 |
+ find "${ED}" -type f -name '*.la' -delete || die |
293 |
+} |