diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/setools | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/setools')
-rw-r--r-- | app-admin/setools/Manifest | 4 | ||||
-rw-r--r-- | app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch | 24 | ||||
-rw-r--r-- | app-admin/setools/files/fix-implicit-def-fstat.patch | 13 | ||||
-rw-r--r-- | app-admin/setools/files/setools3-userspace-2.4-compatibility.patch | 114 | ||||
-rw-r--r-- | app-admin/setools/metadata.xml | 9 | ||||
-rw-r--r-- | app-admin/setools/setools-3.3.8-r5.ebuild | 160 | ||||
-rw-r--r-- | app-admin/setools/setools-3.3.8-r7.ebuild | 138 | ||||
-rw-r--r-- | app-admin/setools/setools-9999.ebuild | 45 |
8 files changed, 507 insertions, 0 deletions
diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest new file mode 100644 index 000000000000..6aeaf2fec08d --- /dev/null +++ b/app-admin/setools/Manifest @@ -0,0 +1,4 @@ +DIST setools-3.3.8-01-fedora-patches.tar.gz 1128 SHA256 420b852d4209d07b73cec84586e000e7a6a719135ea677711abf97d420840bb6 SHA512 1aa2cc50c307929b522e029a552bfd545aef07656d1983289b0ea9be67aa94c07272a59c17630fc09fd79b06845ada318cdfa48d6cc243a24026e015c23b9634 WHIRLPOOL 25ae2b15fb15060fd0d34c55f4cc098b70a3a616f5334b092657a9c5df037b7fcf00fd185f33ba142e47d46c36b2fb7e9434021d6e987832fe833367a50d7449 +DIST setools-3.3.8-03-gentoo-patches.tar.gz 6584 SHA256 8eac460b7dc2ee5e2f23148cdbf187316edd78ce0ec7ebbb6b0f68d6ad33d86a SHA512 5458dab5775b558e287f946c299753be5cb5eb6c1c2b9df0e32c7cfa758bb5316d142aa6338d3019f5f1eeb72876e4d5ed4939b0dbfe7b7e01c08a19a086bacc WHIRLPOOL e1afa6bb28f3aee2f3acdc66efd8ca02548c4f8e5707052ea455f1db558126f069d63278251630ee68bf4987157279161006975cb14d44055492228fa476cd72 +DIST setools-3.3.8-04-gentoo-patches.tar.bz2 94986 SHA256 9a8a43ac97606fde9b2610ceed65f640638929853f871ce530982bedfd919b64 SHA512 39bf00b6aaf31821c6e2e2fb4c460dd1914fba4bf8385acebedf88f1533da990f1fb925dd49d75827aebef3f394a50a1edea46a07204193b58c65a066a064e6a WHIRLPOOL 4a92e4cf6930584de931c5d0805815aacd1c1af4434ca8e73414eda33588a55ef8d7bdfe4195be642889eee480128cbe12d1c5612e07ea304021b230e0b74816 +DIST setools-3.3.8.tar.bz2 951428 SHA256 44387ecc9a231ec536a937783440cd8960a72c51f14bffc1604b7525e341e999 SHA512 2c42ee9904174ed6c6fc129e374ec3591925094ab0ef65001b0104e365c5634bf4a79f28369608c80199d8f59fafaa5f274107c04c129c380eeef7adb0c32667 WHIRLPOOL 11c4065809909764f4364b78df1a8030d189315601b882919ccacb5fb147c1b3a061c5bbf9ced3c243d4615ab7727e9db0c89e931a884ae8b317ae3a879e5371 diff --git a/app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch b/app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch new file mode 100644 index 000000000000..548f60b7dc88 --- /dev/null +++ b/app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch @@ -0,0 +1,24 @@ +diff -ur setools-3.3.7.orig/configure.ac setools-3.3.7/configure.ac +--- setools-3.3.7.orig/configure.ac 2011-08-12 19:20:32.651000078 +0200 ++++ setools-3.3.7/configure.ac 2011-08-12 19:20:42.224000036 +0200 +@@ -503,7 +503,7 @@ + [AC_LANG_SOURCE([ + #include <sepol/policydb/expand.h> + int main () { +- return role_set_expand(NULL, NULL, NULL, NULL); ++ return role_set_expand(NULL, NULL, NULL, NULL, NULL); + }])], + sepol_new_user_role_mapping="yes", + sepol_new_user_role_mapping="no") +diff -ur setools-3.3.7.orig/libqpol/src/policy_define.c setools-3.3.7/libqpol/src/policy_define.c +--- setools-3.3.7.orig/libqpol/src/policy_define.c 2011-08-12 19:20:32.657000013 +0200 ++++ setools-3.3.7/libqpol/src/policy_define.c 2011-08-12 19:20:53.907005864 +0200 +@@ -2133,7 +2133,7 @@ + + /* This ebitmap business is just to ensure that there are not conflicting role_trans rules */ + #ifdef HAVE_SEPOL_USER_ROLE_MAPPING +- if (role_set_expand(&roles, &e_roles, policydbp, NULL)) ++ if (role_set_expand(&roles, &e_roles, policydbp, NULL, NULL)) + #else + if (role_set_expand(&roles, &e_roles, policydbp)) + #endif diff --git a/app-admin/setools/files/fix-implicit-def-fstat.patch b/app-admin/setools/files/fix-implicit-def-fstat.patch new file mode 100644 index 000000000000..72764320a252 --- /dev/null +++ b/app-admin/setools/files/fix-implicit-def-fstat.patch @@ -0,0 +1,13 @@ +diff -ur setools-3.3.7.orig/libqpol/src/policy.c setools-3.3.7/libqpol/src/policy.c +--- setools-3.3.7.orig/libqpol/src/policy.c 2011-08-12 19:48:13.793000029 +0200 ++++ setools-3.3.7/libqpol/src/policy.c 2011-08-12 19:49:32.880001229 +0200 +@@ -36,6 +36,9 @@ + #include <stdio.h> + #include <stdlib.h> + #include <sys/mman.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> + #include <asm/types.h> + + #include <sepol/debug.h> diff --git a/app-admin/setools/files/setools3-userspace-2.4-compatibility.patch b/app-admin/setools/files/setools3-userspace-2.4-compatibility.patch new file mode 100644 index 000000000000..c8fc3f52905d --- /dev/null +++ b/app-admin/setools/files/setools3-userspace-2.4-compatibility.patch @@ -0,0 +1,114 @@ +From f1e5b208d507171968ca4d2eeefd7980f1004a3c Mon Sep 17 00:00:00 2001 +From: Chris PeBenito <cpebenito@tresys.com> +Date: Thu, 12 Feb 2015 08:55:12 -0500 +Subject: [PATCH] Update for 2015-02-02 Userspace release (2.4) + +SETools now requires libsepol 2.4 and libselinux 2.4. +--- + configure.ac | 6 +++--- + libqpol/src/policy_define.c | 4 ++-- + libqpol/src/policy_extend.c | 4 ++-- + libqpol/src/syn_rule_query.c | 6 +++--- + secmds/replcon.cc | 2 +- + 5 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 80395e6..ae20da7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,9 +25,9 @@ libseaudit_version=4.5 + setoolsdir='${prefix}/share/setools-3.3' + javadir='${prefix}/share/java' + +-version_min_sepol_major=1 +-version_min_sepol_minor=12 +-version_min_sepol_patch=27 ++version_min_sepol_major=2 ++version_min_sepol_minor=4 ++version_min_sepol_patch=0 + + dnl *** end of tunable values *** + +diff --git a/libqpol/src/policy_define.c b/libqpol/src/policy_define.c +index 229779c..15f70ba 100644 +--- a/libqpol/src/policy_define.c ++++ b/libqpol/src/policy_define.c +@@ -1661,7 +1661,7 @@ int define_compute_type_helper(int which, avrule_t ** rule) + goto bad; + } + class_perm_node_init(perm); +- perm->class = i + 1; ++ perm->tclass = i + 1; + perm->data = datum->s.value; + perm->next = avrule->perms; + avrule->perms = perm; +@@ -1901,7 +1901,7 @@ int define_te_avtab_helper(int which, avrule_t ** rule) + goto out; + } + class_perm_node_init(cur_perms); +- cur_perms->class = i + 1; ++ cur_perms->tclass = i + 1; + if (!perms) + perms = cur_perms; + if (tail) +diff --git a/libqpol/src/policy_extend.c b/libqpol/src/policy_extend.c +index 5325a87..1417271 100644 +--- a/libqpol/src/policy_extend.c ++++ b/libqpol/src/policy_extend.c +@@ -843,7 +843,7 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_ + for (class_node = rule->perms; class_node; class_node = class_node->next) { + key.rule_type = rule->specified; + key.source_val = key.target_val = i + 1; +- key.class_val = class_node->class; ++ key.class_val = class_node->tclass; + key.cond = cond; + if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule)) + goto err; +@@ -856,7 +856,7 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_ + key.rule_type = rule->specified; + key.source_val = i + 1; + key.target_val = j + 1; +- key.class_val = class_node->class; ++ key.class_val = class_node->tclass; + key.cond = cond; + if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule)) + goto err; +diff --git a/libqpol/src/syn_rule_query.c b/libqpol/src/syn_rule_query.c +index 3e63204..d7578f1 100644 +--- a/libqpol/src/syn_rule_query.c ++++ b/libqpol/src/syn_rule_query.c +@@ -67,7 +67,7 @@ static void *syn_rule_class_state_get_cur(const qpol_iterator_t * iter) + return NULL; + } + +- return db->class_val_to_struct[srcs->cur->class - 1]; ++ return db->class_val_to_struct[srcs->cur->tclass - 1]; + } + + static int syn_rule_class_state_next(qpol_iterator_t * iter) +@@ -465,10 +465,10 @@ int qpol_syn_avrule_get_perm_iter(const qpol_policy_t * policy, const qpol_syn_a + } + + for (node = internal_rule->perms; node; node = node->next) { +- for (i = 0; i < db->class_val_to_struct[node->class - 1]->permissions.nprim; i++) { ++ for (i = 0; i < db->class_val_to_struct[node->tclass - 1]->permissions.nprim; i++) { + if (!(node->data & (1 << i))) + continue; +- tmp = sepol_av_to_string(db, node->class, (sepol_access_vector_t) (1 << i)); ++ tmp = sepol_av_to_string(db, node->tclass, (sepol_access_vector_t) (1 << i)); + if (tmp) { + tmp++; /* remove prepended space */ + for (cur = 0; cur < perm_list_sz; cur++) +diff --git a/secmds/replcon.cc b/secmds/replcon.cc +index 34f7c1a..307c39f 100644 +--- a/secmds/replcon.cc ++++ b/secmds/replcon.cc +@@ -60,7 +60,7 @@ static struct option const longopts[] = { + {NULL, 0, NULL, 0} + }; + +-extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak)); ++extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak)); + + /** + * As that setools must work with older libselinux versions that may diff --git a/app-admin/setools/metadata.xml b/app-admin/setools/metadata.xml new file mode 100644 index 000000000000..12d653b53586 --- /dev/null +++ b/app-admin/setools/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>selinux</herd> + <longdescription>SELinux policy analysis tools.</longdescription> + <upstream> + <remote-id type="github">TresysTechnology/setools</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-admin/setools/setools-3.3.8-r5.ebuild b/app-admin/setools/setools-3.3.8-r5.ebuild new file mode 100644 index 000000000000..d1b6a8c7d5ac --- /dev/null +++ b/app-admin/setools/setools-3.3.8-r5.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +inherit autotools java-pkg-opt-2 python-r1 eutils toolchain-funcs + +DESCRIPTION="SELinux policy tools" +HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml" +SRC_URI="http://oss.tresys.com/projects/setools/chrome/site/dists/${P}/${P}.tar.bz2 + http://dev.gentoo.org/~swift/patches/setools/${P}-01-fedora-patches.tar.gz + http://dev.gentoo.org/~swift/patches/setools/${P}-03-gentoo-patches.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="X debug java python" + +DEPEND=">=sys-libs/libsepol-2.1.4 + >=sys-libs/libselinux-2.3 + sys-devel/bison + sys-devel/flex + >=dev-db/sqlite-3.2:3 + dev-libs/libxml2:2 + virtual/pkgconfig + java? ( + dev-lang/swig:1 + >=virtual/jdk-1.4 + ) + python? ( + ${PYTHON_DEPS} + dev-lang/swig:1 + ) + X? ( + >=dev-lang/tk-8.4.9 + >=gnome-base/libglade-2.0 + >=x11-libs/gtk+-2.8:2 + )" + +RDEPEND=">=sys-libs/libsepol-2.1.4 + >=sys-libs/libselinux-2.3 + >=dev-db/sqlite-3.2:3 + dev-libs/libxml2:2 + java? ( >=virtual/jre-1.4 ) + X? ( + >=dev-lang/tk-8.4.9:0= + >=dev-tcltk/bwidget-1.8 + >=gnome-base/libglade-2.0 + >=x11-libs/gtk+-2.8:2 + )" + +RESTRICT="test" +# setools dirs that contain python code to build +PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python python" + +pkg_setup() { + if use java; then + java-pkg-opt-2_pkg_setup + fi +} + +src_prepare() { + EPATCH_MULTI_MSG="Applying various (Fedora-provided) setools fixes... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}" \ + EPATCH_FORCE="yes" \ + epatch + + EPATCH_MULTI_MSG="Applying various (Gentoo) setool fixes... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ + EPATCH_FORCE="yes" \ + epatch + + # Disable broken check for SWIG version. + sed -e "s/AC_PROG_SWIG(2.0.0)/AC_PROG_SWIG/" -i configure.ac || die "sed failed" + # Use swig1.3 + sed -e 's/AC_PATH_PROG(\[SWIG\],\[swig\])/AC_PATH_PROG([SWIG],[swig1.3])/' -i m4/ac_pkg_swig.m4 || die "failed to set swig1.3" + # Fix build failure due to double __init__.py installation + sed -e "s/^wrappedpy_DATA = qpol.py \$(pkgpython_PYTHON)/wrappedpy_DATA = qpol.py/" -i libqpol/swig/python/Makefile.am || die + + local dir + for dir in ${PYTHON_DIRS}; do + # Python bindings are built/installed manually. + sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed" + # Make PYTHON_LDFLAGS replaceable during running `make`. + sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed" + done + + # temporary work around bug #424581 until automake-1.12 is stable (then + # depend on it). Need to use MKDIR_P in the mean time for 1.12+. + has_version ">=sys-devel/automake-1.12.1" && { find . -name 'Makefile.*' -exec sed -i -e 's:mkdir_p:MKDIR_P:g' {} + || die; } + + eautoreconf + + # Disable byte-compilation of Python modules. + echo '#!/bin/sh' > py-compile + + epatch_user +} + +src_configure() { + tc-ld-disable-gold #467136 + econf \ + --with-java-prefix=${JAVA_HOME} \ + --disable-selinux-check \ + --disable-bwidget-check \ + $(use_enable python swig-python) \ + $(use_enable java swig-java) \ + $(use_enable X swig-tcl) \ + $(use_enable X gui) \ + $(use_enable debug) + + # work around swig c99 issues. it does not require + # c99 anyway. + sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile" +} + +src_compile() { + emake + + if use python; then + building() { + python_export PYTHON_INCLUDEDIR + python_export PYTHON_SITEDIR + python_export PYTHON_LIBS + emake \ + SWIG_PYTHON_CPPFLAGS="-I${PYTHON_INCLUDEDIR}" \ + PYTHON_LDFLAGS="${PYTHON_LIBS}" \ + pyexecdir="${PYTHON_SITEDIR}" \ + pythondir="${PYTHON_SITEDIR}" \ + -C "$1" + } + local dir + for dir in ${PYTHON_DIRS}; do + python_foreach_impl building ${dir} + done + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use python; then + installation() { + python_export PYTHON_SITEDIR + emake DESTDIR="${D}" \ + pyexecdir="${PYTHON_SITEDIR}" \ + pythondir="${PYTHON_SITEDIR}" \ + -C "$1" install + } + + local dir + for dir in ${PYTHON_DIRS}; do + python_foreach_impl installation "${dir}" + done + fi +} diff --git a/app-admin/setools/setools-3.3.8-r7.ebuild b/app-admin/setools/setools-3.3.8-r7.ebuild new file mode 100644 index 000000000000..2d4502037404 --- /dev/null +++ b/app-admin/setools/setools-3.3.8-r7.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 python3_4 ) + +inherit autotools java-pkg-opt-2 python-r1 eutils toolchain-funcs + +DESCRIPTION="SELinux policy tools" +HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml" +SRC_URI="http://oss.tresys.com/projects/setools/chrome/site/dists/${P}/${P}.tar.bz2 + http://dev.gentoo.org/~perfinion/patches/setools/${P}-04-gentoo-patches.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="X debug java python" + +COMMONDEPEND=">=sys-libs/libsepol-2.4 + >=sys-libs/libselinux-2.4 + >=dev-db/sqlite-3.2:3 + dev-libs/libxml2:2 + python? ( ${PYTHON_DEPS} ) + X? ( + >=dev-lang/tk-8.4.9:0= + >=gnome-base/libglade-2.0 + >=x11-libs/gtk+-2.8:2 + )" + +DEPEND="${COMMONDEPEND} + >=sys-devel/automake-1.12.1 + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + java? ( dev-lang/swig + virtual/jdk:= ) + python? ( dev-lang/swig )" + +RDEPEND="${COMMONDEPEND} + java? ( >=virtual/jre-1.4:= ) + X? ( >=dev-tcltk/bwidget-1.8 )" + +RESTRICT="test" +# setools dirs that contain python code to build +PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python python" + +pkg_setup() { + if use java; then + java-pkg-opt-2_pkg_setup + fi +} + +src_prepare() { + EPATCH_MULTI_MSG="Applying various (Gentoo) setool fixes... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ + EPATCH_FORCE="yes" \ + epatch + + # Fix build failure due to double __init__.py installation + sed -e "s/^wrappedpy_DATA = qpol.py \$(pkgpython_PYTHON)/wrappedpy_DATA = qpol.py/" -i libqpol/swig/python/Makefile.am || die + # Disable broken check for SWIG version. Bug #542032 + sed -e "s/AC_PROG_SWIG(2.0.0)/AC_PROG_SWIG/" -i configure.ac || die "sed failed" + + local dir + for dir in ${PYTHON_DIRS}; do + # Python bindings are built/installed manually. + sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed" + # Make PYTHON_LDFLAGS replaceable during running `make`. + sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed" + done + + epatch_user + + eautoreconf + + # Disable byte-compilation of Python modules. + echo '#!/bin/sh' > py-compile +} + +src_configure() { + tc-ld-disable-gold #467136 + econf \ + --with-java-prefix=${JAVA_HOME} \ + --disable-selinux-check \ + --disable-bwidget-check \ + $(use_enable python swig-python) \ + $(use_enable java swig-java) \ + $(use_enable X swig-tcl) \ + $(use_enable X gui) \ + $(use_enable debug) + + # work around swig c99 issues. it does not require + # c99 anyway. + sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile" +} + +src_compile() { + emake + + if use python; then + building() { + python_export PYTHON_INCLUDEDIR + python_export PYTHON_SITEDIR + python_export PYTHON_LIBS + emake \ + SWIG_PYTHON_CPPFLAGS="-I${PYTHON_INCLUDEDIR}" \ + PYTHON_LDFLAGS="${PYTHON_LIBS}" \ + pyexecdir="${PYTHON_SITEDIR}" \ + pythondir="${PYTHON_SITEDIR}" \ + -C "$1" + } + local dir + for dir in ${PYTHON_DIRS}; do + python_foreach_impl building ${dir} + done + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use python; then + installation() { + python_export PYTHON_SITEDIR + emake DESTDIR="${D}" \ + pyexecdir="${PYTHON_SITEDIR}" \ + pythondir="${PYTHON_SITEDIR}" \ + -C "$1" install + } + + local dir + for dir in ${PYTHON_DIRS}; do + python_foreach_impl installation "${dir}" + done + fi +} diff --git a/app-admin/setools/setools-9999.ebuild b/app-admin/setools/setools-9999.ebuild new file mode 100644 index 000000000000..de9943ad7e0a --- /dev/null +++ b/app-admin/setools/setools-9999.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 python3_4 ) + +inherit distutils-r1 + +DESCRIPTION="Policy Analysis Tools for SELinux" +HOMEPAGE="https://github.com/TresysTechnology/setools/wiki" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/TresysTechnology/setools.git" +else + #SRC_URI="https://github.com/TresysTechnology/setools/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +IUSE="debug test" + +RDEPEND="${PYTHON_DEPS} + >=sys-libs/libselinux-2.4:=[${PYTHON_USEDEP}] + >=dev-python/networkx-1.8[${PYTHON_USEDEP}] + app-arch/bzip2:= + dev-libs/libpcre:= + " + +DEPEND="${RDEPEND} + >=dev-lang/swig-2.0.12:0 + sys-devel/bison + sys-devel/flex + >=sys-libs/libsepol-2.4 + test? ( + python_targets_python2_7? ( dev-python/mock[${PYTHON_USEDEP}] ) + dev-python/tox[${PYTHON_USEDEP}] + )" + +python_prepare_all() { + sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror" + distutils-r1_python_prepare_all +} |