Skip to content

Commit

Permalink
media-libs/freetype: Bump to version 2.6.5
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.0
Signed-off-by: Lars Wendler <[email protected]>
  • Loading branch information
Lars Wendler committed Jul 12, 2016
1 parent 0ad37bb commit a7e26c1
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 0 deletions.
3 changes: 3 additions & 0 deletions media-libs/freetype/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ DIST freetype-2.5.5-infinality-patches.tar.xz 24380 SHA256 6b7bc373b068c71feca2e
DIST freetype-2.5.5.tar.bz2 1714529 SHA256 387bcc4b780b12484aa2ec9f7db1a55d8286eb5639f45fbc0fbba7a4e5a1afb9 SHA512 1fc72d24da1744a6a5faf3338e49912c81ce83f30def1e80a2a15b50e7f83893a4fe24a70ef88b65ecc217bed1c15d85804c364eba221b35e25531c727fe8559 WHIRLPOOL 57cf0f020cda6a66cfe8e2a30e1e997c0fd7f97bdaed38da65cce0b360fcc60cfdf1ba0724c1745668ae3f80743052e135edb8356dff4c90365caa6262d59158
DIST freetype-2.6.2.tar.bz2 1767940 SHA256 baf6bdef7cdcc12ac270583f76ef245efe936267dbecef835f02a3409fcbb892 SHA512 269d7a2ba728b4cb79d1d533ce93674bfd483566ab80bc6be0ec24f869cb65ba1fd852fbeff8f045607dd044845ce3d125374faeb14c986761b94dce7d1ff48b WHIRLPOOL d1ffa0d84605ac4e1480c46f7ff7c9c6f87137a539258c3a38900850dbf53cf4f752b57f2e5d22164020d62295b6c4e50ae529ac953b7591b3c3a034701d845c
DIST freetype-2.6.3.tar.bz2 1753083 SHA256 371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2 SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d WHIRLPOOL e17e87fe7b821730da13b1a54073fd0314025e3e15a41b10b5ece2731c8152c4d8dbe1fb7f26593794d70f15f6dfd70582678d48a8f068cec865f821eb3847a0
DIST freetype-2.6.5.tar.bz2 1779603 SHA256 e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0 SHA512 d60f057e12992b4dccd7d5e232bda5c344e6ed0d74362032fbbc52526bac42d600fe0aa04c6442a9502a27a88f5d5155fb42e723531127400ccfce0d1911487f WHIRLPOOL 3cfbbe407ee024ff939469aa2b82b764fe89b1ba4fc7edcdd537e9ad81b3ea6a8fe807e2d5fdb80ec47de2f66cf3f28b5e45320c84a84ea446acbf6c2966cccb
DIST freetype-doc-2.5.5.tar.bz2 108133 SHA256 68becbae3578a8101e9f3c55f10e435fb75535011d3f7a523719371e86e368e7 SHA512 0e2455433f72766ec88275d2e53e49630457579a83ca491697bb5ce12196ee964618d1af86956651557d34e8ea1d57f75f69e0d60ef90e943509bc571370fb64 WHIRLPOOL 28d13ae3ce9bc3fb278df9a963cef3622672fa288fc0fd654e874054bedccd8510a3dcf7636ea2ec107b5299984742607d2a9436d5e473202856e27bf262655f
DIST freetype-doc-2.6.2.tar.bz2 477268 SHA256 d5108a972d8f80561fd698aa856233999527375b4e8f6c82d2eafe5ac66f989b SHA512 7eb9c2cee68e0557a9c177db83525c91ea59fbfaf2a6516916b76b7b3d82f17cf08ce21f062cf1012ed872db612444a1ae6fa31290ee1b0377d84531a17a4dea WHIRLPOOL 1822b3fbe2c1b83c2add119defe0052d18fd2875dd457432f024d8b197b48a93cc05be2743a1290050aae9b935cb3790b5ed28cf1b658eeba5ee43781de752c4
DIST freetype-doc-2.6.3.tar.bz2 5367900 SHA256 28b7cb0b1ff3962d386c54cdffd3891d2126292f57b4ea9ad0467f07cf68de7d SHA512 7731d96543f73ace8afc4b5ff2148c32a8dacbf01a976a6870705f73b45dfe1429ffa94406cdfc83b163b039c4d375c0c553a7d7aaad659a87079f357e6599cc WHIRLPOOL 71b01f8d5daf8e93efab5453f198d1790365fd010b5a137f4f34e93f6bc03a6a644900b92b8263973248954895c73e70cad64fe50b09bb4042627182299a5a1c
DIST freetype-doc-2.6.5.tar.bz2 1932398 SHA256 cb9cd73c3a713138e690a634608ec7b64ff645f9a71ac6645804b18e38be49e9 SHA512 1d2affa07f34c6486f1738141b428256f1d44bc0d166c74e9884caeeecdf3204164542e9bbc1c0eba6ff605f41d6022068546da64aee7859b72636bcd72fff00 WHIRLPOOL 90499d7ffdfe079dc058974e9d89a18a35c011244ea6d6003e8f445af579430910331fad2c6c7f4cc5ff318cf8582d8b30a32f878a4b8e4e5723e1b02025a396
DIST ft2demos-2.5.5.tar.bz2 182006 SHA256 b87c7deb5d9b1fddb8520c091a5491cc63ecac4de25139e1da38aebee82195ea SHA512 c6e1855f2315665e39a894ecfcb65f8546de435c1dada0ea0a6665a1e3ef22331d6949cd9261dfb6b68e653631d4c2e74f8ea31b53b40e46f44ab4dae38e368b WHIRLPOOL 55d6add5e3fac008a39231e3805e151a5a9b7cafb6ef970e546d96d3fa338a6a4a744aeb59ea04804312164aedd5e5a21e19773dbf5c42a1acfc42d283d90930
DIST ft2demos-2.6.2.tar.bz2 191120 SHA256 819791a0548dcb8301c0f22e893ad7dadb1cb88cb37055e75f609bd436f013ca SHA512 570b6c6f072c93674b8cd27f9c42540e2bcd6b4f499c227634009277b0b6ac0833a2101285c5055a429a17be341cb2ff257eba25172a41accd4b43245908431c WHIRLPOOL a8f3fb54305ef8b0eb5161691546afdaa0cc65d48c9a7c411fe78fe8b5c11e118e6fccc579ac9e5d25d0199fce1e28a3d2c2e931cdae8080549cd5173cf1fa2c
DIST ft2demos-2.6.3.tar.bz2 193412 SHA256 b076ac52465e912d035f111ede78b88bf3dd186f91a56a54ff83ffdf862e84e4 SHA512 1f23f9ab0bd59a06b8fd223bcc335ffba064477abee74d33308ddc28eb41e4ccf3728a52c36d4cab3995be695b56e1e099c2889f04e0835ba242b2938c5d2e78 WHIRLPOOL 1246985eca92e2e4d1b618d633602fc4114a69c1a8d715c51a5e96c17b3119fb3a254a577c876ad8ba9e2871bf59f4bd67f6721a706b3706a0a532728723f6a4
DIST ft2demos-2.6.5.tar.bz2 216722 SHA256 568a8f3a6301189a881d2f7ec95da280d20c862de94d81815341870e380b00e6 SHA512 1b950254588835c4f797a3cf45034af714676e6b2a8415ee8fa860bab7e284c3833675efc84167a90bed29dc0dc2079b22a513cfb6642ba9b5cbc84f1bc4d30d WHIRLPOOL 64780f2ca5c1fe64f1e25f18297c7761bca7b4e9defa0ef823376037f99f5c270f875efd8052f372af3b6cf0f104db91cacad957691df89818404a17ff3d8fb3
177 changes: 177 additions & 0 deletions media-libs/freetype/freetype-2.6.5.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit autotools flag-o-matic multilib multilib-build multilib-minimal toolchain-funcs

INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"

DESCRIPTION="A high-quality and portable font engine"
HOMEPAGE="http://www.freetype.org/"
SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
mirror://nongnu/freetype/${P/_/}.tar.bz2
utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"

LICENSE="|| ( FTL GPL-2+ )"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="X +adobe-cff bindist bzip2 cleartype_hinting debug doc fontforge harfbuzz
infinality png static-libs utils"
RESTRICT="!bindist? ( bindist )" # bug 541408

CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
utils? (
X? (
>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
)
)"
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
PDEPEND="infinality? ( media-libs/fontconfig-infinality )"

REQUIRED_USE="?? ( cleartype_hinting infinality )"

PATCHES=(
# This is the same as the 01 patch from infinality
"${FILESDIR}"/${PN}-2.3.2-enable-valid.patch

"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
)

src_prepare() {
enable_option() {
sed -i -e "/#define $1/a #define $1" \
include/${PN}/config/ftoption.h \
|| die "unable to enable option $1"
}

disable_option() {
sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
include/${PN}/config/ftoption.h \
|| die "unable to disable option $1"
}

default

if use infinality; then
# FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1"
fi

if use cleartype_hinting; then
# Will be the new default for >=freetype-2.7.0
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
fi

if ! use bindist; then
# See http://freetype.org/patents.html
# ClearType is covered by several Microsoft patents in the US
enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
fi

if ! use adobe-cff; then
enable_option CFF_CONFIG_OPTION_OLD_ENGINE
fi

if use debug; then
enable_option FT_DEBUG_LEVEL_TRACE
enable_option FT_DEBUG_MEMORY
fi

if use utils; then
cd "${WORKDIR}/ft2demos-${PV}" || die
# Disable tests needing X11 when USE="-X". (bug #177597)
if ! use X; then
sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
fi
cd "${S}" || die
fi

# we need non-/bin/sh to run configure
if [[ -n ${CONFIG_SHELL} ]] ; then
sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
"${S}"/builds/unix/configure || die
fi

elibtoolize --patch-only
}

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

