Files
haikuports/dev-libs/expat/expat-2.5.0.recipe
François Revol 654cc24d09 expat: Fix CMake file
It was searching for headers in some lib/include directory.
2023-12-02 04:39:10 +01:00

96 lines
2.0 KiB
Bash

SUMMARY="XML parser toolkit"
DESCRIPTION="Expat is an XML parser library written in C. It is a \
stream-oriented parser in which an application registers handlers for things \
the parser might find in the XML document (like start tags)."
HOMEPAGE="http://expat.sourceforge.net/"
COPYRIGHT="1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
2001-2022 Expat maintainers."
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://downloads.sourceforge.net/expat/expat-$portVersion.tar.bz2"
CHECKSUM_SHA256="6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67"
PATCHES="expat-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion=1.8.10
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
portVersionCompat="$portVersion compat >= 2.2"
PROVIDES="
expat$secondaryArchSuffix = $portVersionCompat
lib:libexpat$secondaryArchSuffix = $libVersionCompat
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:xmlwf = $portVersionCompat
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
expat${secondaryArchSuffix}_devel = $portVersion
devel:libexpat$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
expat$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
"
debugList=(
"$libDir"/libexpat.so.$libVersion
)
if [ -z "$secondaryArchSuffix" ]; then
debugList+=("$binDir"/xmlwf)
fi
defineDebugInfoPackage expat$secondaryArchSuffix "${debugList[@]}"
BUILD()
{
./buildconf.sh
runConfigure ./configure --disable-static
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libexpat.la
# remove command and manual for secondary architecture
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir $documentationDir
fi
# prepare develop/lib
prepareInstalledDevelLib libexpat
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}