You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
2.0 KiB
98 lines
2.0 KiB
5 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
5 years ago
|
EAPI=6
|
||
6 years ago
|
|
||
|
DISTUTILS_OPTIONAL=1
|
||
|
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
||
|
GENTOO_DEPEND_ON_PERL="no"
|
||
|
|
||
5 years ago
|
inherit autotools distutils-r1 eapi7-ver perl-functions
|
||
6 years ago
|
|
||
5 years ago
|
MY_PV="$(ver_cut 1-2)"
|
||
6 years ago
|
|
||
|
DESCRIPTION="Library to support AppArmor userspace utilities"
|
||
5 years ago
|
HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
|
||
|
SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz"
|
||
6 years ago
|
|
||
|
LICENSE="LGPL-2.1"
|
||
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
6 years ago
|
IUSE="doc +perl +python static-libs"
|
||
|
|
||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||
|
|
||
|
RDEPEND="perl? ( dev-lang/perl:= )
|
||
|
python? ( ${PYTHON_DEPS} )"
|
||
|
DEPEND="${RDEPEND}
|
||
|
sys-devel/autoconf-archive
|
||
|
sys-devel/bison
|
||
|
sys-devel/flex
|
||
|
doc? ( dev-lang/perl )
|
||
|
perl? ( dev-lang/swig )
|
||
|
python? ( dev-lang/swig )"
|
||
|
|
||
5 years ago
|
S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
|
||
|
|
||
|
PATCHES=( "${FILESDIR}/${PN}-2.10-symbol_visibility.patch" )
|
||
6 years ago
|
|
||
|
RESTRICT="test"
|
||
|
|
||
|
src_prepare() {
|
||
|
rm -r m4 || die "failed to remove bundled macros"
|
||
5 years ago
|
default
|
||
|
eautoreconf
|
||
6 years ago
|
use python && distutils-r1_src_prepare
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
5 years ago
|
econf \
|
||
|
$(use_enable static-libs static) \
|
||
6 years ago
|
$(use_with perl) \
|
||
|
$(use_with python)
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
5 years ago
|
emake -C src
|
||
|
emake -C include
|
||
|
use doc && emake -C doc
|
||
|
use perl && emake -C swig/perl
|
||
6 years ago
|
|
||
|
if use python ; then
|
||
5 years ago
|
pushd swig/python > /dev/null
|
||
6 years ago
|
emake libapparmor_wrap.c
|
||
|
distutils-r1_src_compile
|
||
|
popd > /dev/null
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
5 years ago
|
emake DESTDIR="${D}" -C src install
|
||
|
emake DESTDIR="${D}" -C include install
|
||
|
use doc && emake DESTDIR="${D}" -C doc install
|
||
6 years ago
|
|
||
|
if use perl ; then
|
||
5 years ago
|
emake DESTDIR="${D}" -C swig/perl install
|
||
6 years ago
|
perl_set_version
|
||
|
insinto "${VENDOR_ARCH}"
|
||
5 years ago
|
doins swig/perl/LibAppArmor.pm
|
||
6 years ago
|
|
||
|
# bug 620886
|
||
|
perl_delete_localpod
|
||
|
perl_fix_packlist
|
||
|
fi
|
||
|
|
||
|
if use python ; then
|
||
5 years ago
|
pushd swig/python > /dev/null
|
||
6 years ago
|
distutils-r1_src_install
|
||
|
|
||
|
python_moduleinto LibAppArmor
|
||
|
python_foreach_impl python_domodule LibAppArmor.py
|
||
|
popd > /dev/null
|
||
|
fi
|
||
5 years ago
|
|
||
|
dodoc AUTHORS ChangeLog NEWS README
|
||
|
|
||
|
find "${D}" -name '*.la' -delete || die
|
||
6 years ago
|
}
|