Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the harfbuzz recipe to enable glib without the main library depending on it. #9622

Open
Begasus opened this issue Oct 13, 2023 · 1 comment

Comments

@Begasus
Copy link
Contributor

Begasus commented Oct 13, 2023

With the issue #9604 pango was broken on the harfbuzz build.
Trying to enable a build for harfbuzz with glib ended up so far without succes.

Comments about this can be read in the pango issue and the PR for updating/fixing harfbuzz.

@Begasus
Copy link
Contributor Author

Begasus commented Oct 13, 2023

My latest attempt so far (no go on that), pango was fine but checking GTK4 (not goint to be included) still reveals a missing symbol.

harfbuzz-8.2.1.recipe
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-2018 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://github.com/harfbuzz/harfbuzz/releases/download/$portVersion/harfbuzz-$portVersion.tar.xz"
CHECKSUM_SHA256="0fec78f98c9c8faf228957a201c8846f809452c20f8445eb092a1ba6f22dbea5"
PATCHES="harfbuzz-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
	commandSuffix=
	commandBinDir=$prefix/bin
fi

libVersion="0.60821.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

PROVIDES="
	harfbuzz$secondaryArchSuffix = $portVersion compat >= 0.9
	lib:libharfbuzz$secondaryArchSuffix = $libVersionCompat
	lib:libharfbuzz_icu$secondaryArchSuffix = $libVersionCompat
	lib:libharfbuzz_subset$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libgraphite2$secondaryArchSuffix
	lib:libicuuc$secondaryArchSuffix
	"

SUMMARY_glib="$SUMMARY (glib)"
DESCRIPTION_glib="$DESCRIPTION (glib)"

PROVIDES_glib="
	harfbuzz${secondaryArchSuffix}_glib = $portVersion compat >= 0.9
	lib:libharfbuzz$secondaryArchSuffix = $libVersionCompat
	lib:libharfbuzz_cairo$secondaryArchSuffix = $libVersionCompat
	lib:libharfbuzz_gobject$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_glib="
	haiku$secondaryArchSuffix
	harfbuzz$secondaryArchSuffix == $portVersion
	lib:libcairo$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libgobject_2.0$secondaryArchSuffix
	lib:libgraphite2$secondaryArchSuffix
	"
FRESHENS="
	lib:libharfbuzz$secondaryArchSuffix == $portVersion
	"

PROVIDES_glib_devel="
	harfbuzz_glib${secondaryArchSuffix}_devel = $portVersion compat >= 0.9
	devel:libharfbuzz_cairo$secondaryArchSuffix = $libVersionCompat
	devel:libharfbuzz_gobject$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_glib_devel="
	harfbuzz${secondaryArchSuffix}_glib == $portVersion
	harfbuzz${secondaryArchSuffix}_devel == $portVersion
	"
FRESHENS="
	harfbuzz${secondaryArchSuffix}_devel == $portVersion
	"

PROVIDES_devel="
	harfbuzz${secondaryArchSuffix}_devel = $portVersion compat >= 0.9
	devel:libharfbuzz$secondaryArchSuffix = $libVersionCompat
	devel:libharfbuzz_icu$secondaryArchSuffix = $libVersionCompat
	devel:libharfbuzz_subset$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_devel="
	harfbuzz$secondaryArchSuffix == $portVersion base
	devel:libfreetype$secondaryArchSuffix
	devel:libgio_2.0$secondaryArchSuffix
	devel:libgirepository_1.0$secondaryArchSuffix
	devel:libglib_2.0$secondaryArchSuffix
	devel:libgraphite2$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcairo$secondaryArchSuffix
	devel:libfreetype$secondaryArchSuffix
	devel:libgirepository_1.0$secondaryArchSuffix
	devel:libglib_2.0$secondaryArchSuffix
	devel:libgraphite2$secondaryArchSuffix
	devel:libgobject_2.0$secondaryArchSuffix
	devel:libicuuc$secondaryArchSuffix >= 66
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gcc$secondaryArchSuffix
	cmd:gtkdoc_scan
	cmd:ld$secondaryArchSuffix
	cmd:meson >= 0.55.0
	cmd:ninja
	cmd:pkg_config$secondaryArchSuffix
	cmd:python3
	pygments_python310
	"

defineDebugInfoPackage harfbuzz$secondaryArchSuffix \
	"$libDir"/libharfbuzz.so.$libVersion \
	"$libDir"/libharfbuzz-icu.so.$libVersion \
	"$libDir"/libharfbuzz-subset.so.$libVersion

BUILD()
{
	meson \
		--buildtype=release \
		--prefix=$prefix \
		--libdir=$libDir \
		--includedir=$includeDir \
		--mandir=$manDir \
		--infodir=$infoDir \
		--datadir=$dataDir \
		--bindir="$commandBinDir" \
		-Dcairo=enabled \
		-Dglib=enabled \
		-Dgobject=enabled \
		-Dgraphite2=enabled \
		-Dicu=disabled \
		-Dintrospection=enabled \
		-Ddocs=disabled \
		-Dtests=disabled \
		-Dutilities=disabled \
		glib_build
	ninja -C glib_build $jobArgs

	meson --reconfigure \
		--buildtype=release \
		--prefix=$prefix \
		--libdir=$libDir \
		--includedir=$includeDir \
		--mandir=$manDir \
		--infodir=$infoDir \
		--datadir=$dataDir \
		--bindir="$commandBinDir" \
		-Dglib=disabled \
		-Dcairo=disabled \
		-Dicu=enabled \
		-Dintrospection=disabled \
		-Dgraphite2=enabled \
		-Dgobject=disabled \
		-Ddocs=enabled \
		-Dtests=disabled \
		haiku_build
	ninja -C haiku_build $jobArgs
}

INSTALL()
{
	ninja -C glib_build install

	# remove libtool library files
	rm -f "$libDir"/libharfbuzz*.la

	prepareInstalledDevelLibs \
		libharfbuzz \
		libharfbuzz-cairo \
		libharfbuzz-gobject \
		libharfbuzz-subset
	fixPkgconfig

	# glib package
	packageEntries glib \
		"$libDir"/girepository-1.0 \
		"$libDir"/libharfbuzz.so* \
		"$libDir"/libharfbuzz-cairo.so* \
		"$libDir"/libharfbuzz-gobject.so*

	# glib_devel package
	packageEntries glib_devel \
		"$dataDir" \
		$developLibDir/pkgconfig/harfbuzz-cairo.pc \
		$developLibDir/pkgconfig/harfbuzz-gobject.pc \
		$developLibDir/libharfbuzz-cairo.so* \
		$developLibDir/libharfbuzz-gobject.so*

	ninja -C haiku_build install

	prepareInstalledDevelLib \
		libharfbuzz-icu
	fixPkgconfig

	# cleanup
	mkdir -p $docDir
	cp -R $prefix/share/* $docDir
	rm -rf $prefix/share

	# devel package
	packageEntries devel \
		"$documentationDir" \
		"$developDir" \
		"$libDir"/cmake
}

TEST()
{
	ninja -C haiku_build test
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant