summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-10-28 12:35:07 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-10-28 15:16:19 +0100
commitc3a586a716424a0f22858823622328ce92cb9640 (patch)
tree732962e38745e281e3ef97b215cd56ee9953d7d1
parenteb28dd59b86f572f83eb60c826c08509da9ca6ae (diff)
openldap: convert to gbuild
Change-Id: Ic1c4c58a09fd41bce78731e61349baa129f5e935
-rw-r--r--Makefile.top2
-rw-r--r--Module_tail_build.mk1
-rw-r--r--RepositoryExternal.mk4
-rw-r--r--RepositoryModule_ooo.mk1
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac6
-rw-r--r--ooo.lst.in2
-rw-r--r--openldap/ExternalPackage_openldap.mk20
-rw-r--r--openldap/ExternalProject_openldap.mk42
-rw-r--r--openldap/Makefile7
-rw-r--r--openldap/Module_openldap.mk22
-rw-r--r--openldap/UnpackedTarball_openldap.mk18
-rw-r--r--openldap/makefile.mk76
-rw-r--r--openldap/prj/dmake0
-rw-r--r--postgresql/ExternalProject_postgresql.mk2
-rw-r--r--tail_build/prj/build.lst2
16 files changed, 123 insertions, 83 deletions
diff --git a/Makefile.top b/Makefile.top
index 87653e1a9c18..b33820105a78 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -126,6 +126,7 @@ offapi\
officecfg\
oovbaapi\
oox\
+openldap\
package\
packimages\
padmin\
@@ -238,7 +239,6 @@ mysqlc\
mysqlcppconn\
nss\
odk\
-openldap\
openssl\
pango\
postprocess\
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 7cafb1c8078d..dc8d16d3184b 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -117,6 +117,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
officecfg \
oovbaapi \
oox \
+ $(call gb_Helper_optional,OPENLDAP,openldap) \
package \
padmin \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e08beecc9e4d..77be1e7324c6 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1776,10 +1776,12 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
define gb_LinkTarget__use_openldap
$(call gb_LinkTarget_set_include,$(1),\
- -I$(OUTDIR)/inc/openldap \
+ -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
$$(INCLUDE) \
)
+$(call gb_LinkTarget_use_package,$(1),openldap)
+
$(call gb_LinkTarget_use_static_libraries,$(1),\
ldap \
lber \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 226aa55d71a9..d8968eefabef 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -125,6 +125,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
officecfg \
oovbaapi \
oox \
+ $(call gb_Helper_optional,OPENLDAP,openldap) \
package \
packimages \
padmin \
diff --git a/config_host.mk.in b/config_host.mk.in
index 064eece174b3..c1e0171fc7f9 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -457,6 +457,7 @@ export OOOP_TEMPLATES_PACK=@OOOP_TEMPLATES_PACK@
export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@
export OOO_SHELL=@BASH@
export OOO_VENDOR=@OOO_VENDOR@
+export OPENLDAP_TARBALL=@OPENLDAP_TARBALL@
export OPENSSL_CFLAGS=@OPENSSL_CFLAGS@
export OPENSSL_LIBS=@OPENSSL_LIBS@
export ORCUS_CFLAGS=@ORCUS_CFLAGS@
diff --git a/configure.ac b/configure.ac
index f25debb2787f..fbe21cc636f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8064,7 +8064,7 @@ dnl ===================================================================
dnl Check for system openldap
dnl ===================================================================
-if test "$_os" != "WINNT"; then
+if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
AC_MSG_CHECKING([which openldap library to use])
if test "$with_system_openldap" = "yes"; then
AC_MSG_RESULT([external])
@@ -8075,12 +8075,12 @@ if test "$with_system_openldap" = "yes"; then
else
AC_MSG_RESULT([internal])
SYSTEM_OPENLDAP=NO
+ OPENLDAP_TARBALL="804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz"
BUILD_TYPE="$BUILD_TYPE OPENLDAP"
fi
-else
- SYSTEM_OPENLDAP=NO
fi
AC_SUBST(SYSTEM_OPENLDAP)
+AC_SUBST(OPENLDAP_TARBALL)
dnl ===================================================================
dnl Check for system mozilla
diff --git a/ooo.lst.in b/ooo.lst.in
index ceaa9ecc33c0..00abafdf6299 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -40,7 +40,6 @@ a0a861f539f0e7a91d05e6b9457e4db1-nss-3.13.5-with-nspr-4.9.1.tar.gz
3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz
861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
-804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
@AFMS_TARBALL@
@APACHE_COMMONS_CODEC_TARBALL@
@APACHE_COMMONS_HTTPCLIENT_TARBALL@
@@ -82,6 +81,7 @@ fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
@MSPUB_TARBALL@
@MYTHES_TARBALL@
@NEON_TARBALL@
+@OPENLDAP_TARBALL@
@ORCUS_TARBALL@
@PNG_TARBALL@
@POSTGRESQL_TARBALL@
diff --git a/openldap/ExternalPackage_openldap.mk b/openldap/ExternalPackage_openldap.mk
new file mode 100644
index 000000000000..daacf1fda1f1
--- /dev/null
+++ b/openldap/ExternalPackage_openldap.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_ExternalPackage_ExternalPackage,openldap,openldap))
+
+$(eval $(call gb_ExternalPackage_use_external_project,openldap,openldap))
+
+$(eval $(call gb_ExternalPackage_add_files,openldap,lib,\
+ libraries/libldap/.libs/libldap.a \
+ libraries/libldap_r/.libs/libldap_r.a \
+ libraries/liblber/.libs/liblber.a \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/openldap/ExternalProject_openldap.mk b/openldap/ExternalProject_openldap.mk
new file mode 100644
index 000000000000..41a7b43b90e5
--- /dev/null
+++ b/openldap/ExternalProject_openldap.mk
@@ -0,0 +1,42 @@
+# -*- 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,openldap))
+
+$(eval $(call gb_ExternalProject_use_unpacked,openldap,openldap))
+
+$(eval $(call gb_ExternalProject_register_targets,openldap,\
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,openldap,build) :
+ cd $(EXTERNAL_WORKDIR) \
+ && ./configure \
+ --disable-slapd \
+ --with-pic \
+ --with-tls=moznss \
+ --without-cyrus-sasl \
+ --disable-shared \
+ --enable-static \
+ $(if $(filter YES,$(CROSS_COMPILING)), \
+ --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+ --with-yielding_select=yes \
+ ac_cv_func_memcmp_working=yes \
+ ) \
+ $(if $(filter YES,$(SYSTEM_NSS)), \
+ CPPFLAGS="$(NSS_CFLAGS)" CFLAGS="$(NSS_CFLAGS)" LDFLAGS="$(NSS_LIBS)" \
+ , \
+ CPPFLAGS="-I $(OUTDIR)/inc/mozilla/nss -I $(OUTDIR)/inc/mozilla/nspr" \
+ CFLAGS="-I $(OUTDIR)/inc/mozilla/nss -I $(OUTDIR)/inc/mozilla/nspr" \
+ LDFLAGS="-L$(OUTDIR)/lib" \
+ ) \
+ && unset MAKEFLAGS && $(GNUMAKE) -j$(GMAKE_PARALLELISM) \
+ && touch $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/openldap/Makefile b/openldap/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/openldap/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/openldap/Module_openldap.mk b/openldap/Module_openldap.mk
new file mode 100644
index 000000000000..658695cb8b52
--- /dev/null
+++ b/openldap/Module_openldap.mk
@@ -0,0 +1,22 @@
+# -*- 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,openldap))
+
+ifeq ($(SYSTEM_OPENLDAP),NO)
+
+$(eval $(call gb_Module_add_targets,openldap,\
+ ExternalPackage_openldap \
+ ExternalProject_openldap \
+ UnpackedTarball_openldap \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/openldap/UnpackedTarball_openldap.mk b/openldap/UnpackedTarball_openldap.mk
new file mode 100644
index 000000000000..44db53090086
--- /dev/null
+++ b/openldap/UnpackedTarball_openldap.mk
@@ -0,0 +1,18 @@
+# -*- 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,openldap))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,openldap,$(OPENLDAP_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,openldap,\
+ openldap/openldap-2.4.31.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/openldap/makefile.mk b/openldap/makefile.mk
deleted file mode 100644
index 44b710e3fcaa..000000000000
--- a/openldap/makefile.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# 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/.
-#
-
-PRJ=.
-
-PRJNAME=openldap
-TARGET=so_openldap
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(SYSTEM_OPENLDAP)" == "YES"
-all:
- @echo "An already available installation of openldap should exist on your system."
- @echo "Therefore the version provided here does not need to be built in addition."
-.ENDIF
-
-.IF "$(OS)"=="WNT" || "$(OS)"=="ANDROID" || "$(OS)"=="IOS"
-all:
- @echo "Openldap is not needed on Windows, Android or iOS."
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-TARFILE_NAME=openldap-2.4.31
-TARFILE_MD5=804c6cb5698db30b75ad0ff1c25baefd
-
-PATCH_FILES=\
- $(TARFILE_NAME).patch
-
-CONFIGURE_DIR=
-CONFIGURE_ACTION=.$/configure
-CONFIGURE_FLAGS=--disable-slapd --with-pic --with-tls=moznss --without-cyrus-sasl --disable-shared --enable-static
-
-.IF "$(CROSS_COMPILING)"=="YES"
-CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-yielding_select=yes ac_cv_func_memcmp_working=yes
-.ENDIF
-
-.IF "$(SYSTEM_NSS)" == "YES"
-CONFIGURE_FLAGS+=CPPFLAGS="$(NSS_CFLAGS)" CFLAGS="$(NSS_CFLAGS)" LDFLAGS="$(NSS_LIBS)"
-.ELSE
-CONFIGURE_FLAGS+=CPPFLAGS="-I $(SOLARVER)$/$(INPATH)$/inc$/mozilla$/nss -I $(SOLARVER)$/$(INPATH)$/inc$/mozilla$/nspr"
-CONFIGURE_FLAGS+=CFLAGS="-I $(SOLARVER)$/$(INPATH)$/inc$/mozilla$/nss -I $(SOLARVER)$/$(INPATH)$/inc$/mozilla$/nspr"
-CONFIGURE_FLAGS+=LDFLAGS="-L$(SOLARVER)$/$(INPATH)$/lib"
-.ENDIF
-
-BUILD_FLAGS+= -j$(EXTMAXPROCESS)
-BUILD_DIR=$(CONFIGURE_DIR)
-BUILD_ACTION=$(GNUMAKE)
-
-OUT2INC+=include$/slapi-plugin.h
-OUT2INC+=include$/ldap_utf8.h
-OUT2INC+=include$/ldap.h
-OUT2INC+=include$/ldap_cdefs.h
-OUT2INC+=include$/ldap_features.h
-OUT2INC+=include$/ldap_schema.h
-OUT2INC+=include$/ldif.h
-OUT2INC+=include$/lber_types.h
-OUT2INC+=include$/lber.h
-
-OUT2LIB+=libraries$/libldap$/.libs$/libldap.a
-OUT2LIB+=libraries$/libldap_r$/.libs$/libldap_r.a
-OUT2LIB+=libraries$/liblber$/.libs$/liblber.a
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-
diff --git a/openldap/prj/dmake b/openldap/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/openldap/prj/dmake
+++ /dev/null
diff --git a/postgresql/ExternalProject_postgresql.mk b/postgresql/ExternalProject_postgresql.mk
index 283b11bf128d..c11cdb4e1646 100644
--- a/postgresql/ExternalProject_postgresql.mk
+++ b/postgresql/ExternalProject_postgresql.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_ExternalProject_ExternalProject,postgresql))
$(eval $(call gb_ExternalProject_use_unpacked,postgresql,postgresql))
+$(eval $(call gb_ExternalProject_use_package,postgresql,openldap))
+
$(eval $(call gb_ExternalProject_register_targets,postgresql,\
build \
))
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index 0fb7a0688282..374a400a5852 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 HUNSPELL:hunspell HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz NSS:nss OPENLDAP:openldap 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 CURL:curl EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf HUNSPELL:hunspell 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