commit:     52161eabaa7da1d524db1a7b24b32f9006c85dcd
Author:     Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin <DOT> de>
AuthorDate: Thu Oct  2 20:16:50 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Oct  2 21:20:30 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=52161eab

pax-utils-0.8.1: substitute __BEGIN/END_DECLS by ifdefs

Signed-of-by: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin.de>

---
 .../files/pax-utils-0.8.1-remove_DECLS.patch       | 25 ++++++++++++
 app-misc/pax-utils/metadata.xml                    | 16 ++++++++
 app-misc/pax-utils/pax-utils-0.8.1-r99.ebuild      | 47 ++++++++++++++++++++++
 3 files changed, 88 insertions(+)

diff --git a/app-misc/pax-utils/files/pax-utils-0.8.1-remove_DECLS.patch 
b/app-misc/pax-utils/files/pax-utils-0.8.1-remove_DECLS.patch
new file mode 100644
index 0000000..38fd77a
--- /dev/null
+++ b/app-misc/pax-utils/files/pax-utils-0.8.1-remove_DECLS.patch
@@ -0,0 +1,25 @@
+diff --git a/elf.h b/elf.h
+index d131b9b..e625240 100644
+--- a/elf.h
++++ b/elf.h
+@@ -21,7 +21,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Standard ELF types.  */
+ 
+@@ -3375,6 +3377,8 @@ typedef Elf32_Addr Elf32_Conflict;
+ #define R_TILEGX_NUM          130
+ 
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif        /* elf.h */

diff --git a/app-misc/pax-utils/metadata.xml b/app-misc/pax-utils/metadata.xml
new file mode 100644
index 0000000..448899f
--- /dev/null
+++ b/app-misc/pax-utils/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer>
+    <email>[email protected]</email>
+    <description>Maintainer</description>
+  </maintainer>
+  <maintainer>
+    <email>[email protected]</email>
+    <description>Maintainer</description>
+  </maintainer>
+  <longdescription>A suite of ELF tools to aid auditing systems. Contains 
various ELF related utils for ELF32, ELF64 binaries useful for displaying PaX 
and security info on a large groups of binary files.</longdescription>
+  <use>
+    <flag name='python'>Install a more powerful/faster version of 
lddtree</flag>
+  </use>
+</pkgmetadata>

diff --git a/app-misc/pax-utils/pax-utils-0.8.1-r99.ebuild 
b/app-misc/pax-utils/pax-utils-0.8.1-r99.ebuild
new file mode 100644
index 0000000..3f05c41
--- /dev/null
+++ b/app-misc/pax-utils/pax-utils-0.8.1-r99.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/pax-utils/pax-utils-0.8.1.ebuild,v 
1.1 2014/03/21 05:36:34 vapier Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs unpacker
+
+DESCRIPTION="ELF related utils for ELF 32/64 binaries that can check files for 
security relevant properties"
+HOMEPAGE="http://hardened.gentoo.org/pax-utils.xml";
+SRC_URI="mirror://gentoo/pax-utils-${PV}.tar.xz
+       http://dev.gentoo.org/~solar/pax/pax-utils-${PV}.tar.xz
+       http://dev.gentoo.org/~vapier/dist/pax-utils-${PV}.tar.xz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="caps python"
+#RESTRICT="mirror"
+
+RDEPEND="caps? ( sys-libs/libcap )
+       python? ( dev-python/pyelftools )"
+DEPEND="${RDEPEND}
+       app-arch/xz-utils"
+
+_emake() {
+       emake \
+               USE_CAP=$(usex caps) \
+               USE_PYTHON=$(usex python) \
+               "$@"
+}
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-remove_DECLS.patch
+}
+
+src_compile() {
+       _emake CC="$(tc-getCC)"
+}
+
+src_test() {
+       _emake check
+}
+
+src_install() {
+       _emake DESTDIR="${ED}" PKGDOCDIR='$(DOCDIR)'/${PF} install
+}

Reply via email to