Files
haikuports/dev-libs/libmspack/libmspack-0.6~alpha.recipe
fbrosson 8a4e5324b8 dev-libs/libmspack: bump to 0.6alpha, add debuginfo. (#2303)
* Add cmd: entries for the runtimes added in this release.
* Call cabd_test in TEST(). (ALL 194 TESTS PASSED.)
* Add patch from Gentoo to fix cabd_test.
* Compute arguments being passed to defineDebugInfoPackage.
2018-03-12 13:07:17 +00:00

129 lines
3.3 KiB
Bash

SUMMARY="A portable library for Microsoft compression formats"
DESCRIPTION="The following file formats are supported:
* SZDD files, which use LZSS compression
* KWAJ files, which use LZSS, LZSS+Huffman or deflate compression
* .HLP (MS Help) files, which use LZSS compression
* .CAB (MS Cabinet) files, which use deflate, LZX or Quantum compression
* .CHM (HTML Help) files, which use LZX compression
* .LIT (MS EBook) files, which use LZX compression and DES encryption
* .LZX (Exchange Offline Addressbook) files, which use LZX compression
To determine the capabilities of the library, and the binary compatibility \
version of any particular compressor or decompressor, use the \
mspack_version() function. The UNIX library interface version is defined as \
the highest-versioned library component."
HOMEPAGE="https://www.cabextract.org.uk/libmspack/"
COPYRIGHT="2000-2017 Stuart Caie"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/libmspack-${portVersion/\~/}.tar.gz"
CHECKSUM_SHA256="1edbee82accb28e679ab538f803aab7a5a569e4102ccf1715b462b1bd915f921"
SOURCE_DIR="libmspack-${portVersion/\~/}"
SOURCE_FILENAME_2="libmspack-${portVersion/\~/_}-fix-tests.patch"
srcGitRev_2="831379877f8c646c5643dd98305afdb5a6b4ca6c"
SOURCE_URI_2="https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/libmspack/files/$SOURCE_FILENAME_2?id=$srcGitRev_2#noarchive"
CHECKSUM_SHA256_2="ab1bbe6b469316c320507f1b13aee36fe06b3732949c52b8e5e0f8dd4c3cf8a1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="0.1.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libmspack$secondaryArchSuffix = $portVersion
lib:libmspack$secondaryArchSuffix = $libVersionCompat
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:cabrip = $portVersion
cmd:chmextract = $portVersion
cmd:msexpand = $portVersion
cmd:oabextract = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libmspack${secondaryArchSuffix}_devel = $portVersion
devel:libmspack$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libmspack$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoheader
cmd:automake
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
debugList=(
"$libDir"/libmspack.so.$libVersion
)
if [ -z "$secondaryArchSuffix" ]; then
for i in `echo "$PROVIDES" | sed -n -e \
"s/^[\t]*cmd:\(.*\)$secondaryArchSuffix =.*/\1/p;"`; do
debugList+=("$binDir"/$i)
done
fi
defineDebugInfoPackage libmspack$secondaryArchSuffix "${debugList[@]}"
PATCH()
{
patch -p1 -i "$sourceDir2"/$SOURCE_FILENAME_2
}
BUILD()
{
runConfigure ./configure
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
make $jobArgs AM_CFLAGS=-Wall
else
make $jobArgs
fi
}
INSTALL()
{
make install
if [ -z "$secondaryArchSuffix" ]; then
install -d $docDir $developDocDir
install -t $docDir AUTHORS README
cp -r doc/* $developDocDir
rm $developDocDir/Doxyfile*
rm $developDocDir/Makefile*
else
rm -rf "$binDir"
fi
rm $libDir/libmspack.la
prepareInstalledDevelLib libmspack
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
cd test
./cabd_test
}