summaryrefslogtreecommitdiff
path: root/curl
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2012-10-29 10:50:32 -0400
committerPeter Foley <pefoley2@verizon.net>2012-10-29 12:25:53 -0400
commit0f075129c95f7aee782bf08b2edbe7c71db1c7b2 (patch)
treea6dd3dab52ffac33fe742f3e01d3fcc569e61068 /curl
parenta3d9253615078a35836c9e79dd694c4540dd5dde (diff)
convert curl to gbuild
Change-Id: I8c038a0c59660f4fb672d71c08e6ee0b56c302ee
Diffstat (limited to 'curl')
-rw-r--r--curl/ExternalPackage_curl.mk39
-rw-r--r--curl/ExternalProject_curl.mk56
-rw-r--r--curl/Makefile7
-rw-r--r--curl/Module_curl.mk20
-rw-r--r--curl/UnpackedTarball_curl.mk32
-rw-r--r--curl/curl-7.26.0_mingw.patch2
-rw-r--r--curl/curl-7.26.0_win.patch20
-rw-r--r--curl/prj/d.lst18
-rw-r--r--curl/prj/dmake0
9 files changed, 174 insertions, 20 deletions
diff --git a/curl/ExternalPackage_curl.mk b/curl/ExternalPackage_curl.mk
new file mode 100644
index 000000000000..c5852f872400
--- /dev/null
+++ b/curl/ExternalPackage_curl.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,curl,curl))
+
+$(eval $(call gb_ExternalPackage_use_external_project,curl,curl))
+
+ifeq ($(GUI),UNX)
+
+ifeq ($(COM),GCC)
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/pkgconfig/libcurl.pc,libcurl.pc))
+endif
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/libcurl.a,.libs/libcurl.a))
+else ifeq ($(OS),ANDROID)
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/libcurl.so,.libs/libcurl.so))
+else
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/libcurl.so,lib/.libs/libcurl.so.4.2.0))
+endif
+
+else ifeq ($(GUI),WNT)
+
+ifeq ($(COM),GCC)
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/libcurl.a,.libs/libcurl.a))
+$(eval $(call gb_ExternalPackage_add_file,curl,bin/libcurl.dll,.libs/libcurl.dll))
+else ifeq ($(COM),WNT)
+$(eval $(call gb_ExternalPackage_add_file,curl,lib/libcurl.lib,lib/libcurl.lib))
+$(eval $(call gb_ExternalPackage_add_file,curl,bin/libcurl.dll,lib/libcurl.dll))
+endif
+
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/curl/ExternalProject_curl.mk b/curl/ExternalProject_curl.mk
new file mode 100644
index 000000000000..beee03450a58
--- /dev/null
+++ b/curl/ExternalProject_curl.mk
@@ -0,0 +1,56 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,curl))
+
+$(eval $(call gb_ExternalProject_use_unpacked,curl,curl))
+
+$(eval $(call gb_ExternalProject_register_targets,curl,\
+ build \
+))
+
+ifeq ($(GUI),UNX)
+$(call gb_ExternalProject_get_state_target,curl,build):
+ cd $(EXTERNAL_WORKDIR) \
+ && ./configure --with-nss --without-ssl --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \
+ --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
+ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
+ $(if $(SYSBASE),CPPFLAGS="-I$(SYSBASE)/usr/include" LDFLAGS="-L$(SYSBASE)/usr/lib") \
+ && cd lib \
+ && $(GNUMAKE) -j$(EXTMAXPROCESS) \
+ && touch $@
+else ifeq ($(GUI),WNT)
+ifeq ($(COM),GCC)
+$(call gb_ExternalProject_get_state_target,curl,build):
+ cd $(EXTERNAL_WORKDIR) \
+ && ./configure --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher \
+ --disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 \
+ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
+ CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
+ LIBS="-lws2_32 -lwinmm $(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
+ LDFLAGS="$(patsubst ;, -L,$(ILIB))" \
+ CPPFLAGS="$(INCLUDE)" OBJDUMP="objdump" \
+ && cd lib \
+ && $(GNUMAKE) -j$(EXTMAXPROCESS) \
+ && touch $@
+
+else ifeq ($(COM),MSC)
+$(call gb_ExternalProject_get_state_target,curl,build):
+ cd $(EXTERNAL_WORKDIR)/lib \
+ && unset MAKEFLAGS \
+ && export LIB="$(ILIB)" \
+ && nmake -f Makefile.vc9 cfg=release-dll EXCFLAGS="/EHa /Zc:wchar_t- /D_CRT_SECURE_NO_DEPRECATE $(SOLARINC)" $(if $(filter X86_64,$(CPUNAME)),MACHINE=X64) \
+ && touch $@
+endif
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/curl/Makefile b/curl/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/curl/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/curl/Module_curl.mk b/curl/Module_curl.mk
new file mode 100644
index 000000000000..2f9c4b2a9403
--- /dev/null
+++ b/curl/Module_curl.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,curl))
+
+ifeq ($(SYSTEM_CURL),NO)
+$(eval $(call gb_Module_add_targets,curl,\
+ UnpackedTarball_curl \
+ ExternalPackage_curl \
+ ExternalProject_curl \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/curl/UnpackedTarball_curl.mk b/curl/UnpackedTarball_curl.mk
new file mode 100644
index 000000000000..4ff19f7374c6
--- /dev/null
+++ b/curl/UnpackedTarball_curl.mk
@@ -0,0 +1,32 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,curl))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,curl,$(CURL_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,curl,1))
+
+$(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
+ Makefile.msvc.names \
+ lib/Makefile.vc9 \
+))
+$(eval $(call gb_UnpackedTarball_add_patches,curl,\
+ curl/curl-7.26.0.patch \
+ curl/curl-7.26.0_nspr.patch \
+ curl/curl-aix.patch \
+ curl/curl-7.26.0_win.patch \
+ curl/curl-7.26.0_mingw.patch \
+))
+ifeq ($(OS),ANDROID)
+$(eval $(call gb_UnpackedTarball_add_patches,curl,\
+ curl/curl-android.patch \
+))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/curl/curl-7.26.0_mingw.patch b/curl/curl-7.26.0_mingw.patch
index 54d1ef3d0036..79318732a69b 100644
--- a/curl/curl-7.26.0_mingw.patch
+++ b/curl/curl-7.26.0_mingw.patch
@@ -1,4 +1,4 @@
---- misc/curl-7.26.0/lib/setup.h 2009-10-29 05:21:58.000000000 +0900
+--- curl-7.26.0/lib/setup.h 2009-10-29 05:21:58.000000000 +0900
+++ misc/build/curl-7.26.0/lib/setup.h 2010-03-02 06:03:10.009500000 +0900
@@ -40,6 +40,21 @@
diff --git a/curl/curl-7.26.0_win.patch b/curl/curl-7.26.0_win.patch
index 214b5a9389e7..bcc357c045f4 100644
--- a/curl/curl-7.26.0_win.patch
+++ b/curl/curl-7.26.0_win.patch
@@ -1,4 +1,4 @@
---- misc/curl-7.26.0/Makefile.msvc.names 2011-03-19 09:17:12.000000000 -0600
+--- curl-7.26.0/Makefile.msvc.names 2011-03-19 09:17:12.000000000 -0600
+++ misc/build/curl-7.26.0/Makefile.msvc.names 2012-07-02 07:20:39.323448800 -0600
@@ -43,7 +43,7 @@
!ENDIF
@@ -32,3 +32,21 @@
!ENDIF
# --------------------------------------
+--- curl/lib/Makefile.vc9 2012-05-24 12:07:02.000000000 -0400
++++ curl/lib/Makefile.vc9 2012-10-29 11:53:44.658809300 -0400
+@@ -117,7 +117,7 @@
+ ZLIBLIBSDLL= zdll.lib
+ ZLIBLIBS = zlib.lib
+ WINLIBS = ws2_32.lib wldap32.lib
+-CFLAGS = $(CFLAGS)
++CFLAGS = $(CFLAGS) $(EXCFLAGS)
+
+ CFGSET = FALSE
+
+@@ -620,5 +620,5 @@
+ release-dll-ssl-dll\libcurl.res \
+ release-dll-zlib-dll\libcurl.res \
+ release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
+- rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
++ rc $(SOLARINC) /dDEBUGBUILD=0 /Fo $@ libcurl.rc
+ !ENDIF # End of case where a config was provided.
diff --git a/curl/prj/d.lst b/curl/prj/d.lst
index 13d6ad291df9..e69de29bb2d1 100644
--- a/curl/prj/d.lst
+++ b/curl/prj/d.lst
@@ -1,18 +0,0 @@
-mkdir: %_DEST%\inc\external\curl
-..\%__SRC%\inc\easy.h %_DEST%\inc\external\curl\easy.h
-..\%__SRC%\inc\curlver.h %_DEST%\inc\external\curl\curlver.h
-..\%__SRC%\inc\curl.h %_DEST%\inc\external\curl\curl.h
-..\%__SRC%\inc\mprintf.h %_DEST%\inc\external\curl\mprintf.h
-..\%__SRC%\inc\multi.h %_DEST%\inc\external\curl\multi.h
-..\%__SRC%\inc\stdcheaders.h %_DEST%\inc\external\curl\stdcheaders.h
-..\%__SRC%\inc\typecheck-gcc.h %_DEST%\inc\external\curl\typecheck-gcc.h
-..\%__SRC%\inc\curlbuild.h %_DEST%\inc\external\curl\curlbuild.h
-..\%__SRC%\inc\curlrules.h %_DEST%\inc\external\curl\curlrules.h
-
-mkdir: %_DEST%\lib\pkgconfig
-..\%__SRC%\inc\libcurl.pc %_DEST%\lib\pkgconfig\libcurl.pc
-
-..\%__SRC%\bin\libcurl*.dll %_DEST%\bin\*.dll
-..\%__SRC%\lib\libcurl.* %_DEST%\lib\libcurl.*
-
-linklib: libcurl.*.*
diff --git a/curl/prj/dmake b/curl/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/curl/prj/dmake
+++ /dev/null