summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.top2
-rw-r--r--Module_tail_build.mk1
-rw-r--r--RepositoryModule_ooo.mk1
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac2
-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
-rw-r--r--ooo.lst.in2
-rw-r--r--tail_build/prj/build.lst2
16 files changed, 182 insertions, 23 deletions
diff --git a/Makefile.top b/Makefile.top
index 510b49fcdf97..d6a324bb7fc5 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -64,6 +64,7 @@ cppuhelper\
cpputools\
ct2n\
cui\
+curl\
dbaccess\
desktop\
dictionaries \
@@ -215,7 +216,6 @@ binfilter \
cairo\
cppunit\
crashrep\
-curl\
external\
gdk-pixbuf\
gettext\
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 19893273e354..a8a397a1dc39 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
cpputools \
$(call gb_Helper_optional,CT2N,ct2n) \
cui \
+ $(call gb_Helper_optional,CURL,curl) \
dbaccess \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index b2593926e4c4..a0559b6516ec 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
cpputools \
$(call gb_Helper_optional,CT2N,ct2n) \
cui \
+ $(call gb_Helper_optional,CURL,curl) \
dbaccess \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
diff --git a/config_host.mk.in b/config_host.mk.in
index 2f4837f883c5..be1fd1b6d71d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -84,6 +84,7 @@ export CPUNAME_FOR_BUILD=@CPUNAME_FOR_BUILD@
export CPU_FOR_BUILD=@CPU_FOR_BUILD@
export CROSS_COMPILING=@CROSS_COMPILING@
export CT2N_TARBALL=@CT2N_TARBALL@
+export CURL_TARBALL=@CURL_TARBALL@
export CURL_CFLAGS=@CURL_CFLAGS@
export CURL_LIBS=@CURL_LIBS@
export CXX=@CXX@
diff --git a/configure.ac b/configure.ac
index d53c6a34ef82..65e3c222d8d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7892,9 +7892,11 @@ if test "$with_system_curl" = "yes"; then
else
AC_MSG_RESULT([internal])
SYSTEM_CURL=NO
+ CURL_TARBALL="3fa4d5236f2a36ca5c3af6715e837691-curl-7.26.0.tar.gz"
BUILD_TYPE="$BUILD_TYPE CURL"
fi
AC_SUBST(SYSTEM_CURL)
+AC_SUBST(CURL_TARBALL)
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
AC_SUBST([MINGW_CURL_DLL])
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
diff --git a/ooo.lst.in b/ooo.lst.in
index 69ac6f46f277..8f50cd250a1d 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -14,7 +14,6 @@ f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz
599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz
7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz
7376930b0d3f3d77a685d94c4a3acda8-STLport-4.5-0119.tar.gz
-3fa4d5236f2a36ca5c3af6715e837691-curl-7.26.0.tar.gz
fa9aa839145cdf860bf596532bb8af97-cppunit-1.13.1.tar.gz
bc702168a2af16869201dbe91e46ae48-LICENSE_Python-2.6.1
c441926f3a552ed3e5b274b62e86af16-STLport-4.0.tar.gz
@@ -50,6 +49,7 @@ fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
@CLUCENE_TARBALL@
@CMIS_TARBALL@
@CT2N_TARBALL@
+@CURL_TARBALL@
@EPM_TARBALL@
@EXPAT_TARBALL@
@FONT_DEJAVU_TARBALL@
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index a3c2f2a6a3e6..635fdef7a223 100644
--- a/tail_build/prj/build.lst
+++ b/tail_build/prj/build.lst
@@ -1,2 +1,2 @@
-tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit CURL:curl EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
+tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
tb tail_build\prj nmake - all tb_prj NULL