Move curl from packages to trunk, opkg depends on it
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 29 Jul 2008 10:23:59 +0000 (10:23 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 29 Jul 2008 10:23:59 +0000 (10:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11987 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/curl/Makefile [new file with mode: 0644]
package/curl/patches/100-cross_compile.patch [new file with mode: 0644]
package/curl/patches/200-no_docs_tests.patch [new file with mode: 0644]
package/curl/patches/510-no_sslv2.patch [new file with mode: 0644]

diff --git a/package/curl/Makefile b/package/curl/Makefile
new file mode 100644 (file)
index 0000000..0f80736
--- /dev/null
@@ -0,0 +1,116 @@
+# 
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=curl
+PKG_VERSION:=7.17.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
+       http://www.mirrorspace.org/curl/ \
+       http://curl.mirror.internet.tp/download/ \
+       ftp://ftp.sunet.se/pub/www/utilities/curl/ \
+       ftp://ftp.planetmirror.com/pub/curl/ \
+       http://www.mirrormonster.com/curl/download/ \
+       http://curl.mirrors.cyberservers.net/download/
+PKG_MD5SUM:=1fa635d1dfde8337c98c82749d75c1de
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/curl/Default
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=http://curl.haxx.se/
+endef
+
+define Package/curl
+  $(call Package/curl/Default)
+  DEPENDS:=+libcurl
+  TITLE:=A client-side URL transfer library
+endef
+
+define Package/libcurl
+  $(call Package/curl/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libopenssl +zlib
+  TITLE:=A client-side URL transfer utility
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-thread \
+       --enable-cookies \
+       --enable-crypto-auth \
+       --enable-nonblocking \
+       --enable-file \
+       --enable-ftp \
+       --enable-http \
+       --enable-ipv6 \
+       --disable-ares \
+       --disable-debug \
+       --disable-dict \
+       --disable-gopher \
+       --disable-ldap \
+       --disable-manual \
+       --disable-sspi \
+       --disable-telnet \
+       --enable-tftp \
+       --disable-verbose \
+       --with-random="/dev/urandom" \
+       --with-ssl="$(STAGING_DIR)/usr" \
+       --without-ca-bundle \
+       --without-gnutls \
+       --without-krb4 \
+       --without-libidn \
+       --without-nss \
+       --with-zlib="$(STAGING_DIR)/usr" \
+
+CONFIGURE_VARS += \
+       LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
+       CC="$(filter-out ccache,$(TARGET_CC))"
+
+define Build/Configure
+       $(call Build/Configure/Default,,bash)
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               CC="$(TARGET_CC)" \
+               install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
+       $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
+       $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/libcurl.pc
+       ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
+endef
+
+define Package/curl/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
+endef
+
+define Package/libcurl/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,curl))
+$(eval $(call BuildPackage,libcurl))
diff --git a/package/curl/patches/100-cross_compile.patch b/package/curl/patches/100-cross_compile.patch
new file mode 100644 (file)
index 0000000..0f61f05
--- /dev/null
@@ -0,0 +1,156 @@
+Index: curl-7.17.1/configure
+===================================================================
+--- curl-7.17.1.orig/configure 2008-04-02 11:38:36.800178755 +0200
++++ curl-7.17.1/configure      2008-04-02 11:39:49.124300271 +0200
+@@ -26922,16 +26922,6 @@
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   fi
+-  if test "$OPENSSL_ENABLED" = "1"; then
+-    if test -n "$LIB_OPENSSL"; then
+-
+-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+-       export LD_LIBRARY_PATH
+-       { echo "$as_me:$LINENO: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
+-echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
+-    fi
+-  fi
+-
+ fi
+@@ -27551,15 +27541,6 @@
+    { (exit 1); exit 1; }; }
+   fi
+-  if test "$LIBSSH2_ENABLED" = "1"; then
+-    if test -n "$LIB_LIBSSH2"; then
+-
+-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2"
+-       export LD_LIBRARY_PATH
+-       { echo "$as_me:$LINENO: Added $LIB_LIBSSH2 to LD_LIBRARY_PATH" >&5
+-echo "$as_me: Added $LIB_LIBSSH2 to LD_LIBRARY_PATH" >&6;}
+-    fi
+-  fi
+ fi
+@@ -27741,18 +27722,6 @@
+ fi
+-
+-      if test "x$USE_GNUTLS" = "xyes"; then
+-        { echo "$as_me:$LINENO: detected GnuTLS version $version" >&5
+-echo "$as_me: detected GnuTLS version $version" >&6;}
+-
+-
+-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff"
+-        export LD_LIBRARY_PATH
+-        { echo "$as_me:$LINENO: Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
+-echo "$as_me: Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
+-      fi
+-
+     fi
+   fi
+@@ -27951,17 +27920,6 @@
+ fi
+-      if test "x$USE_NSS" = "xyes"; then
+-        { echo "$as_me:$LINENO: detected NSS version $version" >&5
+-echo "$as_me: detected NSS version $version" >&6;}
+-
+-
+-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
+-        export LD_LIBRARY_PATH
+-        { echo "$as_me:$LINENO: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
+-echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
+-      fi
+-
+     fi
+   fi
+Index: curl-7.17.1/configure.ac
+===================================================================
+--- curl-7.17.1.orig/configure.ac      2008-04-02 11:37:43.137120670 +0200
++++ curl-7.17.1/configure.ac   2008-04-02 11:38:33.383984077 +0200
+@@ -1215,19 +1215,6 @@
+         AC_MSG_RESULT([no])
+     ])
+   fi
+-
+-  if test "$OPENSSL_ENABLED" = "1"; then
+-    if test -n "$LIB_OPENSSL"; then
+-       dnl when the ssl shared libs were found in a path that the run-time
+-       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
+-       dnl to prevent further configure tests to fail due to this
+-
+-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+-       export LD_LIBRARY_PATH
+-       AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
+-    fi
+-  fi
+-
+ fi
+ dnl **********************************************************************
+@@ -1364,17 +1351,6 @@
+     AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
+   fi
+-  if test "$LIBSSH2_ENABLED" = "1"; then
+-    if test -n "$LIB_LIBSSH2"; then
+-       dnl when the libssh2 shared libs were found in a path that the run-time
+-       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
+-       dnl to prevent further configure tests to fail due to this
+-
+-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2"
+-       export LD_LIBRARY_PATH
+-       AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH])
+-    fi
+-  fi
+ fi
+ dnl **********************************************************************
+@@ -1464,19 +1440,6 @@
+          CPPFLAGS="$CLEANCPPFLAGS"
+        ])
+-      if test "x$USE_GNUTLS" = "xyes"; then
+-        AC_MSG_NOTICE([detected GnuTLS version $version])
+-
+-        dnl when shared libs were found in a path that the run-time
+-        dnl linker doesn't search through, we need to add it to
+-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
+-        dnl due to this
+-
+-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff"
+-        export LD_LIBRARY_PATH
+-        AC_MSG_NOTICE([Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH])
+-      fi
+-
+     fi
+   fi dnl GNUTLS not disabled
+@@ -1544,19 +1507,6 @@
+          CPPFLAGS="$CLEANCPPFLAGS"
+        ])
+-      if test "x$USE_NSS" = "xyes"; then
+-        AC_MSG_NOTICE([detected NSS version $version])
+-
+-        dnl when shared libs were found in a path that the run-time
+-        dnl linker doesn't search through, we need to add it to
+-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
+-        dnl due to this
+-
+-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
+-        export LD_LIBRARY_PATH
+-        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
+-      fi
+-
+     fi
+   fi dnl NSS not disabled
diff --git a/package/curl/patches/200-no_docs_tests.patch b/package/curl/patches/200-no_docs_tests.patch
new file mode 100644 (file)
index 0000000..f3b82bd
--- /dev/null
@@ -0,0 +1,24 @@
+diff -urN curl-7.17.1/Makefile.am curl-7.17.1.new/Makefile.am
+--- curl-7.17.1/Makefile.am    2007-07-12 22:41:22.000000000 +0200
++++ curl-7.17.1.new/Makefile.am        2008-07-29 12:18:00.000000000 +0200
+@@ -29,7 +29,7 @@
+ bin_SCRIPTS = curl-config
+ SUBDIRS = lib src
+-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
++DIST_SUBDIRS = $(SUBDIRS) include packages
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libcurl.pc
+diff -urN curl-7.17.1/Makefile.in curl-7.17.1.new/Makefile.in
+--- curl-7.17.1/Makefile.in    2007-10-29 15:49:45.000000000 +0100
++++ curl-7.17.1.new/Makefile.in        2008-07-29 12:17:49.000000000 +0200
+@@ -260,7 +260,7 @@
+ bin_SCRIPTS = curl-config
+ SUBDIRS = lib src
+-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
++DIST_SUBDIRS = $(SUBDIRS) include packages 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libcurl.pc
+ all: all-recursive
diff --git a/package/curl/patches/510-no_sslv2.patch b/package/curl/patches/510-no_sslv2.patch
new file mode 100644 (file)
index 0000000..d6d4dbf
--- /dev/null
@@ -0,0 +1,41 @@
+diff -ruN curl-7.14.0-old/lib/ssluse.c curl-7.14.0-new/lib/ssluse.c
+--- curl-7.14.0-old/lib/ssluse.c       2005-04-15 00:52:57.000000000 +0200
++++ curl-7.14.0-new/lib/ssluse.c       2006-12-18 10:48:20.000000000 +0100
+@@ -1144,9 +1144,11 @@
+   case CURL_SSLVERSION_TLSv1:
+     req_method = TLSv1_client_method();
+     break;
++#ifndef OPENSSL_NO_SSL2
+   case CURL_SSLVERSION_SSLv2:
+     req_method = SSLv2_client_method();
+     break;
++#endif
+   case CURL_SSLVERSION_SSLv3:
+     req_method = SSLv3_client_method();
+     break;
+diff -ruN curl-7.14.0-old/src/main.c curl-7.14.0-new/src/main.c
+--- curl-7.14.0-old/src/main.c 2005-05-12 09:28:03.000000000 +0200
++++ curl-7.14.0-new/src/main.c 2006-12-18 10:47:48.000000000 +0100
+@@ -425,7 +425,9 @@
+     " -z/--time-cond <time> Transfer based on a time condition",
+     " -0/--http1.0       Use HTTP 1.0 (H)",
+     " -1/--tlsv1         Use TLSv1 (SSL)",
++#ifndef OPENSSL_NO_SSL2
+     " -2/--sslv2         Use SSLv2 (SSL)",
++#endif
+     " -3/--sslv3         Use SSLv3 (SSL)",
+     "    --3p-quote      like -Q for the source URL for 3rd party transfer (F)",
+     "    --3p-url        source URL to activate 3rd party transfer (F)",
+@@ -1671,10 +1673,12 @@
+       /* TLS version 1 */
+       config->ssl_version = CURL_SSLVERSION_TLSv1;
+       break;
++#ifndef OPENSSL_NO_SSL2
+     case '2':
+       /* SSL version 2 */
+       config->ssl_version = CURL_SSLVERSION_SSLv2;
+       break;
++#endif
+     case '3':
+       /* SSL version 3 */
+       config->ssl_version = CURL_SSLVERSION_SSLv3;