summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-02-16 22:02:29 +0000
committerMike Frysinger <vapier@gentoo.org>2008-02-16 22:02:29 +0000
commit7caf7e53e997a5992a11f115190546e37342cbe7 (patch)
tree7ca0b842ec3bc726ad3256e1395c37bcf713047d /sys-libs/libcap
parentstable x86, bug 210396 (diff)
downloadgentoo-2-7caf7e53e997a5992a11f115190546e37342cbe7.tar.gz
gentoo-2-7caf7e53e997a5992a11f115190546e37342cbe7.tar.bz2
gentoo-2-7caf7e53e997a5992a11f115190546e37342cbe7.zip
Version bump #209905 by Arfrever Frehtes Taifersar Arahesis.
(Portage version: 2.2_pre2)
Diffstat (limited to 'sys-libs/libcap')
-rw-r--r--sys-libs/libcap/ChangeLog13
-rw-r--r--sys-libs/libcap/files/2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch29
-rw-r--r--sys-libs/libcap/files/2.06/0002-do-not-use-the-s-flag-with-install.patch31
-rw-r--r--sys-libs/libcap/files/2.06/0003-Add-.gitignore-files.patch57
-rw-r--r--sys-libs/libcap/files/2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch33
-rw-r--r--sys-libs/libcap/files/2.06/0005-Do-not-hard-code-toolchain-binaries.patch48
-rw-r--r--sys-libs/libcap/files/2.06/0006-cleanup-build-system.patch199
-rw-r--r--sys-libs/libcap/libcap-2.06.ebuild38
8 files changed, 447 insertions, 1 deletions
diff --git a/sys-libs/libcap/ChangeLog b/sys-libs/libcap/ChangeLog
index ff2ba501ede6..8b14ff275e51 100644
--- a/sys-libs/libcap/ChangeLog
+++ b/sys-libs/libcap/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-libs/libcap
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.57 2008/02/14 18:15:46 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.58 2008/02/16 22:02:28 vapier Exp $
+
+*libcap-2.06 (16 Feb 2008)
+
+ 16 Feb 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch,
+ +files/2.06/0002-do-not-use-the-s-flag-with-install.patch,
+ +files/2.06/0003-Add-.gitignore-files.patch,
+ +files/2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch,
+ +files/2.06/0005-Do-not-hard-code-toolchain-binaries.patch,
+ +files/2.06/0006-cleanup-build-system.patch, +libcap-2.06.ebuild:
+ Version bump #209905 by Arfrever Frehtes Taifersar Arahesis.
14 Feb 2008; nixnut <nixnut@gentoo.org> ChangeLog:
Stable on ppc wrt bug 200512
diff --git a/sys-libs/libcap/files/2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch b/sys-libs/libcap/files/2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch
new file mode 100644
index 000000000000..c32f6e8cd7a9
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch
@@ -0,0 +1,29 @@
+From bdf315fc208c8fcf2c1f1cfa5450e51ab9e29f20 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:06:55 -0500
+Subject: [PATCH] set FAKEROOT to DESTDIR by default
+
+Since the DESTDIR variable is the common standard for installing into a
+staging directory, the FAKEROOT variable should default to it.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Make.Rules | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Make.Rules b/Make.Rules
+index db3aab2..9bccbb7 100644
+--- a/Make.Rules
++++ b/Make.Rules
+@@ -4,7 +4,7 @@
+
+ # common 'packaging' directoty
+
+-FAKEROOT=
++FAKEROOT=$(DESTDIR)
+
+ # Autoconf-style prefixes are activated when $(prefix) is defined.
+ # Otherwise binaries and libraraies are installed in /{lib,sbin}/,
+--
+1.5.4
+
diff --git a/sys-libs/libcap/files/2.06/0002-do-not-use-the-s-flag-with-install.patch b/sys-libs/libcap/files/2.06/0002-do-not-use-the-s-flag-with-install.patch
new file mode 100644
index 000000000000..2710efaea893
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0002-do-not-use-the-s-flag-with-install.patch
@@ -0,0 +1,31 @@
+From 7dcf80ba834e54d6745575086eb4e4c4db1cad92 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:09:51 -0500
+Subject: [PATCH] do not use the '-s' flag with `install`
+
+The `install` program strips binaries when given the '-s' flag. This step
+should be left up to package maintainers to handle the stripping, especially
+since the `install` program will always execute `strip` -- this is no good
+for cross-compiling for example.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ progs/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/progs/Makefile b/progs/Makefile
+index 9d25a78..d711656 100644
+--- a/progs/Makefile
++++ b/progs/Makefile
+@@ -17,7 +17,7 @@ $(PROGS): %: %.o
+ install: all
+ mkdir -p -m 0755 $(SBINDIR)
+ for p in $(PROGS) ; do \
+- install -s -m 0755 $$p $(SBINDIR) ; \
++ install -m 0755 $$p $(SBINDIR) ; \
+ done
+
+ clean:
+--
+1.5.4
+
diff --git a/sys-libs/libcap/files/2.06/0003-Add-.gitignore-files.patch b/sys-libs/libcap/files/2.06/0003-Add-.gitignore-files.patch
new file mode 100644
index 000000000000..e4f71858b4fa
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0003-Add-.gitignore-files.patch
@@ -0,0 +1,57 @@
+From f016763e8d886120be6d3fe9740f34bb5ae8487a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:14:58 -0500
+Subject: [PATCH] Add .gitignore files
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ .gitignore | 1 +
+ libcap/.gitignore | 6 ++++++
+ pam_cap/.gitignore | 2 ++
+ progs/.gitignore | 4 ++++
+ 4 files changed, 13 insertions(+), 0 deletions(-)
+ create mode 100644 .gitignore
+ create mode 100644 libcap/.gitignore
+ create mode 100644 pam_cap/.gitignore
+ create mode 100644 progs/.gitignore
+
+diff --git a/.gitignore b/.gitignore
+new file mode 100644
+index 0000000..5761abc
+--- /dev/null
++++ b/.gitignore
+@@ -0,0 +1 @@
++*.o
+diff --git a/libcap/.gitignore b/libcap/.gitignore
+new file mode 100644
+index 0000000..9fc5e1d
+--- /dev/null
++++ b/libcap/.gitignore
+@@ -0,0 +1,6 @@
++cap_names.h
++cap_names.sed
++_caps_output.gperf
++libcap.a
++libcap.so*
++_makenames
+diff --git a/pam_cap/.gitignore b/pam_cap/.gitignore
+new file mode 100644
+index 0000000..11806f5
+--- /dev/null
++++ b/pam_cap/.gitignore
+@@ -0,0 +1,2 @@
++pam_cap.so
++testcompile
+diff --git a/progs/.gitignore b/progs/.gitignore
+new file mode 100644
+index 0000000..280c19e
+--- /dev/null
++++ b/progs/.gitignore
+@@ -0,0 +1,4 @@
++capsh
++getcap
++getpcaps
++setcap
+--
+1.5.4
+
diff --git a/sys-libs/libcap/files/2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch b/sys-libs/libcap/files/2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch
new file mode 100644
index 000000000000..4e032f42193c
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch
@@ -0,0 +1,33 @@
+From 4d901fdeb7af70d5e7800848f0a33af6cbeb491d Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:22:02 -0500
+Subject: [PATCH] Do not run ldconfig for FAKEROOT installs
+
+If you're installing into a temporary directory, then running ldconfig will
+simply waste CPU and I/O time. The install location will not be any path
+that ldconfig searches, and generally people build as non-root so the
+ldconfig binary will run for a while before erroring out due to lack of
+permissions.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ libcap/Makefile | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/libcap/Makefile b/libcap/Makefile
+index fdb9ae2..b108aa9 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -62,7 +62,9 @@ install: all
+ install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
+ ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
+ ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
++ifeq ($(FAKEROOT),)
+ -/sbin/ldconfig
++endif
+
+ clean:
+ $(LOCALCLEAN)
+--
+1.5.4
+
diff --git a/sys-libs/libcap/files/2.06/0005-Do-not-hard-code-toolchain-binaries.patch b/sys-libs/libcap/files/2.06/0005-Do-not-hard-code-toolchain-binaries.patch
new file mode 100644
index 000000000000..d9431f9d6e53
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0005-Do-not-hard-code-toolchain-binaries.patch
@@ -0,0 +1,48 @@
+From adf5e017030a62ea4cab21067b52ee1d336da222 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:25:28 -0500
+Subject: [PATCH] Do not hard code toolchain binaries
+
+If you are cross-compiling, you cannot execute `ar` and `ranlib` on the
+target library, otherwise things may break. Here we create standard AR
+and RANLIB variables which can easily be overridden by the environment.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Make.Rules | 4 +++-
+ libcap/Makefile | 4 ++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/Make.Rules b/Make.Rules
+index 9bccbb7..3f38e72 100644
+--- a/Make.Rules
++++ b/Make.Rules
+@@ -42,7 +42,9 @@ MINOR=06
+
+ # Compilation specifics
+
+-CC=gcc
++CC ?= gcc
++AR ?= ar
++RANLIB ?= ranlib
+ COPTFLAGS=-O2
+ DEBUG=-O2 -g #-DDEBUG
+ WARNINGS=-fPIC -Wall -Wwrite-strings \
+diff --git a/libcap/Makefile b/libcap/Makefile
+index b108aa9..09a12d2 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -40,8 +40,8 @@ cap_names.sed: Makefile $(KERNEL_HEADERS)/linux/capability.h
+ @sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/\{\"\1\",\2\},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
+
+ $(STALIBNAME): $(OBJS)
+- ar rcs $(STALIBNAME) $(OBJS)
+- ranlib $(STALIBNAME)
++ $(AR) rcs $(STALIBNAME) $(OBJS)
++ $(RANLIB) $(STALIBNAME)
+
+ $(MINLIBNAME): $(OBJS)
+ $(LD) $(LDFLAGS) $(COPTFLAG) -Wl,-soname,$(MAJLIBNAME) -o $@ $(OBJS)
+--
+1.5.4
+
diff --git a/sys-libs/libcap/files/2.06/0006-cleanup-build-system.patch b/sys-libs/libcap/files/2.06/0006-cleanup-build-system.patch
new file mode 100644
index 000000000000..cecde8cd2cbe
--- /dev/null
+++ b/sys-libs/libcap/files/2.06/0006-cleanup-build-system.patch
@@ -0,0 +1,199 @@
+From 5ec19bea0899c6e305337331ad4f8f8669492f28 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Feb 2008 16:51:53 -0500
+Subject: [PATCH] cleanup build system
+
+This refactors the homebrewed build system to work much better "out of the
+box" for people. It moves tools/flags into appropriate env-overridable
+variables as well as simplifies the subdirectory handling and flag passing.
+A few bug fixes are also mixed in such as proper link order, parallel build
+failure due to local header generation, and splitting up of logic between
+binaries compiled and run on the build system and binaries compiled to run
+on the target system.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Make.Rules | 27 +++++++++++----------------
+ Makefile | 8 ++++----
+ libcap/Makefile | 18 ++++++++++--------
+ pam_cap/Makefile | 9 ++++++---
+ progs/Makefile | 7 +++++--
+ 5 files changed, 36 insertions(+), 33 deletions(-)
+
+diff --git a/Make.Rules b/Make.Rules
+index 3f38e72..17e71c1 100644
+--- a/Make.Rules
++++ b/Make.Rules
+@@ -43,33 +43,28 @@ MINOR=06
+ # Compilation specifics
+
+ CC ?= gcc
++BUILD_CC ?= $(CC)
+ AR ?= ar
+ RANLIB ?= ranlib
+-COPTFLAGS=-O2
+-DEBUG=-O2 -g #-DDEBUG
+-WARNINGS=-fPIC -Wall -Wwrite-strings \
++CFLAGS ?= -O2
++BUILD_CFLAGS ?=
++WARNINGS=-Wall -Wwrite-strings \
+ -Wpointer-arith -Wcast-qual -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wnested-externs -Winline -Wshadow
+ LD=$(CC) -Wl,-x -shared
+-LDFLAGS=#-g
++LDFLAGS ?= #-g
+
+ KERNEL_HEADERS = $(topdir)/libcap/include
+-SYSTEM_HEADERS = /usr/include
+-IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
++LIBCAP_CPPFLAGS = -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
++CPPFLAGS += $(LIBCAP_CPPFLAGS)
++BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
+ INCS=$(topdir)/libcap/include/sys/capability.h
+-LIBS=-L$(topdir)/libcap -lcap
+-CFLAGS=-Dlinux $(WARNINGS) $(DEBUG) $(COPTFLAG) $(IPATH)
++LDFLAGS += -L$(topdir)/libcap
++CPPFLAGS += -Dlinux
++CFLAGS += $(WARNINGS)
+ PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
+ # Global cleanup stuff
+
+ LOCALCLEAN=rm -f *~ core
+ DISTCLEAN=@find . \( -name '*.orig' -o -name '*.rej' \) | xargs rm -f
+-
+-# Flags to pass down recursive makes
+-
+-MAKE_DEFS = CC='$(CC)' CFLAGS='$(CFLAGS)' \
+- LD='$(LD)' LIBS='$(LIBS)' LDFLAGS='$(LDFLAGS)' \
+- VERSION='$(VERSION)' MINOR='$(MINOR)' \
+- LIBDIR='$(LIBDIR)' INCDIR='$(INCDIR)' \
+- SBINDIR='$(SBINDIR)' MANDIR='$(MANDIR)'
+diff --git a/Makefile b/Makefile
+index 52f7b42..9076724 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,12 +9,12 @@ include Make.Rules
+ #
+
+ all install clean: %: %-here
+- $(MAKE) -C libcap $(MAKE_DEFS) $@
++ $(MAKE) -C libcap $@
+ ifneq ($(PAM_CAP),no)
+- $(MAKE) -C pam_cap $(MAKE_DEFS) $@
++ $(MAKE) -C pam_cap $@
+ endif
+- $(MAKE) -C progs $(MAKE_DEFS) $@
+- $(MAKE) -C doc $(MAKE_DEFS) $@
++ $(MAKE) -C progs $@
++ $(MAKE) -C doc $@
+
+ all-here:
+
+diff --git a/libcap/Makefile b/libcap/Makefile
+index 09a12d2..4bcc279 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -17,7 +17,9 @@ OBJS=$(addsuffix .o, $(FILES))
+ MAJLIBNAME=$(LIBNAME).$(VERSION)
+ MINLIBNAME=$(MAJLIBNAME).$(MINOR)
+ GPERF_OUTPUT = _caps_output.gperf
+-LDFLAGS+=-lattr
++LDLIBS += -lattr
++CFLAGS += -fPIC
++INCLS += cap_names.h
+
+ all: $(MINLIBNAME) $(STALIBNAME)
+
+@@ -27,7 +29,7 @@ INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT)
+ endif
+
+ _makenames: _makenames.c cap_names.sed
+- $(CC) $(CFLAGS) $< -o $@
++ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
+
+ cap_names.h: _makenames
+ ./_makenames > cap_names.h
+@@ -40,19 +42,19 @@ cap_names.sed: Makefile $(KERNEL_HEADERS)/linux/capability.h
+ @sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/\{\"\1\",\2\},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
+
+ $(STALIBNAME): $(OBJS)
+- $(AR) rcs $(STALIBNAME) $(OBJS)
+- $(RANLIB) $(STALIBNAME)
++ $(AR) rcs $@ $^
++ $(RANLIB) $@
+
+ $(MINLIBNAME): $(OBJS)
+- $(LD) $(LDFLAGS) $(COPTFLAG) -Wl,-soname,$(MAJLIBNAME) -o $@ $(OBJS)
++ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^ $(LDLIBS)
+ ln -sf $(MINLIBNAME) $(MAJLIBNAME)
+ ln -sf $(MAJLIBNAME) $(LIBNAME)
+
+ %.o: %.c $(INCLS)
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+-cap_text.o: cap_text.c $(USE_GPERF_OUTPUT)
+- $(CC) $(CFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
++cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
+
+ install: all
+ mkdir -p -m 0755 $(INCDIR)/sys
+diff --git a/pam_cap/Makefile b/pam_cap/Makefile
+index 3b3d266..e20d059 100644
+--- a/pam_cap/Makefile
++++ b/pam_cap/Makefile
+@@ -3,6 +3,9 @@
+ topdir=$(shell pwd)/..
+ include ../Make.Rules
+
++LDLIBS += -lcap
++CFLAGS += -fPIC
++
+ all: pam_cap.so
+ $(MAKE) testcompile
+
+@@ -14,13 +17,13 @@ install:
+ @echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+
+ pam_cap.so: pam_cap.o
+- $(LD) -o pam_cap.so $< $(LIBS)
++ $(LD) $(CFLAGS) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
+
+ pam_cap.o: pam_cap.c
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ testcompile: test.c pam_cap.o
+- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
+
+ clean:
+ rm -f *.o *.so testcompile *~
+diff --git a/progs/Makefile b/progs/Makefile
+index d711656..9b6b11c 100644
+--- a/progs/Makefile
++++ b/progs/Makefile
+@@ -6,13 +6,16 @@ include $(topdir)/Make.Rules
+ #
+ PROGS=getpcaps getcap setcap capsh
+
++LDFLAGS += --static
++LDLIBS += -lcap
++
+ all: $(PROGS)
+
+ $(PROGS): %: %.o
+- $(CC) --static $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+ %.o: %.c $(INCS)
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ install: all
+ mkdir -p -m 0755 $(SBINDIR)
+--
+1.5.4
+
diff --git a/sys-libs/libcap/libcap-2.06.ebuild b/sys-libs/libcap/libcap-2.06.ebuild
new file mode 100644
index 000000000000..ad5f0f234be5
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.06.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/libcap-2.06.ebuild,v 1.1 2008/02/16 22:02:28 vapier Exp $
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html"
+SRC_URI="http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap${PV:0:1}/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="pam"
+
+DEPEND="sys-kernel/linux-headers"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}/*.patch
+}
+
+src_compile() {
+ tc-export BUILD_CC CC AR RANLIB
+ export PAM_CAP=$(use pam && echo yes || echo no)
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" lib=$(get_libdir) || die
+
+ dolib.a libcap/libcap.a || die
+ gen_usr_ldscript libcap.so
+
+ dodoc CHANGELOG README doc/capability.notes
+}