Diff freetype-2.13.0 with a freetype-2.13.1

/usr/portage/media-libs/freetype/freetype-2.13.1.ebuild 2023-10-09 14:52:31.664368405 +0300
7 7

  
8 8
DESCRIPTION="High-quality and portable font engine"
9 9
HOMEPAGE="https://www.freetype.org/"
10
IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs svg utils"
11 10

  
12
if [[ "${PV}" != 9999 ]] ; then
13
	SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
14
		mirror://nongnu/freetype/${P/_/}.tar.xz
15
		utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
16
			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
17
		doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
18
			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
19
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
20
	IUSE+=" doc"
21
else
11
if [[ ${PV} == 9999 ]] ; then
22 12
	inherit git-r3
13
else
14
	SRC_URI="
15
		mirror://sourceforge/freetype/${P/_/}.tar.xz
16
		mirror://nongnu/freetype/${P/_/}.tar.xz
17
		utils? (
18
			mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
19
			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz
20
		)
21
		doc? (
22
			mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
23
			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz
24
		)
25
	"
26
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
23 27
fi
24 28

  
25 29
LICENSE="|| ( FTL GPL-2+ )"
26 30
SLOT="2"
31
IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug doc fontforge harfbuzz infinality +png static-libs svg utils"
27 32

  
28 33
RDEPEND="
29 34
	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
......
45 50
)
46 51

  
47 52
_egit_repo_handler() {
48
	if [[ "${PV}" == 9999 ]] ; then
53
	if [[ ${PV} == 9999 ]] ; then
49 54
		local phase="${1}"
50 55
		case ${phase} in
51 56
			fetch|unpack)
......
75 80
	fi
76 81
}
77 82

  
78
src_fetch() {
79
	_egit_repo_handler ${EBUILD_PHASE}
80
}
81

  
82 83
src_unpack() {
83 84
	_egit_repo_handler ${EBUILD_PHASE}
84 85

  
85
	if [[ "${PV}" == 9999 ]] ; then
86
		# Need to copy stuff from dlg subproject (#758902)
86
	if [[ ${PV} == 9999 ]] ; then
87
		# Need to copy stuff from dlg subproject (bug #758902)
87 88
		local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
88 89
		local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
89 90
		local dlg_dest_dir="${S}/include"
......
94 95
}
95 96

  
96 97
src_prepare() {
97
	if [[ "${PV}" == 9999 ]] ; then
98
		# Do NOT automagically mess with submodules!!!
98
	if [[ ${PV} == 9999 ]] ; then
99
		# Do NOT automagically mess with submodules!
99 100
		sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
100
		# inspired by shipped autogen.sh script
101

  
102
		# Inspired by shipped autogen.sh script
101 103
		eval $(sed -n \
102 104
			-e 's/^#define  *\(FREETYPE_MAJOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
103 105
			-e 's/^#define  *\(FREETYPE_MINOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
......
105 107
			include/freetype/freetype.h || die)
106 108
		FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
107 109
		[[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
110

  
108 111
		pushd builds/unix &>/dev/null || die
109 112
		sed -e "s;@VERSION@;${FREETYPE};" \
110 113
			< configure.raw > configure.ac || die
111
		# eautoheader produces broken ftconfig.in
112
		AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
113 114
		unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
114 115
		popd &>/dev/null || die
115 116
	fi
......
175 176
	# bug #869803
176 177
	rm docs/reference/sitemap.xml.gz || die
177 178

  
178
	# we need non-/bin/sh to run configure
179
	# We need non-/bin/sh to run configure
179 180
	if [[ -n ${CONFIG_SHELL} ]] ; then
180 181
		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
181 182
			"${S}"/builds/unix/configure || die
......
186 187

  
187 188
multilib_src_configure() {
188 189
	append-flags -fno-strict-aliasing
189
	type -P gmake &> /dev/null && export GNUMAKE=gmake
190

  
191
	export GNUMAKE=gmake
190 192

  
191 193
	local myeconfargs=(
192 194
		--disable-freetype-config
......
199 201
		$(use_enable static-libs static)
200 202
		$(usex utils $(use_with svg librsvg) --without-librsvg)
201 203

  
202
		# avoid using libpng-config
204
		# Avoid using libpng-config
203 205
		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
204 206
		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
205 207
	)
......
221 223

  
222 224
	if multilib_is_native_abi && use utils ; then
223 225
		einfo "Building utils"
224
		# fix for Prefix, bug #339334
226
		# Fix for Prefix, bug #339334
225 227
		emake \
226 228
			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
227 229
			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
......
240 242

  
241 243
multilib_src_install_all() {
242 244
	if use fontforge ; then
243
		# Probably fontforge needs less but this way makes things simplier...
245
		# fontforge can probably cope with fewer of these, but this is simpler
244 246
		einfo "Installing internal headers required for fontforge"
245 247
		local header
246 248
		find src/truetype include/freetype/internal -name '*.h' | \
......
251 253
	fi
252 254

  
253 255
	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
254
	if [[ "${PV}" != 9999 ]] && use doc ; then
256
	if [[ ${PV} != 9999 ]] && use doc ; then
255 257
		docinto html
256 258
		dodoc -r docs/*
257 259
	fi
Thank you!