summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorwiz <wiz>2014-08-21 20:44:16 +0000
committerwiz <wiz>2014-08-21 20:44:16 +0000
commit838508d3ccb69fcc421179b0b7cea283a2ef56af (patch)
tree9d024311b9e3225fa5bc0fab8ef9583ee24d6315 /archivers
parent332adb512dd23da28ea3f70c8f30168b69f8fc8a (diff)
downloadpkgsrc-838508d3ccb69fcc421179b0b7cea283a2ef56af.tar.gz
Fix problems with xattr detection on OS X using upstream patch.
Patch found and adapted for pkgsrc by J. Lewis Muir, with further changes by myself to avoid auto* dependencies.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/gtar-base/distinfo7
-rw-r--r--archivers/gtar-base/patches/patch-Makefile.in16
-rw-r--r--archivers/gtar-base/patches/patch-ad17
-rw-r--r--archivers/gtar-base/patches/patch-configure207
-rw-r--r--archivers/gtar-base/patches/patch-lib_xattr-at.c33
-rw-r--r--archivers/gtar-base/patches/patch-src_Makefile.in29
6 files changed, 290 insertions, 19 deletions
diff --git a/archivers/gtar-base/distinfo b/archivers/gtar-base/distinfo
index 548a9d9f810..4a15a197dac 100644
--- a/archivers/gtar-base/distinfo
+++ b/archivers/gtar-base/distinfo
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.35 2014/08/17 16:28:18 wiz Exp $
+$NetBSD: distinfo,v 1.36 2014/08/21 20:44:16 wiz Exp $
SHA1 (tar-1.28.tar.bz2) = 668ea52014ef7e70afc4ff7324410ee32f2970ef
RMD160 (tar-1.28.tar.bz2) = a2edf2a854fa9a7bc7383638038a7465ae8bba51
Size (tar-1.28.tar.bz2) = 2693989 bytes
-SHA1 (patch-ad) = f3a988a6b675a389d8d307fe1a90dde81ba98df5
+SHA1 (patch-Makefile.in) = 78cc142b9370317c52215c106ea1e7217e71f9b5
+SHA1 (patch-configure) = 9d3b26ab03c8a0a30c3dbfbdeadae4d14b7fd8dc
SHA1 (patch-gnu_readlinkat.c) = b1ddbf5159db92df9186354f27db5c9cb93b9afa
+SHA1 (patch-lib_xattr-at.c) = c69631c118558c0c056feb5b55188b2b4c92cc19
+SHA1 (patch-src_Makefile.in) = 2e6c93b00f4c291a68884663968625e784103c3b
diff --git a/archivers/gtar-base/patches/patch-Makefile.in b/archivers/gtar-base/patches/patch-Makefile.in
new file mode 100644
index 00000000000..fe981a50d4b
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-Makefile.in
@@ -0,0 +1,16 @@
+$NetBSD: patch-Makefile.in,v 1.1 2014/08/21 20:44:16 wiz Exp $
+
+Don't install documentation with this package, it is in gtar-info
+(to reduce dependencies when gtar is used for bootstrapping).
+
+--- Makefile.in.orig 2014-07-27 20:33:48.000000000 +0000
++++ Makefile.in
+@@ -1278,7 +1278,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ ACLOCAL_AMFLAGS = -I m4
+ EXTRA_DIST = ChangeLog.1 Make.rules
+-SUBDIRS = doc gnu lib rmt src scripts po tests
++SUBDIRS = gnu lib rmt src scripts po tests
+ gen_start_date = 2009-03-06
+ prev_change_log = ChangeLog.CVS
+ changelog_dir = .
diff --git a/archivers/gtar-base/patches/patch-ad b/archivers/gtar-base/patches/patch-ad
deleted file mode 100644
index b5155e185d4..00000000000
--- a/archivers/gtar-base/patches/patch-ad
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ad,v 1.11 2011/05/11 07:49:59 adam Exp $
-
-Don't install documentation with this package, it is in
-gtar-info (to reduce dependencies when gtar is used for
-bootstrapping).
-
---- Makefile.in.orig 2010-11-07 13:53:49.000000000 +0000
-+++ Makefile.in
-@@ -1028,7 +1028,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- ACLOCAL_AMFLAGS = -I m4
- EXTRA_DIST = ChangeLog.1 Make.rules
--SUBDIRS = doc gnu lib rmt src scripts po tests
-+SUBDIRS = gnu lib rmt src scripts po tests
- gen_start_date = 2009-03-06
- prev_change_log = ChangeLog.CVS
- changelog_dir = .
diff --git a/archivers/gtar-base/patches/patch-configure b/archivers/gtar-base/patches/patch-configure
new file mode 100644
index 00000000000..a928dde333b
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-configure
@@ -0,0 +1,207 @@
+$NetBSD: patch-configure,v 1.1 2014/08/21 20:44:16 wiz Exp $
+
+* Make GNU tar 1.28 detect the presence of the GNU/Linux xattrs
+ interface it expects.
+
+ Upstream report:
+
+ https://lists.gnu.org/archive/html/bug-tar/2014-08/msg00001.html
+
+--- configure.orig 2014-07-27 20:33:47.000000000 +0000
++++ configure
+@@ -663,8 +663,6 @@ RSH
+ LIBOBJS
+ TAR_COND_GRANTPT_FALSE
+ TAR_COND_GRANTPT_TRUE
+-TAR_LIB_ATTR_FALSE
+-TAR_LIB_ATTR_TRUE
+ TAR_COND_XATTR_H_FALSE
+ TAR_COND_XATTR_H_TRUE
+ GNULIB_TEST_WARN_CFLAGS
+@@ -34994,41 +34975,6 @@ else
+ TAR_COND_XATTR_H_FALSE=
+ fi
+
+- if false; then
+- TAR_LIB_ATTR_TRUE=
+- TAR_LIB_ATTR_FALSE='#'
+-else
+- TAR_LIB_ATTR_TRUE='#'
+- TAR_LIB_ATTR_FALSE=
+-fi
+-
+- if test "$ac_cv_header_sys_xattr_h" = yes; then
+- for ac_func in getxattr fgetxattr lgetxattr \
+- setxattr fsetxattr lsetxattr \
+- listxattr flistxattr llistxattr
+-do :
+- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+- cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- # only when functions are present
+-
+-$as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
+-
+- if test "$with_xattrs" != no; then
+-
+-$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
+-
+- fi
+-
+-fi
+-done
+-
+- fi
+-
+- # If <sys/xattr.h> is not found, then check for <attr/xattr.h>
+ if test "$ac_cv_header_sys_xattr_h" != yes; then
+ for ac_header in attr/xattr.h
+ do :
+@@ -35050,13 +34996,20 @@ else
+ TAR_COND_XATTR_H_FALSE=
+ fi
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
+-$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
+-if ${ac_cv_lib_attr_fgetxattr+:} false; then :
++ fi
++
++ if test "$with_xattrs" != no; then
++ for i in getxattr fgetxattr lgetxattr \
++ setxattr fsetxattr lsetxattr \
++ listxattr flistxattr llistxattr
++ do
++ as_ac_Search=`$as_echo "ac_cv_search_$i" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $i" >&5
++$as_echo_n "checking for library containing $i... " >&6; }
++if eval \${$as_ac_Search+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lattr $LIBS"
++ ac_func_search_save_LIBS=$LIBS
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -35066,68 +35019,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char fgetxattr ();
++char $i ();
+ int
+ main ()
+ {
+-return fgetxattr ();
++return $i ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_attr_fgetxattr=yes
+-else
+- ac_cv_lib_attr_fgetxattr=no
++for ac_lib in '' attr; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ eval "$as_ac_Search=\$ac_res"
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
+-$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
+-if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBATTR 1
+-_ACEOF
+-
+- LIBS="-lattr $LIBS"
+-
++ conftest$ac_exeext
++ if eval \${$as_ac_Search+:} false; then :
++ break
+ fi
++done
++if eval \${$as_ac_Search+:} false; then :
+
+- if test "$ac_cv_lib_attr_fgetxattr" = yes; then
+- TAR_LIB_ATTR_TRUE=
+- TAR_LIB_ATTR_FALSE='#'
+ else
+- TAR_LIB_ATTR_TRUE='#'
+- TAR_LIB_ATTR_FALSE=
++ eval "$as_ac_Search=no"
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
+ fi
++eval ac_res=\$$as_ac_Search
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Search
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
+- for ac_func in getxattr fgetxattr lgetxattr \
+- setxattr fsetxattr lsetxattr \
+- listxattr flistxattr llistxattr
+-do :
+- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+- cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+- # only when functions are present
++fi
+
+-$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
++ eval found=\$ac_cv_search_$i
++ test "$found" = "no" && break
++ done
+
+- if test "$with_xattrs" != no; then
++ if test "$found" != no; then
+
+ $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
+
+ fi
+-
+-fi
+-done
+-
+- fi
+ fi
+
+
+@@ -38187,18 +37836,10 @@ if test -z "${TAR_COND_XATTR_H_TRUE}" &&
+ as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+-if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
+- as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
+-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+-fi
+ if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
+ as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+-if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
+- as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
+-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+-fi
+ if test -z "${TAR_COND_GRANTPT_TRUE}" && test -z "${TAR_COND_GRANTPT_FALSE}"; then
+ as_fn_error $? "conditional \"TAR_COND_GRANTPT\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/archivers/gtar-base/patches/patch-lib_xattr-at.c b/archivers/gtar-base/patches/patch-lib_xattr-at.c
new file mode 100644
index 00000000000..b110ba3824f
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-lib_xattr-at.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-lib_xattr-at.c,v 1.1 2014/08/21 20:44:16 wiz Exp $
+
+* Make GNU tar 1.28 detect the presence of the GNU/Linux xattrs
+ interface it expects.
+
+ Upstream report:
+
+ https://lists.gnu.org/archive/html/bug-tar/2014-08/msg00001.html
+
+ In this patch, quoting from the upstream patch by Pavel Raiskup:
+
+ Do not build when HAVE_XATTRS is not defined.
+
+--- lib/xattr-at.c.orig 2014-02-10 11:42:45.000000000 -0600
++++ lib/xattr-at.c 2014-08-19 09:40:54.000000000 -0500
+@@ -18,6 +18,11 @@
+
+ #include <config.h>
+
++/* Temporarily don't build. We are unable to build on (probably not only)
++ darwin due to lack of l*xattr callbacks (XATTR_NOFOLLOW is alternative) and
++ different function definitions. */
++#ifdef HAVE_XATTRS
++
+ #include "xattr-at.h"
+ #include "openat.h"
+
+@@ -108,3 +113,5 @@
+ #undef AT_FUNC_RESULT
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
++
++#endif
diff --git a/archivers/gtar-base/patches/patch-src_Makefile.in b/archivers/gtar-base/patches/patch-src_Makefile.in
new file mode 100644
index 00000000000..86cfc2ff0c2
--- /dev/null
+++ b/archivers/gtar-base/patches/patch-src_Makefile.in
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_Makefile.in,v 1.3 2014/08/21 20:44:16 wiz Exp $
+
+* Make GNU tar 1.28 detect the presence of the GNU/Linux xattrs
+ interface it expects.
+
+ Upstream report:
+
+ https://lists.gnu.org/archive/html/bug-tar/2014-08/msg00001.html
+
+--- src/Makefile.in.orig 2014-07-27 20:33:48.000000000 +0000
++++ src/Makefile.in
+@@ -99,7 +99,6 @@ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+ bin_PROGRAMS = tar$(EXEEXT)
+-@TAR_LIB_ATTR_TRUE@am__append_1 = -lattr
+ subdir = src
+ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/depcomp $(noinst_HEADERS)
+@@ -1225,8 +1224,7 @@ tar_SOURCES = \
+ AM_CPPFLAGS = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib
+ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+ LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
+-tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) \
+- $(LIB_SELINUX) $(am__append_1)
++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)
+ all: all-am
+
+ .SUFFIXES: