1 # Copyright © 2009-2018, The AROS Development Team. All rights reserved.
4 include $(SRCDIR)/config/aros-contrib.cfg
6 #MM- contrib-curl : development-curl
7 #MM- development-curl : contrib-openssl linklibs-pthread
8 #MM development-curl-fixconfig : development-curl-pakagefiles
10 REPOSITORIES := http://curl.haxx.se/download \
11 http://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/www/utilities/curl
14 USER_CPPFLAGS=-D__BSD_VISIBLE=1
15 CURL_OPTIONS=--disable-shared --without-random --disable-threaded-resolver --disable-ntlm-wb --libdir=$(AROS_LIB)
17 %fetch_and_build_gnu_development package=curl version=$(CURL_VERSION) \
18 patch=yes package_repo="$(REPOSITORIES)" \
19 extraoptions="$(CURL_OPTIONS)" \
20 postconfigure="development-curl-fixenv" postinstall="development-curl-fixconfig"
23 development-curl-fixenv :
24 @for file in $(GENDIR)/$(CURDIR)/curl/lib/curl_config.h; \
26 $(SED) -i -e 's@/\* #undef HAVE_SOCKET \*/@#define HAVE_SOCKET 1@' $$file; \
27 $(SED) -i -e 's@/\* #undef HAVE_SELECT \*/@#define HAVE_SELECT 1@' $$file; \
28 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG1 \*/@#define RECVFROM_TYPE_ARG1 int@' $$file; \
29 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG2 \*/@#define RECVFROM_TYPE_ARG2 void *@' $$file; \
30 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG3 \*/@#define RECVFROM_TYPE_ARG3 int@' $$file; \
31 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG4 \*/@#define RECVFROM_TYPE_ARG4 int@' $$file; \
32 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG5 \*/@#define RECVFROM_TYPE_ARG5 struct sockaddr *@' $$file; \
33 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_ARG6 \*/@#define RECVFROM_TYPE_ARG6 int *@' $$file; \
34 $(SED) -i -e 's@/\* #undef RECVFROM_TYPE_RETV \*/@#define RECVFROM_TYPE_RETV int@' $$file; \
35 $(SED) -i -e 's@/\* #undef SELECT_TYPE_ARG1 \*/@#define SELECT_TYPE_ARG1 int@' $$file; \
36 $(SED) -i -e 's@/\* #undef SELECT_TYPE_ARG234 \*/@#define SELECT_TYPE_ARG234 fd_set *@' $$file; \
37 $(SED) -i -e 's@/\* #undef SELECT_TYPE_ARG5 \*/@#define SELECT_TYPE_ARG5 struct timeval *@' $$file; \
38 $(SED) -i -e 's@/\* #undef SELECT_TYPE_RETV \*/@#define SELECT_TYPE_RETV int@' $$file; \
39 $(SED) -i -e 's@/\* #undef HAVE_GETHOSTBYADDR \*/@#define HAVE_GETHOSTBYADDR 1@' $$file; \
40 $(SED) -i -e 's@/\* #undef HAVE_GETHOSTNAME \*/@#define HAVE_GETHOSTNAME 1@' $$file; \
41 $(SED) -i -e 's@/\* #undef HAVE_PROTOBYNAME \*/@#define HAVE_PROTOBYNAME 1@' $$file; \
42 $(SED) -i -e 's@/\* #undef HAVE_INET_ADDR \*/@#define HAVE_INET_ADDR 1@' $$file; \
43 $(SED) -i -e 's@/\* #undef HAVE_CLOSESOCKET_CAMEL \*/@#define HAVE_CLOSESOCKET_CAMEL 1@' $$file; \
44 $(SED) -i -e 's@/\* #undef HAVE_IOCTLSOCKET_CAMEL \*/@#define HAVE_IOCTLSOCKET_CAMEL 1@' $$file; \
45 $(SED) -i -e 's@/\* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO \*/@#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1@' $$file; \
46 $(SED) -i -e 's@#define HAVE_FCNTL 1@/\* #undef HAVE_FCNTL \*/@' $$file; \
47 $(SED) -i -e 's@#define HAVE_FCNTL_O_NONBLOCK 1@/\* #undef HAVE_FCNTL_O_NONBLOCK \*/@' $$file; \
48 $(SED) -i -e 's@#define HAVE_IOCTL 1@/\* #undef HAVE_IOCTL \*/@' $$file; \
49 $(SED) -i -e 's@#define HAVE_IOCTL_FIONBIO 1@/\* #undef HAVE_IOCTL_FIONBIO \*/@' $$file; \
50 $(SED) -i -e 's@#define HAVE_IOCTL_SIOCGIFADDR 1@/\* #undef HAVE_IOCTL_SIOCGIFADDR \*/@' $$file; \
52 for file in $(GENDIR)/$(CURDIR)/curl/src/Makefile; \
54 $(SED) -i -e 's@-lssl -lcrypto -lz -lssl@-lssl -lcrypto -lz@' $$file; \
58 development-curl-fixconfig :
59 @for file in $(AROS_DEVELOPER)/bin/curl-config; \
61 $(SED) -i -e 's@-lssl -lcrypto -lz -lssl@-lssl -lcrypto -lz@' $$file; \
63 $(ECHO) "SYS:Developer" > $(AROS_ENVARC)/SYS/Packages/Curl