Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/
Date: Tue, 02 Jul 2019 10:48:03
Message-Id: 1562064474.ae36884d5dca37b12e5621697c17afef6a5d4d34.polynomial-c@gentoo
1 commit: ae36884d5dca37b12e5621697c17afef6a5d4d34
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 2 10:46:57 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 2 10:47:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae36884d
7
8 media-libs/freetype: Bump to version 2.10.1
9
10 Package-Manager: Portage-2.3.68, Repoman-2.3.16
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 media-libs/freetype/Manifest | 3 +
14 media-libs/freetype/freetype-2.10.1.ebuild | 240 +++++++++++++++++++++++++++++
15 2 files changed, 243 insertions(+)
16
17 diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
18 index 0ef428f3548..8883fcd7599 100644
19 --- a/media-libs/freetype/Manifest
20 +++ b/media-libs/freetype/Manifest
21 @@ -1,6 +1,9 @@
22 DIST freetype-2.10.0.tar.bz2 2743740 BLAKE2B def3e6393a4a26cd063df1cdfa676677547a9f68a95b8f246c79a7ff88d3da842b214770cd60e359d42692d6c002ba4effab03905034aa67a841af4c5d7a7157 SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
23 +DIST freetype-2.10.1.tar.xz 2378784 BLAKE2B 7c177d3ca9ad923dc9534719529686c4242d87d85bfbc32fa8a12d0be87aceb4960ec84b84e433413312de17ac24a8ed2a9d092efa25a39108d28e2051ada574 SHA512 c7a565b0ab3dce81927008a6965d5c7540f0dc973fcefdc1677c2e65add8668b4701c2958d25593cb41f706f4488765365d40b93da71dbfa72907394f28b2650
24 DIST freetype-2.9.1.tar.bz2 1926385 BLAKE2B f165d638e0f49749a2640aabba96aca20441c76028cc18bb2482fd620a29dd368bc55ea020c1e74fa6effe9fed3c59a53c7fdf2dd6021f445032b7007201948e SHA512 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
25 DIST freetype-doc-2.10.0.tar.bz2 2130601 BLAKE2B 7814b8ad53343dc72f0b11b29224f9755686e504d099c53b76faefd9b38d207222c092ea549b25c7842956f13067a09cce460d33cfff1aace537f0044df627ac SHA512 e0902983030b7b67443ca88f29a8bb72662de706ddff81309c66b6738b26c5d11dbd00eb75795851ddcd9f93ce05981623884afad096c0defd08bd544f5266d6
26 +DIST freetype-doc-2.10.1.tar.xz 2079092 BLAKE2B 7d2b8ccdfeba71f1dab57f31cfb96a21afbf628ad329f798e9ac25f6e57cc662db67040a9f7c63df2d43b1c0a169c37ca0cd82bfa2d95ef382b16066859dc5b3 SHA512 7260d0d6b1bd04f9940b456b20d8d8157fc528f5b6a5c2028fe57008bee3e8d0434bdf89589e2e521b04e3e2c43627155549091d3aaf06384b654f795458991e
27 DIST freetype-doc-2.9.1.tar.bz2 2130292 BLAKE2B 667032fa447fbc28c0f753df3ade7a07a4f8d4d26cdd00fed2fa0e8098e9d6a083572608b7d06446ea91baa932e3c6d18beb1f86f6b549a8cd2c07a2df567da0 SHA512 1668f02f67e6e047df04e5e2fccb564cd9af780ec9b3c4878109868302a83eaec7b627390ff82c3e875122400e6f20fc690936a1e4964dfa65143e5309fa22d4
28 DIST ft2demos-2.10.0.tar.bz2 237599 BLAKE2B 722e586f412059b8b29a26c832037a860dc1b26afed85b8b0aa5fc71245293f45d19b379c54993f64ba4b8de329799834656d00fc4b6f6610ddd0b08cfd05449 SHA512 d48cbabd5cc673e0af2e0c4056dba95cee8e08092f881958c6908ea2d4da7104ca81b701d47a17640ac36cbdfd8aa274cc26353bb43f026f55c00d565f2ad641
29 +DIST ft2demos-2.10.1.tar.xz 229228 BLAKE2B 015448f3f246fc7772b10f55037450866323e1b7410cf840fa15fa1da3e6a1c980167bfedbe197b6e6637a8e1dcef1f4fd83174e47f33f090d554fab2c40380c SHA512 f1c06fae3d5653d6d8f8d630e531d47b7be4429b122dc826c80791953e61df7374dfc151f90519fe110f78fcbf592d9dbd9e96c83200730a6f04e42760cc3142
30 DIST ft2demos-2.9.1.tar.bz2 233462 BLAKE2B c689942b222b2c600b5ec3963791621ae87acefb9b01caa5dc35af52525d03e3a1094e48c0789d5eaabbce787bddd7c3055e12454e54ea3c7fae92bca47614de SHA512 38bee59184b20c2eb983deaa5c1f241e31c1b4793e47dc06b1b419601489cfece3b11fde4cf4fb6c5af12254ad0c1ce9a1547885c208e8e715655e9c48f22a46
31
32 diff --git a/media-libs/freetype/freetype-2.10.1.ebuild b/media-libs/freetype/freetype-2.10.1.ebuild
33 new file mode 100644
34 index 00000000000..d7060a13e1c
35 --- /dev/null
36 +++ b/media-libs/freetype/freetype-2.10.1.ebuild
37 @@ -0,0 +1,240 @@
38 +# Copyright 1999-2019 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +
43 +inherit flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
44 +
45 +DESCRIPTION="A high-quality and portable font engine"
46 +HOMEPAGE="https://www.freetype.org/"
47 +IUSE="X +adobe-cff bindist bzip2 +cleartype_hinting debug fontforge harfbuzz infinality png static-libs utils"
48 +
49 +if [[ "${PV}" != 9999 ]] ; then
50 + SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
51 + mirror://nongnu/freetype/${P/_/}.tar.xz
52 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
53 + mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
54 + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
55 + mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
56 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
57 + IUSE+=" doc"
58 +else
59 + inherit autotools git-r3
60 +fi
61 +
62 +LICENSE="|| ( FTL GPL-2+ )"
63 +SLOT="2"
64 +RESTRICT="!bindist? ( bindist )" # bug 541408
65 +
66 +RDEPEND="
67 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
68 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
69 + harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
70 + png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
71 + utils? (
72 + X? (
73 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
74 + >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
75 + >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
76 + )
77 + )"
78 +DEPEND="${RDEPEND}"
79 +BDEPEND="
80 + virtual/pkgconfig
81 +"
82 +PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
83 +
84 +PATCHES=(
85 + "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
86 +)
87 +
88 +_egit_repo_handler() {
89 + if [[ "${PV}" == 9999 ]] ; then
90 + local phase="${1}"
91 + case ${phase} in
92 + fetch|unpack)
93 + :;
94 + ;;
95 + *)
96 + die "Please use this function with either \"fetch\" or \"unpack\""
97 + ;;
98 + esac
99 +
100 + local EGIT_REPO_URI
101 + EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2.git"
102 + git-r3_src_${phase}
103 + if use utils ; then
104 + EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2-demos.git"
105 + local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
106 + git-r3_src_${phase}
107 + fi
108 + else
109 + default
110 + fi
111 +}
112 +
113 +src_fetch() {
114 + _egit_repo_handler ${EBUILD_PHASE}
115 +}
116 +
117 +src_unpack() {
118 + _egit_repo_handler ${EBUILD_PHASE}
119 +}
120 +
121 +src_prepare() {
122 + if [[ "${PV}" == 9999 ]] ; then
123 + # inspired by shipped autogen.sh script
124 + eval $(sed -nf version.sed include/freetype/freetype.h)
125 + pushd builds/unix &>/dev/null || die
126 + sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
127 + < configure.raw > configure.ac || die
128 + # eautoheader produces broken ftconfig.in
129 + eautoheader() { return 0 ; }
130 + AT_M4DIR="." eautoreconf
131 + unset freetype_major freetype_minor freetype_patch
132 + popd &>/dev/null || die
133 + fi
134 +
135 + default
136 +
137 + # This is the same as the 01 patch from infinality
138 + sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
139 +
140 + enable_option() {
141 + sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
142 + include/${PN}/config/ftoption.h \
143 + || die "unable to enable option $1"
144 + }
145 +
146 + disable_option() {
147 + sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
148 + include/${PN}/config/ftoption.h \
149 + || die "unable to disable option $1"
150 + }
151 +
152 + # Will be the new default for >=freetype-2.7.0
153 + disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
154 +
155 + if use infinality && use cleartype_hinting; then
156 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )"
157 + elif use infinality; then
158 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1"
159 + elif use cleartype_hinting; then
160 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
161 + fi
162 +
163 + # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
164 + # via environment (new since v2.8)
165 + enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
166 +
167 + if ! use bindist; then
168 + # See http://freetype.org/patents.html
169 + # ClearType is covered by several Microsoft patents in the US
170 + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
171 + fi
172 +
173 + if ! use adobe-cff; then
174 + enable_option CFF_CONFIG_OPTION_OLD_ENGINE
175 + fi
176 +
177 + if use debug; then
178 + enable_option FT_DEBUG_LEVEL_TRACE
179 + enable_option FT_DEBUG_MEMORY
180 + fi
181 +
182 + if use utils; then
183 + cd "${WORKDIR}/ft2demos-${PV}" || die
184 + # Disable tests needing X11 when USE="-X". (bug #177597)
185 + if ! use X; then
186 + sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
187 + fi
188 + cd "${S}" || die
189 + fi
190 +
191 + # we need non-/bin/sh to run configure
192 + if [[ -n ${CONFIG_SHELL} ]] ; then
193 + sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
194 + "${S}"/builds/unix/configure || die
195 + fi
196 +
197 + elibtoolize --patch-only
198 +}
199 +
200 +multilib_src_configure() {
201 + append-flags -fno-strict-aliasing
202 + type -P gmake &> /dev/null && export GNUMAKE=gmake
203 +
204 + local myeconfargs=(
205 + --disable-freetype-config
206 + --enable-biarch-config
207 + --enable-shared
208 + $(use_with bzip2)
209 + $(use_with harfbuzz)
210 + $(use_with png)
211 + $(use_enable static-libs static)
212 +
213 + # avoid using libpng-config
214 + LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
215 + LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
216 + )
217 +
218 + case ${CHOST} in
219 + mingw*|*-mingw*) ;;
220 + # Workaround windows mis-detection: bug #654712
221 + # Have to do it for both ${CHOST}-windres and windres
222 + *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
223 + esac
224 +
225 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
226 +}
227 +
228 +multilib_src_compile() {
229 + default
230 +
231 + if multilib_is_native_abi && use utils; then
232 + einfo "Building utils"
233 + # fix for Prefix, bug #339334
234 + emake \
235 + X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
236 + FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
237 + fi
238 +}
239 +
240 +multilib_src_install() {
241 + default
242 +
243 + if multilib_is_native_abi && use utils; then
244 + einfo "Installing utils"
245 + rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
246 + dodir /usr/bin #654780
247 + local ft2demo
248 + for ft2demo in ../ft2demos-${PV}/bin/*; do
249 + ./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \
250 + "${ED}"/usr/bin || die
251 + done
252 + fi
253 +}
254 +
255 +multilib_src_install_all() {
256 + if use fontforge; then
257 + # Probably fontforge needs less but this way makes things simplier...
258 + einfo "Installing internal headers required for fontforge"
259 + local header
260 + find src/truetype include/freetype/internal -name '*.h' | \
261 + while read header; do
262 + mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
263 + cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
264 + done
265 + fi
266 +
267 + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
268 + if [[ "${PV}" != 9999 ]] && use doc ; then
269 + docinto html
270 + dodoc -r docs/*
271 + fi
272 +
273 + find "${ED}" -name '*.la' -delete || die
274 + if ! use static-libs ; then
275 + find "${ED}" -name '*.a' -delete || die
276 + fi
277 +}