summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2011-12-17 23:33:32 +0100
committerMichael Stahl <mstahl@redhat.com>2011-12-17 23:33:32 +0100
commit87612dadc166fb078074e50796cc864dc981b483 (patch)
tree3fb89b16db6b2f79c82e06c61f0223c24ee83c54 /extensions
parentextensions: tweak spotlight makefiles (diff)
downloadcore-87612dadc166fb078074e50796cc864dc981b483.tar.gz
core-87612dadc166fb078074e50796cc864dc981b483.zip
extensions: convert ldap to gbuild
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Library_ldapbe2.mk86
-rw-r--r--extensions/Module_extensions.mk6
-rw-r--r--extensions/prj/build.lst3
-rw-r--r--extensions/source/config/ldap/exports.dxp1
-rw-r--r--extensions/source/config/ldap/makefile.mk105
5 files changed, 93 insertions, 108 deletions
diff --git a/extensions/Library_ldapbe2.mk b/extensions/Library_ldapbe2.mk
new file mode 100644
index 000000000000..87cb3ad99286
--- /dev/null
+++ b/extensions/Library_ldapbe2.mk
@@ -0,0 +1,86 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Peter Foley <pefoley2@verizon.net>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+
+$(eval $(call gb_Library_Library,ldapbe2))
+
+$(eval $(call gb_Library_set_componentfile,ldapbe2,extensions/source/config/ldap/ldapbe2))
+
+$(eval $(call gb_Library_add_api,ldapbe2,\
+ offapi \
+ udkapi \
+))
+
+ifeq ($(LDAPSDKINCLUDES),)
+ifneq ($(WITH_OPENLDAP),YES)
+ifeq ($(SYSTEM_MOZILLA),YES)
+$(eval $(call gb_Library_set_include,ldapbe2,\
+ $$(INCLUDE) \
+ $(MOZ_LDAP_CFLAGS) \
+))
+else # SYSTEM_MOZILLA=NO
+$(eval $(call gb_Library_set_include,ldapbe2,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/mozilla \
+))
+endif # SYSTEM_MOZILLA=YES
+else # WITH_OPENLDAP=YES
+$(eval $(call gb_Library_add_defs,ldapbe2,\
+ -DWITH_OPENLDAP \
+ -DLDAP_DEPRECATED \
+))
+endif # WITH_OPENLDAP=NO
+endif # LDAPSDKINCLUDES=
+
+$(eval $(call gb_Library_add_exception_objects,ldapbe2,\
+ extensions/source/config/ldap/componentdef \
+ extensions/source/config/ldap/ldapaccess \
+ extensions/source/config/ldap/ldapuserprofilebe \
+))
+
+$(eval $(call gb_Library_add_linked_libs,ldapbe2,\
+ cppuhelper \
+ cppu \
+ salhelper \
+ sal \
+))
+
+ifeq ($(OS),FREEBSD)
+$(eval $(call gb_Library_add_libs,ldapbe2,\
+ -lcompat \
+))
+ifneq ($(WITH_OPENLDAP),YES)
+$(eval $(call gb_Library_add_libs,ldapbe2,\
+ -Wl,-Bstatic
+ -llber50 \
+))
+endif # WITH_OPENLDAP=NO
+endif # OS=FREEBSD
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index 02e4ae4c43e3..caaa8fb62404 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -86,6 +86,12 @@ $(eval $(call gb_Module_add_targets,extensions,\
))
endif # OS=MACOSX
+ifeq ($(WITH_LDAP),YES)
+$(eval $(call gb_Module_add_targets,extensions,\
+ Library_ldapbe2 \
+))
+endif # WITH_LDAP=YES
+
$(eval $(call gb_Module_add_check_targets,extensions,\
CppunitTest_extensions_test_update \
))
diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst
index 7d5e500019eb..eb8585cf7404 100644
--- a/extensions/prj/build.lst
+++ b/extensions/prj/build.lst
@@ -11,8 +11,7 @@ ex extensions\source\xmlextract nmake - all ex_xmlextr ex_in
ex extensions\source\dbpilots nmake - all ex_dbpilots ex_inc NULL
ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL
ex extensions\source\logging nmake - all ex_logging ex_inc NULL
-ex extensions\source\config\ldap nmake - all ex_ldap ex_inc NULL
-ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_bib NULL
+ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_bib NULL
ex extensions\prj nmake - all ex_prj NULL
# Fails at the moment
diff --git a/extensions/source/config/ldap/exports.dxp b/extensions/source/config/ldap/exports.dxp
deleted file mode 100644
index 70033078921a..000000000000
--- a/extensions/source/config/ldap/exports.dxp
+++ /dev/null
@@ -1 +0,0 @@
-component_getFactory
diff --git a/extensions/source/config/ldap/makefile.mk b/extensions/source/config/ldap/makefile.mk
deleted file mode 100644
index d35e2428ca31..000000000000
--- a/extensions/source/config/ldap/makefile.mk
+++ /dev/null
@@ -1,105 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=extensions
-TARGET=ldapbe
-ENABLE_EXCEPTIONS=TRUE
-
-# Version
-LDAP_MAJOR=2
-
-# --- Settings ---
-
-.INCLUDE : settings.mk
-DLLPRE =
-
-.IF "$(WITH_LDAP)" != "YES"
-@all:
- @echo "LDAP disabled."
-.ENDIF
-
-.IF "$(LDAPSDKINCLUDES)" == ""
-
-.IF "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_OPENLDAP)" != "YES"
-LDAPSDKINCLUDES = $(MOZ_LDAP_CFLAGS)
-.ELSE
-LDAPSDKINCLUDES = -I$(SOLARINCDIR)$/mozilla
-.ENDIF
-.ENDIF
-
-.IF "$(WITH_OPENLDAP)" == "YES"
-CFLAGS += -DWITH_OPENLDAP -DLDAP_DEPRECATED
-.ENDIF
-
-SOLARINC+= $(LDAPSDKINCLUDES)
-# --- Files ---
-
-
-SLOFILES=\
- $(SLO)$/ldapuserprofilebe.obj \
- $(SLO)$/ldapaccess.obj \
- $(SLO)$/componentdef.obj
-
-LIB1TARGET=$(SLB)$/_$(TARGET).lib
-LIB1OBJFILES=$(SLOFILES)
-
-SHL1TARGET=$(TARGET)$(LDAP_MAJOR).uno
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-SHL1LIBS=$(LIB1TARGET)
-SHL1IMPLIB=i$(SHL1TARGET)
-SHL1STDLIBS= \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALHELPERLIB) \
- $(SALLIB)
-.IF "$(OS)"=="FREEBSD"
-SHL1STDLIBS+=-lcompat
-# workaround for FreeBSD, which needs -llber50, too
-.IF "$(WITH_OPENLDAP)" != "YES"
-SHL1STDLIBS+=-Wl,-Bstatic -llber50
-.ENDIF
-.ENDIF
-
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=exports.dxp
-DEF1DES=Configuration: LDAP User Profile Backend
-
-# --- Targets ---
-
-.INCLUDE : target.mk
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
-
-ALLTAR : $(MISC)/ldapbe2.component
-
-$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- ldapbe2.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component