Files
haikuports/x11-proto/xcb_proto/xcb_proto-1.17.0.recipe
2025-09-01 09:07:34 +00:00

67 lines
1.8 KiB
Bash

SUMMARY="X.Org's C Bindings protocol headers"
DESCRIPTION="The X C Bindings protocol headers."
HOMEPAGE="https://xcb.freedesktop.org/"
COPYRIGHT="2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett."
LICENSE="MIT (no promotion)"
REVISION="2"
SOURCE_URI="https://xcb.freedesktop.org/dist/xcb-proto-$portVersion.tar.xz"
CHECKSUM_SHA256="2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c"
SOURCE_DIR="xcb-proto-$portVersion"
ARCHITECTURES="any"
PROVIDES="
xcb_proto = $portVersion
devel:xcb_proto = $portVersion
"
REQUIRES="
haiku
lib:libxml2
"
BUILD_REQUIRES="
haiku_devel
devel:libxml2
devel:util_macros
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc
cmd:make
cmd:pkg_config
cmd:python3
"
# Build/install bindings for the default Python version. Assumes n.nn version format.
pythonVersion=$(python3 --version 2>&1 | sed 's/Python //' | head -c4)
BUILD()
{
autoreconf -vfi
runConfigure --omit-dirs libDir ./configure --libdir=$dataDir
# force python dirs as the autodected one is the non-packaged one.
export PATH="$portPackageLinksDir/cmd~python/bin:$PATH"
export pyexecdir=$prefix/lib/python$pythonVersion/vendor-packages
export pythondir=$prefix/lib/python$pythonVersion/vendor-packages
make pyexecdir=$pyexecdir pythondir=$pythondir
}
INSTALL()
{
# force python dirs as the autodected one is the non-packaged one.
export PATH="$portPackageLinksDir/cmd~python/bin:$PATH"
export pyexecdir=$prefix/lib/python$pythonVersion/vendor-packages
export pythondir=$prefix/lib/python$pythonVersion/vendor-packages
# the .pc file doesn't get it anyway, force it
sed -i "s,pythondir=.*/site-packages,pythondir=\${prefix}/lib/python$pythonVersion/vendor-packages," \
xcb-proto.pc
make install DESTDIR=/ pyexecdir=$pyexecdir pythondir=$pythondir
fixPkgconfig
}
TEST()
{
make check
}