Files
haikuports/dev-libs/libxslt/libxslt-1.1.43.recipe
2025-05-27 13:52:27 +00:00

143 lines
3.2 KiB
Bash

SUMMARY="The XSLT C library of Gnome"
DESCRIPTION="Libxslt implements most of the EXSLT set of processor-portable \
extensions functions and some of Saxon's evaluate and expressions extensions.
People can either embed the library in their application or use xsltproc the \
command line processing tool. This library is free software and can be reused \
in commercial applications."
HOMEPAGE="http://www.xmlsoft.org/"
COPYRIGHT="2001-2012 Daniel Veillard"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://download.gnome.org/sources/libxslt/1.1/libxslt-$portVersion.tar.xz"
CHECKSUM_SHA256="5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
libexsltVersion="0.8.24"
libexsltVersionCompat="$libexsltVersion compat >= ${libexsltVersion%%.*}"
PROVIDES="
libxslt$secondaryArchSuffix = $portVersion
lib:libexslt$secondaryArchSuffix = $libexsltVersionCompat
lib:libxslt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku${secondaryArchSuffix}
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_tools="
libxslt${secondaryArchSuffix}_tools = $portVersion
cmd:xsltproc$secondaryArchSuffix = $portVersion
"
REQUIRES_tools="
$REQUIRES
libxslt$secondaryArchSuffix == $portVersion
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
PROVIDES_python310="
libxslt${secondaryArchSuffix}_python310 = $portVersion
"
REQUIRES_python310="
libxslt$secondaryArchSuffix == $portVersion
"
fi
PROVIDES_devel="
libxslt${secondaryArchSuffix}_devel = $portVersion
cmd:xslt_config$secondaryArchSuffix = $portVersion
devel:libexslt$secondaryArchSuffix = $libexsltVersionCompat
devel:libxslt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libxslt$secondaryArchSuffix == $portVersion base
devel:libxml2$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
BUILD_PREREQUIRES+="
cmd:python3
"
fi
PATCH()
{
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
sed -i \
-E "s/( -Wextra| -Wmissing-format-attribute)//g" \
configure.ac
fi
}
BUILD()
{
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
pythonArg="--without-python"
else
pythonArg="--with-python"
fi
autoreconf -fi
runConfigure ./configure $pythonArg
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libexslt.la $libDir/libxslt.la
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
rm $prefix/lib/python3.10/vendor-packages/libxsltmod.la
fi
prepareInstalledDevelLibs \
libxslt \
libexslt
fixPkgconfig
packageEntries tools \
$binDir/xsltproc \
$manDir/man1
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
packageEntries python310 \
$prefix/lib/python3.10
fi
packageEntries devel \
$binDir \
$dataDir \
$developDir \
$documentationDir \
$libDir/cmake \
$libDir/xsltConf.sh
}
TEST()
{
make check
}