diff options
Diffstat (limited to 'app-arch/bsdtar/files/libarchive-1.3.1-static.patch')
-rw-r--r-- | app-arch/bsdtar/files/libarchive-1.3.1-static.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app-arch/bsdtar/files/libarchive-1.3.1-static.patch b/app-arch/bsdtar/files/libarchive-1.3.1-static.patch new file mode 100644 index 000000000000..20c7238ad3a2 --- /dev/null +++ b/app-arch/bsdtar/files/libarchive-1.3.1-static.patch @@ -0,0 +1,36 @@ +Index: libarchive-1.3.1/configure.ac +=================================================================== +--- libarchive-1.3.1.orig/configure.ac ++++ libarchive-1.3.1/configure.ac +@@ -71,6 +71,11 @@ AC_CHECK_HEADERS([locale.h paths.h]) + AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/acl.h sys/ioctl.h]) + AC_CHECK_HEADERS([sys/param.h sys/time.h unistd.h wchar.h zlib.h]) + ++AC_ARG_ENABLE([static-bsdtar], ++ AS_HELP_STRING([--disable-static-bsdtar], [Makes bsdtar link dynamically to libarchive (default: static)]) ) ++ ++AM_CONDITIONAL([STATIC_BSDTAR], [test "x$enable_static_bsdtar" != "xno"]) ++ + # Checks for libraries. + AC_CHECK_LIB(acl,acl_set_file) + AC_CHECK_LIB(attr,setxattr) +Index: libarchive-1.3.1/Makefile.am +=================================================================== +--- libarchive-1.3.1.orig/Makefile.am ++++ libarchive-1.3.1/Makefile.am +@@ -114,8 +114,12 @@ bsdtar_DEPENDENCIES = libarchive.la \ + libarchive/archive_entry.h \ + libarchive/archive.h + +-bsdtar_LDADD= -larchive -lbz2 -lz +-bsdtar_CPPFLAGS=-I$(top_builddir)/libarchive ++if STATIC_BSDTAR + # Link libarchive statically... +-bsdtar_LDFLAGS= -static -I$(destdir)/libarchive ++static=-all-static ++endif ++ ++bsdtar_LDADD= -L. -larchive -lbz2 -lz ++bsdtar_CPPFLAGS=-I$(top_builddir)/libarchive ++bsdtar_LDFLAGS= $(static) + bsdtar_dist_man_MANS= tar/bsdtar.1 |