mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
139 lines
4.0 KiB
Bash
139 lines
4.0 KiB
Bash
SUMMARY="C library and tools for working with many archive formats"
|
|
DESCRIPTION="The libarchive library features:
|
|
|
|
* Support for a variety of archive and compression formats.
|
|
* Robust automatic format detection, including archive/compression \
|
|
combinations such as tar.gz.
|
|
* Zero-copy internal architecture for high performance.
|
|
* Streaming architecture eliminates all limits on size of archive, limits on \
|
|
entry sizes depend on particular formats.
|
|
* Carefully factored code to minimize bloat when programs are statically linked.
|
|
* Growing test suite ? to verify correctness of new ports.
|
|
* Works on most POSIX-like systems
|
|
* Supports Windows, including Cygwin, MinGW, and Visual Studio.
|
|
|
|
The bsdtar and bscpio command-line utilities are feature- and \
|
|
performance-competitive with other tar and cpio implementations:
|
|
* Reads a variety of formats, including tar, pax, cpio, zip, xar, lha, ar, \
|
|
cab, mtree, rar, and ISO images.
|
|
* Writes tar, pax, cpio, zip, xar, ar, ISO, mtree, and shar archives
|
|
* Automatically handles archives compressed with gzip, bzip2, lzip, xz, lzma, \
|
|
or compress.
|
|
* Unique format conversion feature."
|
|
HOMEPAGE="http://www.libarchive.org/"
|
|
COPYRIGHT="2003-2018 Tim Kientzle"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="http://www.libarchive.org/downloads/libarchive-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="aa90732c5a6bdda52fda2ad468ac98d75be981c15dde263d7b5cf6af66fd009f"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
libVersion="13.7.9"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
portVersionCompat="$portVersion compat >= 3.0"
|
|
|
|
PROVIDES="
|
|
libarchive$secondaryArchSuffix = $portVersionCompat
|
|
lib:libarchive$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libbz2$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:liblzma$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libarchive${secondaryArchSuffix}_devel = $portVersionCompat
|
|
devel:libarchive$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libarchive$secondaryArchSuffix == $portVersion base
|
|
devel:libcrypto$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
libarchive${secondaryArchSuffix}_tools = $portVersionCompat
|
|
cmd:bsdcat$commandSuffix = $portVersionCompat
|
|
cmd:bsdcpio$commandSuffix = $portVersionCompat
|
|
cmd:bsdtar$commandSuffix = $portVersionCompat
|
|
cmd:bsdunzip$commandSuffix = $portVersionCompat
|
|
"
|
|
REQUIRES_tools="
|
|
libarchive$secondaryArchSuffix == $portVersion base
|
|
$REQUIRES
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libbz2$secondaryArchSuffix
|
|
devel:libcrypto$secondaryArchSuffix
|
|
devel:liblzma$secondaryArchSuffix
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:automake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:xml2_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
autoreconf -fi
|
|
LDFLAGS="-lbsd" CFLAGS="-D_BSD_SOURCE -O2" \
|
|
runConfigure --omit-dirs binDir \
|
|
./configure --bindir=$commandBinDir \
|
|
--enable-static=no
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
rm $libDir/libarchive.la
|
|
|
|
prepareInstalledDevelLib libarchive
|
|
fixPkgconfig
|
|
|
|
# Search paths including the package version in them are not useful here
|
|
# (and they will get out-of-sync as soon as xz_utils and/or libxml2 get updated).
|
|
sed -e "s,-L/packages/xz_utils[^/]*/.self/$relativeDevelopLibDir ,," \
|
|
-i $developLibDir/pkgconfig/libarchive.pc
|
|
sed -e "s,-L/packages/libxml2[^/]*/.self/$relativeDevelopLibDir ,," \
|
|
-i $developLibDir/pkgconfig/libarchive.pc
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$manDir/man3
|
|
|
|
packageEntries tools \
|
|
$commandBinDir \
|
|
$manDir/man1
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make check
|
|
}
|