harfbuzz: bump to 1.8.0, rework patchset, enable on x86. (#2656)

This commit is contained in:
fbrosson
2018-06-06 21:13:32 +00:00
parent 8f5426557e
commit 8fd9217dc4
3 changed files with 90 additions and 84 deletions

View File

@@ -2,7 +2,7 @@ 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
COPYRIGHT="2004-2018 Behdad Esfahbod
2000-2005 Owen Taylor
2013, 2015-2017 Khaled Hosny
2010,2011,2012 Google, Inc.
@@ -18,11 +18,11 @@ COPYRIGHT="2004-2017 Behdad Esfahbod
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$portVersion.tar.bz2"
CHECKSUM_SHA256="9645a6e83313b690602017f18d4eb2adf81f2e54c6fc4471e19331304965154e"
CHECKSUM_SHA256="a18518a31436f4b8124a9887ec2c0cf2e3a01f1adedd50dd45b0cc14125e96a3"
PATCHES="harfbuzz-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
if [ "$targetArchitecture" != x86_gcc2 ]; then
commandSuffix=$secondaryArchSuffix
@@ -32,12 +32,17 @@ else
commandBinDir=$prefix/bin
fi
libVersion=0.10800.0
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
harfbuzz$secondaryArchSuffix = $portVersion compat >= 0.9
lib:libharfbuzz$secondaryArchSuffix = 0.10700.1 compat >= 0
lib:libharfbuzz_icu$secondaryArchSuffix = 0.10700.1 compat >= 0
lib:libharfbuzz$secondaryArchSuffix = $libVersionCompat
lib:libharfbuzz_icu$secondaryArchSuffix = $libVersionCompat
lib:libharfbuzz_subset$secondaryArchSuffix = $libVersionCompat
cmd:hb_ot_shape_closure$commandSuffix
cmd:hb_shape$commandSuffix
cmd:hb_subset$commandSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -54,8 +59,9 @@ REQUIRES="
PROVIDES_devel="
harfbuzz${secondaryArchSuffix}_devel = $portVersion compat >= 0.9
devel:libharfbuzz$secondaryArchSuffix = 0.10700.1 compat >= 0
devel:libharfbuzz_icu$secondaryArchSuffix = 0.10700.1 compat >= 0
devel:libharfbuzz$secondaryArchSuffix = $libVersionCompat
devel:libharfbuzz_icu$secondaryArchSuffix = $libVersionCompat
devel:libharfbuzz_subset$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
harfbuzz$secondaryArchSuffix == $portVersion base
@@ -86,10 +92,19 @@ BUILD_PREREQUIRES="
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:ragel$secondaryArchSuffix
cmd:sed
cmd:which
"
defineDebugInfoPackage harfbuzz$secondaryArchSuffix \
"$commandBinDir"/hb-ot-shape-closure \
"$commandBinDir"/hb-shape \
"$commandBinDir"/hb-subset \
"$libDir"/libharfbuzz.so.$libVersion \
"$libDir"/libharfbuzz-icu.so.$libVersion \
"$libDir"/libharfbuzz-subset.so.$libVersion \
BUILD()
{
autoreconf -fi
@@ -107,7 +122,9 @@ INSTALL()
prepareInstalledDevelLibs \
libharfbuzz \
libharfbuzz-icu
libharfbuzz-icu \
libharfbuzz-subset \
fixPkgconfig
# devel package

View File

@@ -1,75 +0,0 @@
From a8cf9112a315902e3cfb2f3ba796ad6a048d9a79 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
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 <fbrosson@localhost>
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

View File

@@ -0,0 +1,64 @@
From cd059ecb349a848e670418a347c5f7c51e041ba4 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Wed, 6 Jun 2018 20:38:08 +0000
Subject: Fix script in the test suite to better filter the output of nm.
src/check-symbols.sh compares the list of symbols in libharfbuzz.so against
a known list, $IGNORED_SYMBOLS, but Haiku has 2 symbols which are missing
in this list: _gSharedObjectHaiku{ABI,Version}.
diff --git a/src/check-symbols.sh b/src/check-symbols.sh
index d4eca50..b181814 100755
--- a/src/check-symbols.sh
+++ b/src/check-symbols.sh
@@ -7,7 +7,7 @@ test -z "$srcdir" && srcdir=.
test -z "$libs" && libs=.libs
stat=0
-IGNORED_SYMBOLS='_fini\|_init\|_fdata\|_ftext\|_fbss\|__bss_start\|__bss_start__\|__bss_end__\|_edata\|_end\|_bss_end__\|__end__\|__gcov_flush\|llvm_.*'
+IGNORED_SYMBOLS='_fini\|_init\|_fdata\|_ftext\|_fbss\|__bss_start\|__bss_start__\|__bss_end__\|_edata\|_end\|_bss_end__\|__end__\|__gcov_flush\|_gSharedObjectHaikuABI\|_gSharedObjectHaikuVersion\|llvm_.*'
if which nm 2>/dev/null >/dev/null; then
:
--
2.17.1
From dd78e507d3f667f7aa2027fe719bb11735882e4f Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Wed, 6 Jun 2018 20:39:08 +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 ce0bdab..ccfb420 100755
--- a/src/check-libstdc++.sh
+++ b/src/check-libstdc++.sh
@@ -10,10 +10,15 @@ stat=0
if which ldd 2>/dev/null >/dev/null; then
LDD=ldd
+ GREP_NEEDED=cat
else
# macOS specific tool
if which otool 2>/dev/null >/dev/null; then
LDD="otool -L"
+ GREP_NEEDED=cat
+ elif which objdump 2>/dev/null >/dev/null; then
+ LDD="objdump -x"
+ GREP_NEEDED="grep NEEDED"
else
echo "check-libstdc++.sh: 'ldd' not found; skipping test"
exit 77
@@ -29,7 +34,7 @@ for soname in harfbuzz harfbuzz-gobject; do
if ! test -f "$so"; then continue; fi
echo "Checking that we are not linking to libstdc++ or libc++ in $so"
- if $LDD $so | grep 'libstdc[+][+]\|libc[+][+]'; then
+ if $LDD $so | $GREP_NEEDED | grep 'libstdc[+][+]\|libc[+][+]'; then
echo "Ouch, linked to libstdc++ or libc++"
stat=1
fi
--
2.17.1