mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
Convert xar to working recipe
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
diff -Naur xar-1.5.2/lib/darwinattr.c xar-1.5.2-haiku/lib/darwinattr.c
|
||||
--- xar-1.5.2/lib/darwinattr.c 2007-12-29 18:49:57.035651584 +0000
|
||||
+++ xar-1.5.2-haiku/lib/darwinattr.c 2013-01-09 20:55:26.246415360 +0000
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "xar.h"
|
||||
diff -Naur xar-1.5.2/lib/stat.c xar-1.5.2-haiku/lib/stat.c
|
||||
--- xar-1.5.2/lib/stat.c 2007-12-29 18:49:57.033554432 +0000
|
||||
+++ xar-1.5.2-haiku/lib/stat.c 2013-01-09 20:55:34.206307328 +0000
|
||||
@@ -53,7 +53,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
88
app-arch/xar/patches/xar-1.5.2.patchset
Normal file
88
app-arch/xar/patches/xar-1.5.2.patchset
Normal file
@@ -0,0 +1,88 @@
|
||||
From f1df8eee79076b29537b7d8a4b909c2c87299225 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sun, 24 Nov 2013 20:15:58 -0700
|
||||
Subject: applying patch xar-1.5.2.patch
|
||||
|
||||
|
||||
diff --git a/lib/darwinattr.c b/lib/darwinattr.c
|
||||
index d3bf136..94206d7 100644
|
||||
--- a/lib/darwinattr.c
|
||||
+++ b/lib/darwinattr.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "xar.h"
|
||||
diff --git a/lib/stat.c b/lib/stat.c
|
||||
index dddb1d4..41634bc 100644
|
||||
--- a/lib/stat.c
|
||||
+++ b/lib/stat.c
|
||||
@@ -53,7 +53,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From adddad2e4b7bd548ba8a84a4bd44ed8fe298deef Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sun, 24 Nov 2013 20:46:25 -0700
|
||||
Subject: Search for xattr support on Haiku
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5c905fa..f3e0d5a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -184,6 +184,7 @@ AC_SUBST([enable_autogen])
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/acl.h>], [acl_t a], [AC_DEFINE([HAVE_SYS_ACL_H],[1], [define if you have sys/acl.h and it has a working acl_t type])])
|
||||
AC_CHECK_HEADERS(ext2fs/ext2_fs.h sys/statfs.h sys/xattr.h sys/param.h sys/extattr.h libutil.h)
|
||||
+AC_SEARCH_LIBS(getxattr, gnu)
|
||||
AC_CHECK_FUNCS(lgetxattr)
|
||||
AC_CHECK_FUNCS(lsetxattr)
|
||||
AC_CHECK_FUNCS(getxattr)
|
||||
@@ -197,6 +198,8 @@ AC_CHECK_FUNCS(statvfs)
|
||||
AC_CHECK_FUNCS(statfs)
|
||||
AC_CHECK_FUNCS(strmode)
|
||||
|
||||
+AC_SEARCH_LIBS(strsep, bsd)
|
||||
+
|
||||
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>])
|
||||
diff --git a/lib/linuxattr.c b/lib/linuxattr.c
|
||||
index 29d8147..fd4f8e7 100644
|
||||
--- a/lib/linuxattr.c
|
||||
+++ b/lib/linuxattr.c
|
||||
@@ -135,7 +135,7 @@ int32_t xar_linuxattr_write(xar_t x, xar_file_t f, void *buf, size_t len, void *
|
||||
|
||||
int32_t xar_linuxattr_archive(xar_t x, xar_file_t f, const char* file, const char *buffer, size_t len)
|
||||
{
|
||||
-#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__)
|
||||
+#if defined(HAVE_SYS_XATTR_H) && defined(HAVE_LGETXATTR) && !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
char *i, *buf = NULL;
|
||||
int ret, retval=0, bufsz = 1024;
|
||||
struct statfs sfs;
|
||||
@@ -200,7 +200,7 @@ BAIL:
|
||||
|
||||
int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len)
|
||||
{
|
||||
-#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__)
|
||||
+#if defined HAVE_SYS_XATTR_H && defined(HAVE_LSETXATTR) && !defined(__APPLE__) && !defined(__HAIKU__)
|
||||
const char *fsname = "bogus";
|
||||
struct statfs sfs;
|
||||
int eaopt = 0;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,27 +1,87 @@
|
||||
DESCRIPTION="Easily extensible archiver"
|
||||
SUMMARY="Easily extensible archiver"
|
||||
DESCRIPTION="
|
||||
The XAR project aims to provide an easily extensible archive format.
|
||||
Important design decisions include an easily extensible XML table of
|
||||
contents for random access to archived files, storing the toc at the
|
||||
beginning of the archive to allow for efficient handling of streamed
|
||||
archives, the ability to handle files of arbitrarily large sizes, the
|
||||
ability to choose independent encodings for individual files in the
|
||||
archive, the ability to store checksums for individual files in both
|
||||
compressed and uncompressed form, and the ability to query the table
|
||||
of content's rich meta-data.
|
||||
"
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="2005 Rob Braun"
|
||||
HOMEPAGE="http://code.google.com/p/xar/"
|
||||
SRC_URI="http://xar.googlecode.com/files/xar-1.5.2.tar.gz"
|
||||
CHECKSUM_MD5="8eabb055d3387b8edc30ecfb08d2e80d"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
MESSAGE="This port builds only with gcc4. Use 'setgcc gcc4' before building."
|
||||
DEPEND=""
|
||||
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"
|
||||
|
||||
PROVIDES="
|
||||
xar$secondaryArchSuffix = $portVersion compat = 1.5.2
|
||||
cmd:xar$secondaryArchSuffix = $portVersion compat = 1.5.2
|
||||
lib:libxar$secondaryArchSuffix = $portVersion compat = 1.5.2
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libxml2
|
||||
lib:libcrypto
|
||||
lib:libz
|
||||
lib:libbz2
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
devel:libxml2
|
||||
devel:libcrypto
|
||||
devel:libz
|
||||
devel:libbz2
|
||||
cmd:libtoolize
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
devel:libxar$secondaryArchSuffix = $portVersion compat = 1.5.2
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
xar$secondaryArchSuffix == $portVersion
|
||||
"
|
||||
|
||||
PATCHES="xar-1.5.2.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd xar-1.5.2
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
runConfigure ./configure
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd xar-1.5.2
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="2005 Rob Braun"
|
||||
prepareInstalledDevelLibs libxar
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user