summaryrefslogtreecommitdiff
path: root/net-libs/pacparser
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/pacparser
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/pacparser')
-rw-r--r--net-libs/pacparser/Manifest8
-rw-r--r--net-libs/pacparser/files/pacparser-1.3.1-makefile.patch66
-rw-r--r--net-libs/pacparser/metadata.xml26
-rw-r--r--net-libs/pacparser/pacparser-1.3.1.ebuild52
-rw-r--r--net-libs/pacparser/pacparser-1.3.7.ebuild61
5 files changed, 213 insertions, 0 deletions
diff --git a/net-libs/pacparser/Manifest b/net-libs/pacparser/Manifest
new file mode 100644
index 000000000000..126ceb4d128a
--- /dev/null
+++ b/net-libs/pacparser/Manifest
@@ -0,0 +1,8 @@
+AUX pacparser-1.3.1-makefile.patch 2265 SHA256 2e5b9fa7fbaad4ae818a608b6d5b667ee442a9a49f5b0f558361ea13dbf86670 SHA512 6812dc1482554053fedf0f522260cc5da6b5f9bfa9e1ccf51bb5d1ad92c3663122460c6d41f8c3a2318b37e251ec8bf5849f3f4140d2f6fd647d5be61544af51 WHIRLPOOL 85e985b0f4d28b9288b67741499f0bf2236fa0d2c3da142cfb9d365ccd1b3ce7548a427d0d23bc8838dc8ef333a82872f25088604b81d8e71d8ce4dac0731081
+DIST pacparser-1.3.1.tar.gz 1229362 SHA256 040fb94c420f6aaad295b0b60cf1659f996fee1997c332bec2a6390955276585 SHA512 20295667d92eb5385429c085c14ca8dc1ba216487ff474304433f99119216934be2dd1647452173418de31f5345679dd7159eafd331e40a2b87564f878d31349 WHIRLPOOL 47caf428b4574d9fbb40cffe46afb38cc6bb786382805754f1653e3d554af60e695e1718902c94822b229b7fb4f9748257745a1b3faedfa02cc7b06ba457768f
+DIST pacparser-1.3.7.tar.gz 905596 SHA256 eb48ec2fc202d12a4b882133048c7590329849f32c2285bc4dbe418f29aad249 SHA512 979238204cd352ecf502a5a6216a35d7c47e82a173c32c6f0a5166f1fe790c66ac74ec1d9d0a58b54038d19e893f8b365ed868664f84ab9d5e653584bf20130b WHIRLPOOL be594e02c2eb41edf737ebd0a1b24c4aa044df9883f749f2d625858b16b7d15bd35045c481717c08ec65ec7043c09ef31d2a16d0c4bae6b1c78ab5fa86418c3e
+EBUILD pacparser-1.3.1.ebuild 1360 SHA256 0c8e2bf555d9a6d32f1c10526108f380c6737b3b27de811338d1c2fa0c586536 SHA512 64b6facfd2512c729e5bed4727489830d0602a720ca7918b9c02f9a936d48410c465101aed9058f550eb6f804813d263c4388add156f472187c936790633fb6e WHIRLPOOL 9d272ca0f763d5180ec311ed6f955d3d76135e9ccdb76ceca8e2fdb45919c711cef5f952b0c59f33f6eeda6a3179d7745d40b923c5aec9ffdf1f764db3864bd0
+EBUILD pacparser-1.3.7.ebuild 1602 SHA256 d8f919b304f807a77375b262881f1596e83636c6075c9f9098ad4d1227db080b SHA512 c40f3ea5279259ff52a05041d870797a23879f3a7a512af64e9f0e26bff9a7a52d7bf47f7e53baeb0c8a7cf5d0b2cbd75238d4892b349fe31117f28014b0a341 WHIRLPOOL f5698266d7e9760e4279fe076eb4b416a81240f60b9332ef67853bf4a5f9f7b5222886f567341dfe03a538dd11be427592b17f4e275664635fdc37845a6674f8
+MISC ChangeLog 2860 SHA256 cabe94fcae5fcd3c52cf97cb176415b2cb2032f87b4980d722e42a5b7b49cc8a SHA512 bd8c620942add8d05ec4959c5a062d85c125671e65fa6b542e1be3f28288399d1ce74f953f2743c1fef6beb83cf27792994646cf3554ca0d18bb4be903185d3e WHIRLPOOL ef87b4608e7a9a410699a6e91668bf5a213df32b21f599138928aa1168b7d52c386f16c683f3d9354ce946b89cf0d8ae148dc5cee6fef3e99a7a0a6b59fc29a4
+MISC ChangeLog-2015 841 SHA256 09f909d344976fcf6f592009ee01a5c54cb689fb2813bb7d5bd71491a8ba57b5 SHA512 6c1623592503e37ed0069cc09117b61201bfee2b65b6bc78fa385589fc194f97132db240ad86c35441da359800ce094726f470dacc011128bba92dd3bbc040eb WHIRLPOOL e7856d77aa3043de6f615b85a72d64b1853f344c8c821fb76417a51ae414d8766cf86ed26e26370fe0311293d9ac3ae208a277a826f4596b84fd2e38707c59f6
+MISC metadata.xml 1211 SHA256 9142f65183c5f33757a1d2099d1b583ceaa56f24a5d2c68dcba03be8c8037a61 SHA512 f8bdcabda15db7e7fdcc91d90a4d43c791883a47c8123843d20fefc45b1357912a192eae37fa0909908d9f795f644086010273aad9361e317b8d6a91dec8523c WHIRLPOOL c60b612d13b259c34d7194226eb2631c4bea8ebac38b63fdf60ba2c9f5f19a4357c0b0563d3c864de52f5401715ac7d058c194bbb0ab39349b4b13bdefe97f32
diff --git a/net-libs/pacparser/files/pacparser-1.3.1-makefile.patch b/net-libs/pacparser/files/pacparser-1.3.1-makefile.patch
new file mode 100644
index 000000000000..a1434075d18a
--- /dev/null
+++ b/net-libs/pacparser/files/pacparser-1.3.1-makefile.patch
@@ -0,0 +1,66 @@
+diff -Nur pacparser-1.3.1.orig/src/Makefile pacparser-1.3.1/src/Makefile
+--- pacparser-1.3.1.orig/src/Makefile 2013-11-26 04:21:24.000000000 +0000
++++ pacparser-1.3.1/src/Makefile 2013-11-26 04:27:11.000000000 +0000
+@@ -55,7 +55,7 @@
+ endif
+ endif
+
+-CFLAGS = -g -DXP_UNIX -Wall -DVERSION=$(VERSION)
++CFLAGS := $(CFLAGS) -g -DXP_UNIX -Wall -DVERSION=$(VERSION)
+
+ ifndef PYTHON
+ PYTHON = python
+@@ -67,13 +67,14 @@
+
+ LIBRARY_LINK = $(LIBRARY_NAME).$(SO_SUFFIX)
+ PREFIX := $(DESTDIR)$(PREFIX)
+-LIB_PREFIX = $(PREFIX)/lib
+-INC_PREFIX = $(PREFIX)/include
+-BIN_PREFIX = $(PREFIX)/bin
+-MAN_PREFIX = $(PREFIX)/share/man
++LIB_PREFIX := $(PREFIX)/lib
++INC_PREFIX := $(PREFIX)/include
++BIN_PREFIX := $(PREFIX)/bin
++MAN_PREFIX := $(PREFIX)/share/man
++DOC_PREFIX := $(PREFIX)/share/doc/pacparser
+
+ .PHONY: clean pymod install-pymod
+-all: testpactester
++all: pactester
+
+ spidermonkey/js/src: spidermonkey/js-?.?.?.tar.gz
+ tar xzvf spidermonkey/js-?.?.?.tar.gz -C spidermonkey
+@@ -97,7 +98,7 @@
+ ln -sf $(LIBRARY) $(LIBRARY_LINK)
+
+ pactester: pactester.c pacparser.h $(LIBRARY_LINK)
+- $(CC) pactester.c -o pactester -lpacparser -L. -I.
++ $(CC) $(CFLAGS) $(LDFLAGS) pactester.c -o pactester -lpacparser -L. -I.
+
+ testpactester: pactester
+ echo "Running tests for pactester."
+@@ -118,16 +119,20 @@
+ # install pacparser manpages
+ install -d $(MAN_PREFIX)/man3/
+ (test -d ../docs && install -m 644 ../docs/man/man3/*.3 $(MAN_PREFIX)/man3/) || true
++
++install-docs:
+ # 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 libjs.a
+ cd pymod && ARCHFLAGS="" $(PYTHON) setup.py build
++
++test-pymod: pymod
+ $(PYTHON) ../tests/runtests.py
+
+ install-pymod: pymod
diff --git a/net-libs/pacparser/metadata.xml b/net-libs/pacparser/metadata.xml
new file mode 100644
index 000000000000..f15997fe5b71
--- /dev/null
+++ b/net-libs/pacparser/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bicatali@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ A library to parse proxy auto-config (PAC) files. Proxy auto-config
+ files are a vastly used proxy configuration method these days. Web
+ browsers can use a PAC file to determine which proxy server to use
+ or whether to go direct for a given URL. PAC files are written in
+ JavaScript and can be programmed to return different proxy methods
+ (e.g. "PROXY proxy1:port; DIRECT") depending upon URL, source IP
+ address, protocol, time of the day etc. PAC files introduce a lot
+ of possibilities.
+ Needless to say, PAC files are now a widely accepted method for
+ proxy configuration management and companies all over are using
+ them in corporate environments. Almost all popular web browsers
+ support PAC files. The idea behind pacparser is to make it easy to
+ add this PAC file parsing capability to any program (C and Python
+ supported right now).
+</longdescription>
+ <upstream>
+ <remote-id type="github">pacparser/pacparser</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-libs/pacparser/pacparser-1.3.1.ebuild b/net-libs/pacparser/pacparser-1.3.1.ebuild
new file mode 100644
index 000000000000..d74a0944e0dc
--- /dev/null
+++ b/net-libs/pacparser/pacparser-1.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit eutils python-r1 multilib
+
+DESCRIPTION="Library to parse proxy auto-config files"
+HOMEPAGE="https://github.com/pacparser/pacparser"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+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 17
+# failures : unbundling not worth
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ export NO_INTERNET=yes
+}
+
+src_compile() {
+ emake -j1 -C src
+ use python && python_foreach_impl emake -j1 -C src pymod
+}
+
+src_test() {
+ emake -j1 -C src testpactester
+ use python && emake -j1 -C src test-pymod
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIB_PREFIX="${ED}/usr/$(get_libdir)" -C src install
+ dodoc README
+ use python && python_foreach_impl \
+ emake DESTDIR="${D}" \
+ LIB_PREFIX="${D}/usr/$(get_libdir)" -C src install-pymod
+ use doc && emake DESTDIR="${ED}" \
+ DOC_PREFIX="${ED}/usr/share/doc/${PF}" -C src install-docs
+ # conflicts (bug #509168), and useless
+ rm "${ED}"/usr/share/man/man3/deprecated.3 || die
+}
diff --git a/net-libs/pacparser/pacparser-1.3.7.ebuild b/net-libs/pacparser/pacparser-1.3.7.ebuild
new file mode 100644
index 000000000000..7256ae1e8a84
--- /dev/null
+++ b/net-libs/pacparser/pacparser-1.3.7.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+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
+ emake -j1 -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
+ use python && python_foreach_impl \
+ emake DESTDIR="${D}" \
+ LIB_PREFIX="${D}/usr/$(get_libdir)" -C src install-pymod
+ if use doc; then
+ docompress -x /usr/share/doc/${PF}/{html,examples}
+ else
+ rm -r "${ED}"/usr/share/doc/${PF}/{html,examples} || die
+ fi
+}