From cb22d885efe690646cc7f307bd63ac403b5ebe31 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 26 Oct 2017 14:24:49 +0200 Subject: [PATCH] harfbuzz: add recipe for version 1.6.2. --- media-libs/harfbuzz/harfbuzz-1.6.2.recipe | 122 ++++++++++++++++++ .../harfbuzz/patches/harfbuzz-1.6.2.patchset | 75 +++++++++++ 2 files changed, 197 insertions(+) create mode 100644 media-libs/harfbuzz/harfbuzz-1.6.2.recipe create mode 100644 media-libs/harfbuzz/patches/harfbuzz-1.6.2.patchset diff --git a/media-libs/harfbuzz/harfbuzz-1.6.2.recipe b/media-libs/harfbuzz/harfbuzz-1.6.2.recipe new file mode 100644 index 000000000..615bd4b02 --- /dev/null +++ b/media-libs/harfbuzz/harfbuzz-1.6.2.recipe @@ -0,0 +1,122 @@ +SUMMARY="An OpenType text shaping engine" +DESCRIPTION="HarfBuzz is an OpenType text shaping engine. It is used to \ +layout complex text such as the Indic and Arabic alphabets." +HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz/" +COPYRIGHT="2004-2017 Behdad Esfahbod + 2000-2005 Owen Taylor + 2013, 2015-2017 Khaled Hosny + 2010,2011,2012 Google, Inc. + 2012 Mozilla Foundation + 2011 Codethink Limited + 2008,2010 Nokia Corporation and/or its subsidiary(-ies) + 2009 Keith Stribley + 2009 Martin Hosken and SIL International + 2007 Chris Wilson + 2005 David Turner + 2004,2007,2008,2009,2010 Red Hat, Inc. + 1998-2004 David Turner and Werner Lemberg" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$portVersion.tar.bz2" +CHECKSUM_SHA256="ceb8cbd652829b5fa680a71d89cb79cac7afa104e9484fbd23a24e71c0d6e80e" +PATCHES="harfbuzz-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86" + +if [ "$targetArchitecture" != x86_gcc2 ]; then + commandSuffix=$secondaryArchSuffix + commandBinDir=$binDir +else + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + harfbuzz$secondaryArchSuffix = $portVersion compat >= 0.9 + lib:libharfbuzz$secondaryArchSuffix = 0.10600.2 compat >= 0 + lib:libharfbuzz_icu$secondaryArchSuffix = 0.10600.2 compat >= 0 + cmd:hb_ot_shape_closure$commandSuffix + cmd:hb_shape$commandSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libicuuc$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:libgraphite2$secondaryArchSuffix + " + +PROVIDES_devel=" + harfbuzz${secondaryArchSuffix}_devel = $portVersion compat >= 0.9 + devel:libharfbuzz$secondaryArchSuffix = 0.10600.2 compat >= 0 + devel:libharfbuzz_icu$secondaryArchSuffix = 0.10600.2 compat >= 0 + " +REQUIRES_devel=" + harfbuzz$secondaryArchSuffix == $portVersion base + devel:libglib_2.0$secondaryArchSuffix + devel:libgraphite2$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libfreetype$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libicuuc$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libbz2$secondaryArchSuffix + devel:libgraphite2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:automake + cmd:autoconf + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:ld$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python + cmd:sed + cmd:which + " + +BUILD() +{ + autoreconf -fi + runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir \ + --with-graphite2=yes --with-icu + make $jobArgs +} + +INSTALL() +{ + make install + + # remove libtool library files + rm $libDir/libharfbuzz*.la + + prepareInstalledDevelLibs \ + libharfbuzz \ + libharfbuzz-icu + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir \ + $dataDir +} + +TEST() +{ + make check +} diff --git a/media-libs/harfbuzz/patches/harfbuzz-1.6.2.patchset b/media-libs/harfbuzz/patches/harfbuzz-1.6.2.patchset new file mode 100644 index 000000000..50a0dd0d5 --- /dev/null +++ b/media-libs/harfbuzz/patches/harfbuzz-1.6.2.patchset @@ -0,0 +1,75 @@ +From a8cf9112a315902e3cfb2f3ba796ad6a048d9a79 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Sun, 19 Jun 2016 14:41:51 +0000 +Subject: Fix scripts in the test suite to better filter the output of nm. + +src/check-defs.sh and src/check-symbols.sh compare the list of +symbols in libharfbuzz.so against a known list. This patch teaches +these scripts that they should ignore two symbols that are Haiku-specific: +_gSharedObjectHaikuABI and _gSharedObjectHaikuVersion. + +diff --git a/src/check-defs.sh b/src/check-defs.sh +index 480d499..8a0d395 100755 +--- a/src/check-defs.sh ++++ b/src/check-defs.sh +@@ -21,7 +21,7 @@ for def in $defs; do + lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'` + so=.libs/lib${lib}.so + +- EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`" ++ EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| _gSharedObjectHaikuABI\>\| _gSharedObjectHaikuVersion\>\| llvm_' | cut -d' ' -f3`" + + if test -f "$so"; then + +diff --git a/src/check-symbols.sh b/src/check-symbols.sh +index d4d655d..ac449dc 100755 +--- a/src/check-symbols.sh ++++ b/src/check-symbols.sh +@@ -20,7 +20,7 @@ for suffix in so dylib; do + so=.libs/libharfbuzz.$suffix + if ! test -f "$so"; then continue; fi + +- EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| ___gcov_flush\>\| llvm_\| _llvm_' | cut -d' ' -f3`" ++ EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| ___gcov_flush\>\| _gSharedObjectHaikuABI\>\| _gSharedObjectHaikuVersion\>\| llvm_\| _llvm_' | cut -d' ' -f3`" + + prefix=`basename "$so" | sed 's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'` + +-- +2.7.0 + + +From c8b977379a62f5119a799c8b14d48dc9031b9994 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Sun, 19 Jun 2016 17:53:12 +0000 +Subject: Patch src/check-libstdc++.sh to use objdump instead of ldd. + + +diff --git a/src/check-libstdc++.sh b/src/check-libstdc++.sh +index b541828..7a1595a 100755 +--- a/src/check-libstdc++.sh ++++ b/src/check-libstdc++.sh +@@ -7,10 +7,10 @@ test -z "$srcdir" && srcdir=. + stat=0 + + +-if which ldd 2>/dev/null >/dev/null; then ++if which objdump 2>/dev/null >/dev/null; then + : + else +- echo "check-libstdc++.sh: 'ldd' not found; skipping test" ++ echo "check-libstdc++.sh: 'objdump' not found; skipping test" + exit 77 + fi + +@@ -20,7 +20,7 @@ for suffix in so dylib; do + if ! test -f "$so"; then continue; fi + + echo "Checking that we are not linking to libstdc++ or libc++" +- if ldd $so | grep 'libstdc[+][+]\|libc[+][+]'; then ++ if objdump -x $so | grep NEEDED | grep 'libstdc[+][+]\|libc[+][+]'; then + echo "Ouch, linked to libstdc++ or libc++" + stat=1 + fi +-- +2.7.0 +