summaryrefslogtreecommitdiff
path: root/net-libs/pacparser
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
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-libs/pacparser')
-rw-r--r--net-libs/pacparser/Manifest4
-rw-r--r--net-libs/pacparser/files/pacparser-1.4.0-build.patch96
-rw-r--r--net-libs/pacparser/files/pacparser-1.4.0-pymod.patch61
-rw-r--r--net-libs/pacparser/pacparser-1.4.0.ebuild70
4 files changed, 231 insertions, 0 deletions
diff --git a/net-libs/pacparser/Manifest b/net-libs/pacparser/Manifest
index 2f437dda9ddd..30dcf080e6d5 100644
--- a/net-libs/pacparser/Manifest
+++ b/net-libs/pacparser/Manifest
@@ -1,3 +1,7 @@
+AUX pacparser-1.4.0-build.patch 3666 BLAKE2B c21de20e715279741acd9659edfb0ef83bcd12dde597ab3f3d4e11ecf0eba4078cb982efc3b12d03f335e466249b6b2c02acf8355ddc6d84eace7906b53f67e8 SHA512 d6fdb9040557033b17bdd9a27c85d33bda7028e2f7774fde71899c1eb9268b3d80ba31f2fd5022d370ebd12ea3d6d3c236106cd44ac5818ee1a4f18d19462305
+AUX pacparser-1.4.0-pymod.patch 2328 BLAKE2B 50be6b3d7950d391edbab3b9ebf9ffb2c6ba3a7121b9cc9fb23da1af4f6e0891d653e0795b9b0153ca8911df8891f6fd872701d578deb3760724582d2d548925 SHA512 115fa4fdbd9a0ba612cccd8d796eefb1d467d4d4aab99b0ef880c7446ad9c1bfb023197d5e6fc86c8158f7be6d72bbb423572b204a2e5b2a41fd3e949db0f597
DIST pacparser-1.3.7.tar.gz 905596 BLAKE2B 122127b6e1d8f68fde4c5ca98207bf2a0fa2a081dbb60aaf34126700a3de9d861e7b5f881e78d3eefdd2a9af97a9ba677339ca2b2a0b4459d26e60a62226e839 SHA512 979238204cd352ecf502a5a6216a35d7c47e82a173c32c6f0a5166f1fe790c66ac74ec1d9d0a58b54038d19e893f8b365ed868664f84ab9d5e653584bf20130b
+DIST pacparser-1.4.0.tar.gz 902919 BLAKE2B da29b34654764b1569d9d37648e4ccb608142becaf34c65cdf37b2bd81aa073b1945d840fb50aa7cb986687bbdc086c862a05bc421adb08d44e1add637b712ed SHA512 9574068dc4da3db27ddc1242cf98d98ebc7515864789e95b700cd2ce1433a7cff84160f1507976488fab7529839cabe9cf2aa16ddbefc0c83009fa6c0d2ad6b3
EBUILD pacparser-1.3.7-r1.ebuild 1723 BLAKE2B fade4e47f9adffe2a2ee3882cbca02c7bfd12fe4b97f3ccd194e0b28e4a86c9049b32b192fef76ef23614c560f034cb69e2e22d4a22983a994b4b646075f4740 SHA512 7317c7cf6cace28cca26881409a86da166cefbef71ae7aedd8e826aa969c274f29660fa2ad970e6b3293ddc970a91df56d1814874b7f10d6e074d6d0b95abed0
+EBUILD pacparser-1.4.0.ebuild 1643 BLAKE2B cc58174c61c4d30e90ec5bc614ab76d2cf185fc1b90fd8cc93b93300e8f20a4ce6781053d1bb63669b9bbf8bf2300297e085483e0e4541b88349794e173b8996 SHA512 483084be28b7924eb88befef5711fafc4f67e1c22e303447df3df631514ab6c979bcc8703f3280d3e1fe498f15028c36cf93dd841726d6fe8aa07417bdfc48fc
MISC metadata.xml 1244 BLAKE2B 308285d031a2a74466840be80d4c3cd1fa26b6d06fcd4cd353a26475ea3f1cf637d14d9b087aaf30e22c385f59ad6c348c5be489579d8001a65db30736a63efe SHA512 128769f45fb50c349a6ca8261ce4fa97fba11f763d97351d811b7bf9b419cea76871344cd8c754652ebb915682b92f7615a4ebc62670a3cec5fe92b83bbf5b4e
diff --git a/net-libs/pacparser/files/pacparser-1.4.0-build.patch b/net-libs/pacparser/files/pacparser-1.4.0-build.patch
new file mode 100644
index 000000000000..2a8898579327
--- /dev/null
+++ b/net-libs/pacparser/files/pacparser-1.4.0-build.patch
@@ -0,0 +1,96 @@
+Upstream-PR: https://github.com/manugarg/pacparser/pull/136
+From 5d689be2e250242ef4022054f11bf00af339c149 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 13 May 2022 22:34:37 -0700
+Subject: [PATCH 1/2] build: Don't conflict with the user's CFLAGS
+
+This uses the variable MAINT_CFLAGS to set the project's flags so that
+the user can set CFLAGS as an environment variable or as an make
+argument without any conflicts.
+
+This can be problemtic with the build environment in some distros.
+---
+ src/Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 87f5c1b..3642241 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -60,14 +60,14 @@ ifeq ($(OS_ARCH),Darwin)
+ endif
+
+ PREFIX ?= /usr
+-CFLAGS = -g -DXP_UNIX -Wall -DVERSION=$(VERSION)
++MAINT_CFLAGS := -g -DXP_UNIX -Wall -DVERSION=$(VERSION)
+
+ ifndef PYTHON
+ PYTHON = python
+ endif
+
+ # Spidermonkey library.
+-CFLAGS += -Ispidermonkey/js/src
++MAINT_CFLAGS += -Ispidermonkey/js/src
+
+ LIBRARY_LINK = $(LIBRARY_NAME).$(SO_SUFFIX)
+ PREFIX := $(DESTDIR)$(PREFIX)
+@@ -87,17 +87,17 @@ spidermonkey/libjs.a: spidermonkey/js/src
+ cd spidermonkey && SMCFLAGS="$(SHFLAGS) $(SMCFLAGS)" $(MAKE) jslib
+
+ pacparser.o: pacparser.c pac_utils.h pacparser.h jsapi_buildstamp
+- $(CC) $(CFLAGS) $(SHFLAGS) -c pacparser.c -o pacparser.o
++ $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(SHFLAGS) -c pacparser.c -o pacparser.o
+ touch pymod/pacparser_o_buildstamp
+
+ $(LIBRARY): pacparser.o spidermonkey/libjs.a
+- $(MKSHLIB) $(CFLAGS) $(LDFLAGS) $(LIB_OPTS) -o $(LIBRARY) pacparser.o spidermonkey/libjs.a -lm
++ $(MKSHLIB) $(MAINT_CFLAGS) $(CFLAGS) $(LDFLAGS) $(LIB_OPTS) -o $(LIBRARY) pacparser.o spidermonkey/libjs.a -lm
+
+ $(LIBRARY_LINK): $(LIBRARY)
+ ln -sf $(LIBRARY) $(LIBRARY_LINK)
+
+ pactester: pactester.c pacparser.h pacparser.o spidermonkey/libjs.a
+- $(CC) $(CFLAGS) $(LDFLAGS) pactester.c pacparser.o spidermonkey/libjs.a -o pactester -lm -L. -I.
++ $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(LDFLAGS) pactester.c pacparser.o spidermonkey/libjs.a -o pactester -lm -L. -I.
+
+ testpactester: pactester $(LIBRARY_LINK)
+ echo "Running tests for pactester."
+
+From ff86f230de5dd60935e1793077eb038fcbe1e515 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 13 May 2022 22:45:19 -0700
+Subject: [PATCH 2/2] build: Add DOC_PREFIX
+
+This can be useful for distro integration.
+---
+ src/Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 3642241..af10890 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -74,6 +74,7 @@ PREFIX := $(DESTDIR)$(PREFIX)
+ LIB_PREFIX = $(PREFIX)/lib
+ INC_PREFIX = $(PREFIX)/include
+ BIN_PREFIX = $(PREFIX)/bin
++DOC_PREFIX = $(PREFIX)/share/doc/pacparser
+ MAN_PREFIX = $(PREFIX)/share/man
+
+ .PHONY: clean pymod install-pymod
+@@ -119,11 +120,11 @@ install: all
+ install -d $(MAN_PREFIX)/man3/
+ (test -d ../docs && install -m 644 ../docs/man/man3/*.3 $(MAN_PREFIX)/man3/) || true
+ # install html docs
+- install -d $(PREFIX)/share/doc/pacparser/html/
+- (test -d ../docs/html && install -m 644 ../docs/html/* $(PREFIX)/share/doc/pacparser/html/) || true
++ install -d $(DOC_PREFIX)/html/
++ (test -d ../docs/html && install -m 644 ../docs/html/* $(DOC_PREFIX)/html/) || true
+ # install examples
+- install -d $(PREFIX)/share/doc/pacparser/examples/
+- (test -d ../examples && install -m 644 ../examples/* $(PREFIX)/share/doc//pacparser/examples/) || true
++ install -d $(DOC_PREFIX)/examples/
++ (test -d ../examples && install -m 644 ../examples/* $(DOC_PREFIX)/examples/) || true
+
+ # Targets to build python module
+ pymod: pacparser.o pacparser.h spidermonkey/libjs.a
diff --git a/net-libs/pacparser/files/pacparser-1.4.0-pymod.patch b/net-libs/pacparser/files/pacparser-1.4.0-pymod.patch
new file mode 100644
index 000000000000..203e34c838f1
--- /dev/null
+++ b/net-libs/pacparser/files/pacparser-1.4.0-pymod.patch
@@ -0,0 +1,61 @@
+Upstream-PR: https://github.com/manugarg/pacparser/pull/137
+From 351b8f837ebbdf6e6fa4978a70287899436890eb Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 14 May 2022 01:46:25 -0700
+Subject: [PATCH] tests: Fix python path in runtests.py
+
+In Gentoo the runtests.py script fails when it fails to determine the
+pacparser path.
+
+This happens because 'py_ver' expands to '3.9' when the expected
+directory ends in '39'. This can be solved by replacing any periods in
+the string.
+
+python ../tests/runtests.py
+Traceback (most recent call last):
+ File "/tmp/pacparser/src/../tests/runtests.py", line 31, in runtests
+ pacparser_module_path = glob.glob(os.path.join(
+IndexError: list index out of range
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ File "/tmp/pacparser/src/../tests/runtests.py", line 81, in <module>
+ main()
+ File "/tmp/pacparser/src/../tests/runtests.py", line 78, in main
+ runtests(pacfile, testdata, tests_dir)
+ File "/tmp/pacparser/src/../tests/runtests.py", line 34, in runtests
+ raise Exception('Tests failed. Could not determine pacparser path.')
+Exception: Tests failed. Could not determine pacparser path.
+---
+ tests/runtests.py | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/tests/runtests.py b/tests/runtests.py
+index 9760300..a5377d1 100644
+--- a/tests/runtests.py
++++ b/tests/runtests.py
+@@ -26,10 +26,20 @@
+ import sys
+
+ def runtests(pacfile, testdata, tests_dir):
+- py_ver = '.'.join([str(x) for x in sys.version_info[0:2]])
++ ver = '.'.join([str(x) for x in sys.version_info[0:2]])
++ py_ver = [ver, ver.replace('.', '')]
+ try:
+- pacparser_module_path = glob.glob(os.path.join(
+- tests_dir, '..', 'src', 'pymod', 'build', 'lib*%s' % py_ver))[0]
++ module_path = glob.glob(os.path.join(
++ tests_dir, '..', 'src', 'pymod', 'build', 'lib*'))
++ module_found = False
++ for module in module_path:
++ for version in py_ver:
++ if module.endswith(version):
++ module_found = True
++ break
++ if module_found:
++ pacparser_module_path = module
++ break
+ except Exception:
+ raise Exception('Tests failed. Could not determine pacparser path.')
+ if 'DEBUG' in os.environ: print('Pacparser module path: %s' %
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
+}