summaryrefslogtreecommitdiff
path: root/net-libs/pacparser/pacparser-1.4.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-libs/pacparser/pacparser-1.4.0.ebuild
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-libs/pacparser/pacparser-1.4.0.ebuild')
-rw-r--r--net-libs/pacparser/pacparser-1.4.0.ebuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/net-libs/pacparser/pacparser-1.4.0.ebuild b/net-libs/pacparser/pacparser-1.4.0.ebuild
new file mode 100644
index 000000000000..7dc296824bb6
--- /dev/null
+++ b/net-libs/pacparser/pacparser-1.4.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit python-r1 toolchain-funcs
+
+DESCRIPTION="Library to parse proxy auto-config files"
+HOMEPAGE="http://pacparser.manugarg.com/"
+SRC_URI="https://github.com/manugarg/${PN}/archive/v${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 it.
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+ "${FILESDIR}/${P}-pymod.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -e '/CC = gcc/d' \
+ -i src/spidermonkey/js/src/config/Linux_All.mk || die
+
+ export NO_INTERNET=yes
+ export VERSION="${PV}"
+ tc-export CC AR RANLIB
+}
+
+src_compile() {
+ # 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_install() {
+ emake \
+ LIB_PREFIX="${ED}/usr/$(get_libdir)" \
+ DOC_PREFIX="${ED}/usr/share/doc/${PF}" \
+ BIN_PREFIX="${ED}"/usr/bin \
+ INC_PREFIX="${ED}"/usr/include \
+ MAN_PREFIX="${ED}"/usr/share/man \
+ -C src install
+ dodoc README.md
+
+ if use python; then
+ python_foreach_impl emake DESTDIR="${D}" -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
+}