summaryrefslogtreecommitdiff
path: root/openldap
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 /openldap
parenteb28dd59b86f572f83eb60c826c08509da9ca6ae (diff)
openldap: convert to gbuild
Change-Id: Ic1c4c58a09fd41bce78731e61349baa129f5e935
Diffstat (limited to 'openldap')
-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
7 files changed, 109 insertions, 76 deletions
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