diff options
Diffstat (limited to 'user/libproxy')
-rw-r--r-- | user/libproxy/APKBUILD | 61 | ||||
-rw-r--r-- | user/libproxy/fix-includes.patch | 10 | ||||
-rw-r--r-- | user/libproxy/libproxy-0.4.7-unistd.patch | 40 |
3 files changed, 111 insertions, 0 deletions
diff --git a/user/libproxy/APKBUILD b/user/libproxy/APKBUILD new file mode 100644 index 000000000..ffeac9d28 --- /dev/null +++ b/user/libproxy/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: +pkgname=libproxy +pkgver=0.4.15 +pkgrel=2 +pkgdesc="Library providing automatic proxy configuration management" +url="http://libproxy.github.io/libproxy/" +arch="all" +license="LGPL-2.1+" +depends="" +depends_dev="zlib-dev" +makedepends="cmake python3-dev $depends_dev" +subpackages="$pkgname-dev $pkgname-bin py3-$pkgname:py" +source="$pkgname-$pkgver.tar.gz::https://github.com/libproxy/libproxy/archive/$pkgver.tar.gz + libproxy-0.4.7-unistd.patch + fix-includes.patch + " + +build() { + cd "$builddir" + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIBEXEC_INSTALL_DIR=lib \ + -DMODULE_INSTALL_DIR=/usr/lib/libproxy/$pkgver/modules \ + -DWITH_PERL=OFF \ + . + make +} + +check() { + cd "$builddir" + CTEST_OUTPUT_ON_FAILURE=TRUE ctest +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +dev() { + default_dev + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/cmake "$subpkgdir"/usr/share/ +} + +bin() { + pkgdesc="Binary to test libproxy" + mkdir -p "$subpkgdir"/usr + mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ +} + +py() { + pkgdesc="Binding for libproxy and python" + replaces="py-$pkgname" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ +} + +sha512sums="8f68bd56e44aeb3f553f4657bef82a5d14302780508dafa32454d6f724b724c884ceed6042f8df53a081d26ea0b05598cf35eab44823257c47c5ef8afb36442b libproxy-0.4.15.tar.gz +9929c308195bc59c1b9a7ddaaf708fb831da83c5d86d7ce122cb9774c9b9b16aef3c17fb721356e33a865de1af27db493f29a99d292e1e258cd0135218cacd32 libproxy-0.4.7-unistd.patch +e35b4f806e5f60e9b184d64dceae62e6e343c367ee96d7e461388f2665fe2ab62170d41848c9da5322bb1719eff3bfaecb273e40a97ce940a5e88d29d03bd8d9 fix-includes.patch" diff --git a/user/libproxy/fix-includes.patch b/user/libproxy/fix-includes.patch new file mode 100644 index 000000000..98d7a0549 --- /dev/null +++ b/user/libproxy/fix-includes.patch @@ -0,0 +1,10 @@ +--- ./libproxy/test/get-pac-test.cpp.orig ++++ ./libproxy/test/get-pac-test.cpp +@@ -3,6 +3,7 @@ + #include <sstream> + #include <string> + ++#include <sys/types.h> + #include <stdlib.h> // for abort() + #include <errno.h> // for EINTR + #include <sys/socket.h> diff --git a/user/libproxy/libproxy-0.4.7-unistd.patch b/user/libproxy/libproxy-0.4.7-unistd.patch new file mode 100644 index 000000000..803f81970 --- /dev/null +++ b/user/libproxy/libproxy-0.4.7-unistd.patch @@ -0,0 +1,40 @@ +--- libproxy-0.4.7/libproxy/url.cpp.orig 2012-02-28 21:05:15.572948027 +0000 ++++ libproxy-0.4.7/libproxy/url.cpp 2012-02-28 21:05:45.635937474 +0000 +@@ -27,6 +27,7 @@ + #define close _close + #endif + #include <fcntl.h> // For ::open() ++#include <unistd.h> // For ::read() and ::close() + #include <cstring> // For memcpy() + #include <sstream> // For int/string conversion (using stringstream) + #include <cstdio> // For sscanf() +--- libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp.orig 2012-02-28 21:06:01.552943358 +0000 ++++ libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp 2012-02-28 21:11:21.429953982 +0000 +@@ -18,6 +18,7 @@ + ******************************************************************************/ + + #include <sys/stat.h> ++#include <unistd.h> + #include <cstdlib> + #include <map> + #include <fstream> +--- libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp.orig 2012-02-28 21:06:11.637943033 +0000 ++++ libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp 2012-02-28 21:11:46.560961409 +0000 +@@ -17,6 +17,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ******************************************************************************/ + ++#include <unistd.h> // for ::gethostname() + #include <cstring> // ? + + #include "../extension_pacrunner.hpp" +--- libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp.orig 2012-02-28 21:06:29.615943614 +0000 ++++ libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp 2012-02-28 21:12:35.530965553 +0000 +@@ -17,6 +17,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ******************************************************************************/ + ++#include <unistd.h> // for ::gethostname() + #include "../extension_pacrunner.hpp" + using namespace libproxy; + |