diff options
author | Henning Schild <henning@hennsch.de> | 2020-05-13 07:59:57 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-06-08 16:41:26 +0300 |
commit | 4fbac5723b8b8d6ad207b7a41b343e861f7e8490 (patch) | |
tree | 88805f5e9f1738919077fdcf6477c38ea91b3041 /net-libs/pacparser | |
parent | net-vpn/i2pd: version bump 2.31.1 (diff) | |
download | gentoo-4fbac5723b8b8d6ad207b7a41b343e861f7e8490.tar.gz gentoo-4fbac5723b8b8d6ad207b7a41b343e861f7e8490.tar.bz2 gentoo-4fbac5723b8b8d6ad207b7a41b343e861f7e8490.zip |
net-libs/pacparser: Support newer python, python_optimize and "make -j"
Add python3_7, that simply works. Add python_optimize calls to fix a QA
issue. And call emake twice to work around parrallel build issue.
Signed-off-by: Henning Schild <henning@hennsch.de>
Closes: https://github.com/gentoo/gentoo/pull/15773
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-libs/pacparser')
-rw-r--r-- | net-libs/pacparser/pacparser-1.3.7-r1.ebuild | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/net-libs/pacparser/pacparser-1.3.7-r1.ebuild b/net-libs/pacparser/pacparser-1.3.7-r1.ebuild new file mode 100644 index 000000000000..af0525e5b471 --- /dev/null +++ b/net-libs/pacparser/pacparser-1.3.7-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{6,7} ) + +inherit eutils python-r1 toolchain-funcs + +DESCRIPTION="Library to parse proxy auto-config files" +HOMEPAGE="http://pacparser.manugarg.com/" +SRC_URI="https://github.com/pacparser/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0/1" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc python" + +DEPEND="python? ( ${PYTHON_DEPS} )" +RDEPEND="${DEPEND}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# spidermonkey-1.7.0 is bundled +# tested unbundling with spidermonkey-1.8* and 1.7 +# and got many failures : unbundling not worth. + +src_prepare() { + default + sed -e 's|CFLAGS = |CFLAGS := $(CFLAGS) |' \ + -e 's|= $(PREFIX)|:= $(PREFIX)|g' \ + -e "s|share/doc.*pacparser|share/doc/${PF}|g" \ + -e "s|/lib|/$(get_libdir)|g" \ + -i src/Makefile || die + export NO_INTERNET=yes + tc-export CC AR RANLIB +} + +src_compile() { + emake -C src spidermonkey/js/src + sed -e '/CC = gcc/d' \ + -i src/spidermonkey/js/src/config/Linux_All.mk || die + # Upstream parallel compilation bug, do that first to work around + emake -C src/spidermonkey + emake -C src + use python && python_foreach_impl emake -C src pymod +} + +src_test() { + emake -C src testpactester +} + +src_install() { + emake DESTDIR="${ED}" LIB_PREFIX="${ED}/usr/$(get_libdir)" -C src install + dodoc README.md + if use python; then + python_foreach_impl emake DESTDIR="${D}" \ + LIB_PREFIX="${D}/usr/$(get_libdir)" -C src install-pymod + python_foreach_impl python_optimize + fi + if use doc; then + docompress -x /usr/share/doc/${PF}/{html,examples} + else + rm -r "${ED}"/usr/share/doc/${PF}/{html,examples} || die + fi +} |