From eba7afcfb7635f69ffa8ba330564b0a896dc5aa3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 31 May 2015 07:08:01 +0200 Subject: [PATCH] gnurl: add net package This is definitely one of the ugliest things I ever got my hands on. If it even did the job properly, but no, it tries to install it's headers in /usr/include/curl collidings with actual curl's headers. Fixed that by installing them into /usr/include/gnurl instead. Now gnunet can use gnurl. Signed-off-by: Daniel Golle --- net/gnurl/Makefile | 103 ++++++++++++++++++++ net/gnurl/patches/100-check_long_long.patch | 10 ++ net/gnurl/patches/200-no_docs_tests.patch | 22 +++++ 3 files changed, 135 insertions(+) create mode 100644 net/gnurl/Makefile create mode 100644 net/gnurl/patches/100-check_long_long.patch create mode 100644 net/gnurl/patches/200-no_docs_tests.patch diff --git a/net/gnurl/Makefile b/net/gnurl/Makefile new file mode 100644 index 000000000..e1a8c01b7 --- /dev/null +++ b/net/gnurl/Makefile @@ -0,0 +1,103 @@ +# +# Copyright (C) 2007-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnurl +PKG_VERSION:=7.40.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://gnunet.org/sites/default/files + +# PKG_MD5SUM:=8d30594212e65657a5c32030f0998fa9 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/gnurl/Default + SECTION:=net + CATEGORY:=Network + URL:=https://gnunet.org/gnurl + MAINTAINER:=Daniel Golle +endef + +define Package/gnurl + $(call Package/gnurl/Default) + SUBMENU:=File Transfer + DEPENDS:=+libgnurl + TITLE:=A client-side HTTP/HTTPS transfer utility +endef + +define Package/libgnurl + $(call Package/gnurl/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libgnutls +libidn + TITLE:=A client-side HTTP/HTTPS transfer library +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --disable-debug \ + --disable-ares \ + --enable-ipv6 \ + --enable-shared \ + --enable-static \ + --disable-manual \ + --disable-ldap \ + --disable-ldaps \ + --with-gnutls="$(STAGING_DIR)/usr" \ + --with-ipv6 \ + --with-libidn="$(STAGING_DIR)/usr" \ + --without-axtls \ + --without-ca-bundle \ + --without-ca-path \ + --without-cyassl \ + --without-libmetalink \ + --without-librtmp \ + --without-nss \ + --without-polarssl \ + --without-ssl \ + --without-zlib + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -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/gnurl $(1)/usr/lib $(1)/usr/lib/pkgconfig + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl-config $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/curl/*.h $(1)/usr/include/gnurl + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libgnurl.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/gnurl-config + [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libgnurl.pc || true + $(LN) $(STAGING_DIR)/usr/bin/gnurl-config $(2)/bin/ +endef + +define Package/gnurl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl $(1)/usr/bin/ +endef + +define Package/libgnurl/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,gnurl)) +$(eval $(call BuildPackage,libgnurl)) diff --git a/net/gnurl/patches/100-check_long_long.patch b/net/gnurl/patches/100-check_long_long.patch new file mode 100644 index 000000000..2dd8cc72d --- /dev/null +++ b/net/gnurl/patches/100-check_long_long.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2885,6 +2885,7 @@ CURL_VERIFY_RUNTIMELIBS + + AC_CHECK_SIZEOF(size_t) + AC_CHECK_SIZEOF(long) ++AC_CHECK_SIZEOF(long long) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(short) + CURL_CONFIGURE_LONG diff --git a/net/gnurl/patches/200-no_docs_tests.patch b/net/gnurl/patches/200-no_docs_tests.patch new file mode 100644 index 000000000..6a1fdf5b6 --- /dev/null +++ b/net/gnurl/patches/200-no_docs_tests.patch @@ -0,0 +1,22 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -129,7 +129,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ + bin_SCRIPTS = curl-config + + SUBDIRS = lib src include +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs ++DIST_SUBDIRS = $(SUBDIRS) packages + + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libcurl.pc +--- a/Makefile.in ++++ b/Makefile.in +@@ -577,7 +577,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ + + bin_SCRIPTS = curl-config + SUBDIRS = lib src include +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs ++DIST_SUBDIRS = $(SUBDIRS) packages + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libcurl.pc + LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \