summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-10-06 14:04:00 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-10-06 14:04:00 +0000
commit9ef9160e08c5d08c444cd3515146fdf4ba76cb11 (patch)
treee675e2773afa9ff4f21b4abb01dd825890a5e3f3 /app-arch/bsdtar
parentStable on ppc wrt bug 139179 (diff)
downloadgentoo-2-9ef9160e08c5d08c444cd3515146fdf4ba76cb11.tar.gz
gentoo-2-9ef9160e08c5d08c444cd3515146fdf4ba76cb11.tar.bz2
gentoo-2-9ef9160e08c5d08c444cd3515146fdf4ba76cb11.zip
Make sure that build/static useflags are correctly respected (as this package is used in Gentoo/FreeBSD stage1).
(Portage version: 2.1.2_pre2-r3)
Diffstat (limited to 'app-arch/bsdtar')
-rw-r--r--app-arch/bsdtar/ChangeLog9
-rw-r--r--app-arch/bsdtar/bsdtar-1.3.1-r1.ebuild84
-rw-r--r--app-arch/bsdtar/files/digest-bsdtar-1.3.1-r13
-rw-r--r--app-arch/bsdtar/files/libarchive-1.3.1-static.patch36
4 files changed, 131 insertions, 1 deletions
diff --git a/app-arch/bsdtar/ChangeLog b/app-arch/bsdtar/ChangeLog
index 30e599911119..ad1d698e1e54 100644
--- a/app-arch/bsdtar/ChangeLog
+++ b/app-arch/bsdtar/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-arch/bsdtar
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/bsdtar/ChangeLog,v 1.36 2006/10/06 12:57:12 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/bsdtar/ChangeLog,v 1.37 2006/10/06 14:04:00 flameeyes Exp $
+
+*bsdtar-1.3.1-r1 (06 Oct 2006)
+
+ 06 Oct 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/libarchive-1.3.1-static.patch, +bsdtar-1.3.1-r1.ebuild:
+ Make sure that build/static useflags are correctly respected (as this
+ package is used in Gentoo/FreeBSD stage1).
06 Oct 2006; Diego Pettenò <flameeyes@gentoo.org> bsdtar-1.3.1.ebuild:
Fix dependencies.
diff --git a/app-arch/bsdtar/bsdtar-1.3.1-r1.ebuild b/app-arch/bsdtar/bsdtar-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..8aa6c1c531b5
--- /dev/null
+++ b/app-arch/bsdtar/bsdtar-1.3.1-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/bsdtar/bsdtar-1.3.1-r1.ebuild,v 1.1 2006/10/06 14:04:00 flameeyes Exp $
+
+WANT_AUTOCONF=latest
+WANT_AUTOMAKE=latest
+
+inherit eutils autotools toolchain-funcs flag-o-matic
+
+MY_P="libarchive-${PV}"
+
+DESCRIPTION="BSD tar command"
+HOMEPAGE="http://people.freebsd.org/~kientzle/libarchive/"
+SRC_URI="http://people.freebsd.org/~kientzle/libarchive/src/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc-macos ~x86 ~x86-fbsd"
+IUSE="build static acl xattr"
+
+RDEPEND="!dev-libs/libarchive
+ kernel_linux? (
+ acl? ( sys-apps/acl )
+ xattr? ( sys-apps/attr )
+ )
+ !static? ( !build? (
+ app-arch/bzip2
+ sys-libs/zlib ) )"
+DEPEND="${RDEPEND}
+ kernel_linux? ( sys-fs/e2fsprogs
+ virtual/os-headers )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/libarchive-1.3.1-static.patch
+ epatch "${FILESDIR}"/libarchive-1.2.57-acl.patch
+ epatch "${FILESDIR}"/libarchive-1.2.53-strict-aliasing.patch
+
+ eautoreconf
+ epunt_cxx
+}
+
+src_compile() {
+ local myconf
+
+ if use static || use build ; then
+ myconf="${myconf} --enable-static-bsdtar"
+ else
+ myconf="${myconf} --disable-static-bsdtar"
+ fi
+
+ econf \
+ --bindir=/bin \
+ $(use_enable acl) \
+ $(use_enable xattr) \
+ ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "emake install failed"
+
+ # Create tar symlink for FreeBSD
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ dosym bsdtar /bin/tar
+ dosym bsdtar.1.gz /usr/share/man/man1/tar.1.gz
+ fi
+
+ if use build; then
+ rm -rf "${D}"/usr
+ rm -rf "${D}"/lib/*.so*
+ return 0
+ fi
+
+ if [[ ${CHOST} != *-darwin* ]]; then
+ dodir /$(get_libdir)
+ mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir)
+ gen_usr_ldscript libarchive.so
+ fi
+}
diff --git a/app-arch/bsdtar/files/digest-bsdtar-1.3.1-r1 b/app-arch/bsdtar/files/digest-bsdtar-1.3.1-r1
new file mode 100644
index 000000000000..853d5013146e
--- /dev/null
+++ b/app-arch/bsdtar/files/digest-bsdtar-1.3.1-r1
@@ -0,0 +1,3 @@
+MD5 c618d26d680ace57fcd5f59cea3151c6 libarchive-1.3.1.tar.gz 901173
+RMD160 e518f802d9a50afcfede6dd7cbb4f42b2cbe12a1 libarchive-1.3.1.tar.gz 901173
+SHA256 ad9eaf5779df75b9a0618a732eb227792e65db17c6713fe81ef5bff2bbc616a8 libarchive-1.3.1.tar.gz 901173
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