Files
haikuports/dev-libs/expat/expat-2.7.4.recipe
2026-02-08 11:24:21 +01:00

101 lines
2.3 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-2025 Expat maintainers."
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://downloads.sourceforge.net/expat/expat-$portVersion.tar.bz2"
#SOURCE_URI="git+https://github.com/libexpat/libexpat?signed#tag=R_${portVersion//./_}"
CHECKSUM_SHA256="e6af11b01e32e5ef64906a5cca8809eabc4beb7ff2f9a0e6aabbd42e825135d0"
PATCHES="expat-$portVersion.patchset"
#PGPKEYS="3176EF7DB2367F1FCA4F306B1F9B0E909AF37285"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion=1.11.2
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$secondaryArchSuffix
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 --with-getentropy
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
sed -i 's,${_IMPORT_PREFIX}/lib/lib',$libDir, \
$libDir/cmake/expat-$portVersion/expat-noconfig.cmake
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}