Browse Source

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 <daniel@makrotopia.org>
Daniel Golle 9 years ago
parent
commit
eba7afcfb7

+ 103
- 0
net/gnurl/Makefile View File

@@ -0,0 +1,103 @@
1
+#
2
+# Copyright (C) 2007-2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=gnurl
11
+PKG_VERSION:=7.40.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_URL:=https://gnunet.org/sites/default/files
16
+
17
+# PKG_MD5SUM:=8d30594212e65657a5c32030f0998fa9
18
+
19
+PKG_LICENSE:=MIT
20
+PKG_LICENSE_FILES:=COPYING
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_BUILD_PARALLEL:=1
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/gnurl/Default
28
+  SECTION:=net
29
+  CATEGORY:=Network
30
+  URL:=https://gnunet.org/gnurl
31
+  MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
32
+endef
33
+
34
+define Package/gnurl
35
+  $(call Package/gnurl/Default)
36
+  SUBMENU:=File Transfer
37
+  DEPENDS:=+libgnurl
38
+  TITLE:=A client-side HTTP/HTTPS transfer utility
39
+endef
40
+
41
+define Package/libgnurl
42
+  $(call Package/gnurl/Default)
43
+  SECTION:=libs
44
+  CATEGORY:=Libraries
45
+  DEPENDS:=+libgnutls +libidn
46
+  TITLE:=A client-side HTTP/HTTPS transfer library
47
+endef
48
+
49
+TARGET_CFLAGS += $(FPIC)
50
+
51
+CONFIGURE_ARGS += \
52
+	--disable-debug \
53
+	--disable-ares \
54
+	--enable-ipv6 \
55
+	--enable-shared \
56
+	--enable-static \
57
+	--disable-manual \
58
+	--disable-ldap \
59
+	--disable-ldaps \
60
+	--with-gnutls="$(STAGING_DIR)/usr" \
61
+	--with-ipv6 \
62
+	--with-libidn="$(STAGING_DIR)/usr" \
63
+	--without-axtls \
64
+	--without-ca-bundle \
65
+	--without-ca-path \
66
+	--without-cyassl \
67
+	--without-libmetalink \
68
+	--without-librtmp \
69
+	--without-nss \
70
+	--without-polarssl \
71
+	--without-ssl \
72
+	--without-zlib
73
+
74
+define Build/Compile
75
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
76
+		DESTDIR="$(PKG_INSTALL_DIR)" \
77
+		CC="$(TARGET_CC)" \
78
+		install
79
+endef
80
+
81
+define Build/InstallDev
82
+	$(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include/gnurl $(1)/usr/lib $(1)/usr/lib/pkgconfig
83
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl-config $(1)/usr/bin/
84
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/curl/*.h $(1)/usr/include/gnurl
85
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.{a,so*} $(1)/usr/lib/
86
+	$(CP) $(PKG_BUILD_DIR)/libgnurl.pc $(1)/usr/lib/pkgconfig/
87
+	$(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/gnurl-config
88
+	[ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libgnurl.pc || true
89
+	$(LN) $(STAGING_DIR)/usr/bin/gnurl-config $(2)/bin/
90
+endef
91
+
92
+define Package/gnurl/install
93
+	$(INSTALL_DIR) $(1)/usr/bin
94
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl $(1)/usr/bin/
95
+endef
96
+
97
+define Package/libgnurl/install
98
+	$(INSTALL_DIR) $(1)/usr/lib
99
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.so.* $(1)/usr/lib/
100
+endef
101
+
102
+$(eval $(call BuildPackage,gnurl))
103
+$(eval $(call BuildPackage,libgnurl))

+ 10
- 0
net/gnurl/patches/100-check_long_long.patch View File

@@ -0,0 +1,10 @@
1
+--- a/configure.ac
2
++++ b/configure.ac
3
+@@ -2885,6 +2885,7 @@ CURL_VERIFY_RUNTIMELIBS
4
+ 
5
+ AC_CHECK_SIZEOF(size_t)
6
+ AC_CHECK_SIZEOF(long)
7
++AC_CHECK_SIZEOF(long long)
8
+ AC_CHECK_SIZEOF(int)
9
+ AC_CHECK_SIZEOF(short)
10
+ CURL_CONFIGURE_LONG

+ 22
- 0
net/gnurl/patches/200-no_docs_tests.patch View File

@@ -0,0 +1,22 @@
1
+--- a/Makefile.am
2
++++ b/Makefile.am
3
+@@ -129,7 +129,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ)	\
4
+ bin_SCRIPTS = curl-config
5
+ 
6
+ SUBDIRS = lib src include
7
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
8
++DIST_SUBDIRS = $(SUBDIRS) packages
9
+ 
10
+ pkgconfigdir = $(libdir)/pkgconfig
11
+ pkgconfig_DATA = libcurl.pc
12
+--- a/Makefile.in
13
++++ b/Makefile.in
14
+@@ -577,7 +577,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ)	\
15
+ 
16
+ bin_SCRIPTS = curl-config
17
+ SUBDIRS = lib src include
18
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
19
++DIST_SUBDIRS = $(SUBDIRS) packages
20
+ pkgconfigdir = $(libdir)/pkgconfig
21
+ pkgconfig_DATA = libcurl.pc
22
+ LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \