public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/libcap-ng/, sys-libs/libcap-ng/files/
@ 2014-02-22 16:02 Anthony G. Basile
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2014-02-22 16:02 UTC (permalink / raw
  To: gentoo-commits

commit:     4ccddb2765deea49149670e021a04cfb6e17aa5e
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 22 16:03:34 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 16:03:34 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=4ccddb27

sys-libs/libcap-ng: add missing unistd.h

Package-Manager: portage-2.2.7
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA

---
 .../libcap-ng-0.7.3-add-missing-unistd_h.patch     |  11 ++
 sys-libs/libcap-ng/libcap-ng-0.7.3-r99.ebuild      | 117 +++++++++++++++++++++
 sys-libs/libcap-ng/metadata.xml                    |  10 ++
 3 files changed, 138 insertions(+)

diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.7.3-add-missing-unistd_h.patch b/sys-libs/libcap-ng/files/libcap-ng-0.7.3-add-missing-unistd_h.patch
new file mode 100644
index 0000000..fa6fab2
--- /dev/null
+++ b/sys-libs/libcap-ng/files/libcap-ng-0.7.3-add-missing-unistd_h.patch
@@ -0,0 +1,11 @@
+diff -Naur libcap-ng-0.7.3.orig/utils/proc-llist.c libcap-ng-0.7.3/utils/proc-llist.c
+--- libcap-ng-0.7.3.orig/utils/proc-llist.c	2012-11-09 19:59:13.000000000 +0000
++++ libcap-ng-0.7.3/utils/proc-llist.c	2014-02-22 15:58:17.933566760 +0000
+@@ -24,6 +24,7 @@
+ #include "config.h"
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "proc-llist.h"
+ 
+ void list_create(llist *l)

diff --git a/sys-libs/libcap-ng/libcap-ng-0.7.3-r99.ebuild b/sys-libs/libcap-ng/libcap-ng-0.7.3-r99.ebuild
new file mode 100644
index 0000000..2bada81
--- /dev/null
+++ b/sys-libs/libcap-ng/libcap-ng-0.7.3-r99.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.7.3.ebuild,v 1.14 2014/01/19 20:11:39 vapier Exp $
+
+EAPI=5
+
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+
+inherit autotools eutils flag-o-matic python
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
+SRC_URI="http://people.redhat.com/sgrubb/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="python static-libs"
+
+RDEPEND="python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+	sys-kernel/linux-headers
+	python? ( >=dev-lang/swig-2 )"
+
+PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
+
+pkg_setup() {
+	use python && python_pkg_setup
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-add-missing-unistd_h.patch
+
+	# Disable byte-compilation of Python modules.
+	>py-compile
+
+	# Python bindings are built/tested/installed manually.
+	sed -i -e "/^SUBDIRS/s/ python//" bindings/Makefile.am || die
+	sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+
+	eautoreconf
+
+	use sparc && replace-flags -O? -O0
+}
+
+src_configure() {
+	econf \
+		$(use_enable static-libs static) \
+		$(use_with python)
+}
+
+src_compile() {
+	default
+
+	if use python; then
+		python_copy_sources bindings/python
+
+		building() {
+			emake \
+				CFLAGS="${CFLAGS}" \
+				PYTHON_VERSION="$(python_get_version)" \
+				pyexecdir="$(python_get_sitedir)" \
+				pythondir="$(python_get_sitedir)"
+		}
+		python_execute_function -s --source-dir bindings/python building
+	fi
+}
+
+src_test() {
+	if [[ "${EUID}" -eq 0 ]]; then
+		ewarn "Skipping tests due to root permissions."
+		return
+	fi
+
+	default
+
+	if use python; then
+		testing() {
+			emake \
+				PYTHON_VERSION="$(python_get_version)" \
+				pyexecdir="$(python_get_sitedir)" \
+				pythondir="$(python_get_sitedir)" \
+				TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
+				check
+		}
+		python_execute_function -s --source-dir bindings/python testing
+	fi
+}
+
+src_install() {
+	default
+
+	if use python; then
+		installation() {
+			emake \
+				DESTDIR="${D}" \
+				PYTHON_VERSION="$(python_get_version)" \
+				pyexecdir="$(python_get_sitedir)" \
+				pythondir="$(python_get_sitedir)" \
+				install
+		}
+		python_execute_function -s --source-dir bindings/python installation
+
+		python_clean_installation_image
+	fi
+
+	rm -f "${ED}"/usr/lib*/${PN}.la
+}
+
+pkg_postinst() {
+	use python && python_mod_optimize capng.py
+}
+
+pkg_postrm() {
+	use python && python_mod_cleanup capng.py
+}

diff --git a/sys-libs/libcap-ng/metadata.xml b/sys-libs/libcap-ng/metadata.xml
new file mode 100644
index 0000000..703c252
--- /dev/null
+++ b/sys-libs/libcap-ng/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>base-system</herd>
+  <longdescription>The libcap-ng library is intended to make programming with
+  POSIX capabilities much easier than the traditional libcap library. It
+  includes utilities that can analyse all currently running applications and
+  print out any capabilities and whether or not it has an open ended bounding
+  set.</longdescription>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-22 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-22 16:02 [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/libcap-ng/, sys-libs/libcap-ng/files/ Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox