xar, bump version, fixes build with openssl-1.1.1 (#5379)

This commit is contained in:
Schrijvers Luc
2020-11-01 15:13:30 +01:00
committed by GitHub
parent 0b88a1b5db
commit 85296a7fc8
3 changed files with 120 additions and 121 deletions

View File

@@ -1,58 +1,22 @@
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 c91f2244727983ec77ddaca5618694bd88b00aa0 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
index 812b5ff..91a7f84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,7 @@ AC_SUBST([enable_autogen])
AC_TRY_COMPILE([#include <sys/types.h>
@@ -189,6 +189,7 @@ AC_SUBST([C99_FIXED_WIDTH_TYPE_HEADER])
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)
@@ -202,6 +203,8 @@ AC_CHECK_FUNCS(statvfs)
AC_CHECK_FUNCS(statfs)
AC_CHECK_FUNCS(strmode)
@@ -62,10 +26,10 @@ index 5c905fa..f3e0d5a 100644
#include <sys/param.h>
#include <sys/mount.h>])
diff --git a/lib/linuxattr.c b/lib/linuxattr.c
index 29d8147..fd4f8e7 100644
index ba13ef6..3f42e23 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 *
@@ -137,7 +137,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)
{
@@ -74,7 +38,7 @@ index 29d8147..fd4f8e7 100644
char *i, *buf = NULL;
int ret, retval=0, bufsz = 1024;
struct statfs sfs;
@@ -200,7 +200,7 @@ BAIL:
@@ -208,7 +208,7 @@ BAIL:
int32_t xar_linuxattr_extract(xar_t x, xar_file_t f, const char* file, char *buffer, size_t len)
{
@@ -84,5 +48,28 @@ index 29d8147..fd4f8e7 100644
struct statfs sfs;
int eaopt = 0;
--
1.8.3.4
2.28.0
From f9ebf3abac0fce8e51699420189833951b3af5c9 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 1 Nov 2020 11:32:14 +0000
Subject: Fix build with openssl-1.1.1
diff --git a/configure.ac b/configure.ac
index 91a7f84..98a6507 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,7 +332,7 @@ dnl Configure libcrypto (part of OpenSSL).
dnl
have_libcrypto="1"
AC_CHECK_HEADERS([openssl/evp.h], , [have_libcrypto="0"])
-AC_CHECK_LIB([crypto], [OpenSSL_add_all_ciphers], , [have_libcrypto="0"])
+AC_CHECK_LIB([crypto], [OPENSSL_init_crypto], , [have_libcrypto="0"])
if test "x${have_libcrypto}" = "x0" ; then
AC_MSG_ERROR([Cannot build without libcrypto (OpenSSL)])
fi
--
2.28.0

View File

@@ -1,76 +0,0 @@
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."
HOMEPAGE="https://mackyle.github.io/xar/"
COPYRIGHT="2005 Rob Braun"
LICENSE="BSD (3-clause)"
REVISION="5"
SOURCE_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz"
CHECKSUM_SHA256="4c5d5682803cdfab16d72365cf51fc4075d597c5eeaa8c7d1990fea98cdae3e6"
PATCHES="xar-1.5.2.patchset"
ARCHITECTURES="!x86_gcc2 x86"
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
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
xar${secondaryArchSuffix}_devel = $portVersion compat = 1.5.2
devel:libxar$secondaryArchSuffix = $portVersion compat = 1.5.2
"
REQUIRES_devel="
xar$secondaryArchSuffix == $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
"
BUILD()
{
libtoolize --force --copy --install
aclocal
autoconf
runConfigure ./configure
make
}
INSTALL()
{
make install
prepareInstalledDevelLibs libxar
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,88 @@
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."
HOMEPAGE="https://mackyle.github.io/xar/"
COPYRIGHT="2005 Rob Braun"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/downloads/mackyle/xar/xar-$portVersion.tar.gz"
CHECKSUM_SHA256="ee46089968457cf710b8cf1bdeb98b7ef232eb8a4cdeb34502e1f16ef4d2153e"
PATCHES="xar-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
xar$secondaryArchSuffix = $portVersion compat = 1.5.2
cmd:xar$commandSuffix = $portVersion compat = 1.5.2
lib:libxar$secondaryArchSuffix = $portVersion compat = 1.5.2
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
xar${secondaryArchSuffix}_devel = $portVersion compat = 1.5.2
devel:libxar$secondaryArchSuffix = $portVersion compat = 1.5.2
"
REQUIRES_devel="
xar$secondaryArchSuffix == $portVersion
"
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:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
BUILD()
{
libtoolize --force --copy --install
aclocal
autoconf
runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir
make
}
INSTALL()
{
make install
# remove libtool file
rm $libDir/libxar.la
prepareInstalledDevelLib libxar
packageEntries devel \
$developDir
}