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
commit42149635d8fa318afabcd20a83cbd75e0e7a8b5e (patch)
tree538e15d30aff23ff7cc473334229a8c3b6f03bba /sys-libs
parentarm/s390/sh stable (diff)
downloadhistorical-42149635d8fa318afabcd20a83cbd75e0e7a8b5e.tar.gz
historical-42149635d8fa318afabcd20a83cbd75e0e7a8b5e.tar.bz2
historical-42149635d8fa318afabcd20a83cbd75e0e7a8b5e.zip
Version bump #209905 by Arfrever Frehtes Taifersar Arahesis.
Package-Manager: portage-2.2_pre2
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libcap/ChangeLog13
-rw-r--r--sys-libs/libcap/Manifest22
-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
9 files changed, 467 insertions, 3 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/Manifest b/sys-libs/libcap/Manifest
index 1c7b8efbd82b..f0a9160ba2f2 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -1,4 +1,13 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 1.10-python.patch 2796 RMD160 b8fa02d2141048c95bcd07854f3b1a079475467b SHA1 c2514ea37904469fc0e6ee7d9534210f917910b5 SHA256 52ddf875d1ab0553b66c83c01cf145f3e4c714a948a52a568dc1a7642ab3ba73
+AUX 2.06/0001-set-FAKEROOT-to-DESTDIR-by-default.patch 800 RMD160 da095e588267ed7f4561ae74cfc69b9e55b3839f SHA1 2cd6e500c6f8e31194bd7fd62fae1b614f7aaac5 SHA256 ecc9a210bd441fe4f566a2ed74fc18a86f16b0ac55013dd5030276a52c7cec9c
+AUX 2.06/0002-do-not-use-the-s-flag-with-install.patch 930 RMD160 ced887aa7f8739d25466aa805dc338e5f159c175 SHA1 c3a1c46a607ad56a2d2cf2a90ea8218a2e385928 SHA256 fe37bfb904ca8d67fd84354d7f4ed073320f54527b3280fc766685bf004d1d7b
+AUX 2.06/0003-Add-.gitignore-files.patch 1294 RMD160 fdc4380137ccd12c6870b08422e6b742b4315752 SHA1 331a911b5599a1bf5e7c8b131495e9c6124a9b63 SHA256 efc9a4b172bb1a65915a253e44309646b95a9960b164d72cb6d25f2419ae86fe
+AUX 2.06/0004-Do-not-run-ldconfig-for-FAKEROOT-installs.patch 1030 RMD160 468f0684eb1b0002d795096778744acdc98ef8d6 SHA1 d66aa93977200102f2d375e18bbef09b441a8af8 SHA256 77d41772682d124bfb02ef2a9cd123077383b1ec2950d54954a801afa25cae03
+AUX 2.06/0005-Do-not-hard-code-toolchain-binaries.patch 1543 RMD160 64807ed0e80588b4dfc0836b3bf87bfcb1f53976 SHA1 de92ba2febc538c13af72e456e4d87561002f00a SHA256 f1a77398df4d131016e15bcc53ff7932424fb5db45fe2e51b1a0c993083f3d81
+AUX 2.06/0006-cleanup-build-system.patch 5903 RMD160 cd17e24cfad41bfce72de7d8e1f61d0687be4b3e SHA1 74b3d3e7c26b430ab06743dec83ae4dbf0a1fc04 SHA256 3907880bc0107b65570ca0ec90860edd384e1c862f1e1f22d32aed6e561f8941
AUX libcap-1.10-auditcaps.diff 443 RMD160 a53709c50e907c0a250caa86966c4af36b08629d SHA1 6ce77a09480e5b8b216348ddfad0b4a164cb1356 SHA256 1147f37baedb71d3c1242fa3ff5dd7f784d06d0815ce77429ba3570b0be40b3f
AUX libcap-1.10-headers.patch 422 RMD160 b1177097e4e76acb295e4ee4de478eb214c4e45e SHA1 17d7c7e025205a5d8f250b0527f7026ed980f594 SHA256 75a478e4e7b01ae67b93f80580310259e7d436c3ef32da8d8562690881ccf550
AUX libcap-1.10-nostrip.patch 325 RMD160 f4bb1eedfee569c5ea92836f6944555fb2197e24 SHA1 760505b69d6e5156bcddd85b4b08bce374da2fca SHA256 ee2f10a6b8f9d5d680f19fe58e3dd03f1d8045e0cbf0bef5b9cb9b1c8329dc74
@@ -6,11 +15,20 @@ AUX libcap-1.10-python-2.patch 3349 RMD160 6e6ad215052570a7b1c76be5a82519fbcf386
AUX libcap-1.10-r4-staticfix.diff 2113 RMD160 b99eb439f6254ce468d6ed492dcbf4129eb5ea62 SHA1 e57457517434854274e95fe42f208c6be9ecf73e SHA256 5496a53d3f24bd7a07936dcd470f33615832edbf193d9aebd94590413f34ef7d
AUX libcap-1.10-syscall.patch 1051 RMD160 b369627ad27c14559fdf6e6225c6f0ee607c3e8d SHA1 e8ce4d9b32903f2799f29524ab40b82bc023ac9c SHA256 d07ade0e8c784074d23cd8a26c5619178f8aa16174543d41bd4e2a9aaf266254
DIST libcap-1.10.tar.bz2 26686 RMD160 c1fad30889f0651039efc9db34e72060c4567f71 SHA1 04e699788d98c9ceffaf1292f22a88189ac3d7b7 SHA256 66c3f033fdc8f9ba0bd9d0ae2d1f2c11f9fa51bf0d1418e5cb75e29e6577a5bc
+DIST libcap-2.06.tar.bz2 39523 RMD160 94b8d65023633e66dd81e94b7d771b83ea5437fc SHA1 7e414d2dade34769775d59751098889f6a89b73d SHA256 41d5b04208e9539dbd4e41ad21d94fdb3ee3251a9dee4c0d2aa1b10cbc82d4df
DIST libcap_1.10-14.diff.gz 12928 RMD160 7fbf66ca5795ae8ee05d208d74a76619ad81afae SHA1 e6661aec051ccb201061839d275f2282968d8b93 SHA256 e8fdb798774d49439dd07a6a2858da08a27e6b8057e0f87456a0bc223b74f706
EBUILD libcap-1.10-r10.ebuild 2282 RMD160 adb1185013886c4b924d1603aa7fd7ebbf41e650 SHA1 73e9a1a6aac0584d066597b0a38206631d7d9543 SHA256 d8a54cddb62af2c8fbdc26db97107fa2d091b3424d4086d072552b5a870c4338
-EBUILD libcap-1.10-r11.ebuild 2378 RMD160 6332842e6ddeb98e30c594336ecd8f4ddb216751 SHA1 bc002eace8f2967d08a9b276205aba011d38b025 SHA256 d682cf90a3c43558df2a565e126c9527c49b6c64932eb46ef92fb6d431a5f684
+EBUILD libcap-1.10-r11.ebuild 2377 RMD160 0d8f6bec5c19f68ea877d73dec0b89bbdaaedea4 SHA1 df6cca40dc491d2842e341f25fb6c616bb73f239 SHA256 e0a10aae10f0de300bbcc2450a7c74bdca06019312813140b43831fbb10c1e79
EBUILD libcap-1.10-r5.ebuild 2136 RMD160 09ed5c4e207aceee1237bcbed5c301a9756885fb SHA1 764dce4c35816792ec581f7838c2168a6ee2dbfb SHA256 219f4113c5be9961be727914347fcd1390b51ad0963f875210d206035abddfe1
EBUILD libcap-1.10-r8.ebuild 2136 RMD160 3c44061c68c60ae368e30e4c83eba7620ebf7c5b SHA1 6d7bff54083be7b85f915cd646acf69f31f00a58 SHA256 ae0a5368b189a63411c21c64fb700b10a40303cccccf15d90030b9a8486b4cde
EBUILD libcap-1.10-r9.ebuild 2217 RMD160 4709b38cf001980835311b0c45538ead80c5752d SHA1 09a7cb05b308ad9edb4fe353bb231a06709cb930 SHA256 39b65d70ec65684049d1f38ab095c4d5b1b233a44e6fa26ab85ee27bbe6354be
-MISC ChangeLog 7509 RMD160 b5bf78d855fb06b07b7306903926d1285c3d27db SHA1 84ce42e0fbc9ec1789102293438a2848f3a2d351 SHA256 82ebfafbc663b29523116bd2b5530a9c9a31d527de56becbb5914e3e912e27d4
+EBUILD libcap-2.06.ebuild 1009 RMD160 2185fcb501b8e2ed43090ef21144f7452285975a SHA1 b0d9b1cbc414a678f279e6b4d9974574ce464830 SHA256 a4faf9d43fcdd317b6f1379b60c0c5040fc9dd65e07373e233afff6fc2cf6ea1
+MISC ChangeLog 8018 RMD160 e6db41da12f2ae4d53168a3cf3a546e8e9f47c23 SHA1 9526eea419aac2059d070f93c4c0e6dcb6d281c8 SHA256 a0446d357d53562681eef3e0087ecb3a60c580c6ef62eb9692176537b06ac394
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFHt116j9hvisErhMIRAgt+AKClTj0YUOUc+mbONB/FOWFGS3zrjgCggMDw
+yO9X/mpYRBXhy9x6GjEuRvA=
+=q2ro
+-----END PGP SIGNATURE-----
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
+}