Convert/update libarchive to working recipe

Still debating on whether to allow a gcc2 version without lzma support.

Patch will need cmake enhancements before being upstreamed as they
like to keep it in sync with the autotools build.
This commit is contained in:
Chris Roberts
2013-10-26 19:16:28 -06:00
parent a41985a28f
commit b82638db01
6 changed files with 141 additions and 140 deletions

View File

@@ -1,33 +0,0 @@
DESCRIPTION="C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats."
HOMEPAGE="http://code.google.com/p/libarchive/"
SRC_URI="http://libarchive.googlecode.com/files/libarchive-2.8.3.zip"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="e4fb38b224f623e1cf1122631bf35b82"
BUILD()
{
cd libarchive-2.8.3
libtoolize --force --copy --install
aclocal -I build/autoconf
autoconf
automake
chmod 755 configure
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL()
{
cd libarchive-2.8.3
make install
}
TEST()
{
cd libarchive-2.8.3
make check
}
LICENSE="BSD (2-clause)"
COPYRIGHT="2003-2009 Tim Kientzle"

View File

@@ -1,33 +0,0 @@
DESCRIPTION="C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats."
HOMEPAGE="http://code.google.com/p/libarchive/"
SRC_URI="http://libarchive.googlecode.com/files/libarchive-2.8.4.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="83b237a542f27969a8d68ac217dc3796"
BUILD()
{
cd libarchive-2.8.4
libtoolize --force --copy --install
aclocal -I build/autoconf
autoconf
automake
chmod 755 configure
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL()
{
cd libarchive-2.8.4
make install
}
TEST()
{
cd libarchive-2.8.4
make check
}
LICENSE="BSD (2-clause)"
COPYRIGHT="2003-2009 Tim Kientzle"

View File

@@ -1,37 +0,0 @@
DESCRIPTION="C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats."
HOMEPAGE="http://libarchive.github.com/"
SRC_URI="https://github.com/downloads/libarchive/libarchive/libarchive-2.8.5.zip"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="58d1b202b4878e9da45cfe6d2a740881"
BUILD()
{
cd libarchive-2.8.5
libtoolize --force --copy --install
aclocal -I build/autoconf
autoconf
automake
chmod 755 configure
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
COMMON_BIN=`finddir B_COMMON_BIN_DIRECTORY`
COMMON_DIR=`finddir B_COMMON_DIRECTORY`
./configure --prefix=$COMMON_DIR \
--mandir=$COMMON_DOCS/man
make
}
INSTALL()
{
cd libarchive-2.8.5
make install
}
TEST()
{
cd libarchive-2.8.5
make check
}
LICENSE="BSD (2-clause)"
COPYRIGHT="2003-2009 Tim Kientzle"

View File

@@ -1,37 +0,0 @@
DESCRIPTION="C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats."
HOMEPAGE="http://libarchive.github.com/"
SRC_URI="https://github.com/downloads/libarchive/libarchive/libarchive-3.0.3.tar.gz"
REVISION="1"
STATUS_HAIKU="broken"
DEPEND=""
CHECKSUM_MD5="ca4090f0099432a9ac5a8b6618dc3892"
BUILD()
{
cd libarchive-3.0.3
libtoolize --force --copy --install
aclocal -I build/autoconf
autoconf
automake
chmod 755 configure
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
COMMON_BIN=`finddir B_COMMON_BIN_DIRECTORY`
COMMON_DIR=`finddir B_COMMON_DIRECTORY`
./configure --prefix=$COMMON_DIR \
--mandir=$COMMON_DOCS/man
make
}
INSTALL()
{
cd libarchive-3.0.3
make install
}
TEST()
{
cd libarchive-3.0.3
make check
}
LICENSE="BSD (2-clause)"
COPYRIGHT="2003-2009 Tim Kientzle"

View File

@@ -0,0 +1,120 @@
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.
"
LICENSE="BSD (2-clause)"
COPYRIGHT="2003-2013 Tim Kientzle"
HOMEPAGE="http://www.libarchive.org/"
SRC_URI="http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"
CHECKSUM_MD5="efad5a503f66329bb9d2f4308b5de98a"
REVISION="1"
ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
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
PROVIDES="
libarchive$secondaryArchSuffix = $portVersion compat >= 3.0
cmd:bsdtar$commandSuffix = $portVersion compat >= 3.0
cmd:bsdcpio$commandSuffix = $portVersion compat >= 3.0
lib:libarchive$secondaryArchSuffix = $portVersion compat >= 3.0
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:liblzma$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:liblzma$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libbz2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:libtoolize
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:xml2_config
"
PROVIDES_devel="
libarchive${secondaryArchSuffix}_devel = $portVersion compat >= 3.0
devel:libarchive$secondaryArchSuffix = $portVersion compat >= 3.0
"
REQUIRES_devel="
libarchive$secondaryArchSuffix == $portVersion
"
PATCHES="libarchive-3.1.2.patchset"
#SOURCE_DIR="$portVersionedName"
BUILD()
{
libtoolize -fci
aclocal -I build/autoconf
automake --add-missing
autoconf
runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libarchive
fixPkgconfig
packageEntries devel $developDir $manDir/man3
}
TEST()
{
make check
}

View File

@@ -0,0 +1,21 @@
From e3947009a6fee8dfd0ac635812df2825cdc8c338 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sat, 26 Oct 2013 18:36:43 -0600
Subject: Check libgnu for xattr functions on Haiku
diff --git a/configure.ac b/configure.ac
index 73944d3..9bfdaa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -569,6 +569,7 @@ if test "x$enable_xattr" != "xno"; then
AC_CHECK_HEADERS([attr/xattr.h])
AC_CHECK_HEADERS([sys/xattr.h sys/ea.h])
AC_CHECK_LIB(attr,setxattr)
+ AC_CHECK_LIB(gnu,setxattr)
AC_CHECK_FUNCS([extattr_get_file extattr_list_file])
AC_CHECK_FUNCS([extattr_set_fd extattr_set_file])
AC_CHECK_FUNCS([fgetxattr flistxattr fsetxattr getxattr])
--
1.8.3.4