local myeconfargs=(
--enable-biarch-config
--enable-shared
$(use_with bzip2)
$(use_with harfbuzz)
$(use_with png)
$(use_enable static-libs static)

# avoid using libpng-config
LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
)

ECONF_SOURCE="${S}" \
econf "${myeconfargs[@]}"
}

multilib_src_compile() {
default

if multilib_is_native_abi && use utils; then
einfo "Building utils"
# fix for Prefix, bug #339334
emake \
X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
fi
}

multilib_src_install() {
default

if multilib_is_native_abi && use utils; then
einfo "Installing utils"
rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
local ft2demo
for ft2demo in ../ft2demos-${PV}/bin/*; do
./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
"${ED}"/usr/bin || die
done
fi
}

multilib_src_install_all() {
if use fontforge; then
# Probably fontforge needs less but this way makes things simplier...
einfo "Installing internal headers required for fontforge"
local header
find src/truetype include/freetype/internal -name '*.h' | \
while read header; do
mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
done
fi

dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
if use doc ; then
docinto html
dodoc -r docs/*
fi

prune_libtool_files --all
}
2 changes: 2 additions & 0 deletions media-libs/freetype/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<flag name="adobe-cff">Use Adobe CFF as default font-renderer</flag>
<flag name="auto-hinter">Use the unpatented auto-hinter instead
of the (recommended) TrueType bytecode interpreter</flag>
<flag name="cleartype_hinting">New bytecode hinting mode for TrueType fonts that
activates subpixel hinting (a.k.a. ClearType hinting) by default</flag>
<flag name="bindist">Disable ClearType support (see http://freetype.org/patents.html)</flag>
<flag name="bzip2">Support bzip2 compressed PCF fonts.</flag>
<flag name="fontforge">Install internal headers required for TrueType
Expand Down

0 comments on commit a7e26c1

Please sign in to comment.