mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
unarr : bump, cleanup, debug (#2044)
This commit is contained in:
97
app-arch/unarr/unarr-1.0.1.recipe
Normal file
97
app-arch/unarr/unarr-1.0.1.recipe
Normal file
@@ -0,0 +1,97 @@
|
||||
SUMMARY="Decompression library for RAR, TAR, ZIP and 7z archives"
|
||||
DESCRIPTION="unarr originated as a port of the RAR extraction features from \
|
||||
The Unarchiver project required for extracting images from comic \
|
||||
book archives (.cbr). It was written as an alternative to \
|
||||
libarchive which didn't have support for parsing filters or solid \
|
||||
compression at the time."
|
||||
HOMEPAGE="https://github.com/sumatrapdfreader/sumatrapdf/tree/master/ext/unarr"
|
||||
COPYRIGHT="The Unarchiver project
|
||||
Simon Bünzli
|
||||
Felix Kauselmann
|
||||
Bastien Nocera"
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/selmf/unarr/archive/v${portVersion}.tar.gz"
|
||||
CHECKSUM_SHA256="0098e3f33182d16c13eb21278696651b170360a9a4d1c0214db4bd7882253223"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
unarr$secondaryArchSuffix = $portVersion
|
||||
lib:libunarr$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:liblzma$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_devel="
|
||||
unarr${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libunarr$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
unarr$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:cmake
|
||||
cmd:make
|
||||
cmd:ar$secondaryArchSuffix
|
||||
cmd:ranlib$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage unarr$secondaryArchSuffix \
|
||||
$libDir/libunarr.so.1.0.0
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# fix a small typo in pkg-config.pc.cmake, fixed since in master branch, but not in latest release yet
|
||||
# to remove at next release bump
|
||||
sed -i 's/@CMAKE_INSTALL_INCLUDEDIR_LIBDIR@/@CMAKE_INSTALL_LIBDIR@/g' pkg-config.pc.cmake
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# build static library
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE:STRING="Release" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
$cmakeDirArgs
|
||||
make $jobArgs
|
||||
|
||||
# build shared library too
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE:STRING="Release" \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
$cmakeDirArgs
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $binDir $libDir $includeDir
|
||||
cp build/libunarr.a $libDir
|
||||
cp -P build/libunarr.so* $libDir
|
||||
cp unarr.h $includeDir
|
||||
|
||||
mkdir -p $libDir/pkgconfig
|
||||
cp build/libunarr.pc $libDir/pkgconfig/libunarr.pc
|
||||
|
||||
prepareInstalledDevelLib libunarr
|
||||
fixPkgconfig
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
Reference in New Issue
Block a user