summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoroli2015-06-12 22:00:38 +0200
committeroli2015-06-12 22:00:38 +0200
commitd0c1d0e78c5803d7120763d78e928ffa00c1eb5b (patch)
tree73f88efa43423484aa17710d17594eac1557e981
downloadaur-d0c1d0e78c5803d7120763d78e928ffa00c1eb5b.tar.gz
Initial import
-rw-r--r--.AURINFO31
-rw-r--r--.SRCINFO45
-rw-r--r--01_runtests_gdb.patch32
-rw-r--r--02_art_http_scripting.patch18
-rw-r--r--03_keep_symbols_compat.patch17
-rw-r--r--04_workaround_as_needed_bug.patch38
-rw-r--r--06_always-disable-valgrind.patch17
-rw-r--r--07_do-not-disable-debug-symbols.patch98
-rw-r--r--08_fix-spelling.patch17
-rw-r--r--09_libtoolize_check.patch77
-rw-r--r--10_fix-resolver.patch29
-rw-r--r--90_gnutls.patch137
-rw-r--r--99_nss.patch137
-rw-r--r--PKGBUILD84
-rw-r--r--curlbuild.h9
15 files changed, 786 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 000000000000..99bd7e41d41a
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,31 @@
+pkgbase = libcurl-gnutls
+ pkgdesc = An URL retrieval utility and library
+ pkgver = 7.38.0
+ pkgrel = 1
+ url = http://curl.haxx.se
+ arch = i686
+ arch = x86_64
+ license = MIT
+ depends = ca-certificates
+ depends = libssh2
+ depends = zlib
+ depends = gnutls
+ source = http://curl.haxx.se/download/curl-7.38.0.tar.gz
+ source = http://curl.haxx.se/download/curl-7.38.0.tar.gz.asc
+ source = curlbuild.h
+ source = 01_runtests_gdb.patch
+ source = 02_art_http_scripting.patch
+ source = 03_keep_symbols_compat.patch
+ source = 04_workaround_as_needed_bug.patch
+ source = 06_always-disable-valgrind.patch
+ source = 07_do-not-disable-debug-symbols.patch
+ source = 08_fix-spelling.patch
+ source = 09_libtoolize_check.patch
+ source = 10_fix-resolver.patch
+ source = 90_gnutls.patch
+ source = 99_nss.patch
+ options = !libtool
+ options = !strip
+
+pkgname = libcurl-gnutls
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fed1ee75024b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,45 @@
+pkgbase = libcurl-gnutls
+ pkgdesc = An URL retrieval utility and library
+ pkgver = 7.38.0
+ pkgrel = 1
+ url = http://curl.haxx.se
+ arch = i686
+ arch = x86_64
+ license = MIT
+ depends = ca-certificates
+ depends = libssh2
+ depends = zlib
+ depends = gnutls
+ options = !libtool
+ options = !strip
+ source = http://curl.haxx.se/download/curl-7.38.0.tar.gz
+ source = http://curl.haxx.se/download/curl-7.38.0.tar.gz.asc
+ source = curlbuild.h
+ source = 01_runtests_gdb.patch
+ source = 02_art_http_scripting.patch
+ source = 03_keep_symbols_compat.patch
+ source = 04_workaround_as_needed_bug.patch
+ source = 06_always-disable-valgrind.patch
+ source = 07_do-not-disable-debug-symbols.patch
+ source = 08_fix-spelling.patch
+ source = 09_libtoolize_check.patch
+ source = 10_fix-resolver.patch
+ source = 90_gnutls.patch
+ source = 99_nss.patch
+ md5sums = b6e3ea55bb718f2270489581efa50a8a
+ md5sums = SKIP
+ md5sums = 751bd433ede935c8fae727377625a8ae
+ md5sums = e6b1f326a81f4a21e829f0a7ce43619f
+ md5sums = 5cadcf82367cef12738fc3b0ef27483f
+ md5sums = 955b12e575215735b6bd563ee2e3af2a
+ md5sums = fd110c854e055d0375798c2857bd260e
+ md5sums = 2cc79bcb4c64e131f4be9f86a5d7f2cb
+ md5sums = eb393f4dcd524916372c6bdd66c78c0b
+ md5sums = fc565eca2ca9b5996ef8f4168497b2f4
+ md5sums = 19a2255c096bb829b2d9fb5082dd1842
+ md5sums = 26723d41149031db8c282d5cb42f2bd2
+ md5sums = 011864a7f8332d7785939016af5f98c3
+ md5sums = 7d13d3b00286735dbed1161809546f61
+
+pkgname = libcurl-gnutls
+
diff --git a/01_runtests_gdb.patch b/01_runtests_gdb.patch
new file mode 100644
index 000000000000..1eae1fcbf9df
--- /dev/null
+++ b/01_runtests_gdb.patch
@@ -0,0 +1,32 @@
+Description: runtests_gdb.
+Origin: vendor
+Forwarded: no
+Author: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2011-11-01
+
+--- a/tests/runtests.pl
++++ b/tests/runtests.pl
+@@ -3404,11 +3404,11 @@
+ # run the command line we built
+ if ($torture) {
+ $cmdres = torture($CMDLINE,
+- "$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
++ "libtool --mode=execute gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+ }
+ elsif($gdbthis) {
+ my $GDBW = ($gdbxwin) ? "-w" : "";
+- runclient("$gdb --directory libtest $DBGCURL $GDBW -x $LOGDIR/gdbcmd");
++ runclient("libtool --mode=execute gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+ $cmdres=0; # makes it always continue after a debugged run
+ }
+ else {
+@@ -3442,7 +3442,7 @@
+ open(GDBCMD, ">$LOGDIR/gdbcmd2");
+ print GDBCMD "bt\n";
+ close(GDBCMD);
+- runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
++ runclient("libtool --mode=execute gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
+ # unlink("$LOGDIR/gdbcmd2");
+ }
+ }
diff --git a/02_art_http_scripting.patch b/02_art_http_scripting.patch
new file mode 100644
index 000000000000..c1f63b5fe715
--- /dev/null
+++ b/02_art_http_scripting.patch
@@ -0,0 +1,18 @@
+Description: Fix path to "TheArtOfHttpScripting" in docs.
+Origin: vendor
+Forwarded: not-needed
+Author: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2011-11-01
+
+--- a/docs/index.html
++++ b/docs/index.html
+@@ -12,7 +12,7 @@
+ <br><a href="curl.html">curl</A>
+
+ <h2>Tutorial</h2>
+-<a href="TheArtOfHttpScripting">The Art Of Scripting HTTP Requests Using Curl</a> (plain text)
++<a href="../TheArtOfHttpScripting.gz">The Art Of Scripting HTTP Requests Using Curl</a> (plain text)
+
+ <h2>libcurl</h2>
+ See the <a href="libcurl/index.html">libcurl section</a>
diff --git a/03_keep_symbols_compat.patch b/03_keep_symbols_compat.patch
new file mode 100644
index 000000000000..b4b83daa5e22
--- /dev/null
+++ b/03_keep_symbols_compat.patch
@@ -0,0 +1,17 @@
+Description: Keep versioned symbols backwards compatibility.
+Origin: vendor
+Forwarded: not-needed
+Author: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2013-04-16
+
+--- a/lib/libcurl.vers.in
++++ b/lib/libcurl.vers.in
+@@ -6,7 +6,7 @@
+ _save*;
+ };
+
+-CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4
++CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@3
+ {
+ global: curl_*;
+ local: *;
diff --git a/04_workaround_as_needed_bug.patch b/04_workaround_as_needed_bug.patch
new file mode 100644
index 000000000000..e95c3f09e1cc
--- /dev/null
+++ b/04_workaround_as_needed_bug.patch
@@ -0,0 +1,38 @@
+Description: Work around libtool --as-needed reordering bug
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/347650
+Forwarded: not-needed
+Author: Alessandro Ghedini <ghedo@debian.org>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2013-03-22
+
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5800,6 +5800,11 @@
+ arg=$func_stripname_result
+ ;;
+
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+@@ -6163,6 +6168,15 @@
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed|-Wl,--no-as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test "$linkmode,$pass" = "prog,link"; then
diff --git a/06_always-disable-valgrind.patch b/06_always-disable-valgrind.patch
new file mode 100644
index 000000000000..8c7d96c7204f
--- /dev/null
+++ b/06_always-disable-valgrind.patch
@@ -0,0 +1,17 @@
+Description: Always disable valgrind tests
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/690968
+Forwarded: not-needed
+Last-Update: 2012-10-22
+
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -57,7 +57,7 @@
+ if CROSSCOMPILING
+ TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
+ else # if not cross-compiling:
+-TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
++TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl -n
+ TEST_Q = -a -s
+ TEST_AM = -a -am
+ TEST_F = -a -p -r
diff --git a/07_do-not-disable-debug-symbols.patch b/07_do-not-disable-debug-symbols.patch
new file mode 100644
index 000000000000..e01a4f2a7902
--- /dev/null
+++ b/07_do-not-disable-debug-symbols.patch
@@ -0,0 +1,98 @@
+Description: Do not disable debug symbols without --enable-debug
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/693110
+Forwarded: not-needed
+Author: Alessandro Ghedini <ghedo@debian.org>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2012-11-16
+
+--- a/m4/curl-compilers.m4
++++ b/m4/curl-compilers.m4
+@@ -97,7 +97,6 @@
+ flags_dbg_all="$flags_dbg_all -gdwarf-2"
+ flags_dbg_all="$flags_dbg_all -gvms"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
+ flags_opt_yes="-Os"
+ flags_opt_off="-O0"
+@@ -121,7 +120,6 @@
+ compiler_id="DEC_C"
+ flags_dbg_all="-g -g0 -g1 -g2 -g3"
+ flags_dbg_yes="-g2"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
+ flags_opt_yes="-O1"
+ flags_opt_off="-O0"
+@@ -157,7 +155,6 @@
+ flags_dbg_all="$flags_dbg_all -gdwarf-2"
+ flags_dbg_all="$flags_dbg_all -gvms"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
+ flags_opt_yes="-O2"
+ flags_opt_off="-O0"
+@@ -202,7 +199,6 @@
+ compiler_id="IBM_C"
+ flags_dbg_all="-g -g0 -g1 -g2 -g3"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
+ flags_opt_all="$flags_opt_all -qnooptimize"
+ flags_opt_all="$flags_opt_all -qoptimize=0"
+@@ -236,7 +232,6 @@
+ compiler_id="INTEL_UNIX_C"
+ flags_dbg_all="-g -g0"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
+ flags_opt_yes="-O2"
+ flags_opt_off="-O0"
+@@ -274,7 +269,6 @@
+ compiler_id="LCC"
+ flags_dbg_all="-g"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all=""
+ flags_opt_yes=""
+ flags_opt_off=""
+@@ -300,7 +294,6 @@
+ compiler_id="SGI_MIPS_C"
+ flags_dbg_all="-g -g0 -g1 -g2 -g3"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
+ flags_opt_yes="-O2"
+ flags_opt_off="-O0"
+@@ -327,7 +320,6 @@
+ compiler_id="SGI_MIPSPRO_C"
+ flags_dbg_all="-g -g0 -g1 -g2 -g3"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
+ flags_opt_yes="-O2"
+ flags_opt_off="-O0"
+@@ -371,7 +363,6 @@
+ compiler_id="TINY_C"
+ flags_dbg_all="-g -b"
+ flags_dbg_yes="-g"
+- flags_dbg_off=""
+ flags_opt_all=""
+ flags_opt_yes=""
+ flags_opt_off=""
+@@ -395,7 +386,6 @@
+ compiler_id="WATCOM_UNIX_C"
+ flags_dbg_all="-g1 -g1+ -g2 -g3"
+ flags_dbg_yes="-g2"
+- flags_dbg_off=""
+ flags_opt_all="-O0 -O1 -O2 -O3"
+ flags_opt_yes="-O2"
+ flags_opt_off="-O0"
+@@ -403,7 +393,6 @@
+ compiler_id="WATCOM_WINDOWS_C"
+ flags_dbg_all=""
+ flags_dbg_yes=""
+- flags_dbg_off=""
+ flags_opt_all=""
+ flags_opt_yes=""
+ flags_opt_off=""
diff --git a/08_fix-spelling.patch b/08_fix-spelling.patch
new file mode 100644
index 000000000000..f52e511647c2
--- /dev/null
+++ b/08_fix-spelling.patch
@@ -0,0 +1,17 @@
+Description: Fix spelling error in manpage
+Origin: vendor
+Forwarded: no
+Author: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2014-09-10
+
+--- a/docs/curl.1
++++ b/docs/curl.1
+@@ -1637,7 +1637,7 @@
+ still.
+
+ When using Kerberos V5 with a Windows based server you should include the
+-Windows domain name in the user name, in order for the server to succesfully
++Windows domain name in the user name, in order for the server to successfully
+ obtain a Kerberos Ticket. If you don't then the initial authentication
+ handshake may fail.
+
diff --git a/09_libtoolize_check.patch b/09_libtoolize_check.patch
new file mode 100644
index 000000000000..6600c86dd7b3
--- /dev/null
+++ b/09_libtoolize_check.patch
@@ -0,0 +1,77 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: check for libtoolize rather than libtool
+Last-Modified: 2014-09-19
+
+libtool is now in package libtool-bin, but curl really only uses libtoolize.
+
+--- a/buildconf
++++ b/buildconf
+@@ -190,31 +190,35 @@
+ fi
+
+ #--------------------------------------------------------------------------
+-# GNU libtool preliminary check
++# GNU libtoolize check
+ #
+ want_lt_major=1
+ want_lt_minor=4
+ want_lt_patch=2
+ want_lt_version=1.4.2
+
+-# This approach that tries 'glibtool' first is intended for systems that
+-# have GNU libtool named as 'glibtool' and libtool not being GNU's.
++# This approach that tries 'glibtoolize' first is intended for systems that
++# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's.
+
+-libtool=`findtool glibtool 2>/dev/null`
+-if test ! -x "$libtool"; then
+- libtool=`findtool ${LIBTOOL:-libtool}`
++if test -z "$LIBTOOLIZE"; then
++ libtoolize=`findtool glibtoolize 2>/dev/null`
++ if test ! -x "$libtoolize"; then
++ libtoolize=`findtool libtoolize 2>/dev/null`
++ fi
++else
++ libtoolize=`findtool $LIBTOOLIZE`
+ fi
+-if test -z "$libtool"; then
+- echo "buildconf: libtool not found."
+- echo " You need GNU libtool $want_lt_version or newer installed."
++if test ! -f "$libtoolize"; then
++ echo "buildconf: libtoolize not found."
++ echo " You need GNU libtoolize $want_lt_version or newer installed."
+ exit 1
+ fi
+
+-lt_pver=`$libtool --version 2>/dev/null|head -n 1`
++lt_pver=`$libtoolize --version 2>/dev/null|head -n 1`
+ lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
+ lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
+ if test -z "$lt_version"; then
+- echo "buildconf: libtool not found."
++ echo "buildconf: libtoolize not found."
+ echo " You need GNU libtool $want_lt_version or newer installed."
+ exit 1
+ fi
+@@ -253,21 +257,6 @@
+ echo "buildconf: libtool version $lt_version (ok)"
+
+ #--------------------------------------------------------------------------
+-# GNU libtoolize check
+-#
+-if test -z "$LIBTOOLIZE"; then
+- # use (g)libtoolize from same location as (g)libtool
+- libtoolize="${libtool}ize"
+-else
+- libtoolize=`findtool $LIBTOOLIZE`
+-fi
+-if test ! -f "$libtoolize"; then
+- echo "buildconf: libtoolize not found."
+- echo " You need GNU libtoolize $want_lt_version or newer installed."
+- exit 1
+-fi
+-
+-#--------------------------------------------------------------------------
+ # m4 check
+ #
+ m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`;
diff --git a/10_fix-resolver.patch b/10_fix-resolver.patch
new file mode 100644
index 000000000000..3cc274a14171
--- /dev/null
+++ b/10_fix-resolver.patch
@@ -0,0 +1,29 @@
+From d9762a7cdb35e70f8cb0bf1c2f8019e8391616e1 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Tue, 23 Sep 2014 11:44:03 +0200
+Subject: [PATCH] threaded-resolver: revert Curl_expire_latest() switch
+
+The switch to using Curl_expire_latest() in commit cacdc27f52b was a
+mistake and was against the advice even mentioned in that commit. The
+comparison in asyn-thread.c:Curl_resolver_is_resolved() makes
+Curl_expire() the suitable function to use.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1426
+Reported-By: graysky
+---
+ lib/asyn-thread.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
+index e4ad32b..6cdc9ad 100644
+--- a/lib/asyn-thread.c
++++ b/lib/asyn-thread.c
+@@ -541,7 +541,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+ td->poll_interval = 250;
+
+ td->interval_end = elapsed + td->poll_interval;
+- Curl_expire_latest(conn->data, td->poll_interval);
++ Curl_expire(conn->data, td->poll_interval);
+ }
+
+ return CURLE_OK;
diff --git a/90_gnutls.patch b/90_gnutls.patch
new file mode 100644
index 000000000000..751c80c798b2
--- /dev/null
+++ b/90_gnutls.patch
@@ -0,0 +1,137 @@
+Description: Build with GnuTLS.
+Origin: vendor
+Forwarded: not-needed
+Author: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2013-04-17
+
+--- a/docs/examples/Makefile.am
++++ b/docs/examples/Makefile.am
+@@ -52,9 +52,9 @@
+
+ # Dependencies
+ if USE_EXPLICIT_LIB_DEPS
+-LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
++LDADD = $(LIBDIR)/libcurl-gnutls.la @LIBCURL_LIBS@
+ else
+-LDADD = $(LIBDIR)/libcurl.la
++LDADD = $(LIBDIR)/libcurl-gnutls.la
+ endif
+
+ # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -36,7 +36,7 @@
+ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \
+ objnames-test08.sh objnames-test10.sh objnames.inc
+
+-lib_LTLIBRARIES = libcurl.la
++lib_LTLIBRARIES = libcurl-gnutls.la
+
+ if BUILD_UNITTESTS
+ noinst_LTLIBRARIES = libcurlu.la
+@@ -106,38 +106,38 @@
+ AM_LDFLAGS =
+ AM_CFLAGS =
+
+-libcurl_la_CPPFLAGS_EXTRA =
+-libcurl_la_LDFLAGS_EXTRA =
+-libcurl_la_CFLAGS_EXTRA =
++libcurl_gnutls_la_CPPFLAGS_EXTRA =
++libcurl_gnutls_la_LDFLAGS_EXTRA =
++libcurl_gnutls_la_CFLAGS_EXTRA =
+
+ if CURL_LT_SHLIB_USE_VERSION_INFO
+-libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
++libcurl_gnutls_la_LDFLAGS_EXTRA += $(VERSIONINFO)
+ endif
+
+ if CURL_LT_SHLIB_USE_NO_UNDEFINED
+-libcurl_la_LDFLAGS_EXTRA += -no-undefined
++libcurl_gnutls_la_LDFLAGS_EXTRA += -no-undefined
+ endif
+
+ if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+-libcurl_la_LDFLAGS_EXTRA += -mimpure-text
++libcurl_gnutls_la_LDFLAGS_EXTRA += -mimpure-text
+ endif
+
+ if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
+-libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
++libcurl_gnutls_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+ endif
+
+ if USE_CPPFLAG_CURL_STATICLIB
+-libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
++libcurl_gnutls_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
+ endif
+
+ if DOING_CURL_SYMBOL_HIDING
+-libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+-libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
++libcurl_gnutls_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
++libcurl_gnutls_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+ endif
+
+-libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
+-libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
+-libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
++libcurl_gnutls_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_gnutls_la_CPPFLAGS_EXTRA)
++libcurl_gnutls_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_gnutls_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
++libcurl_gnutls_la_CFLAGS = $(AM_CFLAGS) $(libcurl_gnutls_la_CFLAGS_EXTRA)
+
+ libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
+ libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
+@@ -146,7 +146,7 @@
+ # Makefile.inc provides the CSOURCES and HHEADERS defines
+ include Makefile.inc
+
+-libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
++libcurl_gnutls_la_SOURCES = $(CSOURCES) $(HHEADERS)
+ libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
+
+ checksrc:
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -60,14 +60,14 @@
+ LIBS = $(BLANK_AT_MAKETIME)
+
+ if USE_EXPLICIT_LIB_DEPS
+-curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
++curl_LDADD = $(top_builddir)/lib/libcurl-gnutls.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
+ else
+-curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
++curl_LDADD = $(top_builddir)/lib/libcurl-gnutls.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+ endif
+
+ curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
+ curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+-curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
++curl_DEPENDENCIES = $(top_builddir)/lib/libcurl-gnutls.la
+
+ # if unit tests are enabled, build a static library to link them with
+ if BUILD_UNITTESTS
+--- a/tests/libtest/Makefile.am
++++ b/tests/libtest/Makefile.am
+@@ -59,16 +59,16 @@
+ LIBS = $(BLANK_AT_MAKETIME)
+
+ if USE_EXPLICIT_LIB_DEPS
+-SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+-TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
++SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @LIBCURL_LIBS@
++TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @LIBCURL_LIBS@
+ else
+-SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
+-TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
++SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @CURL_NETWORK_LIBS@
++TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @CURL_NETWORK_AND_TIME_LIBS@
+ endif
+
+ # Dependencies (may need to be overriden)
+ LDADD = $(SUPPORTFILES_LIBS)
+-DEPENDENCIES = $(top_builddir)/lib/libcurl.la
++DEPENDENCIES = $(top_builddir)/lib/libcurl-gnutls.la
+
+ # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
+ # noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
diff --git a/99_nss.patch b/99_nss.patch
new file mode 100644
index 000000000000..ade5c8e16d1c
--- /dev/null
+++ b/99_nss.patch
@@ -0,0 +1,137 @@
+Description: Build with NSS.
+Origin: vendor
+Forwarded: not-needed
+Author: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
+Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
+Last-Update: 2013-04-17
+
+--- a/docs/examples/Makefile.am
++++ b/docs/examples/Makefile.am
+@@ -52,9 +52,9 @@
+
+ # Dependencies
+ if USE_EXPLICIT_LIB_DEPS
+-LDADD = $(LIBDIR)/libcurl-gnutls.la @LIBCURL_LIBS@
++LDADD = $(LIBDIR)/libcurl-nss.la @LIBCURL_LIBS@
+ else
+-LDADD = $(LIBDIR)/libcurl-gnutls.la
++LDADD = $(LIBDIR)/libcurl-nss.la
+ endif
+
+ # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -36,7 +36,7 @@
+ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \
+ objnames-test08.sh objnames-test10.sh objnames.inc
+
+-lib_LTLIBRARIES = libcurl-gnutls.la
++lib_LTLIBRARIES = libcurl-nss.la
+
+ if BUILD_UNITTESTS
+ noinst_LTLIBRARIES = libcurlu.la
+@@ -106,38 +106,38 @@
+ AM_LDFLAGS =
+ AM_CFLAGS =
+
+-libcurl_gnutls_la_CPPFLAGS_EXTRA =
+-libcurl_gnutls_la_LDFLAGS_EXTRA =
+-libcurl_gnutls_la_CFLAGS_EXTRA =
++libcurl_nss_la_CPPFLAGS_EXTRA =
++libcurl_nss_la_LDFLAGS_EXTRA =
++libcurl_nss_la_CFLAGS_EXTRA =
+
+ if CURL_LT_SHLIB_USE_VERSION_INFO
+-libcurl_gnutls_la_LDFLAGS_EXTRA += $(VERSIONINFO)
++libcurl_nss_la_LDFLAGS_EXTRA += $(VERSIONINFO)
+ endif
+
+ if CURL_LT_SHLIB_USE_NO_UNDEFINED
+-libcurl_gnutls_la_LDFLAGS_EXTRA += -no-undefined
++libcurl_nss_la_LDFLAGS_EXTRA += -no-undefined
+ endif
+
+ if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+-libcurl_gnutls_la_LDFLAGS_EXTRA += -mimpure-text
++libcurl_nss_la_LDFLAGS_EXTRA += -mimpure-text
+ endif
+
+ if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
+-libcurl_gnutls_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
++libcurl_nss_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+ endif
+
+ if USE_CPPFLAG_CURL_STATICLIB
+-libcurl_gnutls_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
++libcurl_nss_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
+ endif
+
+ if DOING_CURL_SYMBOL_HIDING
+-libcurl_gnutls_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+-libcurl_gnutls_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
++libcurl_nss_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
++libcurl_nss_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+ endif
+
+-libcurl_gnutls_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_gnutls_la_CPPFLAGS_EXTRA)
+-libcurl_gnutls_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_gnutls_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
+-libcurl_gnutls_la_CFLAGS = $(AM_CFLAGS) $(libcurl_gnutls_la_CFLAGS_EXTRA)
++libcurl_nss_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_nss_la_CPPFLAGS_EXTRA)
++libcurl_nss_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_nss_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
++libcurl_nss_la_CFLAGS = $(AM_CFLAGS) $(libcurl_nss_la_CFLAGS_EXTRA)
+
+ libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
+ libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
+@@ -146,7 +146,7 @@
+ # Makefile.inc provides the CSOURCES and HHEADERS defines
+ include Makefile.inc
+
+-libcurl_gnutls_la_SOURCES = $(CSOURCES) $(HHEADERS)
++libcurl_nss_la_SOURCES = $(CSOURCES) $(HHEADERS)
+ libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
+
+ checksrc:
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -60,14 +60,14 @@
+ LIBS = $(BLANK_AT_MAKETIME)
+
+ if USE_EXPLICIT_LIB_DEPS
+-curl_LDADD = $(top_builddir)/lib/libcurl-gnutls.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
++curl_LDADD = $(top_builddir)/lib/libcurl-nss.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
+ else
+-curl_LDADD = $(top_builddir)/lib/libcurl-gnutls.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
++curl_LDADD = $(top_builddir)/lib/libcurl-nss.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+ endif
+
+ curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
+ curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+-curl_DEPENDENCIES = $(top_builddir)/lib/libcurl-gnutls.la
++curl_DEPENDENCIES = $(top_builddir)/lib/libcurl-nss.la
+
+ # if unit tests are enabled, build a static library to link them with
+ if BUILD_UNITTESTS
+--- a/tests/libtest/Makefile.am
++++ b/tests/libtest/Makefile.am
+@@ -59,16 +59,16 @@
+ LIBS = $(BLANK_AT_MAKETIME)
+
+ if USE_EXPLICIT_LIB_DEPS
+-SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @LIBCURL_LIBS@
+-TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @LIBCURL_LIBS@
++SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-nss.la @LIBCURL_LIBS@
++TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-nss.la @LIBCURL_LIBS@
+ else
+-SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @CURL_NETWORK_LIBS@
+-TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-gnutls.la @CURL_NETWORK_AND_TIME_LIBS@
++SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl-nss.la @CURL_NETWORK_LIBS@
++TESTUTIL_LIBS = $(top_builddir)/lib/libcurl-nss.la @CURL_NETWORK_AND_TIME_LIBS@
+ endif
+
+ # Dependencies (may need to be overriden)
+ LDADD = $(SUPPORTFILES_LIBS)
+-DEPENDENCIES = $(top_builddir)/lib/libcurl-gnutls.la
++DEPENDENCIES = $(top_builddir)/lib/libcurl-nss.la
+
+ # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
+ # noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5b23793d9946
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# based on official curl package
+# Maintainer: Jose Riha <jose1711 gmail com>
+
+pkgname=libcurl-gnutls
+_pkgname=curl
+pkgver=7.38.0
+pkgrel=1
+pkgdesc="An URL retrieval utility and library"
+arch=('i686' 'x86_64')
+url="http://curl.haxx.se"
+license=('MIT')
+depends=('ca-certificates' 'libssh2' 'zlib' 'gnutls')
+options=('!libtool' '!strip')
+source=("http://curl.haxx.se/download/$_pkgname-$pkgver.tar.gz"{,.asc}
+ curlbuild.h
+ 01_runtests_gdb.patch
+ 02_art_http_scripting.patch
+ 03_keep_symbols_compat.patch
+ 04_workaround_as_needed_bug.patch
+ 06_always-disable-valgrind.patch
+ 07_do-not-disable-debug-symbols.patch
+ 08_fix-spelling.patch
+ 09_libtoolize_check.patch
+ 10_fix-resolver.patch
+ 90_gnutls.patch
+ 99_nss.patch)
+
+md5sums=('b6e3ea55bb718f2270489581efa50a8a'
+ 'SKIP'
+ '751bd433ede935c8fae727377625a8ae'
+ 'e6b1f326a81f4a21e829f0a7ce43619f'
+ '5cadcf82367cef12738fc3b0ef27483f'
+ '955b12e575215735b6bd563ee2e3af2a'
+ 'fd110c854e055d0375798c2857bd260e'
+ '2cc79bcb4c64e131f4be9f86a5d7f2cb'
+ 'eb393f4dcd524916372c6bdd66c78c0b'
+ 'fc565eca2ca9b5996ef8f4168497b2f4'
+ '19a2255c096bb829b2d9fb5082dd1842'
+ '26723d41149031db8c282d5cb42f2bd2'
+ '011864a7f8332d7785939016af5f98c3'
+ '7d13d3b00286735dbed1161809546f61')
+
+ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d')
+case $ptrsize in
+ 8) _curlbuild=curlbuild-64.h ;;
+ 4) _curlbuild=curlbuild-32.h ;;
+ *) error "unknown pointer size for architecture: %s bytes" "$ptrsize"
+ exit 1
+ ;;
+esac
+
+build() {
+ cd "$_pkgname-$pkgver"
+ # apply debian patches
+ for i in ../*patch
+ do
+ patch -p1 < "$i"
+ done
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-dependency-tracking \
+ --enable-versioned-symbols \
+ --disable-ldap \
+ --disable-ldaps \
+ --enable-ipv6 \
+ --enable-manual \
+ --enable-threaded-resolver \
+ --without-libidn \
+ --with-random=/dev/urandom \
+ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
+ --without-ssl \
+ --with-gnutls=/usr
+
+
+ make
+}
+
+package() {
+ install -Dm644 $srcdir/$_pkgname-$pkgver/lib/.libs/libcurl.so.4.3.0 $pkgdir/usr/lib/libcurl-gnutls.so.4.3.0
+ ln -s libcurl-gnutls.so.4.3.0 $pkgdir/usr/lib/libcurl-gnutls.so.4
+ ln -s libcurl-gnutls.so.4.3.0 $pkgdir/usr/lib/libcurl-gnutls.so.3
+}
diff --git a/curlbuild.h b/curlbuild.h
new file mode 100644
index 000000000000..b48862696c60
--- /dev/null
+++ b/curlbuild.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "curlbuild-32.h"
+#elif __WORDSIZE == 64
+#include "curlbuild-64.h"
+#else
+#error "Unknown word size"
+#endif