From 1b8bf4561c54f619931af2203b383dcce800ea1c Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 27 Jul 2016 23:39:39 +0000 Subject: [PATCH] fontconfig: add recipe for version 2.12.0. --- .../fontconfig/fontconfig-2.12.0.recipe | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 media-libs/fontconfig/fontconfig-2.12.0.recipe diff --git a/media-libs/fontconfig/fontconfig-2.12.0.recipe b/media-libs/fontconfig/fontconfig-2.12.0.recipe new file mode 100644 index 000000000..7181e0567 --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.12.0.recipe @@ -0,0 +1,134 @@ +SUMMARY="A library for font customization and configuration" +DESCRIPTION=" +Fontconfig is a library for font customization and configuration. +" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/fontconfig" +SOURCE_URI="http://www.freedesktop.org/software/fontconfig/release/fontconfig-$portVersion.tar.bz2" +CHECKSUM_SHA256="b433e4efff1f68fdd8aac221ed1df3ff1e580ffedbada020a703fe64017d8224" +LICENSE="MIT" +COPYRIGHT="2000-2005, 2006-2007 Keith Packard + 2005 Patrick Lam + 2009 Roozbeh Pournader + 2008-2009 Red Hat, Inc. + 2008 Danilo Segan + 2012 Google, Inc. + " +REVISION="1" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + fontconfig$secondaryArchSuffix = $portVersion compat >= 2 + cmd:fc_cache$secondaryArchSuffix + cmd:fc_cat$secondaryArchSuffix + cmd:fc_list$secondaryArchSuffix + cmd:fc_match$secondaryArchSuffix + cmd:fc_pattern$secondaryArchSuffix + cmd:fc_query$secondaryArchSuffix + cmd:fc_scan$secondaryArchSuffix + cmd:fc_validate$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix = 1.9.1 compat >= 1 + " + +REQUIRES=" + haiku$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libpng$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + " + +BUILD_REQUIRES=" + devel:libfreetype$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libbz2$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel + cmd:libtool + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:gperf + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python + " + +PATCHES="fontconfig-2.11.1.patchset" + +GLOBAL_WRITABLE_FILES=" + settings/fonts/conf.d directory keep-old + settings/fonts/fonts.conf auto-merge + " + +BUILD() +{ + mkdir -p `finddir B_USER_CACHE_DIRECTORY` + libtoolize --force --copy --install + aclocal + autoconf + automake + FONTS_DIR=`finddir B_SYSTEM_FONTS_DIRECTORY` + FONTS_DIR2=`finddir B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY` + FONTS_DIR3=`finddir B_USER_FONTS_DIRECTORY` + FONTS_DIR4=`finddir B_USER_NONPACKAGED_FONTS_DIRECTORY` + CACHE_DIR=`finddir B_USER_CACHE_DIRECTORY` + runConfigure ./configure \ + --enable-libxml2 \ + --with-default-fonts=${FONTS_DIR} \ + --with-add-fonts=${FONTS_DIR2},${FONTS_DIR3},${FONTS_DIR4} \ + --with-cache-dir=${CACHE_DIR} + make $jobArgs +} + +INSTALL() +{ + make install RUN_FC_CACHE_TEST=false + + rm $libDir/*.la + + prepareInstalledDevelLibs \ + libfontconfig + fixPkgconfig + + # The pkgconfig file reference other libraries using the wrong paths, which + # creates a lot of confusion. Fix them so correct paths are used. + local develPackageName="${portName}_devel-$portFullVersion" + local packageLinksDir=$(dirname $portPackageLinksDir) + local linksDir="$packageLinksDir/${develPackageName}/devel~libfreetype$secondaryArchSuffix/$relativeDevelopLibDir" + sed -i -e "s,^\(Libs.private.*\)-L.* \(-lfreetype.*\)$,\1-L$linksDir \2," \ + $developLibDir/pkgconfig/fontconfig.pc + linksDir="$packageLinksDir/${develPackageName}/devel~libxml2$secondaryArchSuffix/$relativeDevelopLibDir" + sed -i -e "s,^\(Libs.private.*-lfreetype.*\) -L.* \(-lxml2.*\)$,\1-L$linksDir \2," \ + $developLibDir/pkgconfig/fontconfig.pc + linksDir="$packageLinksDir/${develPackageName}/devel~libfreetype$secondaryArchSuffix/$relativeIncludeDir" + sed -i -e "s,^\(Cflags.*\)-I/packages.*\(/freetype2.*\)$,\1-I$linksDir\2," \ + $developLibDir/pkgconfig/fontconfig.pc + linksDir="$packageLinksDir/${develPackageName}/devel~libxml2$secondaryArchSuffix/$relativeIncludeDir" + sed -i -e "s,^\(Cflags.*freetype2.*\)-I/packages.*\(/libxml2.*\)$,\1-I$linksDir\2," \ + $developLibDir/pkgconfig/fontconfig.pc + + packageEntries devel \ + $developDir \ + $manDir \ + $docDir +} + +PROVIDES_devel=" + fontconfig${secondaryArchSuffix}_devel = $portVersion compat >= 2.1 + devel:libfontconfig$secondaryArchSuffix = 1.9.1 compat >= 1 + " + +REQUIRES_devel=" + fontconfig$secondaryArchSuffix == $portVersion base + devel:libfreetype$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + "