diff options
author | Peter Foley <pefoley2@verizon.net> | 2012-10-21 09:15:12 -0400 |
---|---|---|
committer | Peter Foley <pefoley2@verizon.net> | 2012-10-21 09:49:03 -0400 |
commit | ffcaa7651f5761c884b57e1c0f0ff0f92b803194 (patch) | |
tree | 2998f0bf2d4843b8d26a912fece947453b4ce538 /postgresql | |
parent | b339e4e2ba2b833903956cbcebf64a2a99dba176 (diff) |
convert postgresql to gbuild
Change-Id: Ia1345904a819d8edfad53c8882be35b398e8bc6e
Diffstat (limited to 'postgresql')
-rw-r--r-- | postgresql/ExternalPackage_postgresql.mk | 32 | ||||
-rw-r--r-- | postgresql/ExternalProject_postgresql.mk | 41 | ||||
-rw-r--r-- | postgresql/Makefile | 7 | ||||
-rw-r--r-- | postgresql/Module_postgresql.mk | 22 | ||||
-rw-r--r-- | postgresql/UnpackedTarball_postgresql.mk | 24 | ||||
-rw-r--r-- | postgresql/makefile.mk | 92 | ||||
-rw-r--r-- | postgresql/prj/d.lst | 8 | ||||
-rw-r--r-- | postgresql/prj/dmake | 0 |
8 files changed, 126 insertions, 100 deletions
diff --git a/postgresql/ExternalPackage_postgresql.mk b/postgresql/ExternalPackage_postgresql.mk new file mode 100644 index 000000000000..d86c1059ade2 --- /dev/null +++ b/postgresql/ExternalPackage_postgresql.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_ExternalPackage_ExternalPackage,postgresql,postgresql)) + +$(eval $(call gb_ExternalPackage_use_external_project,postgresql,postgresql)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,postgresql,inc/postgresql,\ + src/include/postgres_ext.h \ + src/interfaces/libpq/libpq-fe.h \ +)) + +$(eval $(call gb_ExternalPackage_add_files,postgresql,inc/postgresql,\ + src/interfaces/libpq/libpq-flags.mk \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_ExternalPackage_add_files,postgresql,lib,\ + src/interfaces/libpq/libpq.lib \ +)) +else +$(eval $(call gb_ExternalPackage_add_files,postgresql,lib,\ + src/interfaces/libpq/libpq.a \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/postgresql/ExternalProject_postgresql.mk b/postgresql/ExternalProject_postgresql.mk new file mode 100644 index 000000000000..db1deb2722f0 --- /dev/null +++ b/postgresql/ExternalProject_postgresql.mk @@ -0,0 +1,41 @@ +# -*- 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,postgresql)) + +$(eval $(call gb_ExternalProject_use_unpacked,postgresql,postgresql)) + +$(eval $(call gb_ExternalProject_register_targets,postgresql,\ + build \ +)) + +ifeq ($(OS)$(COM),WNTMSC) + +$(call gb_ExternalProject_get_state_target,postgresql,build) : + cd $(EXTERNAL_WORKDIR)/src \ + && nmake -f win32.mk USE_SSL=1 USE_LDAP=1 USE_MICROSOFT_LDAP=1 \ + && touch $@ +else + +$(call gb_ExternalProject_get_state_target,postgresql,build) : + cd $(EXTERNAL_WORKDIR) \ + && ./configure \ + --without-readline --disable-shared --with-openssl --with-ldap \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter YES,$(WITH_KRB5)),--with-krb5) \ + $(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi) \ + $(if $(filter NO,$(SYSTEM_OPENLDAP)),CPPFLAGS="-I$(OUTDIR)/inc/openldap" LDFLAGS="-L$(OUTDIR)/lib" EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4") \ + && cd src/interfaces/libpq \ + && unset MAKEFLAGS \ + && $(GNUMAKE) -j$(EXTMAXPROCESS) all-static-lib libpq-flags.mk \ + && touch $@ + +endif + +# vim: set noet sw=4 ts=4: diff --git a/postgresql/Makefile b/postgresql/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/postgresql/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/postgresql/Module_postgresql.mk b/postgresql/Module_postgresql.mk new file mode 100644 index 000000000000..978cc069ab9d --- /dev/null +++ b/postgresql/Module_postgresql.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,postgresql)) + +ifeq ($(SYSTEM_POSTGRESQL),NO) + +$(eval $(call gb_Module_add_targets,postgresql,\ + ExternalProject_postgresql \ + ExternalPackage_postgresql \ + UnpackedTarball_postgresql \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/postgresql/UnpackedTarball_postgresql.mk b/postgresql/UnpackedTarball_postgresql.mk new file mode 100644 index 000000000000..f6b9472acfea --- /dev/null +++ b/postgresql/UnpackedTarball_postgresql.mk @@ -0,0 +1,24 @@ +# -*- 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,postgresql)) + +$(eval $(call gb_UnpackedTarball_set_tarball,postgresql,$(POSTGRESQL_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,postgresql,3)) + +$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \ + postgresql/postgresql-moz-ldap.patch \ + postgresql/postgresql-libs-leak.patch \ + postgresql/libpq-parallel-build.patch \ + postgresql/postgresql-9.1.1-autoreconf.patch \ + postgresql/postgresql-9.1.1-libreoffice.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk deleted file mode 100644 index e4e50214b653..000000000000 --- a/postgresql/makefile.mk +++ /dev/null @@ -1,92 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# 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=postgresql -TARGET=so_postgresql - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=postgresql-9.1.1 -TARFILE_MD5=061a9f17323117c9358ed60f33ecff78 -PATCH_FILES=\ - postgresql-moz-ldap.patch \ - postgresql-libs-leak.patch \ - libpq-parallel-build.patch \ - $(TARFILE_NAME)-libreoffice.patch \ - $(TARFILE_NAME)-autoreconf.patch - -.IF "$(SYSTEM_POSTGRESQL)" == "YES" -@all: - @echo "Using system postgresql..." -.ENDIF - - -.IF "$(GUI)$(COM)"=="WNTMSC" -CONFIGURE_DIR=. -BUILD_DIR=src - -CONFIGURE_ACTION = -BUILD_ACTION = nmake -f win32.mak USE_SSL=1 USE_LDAP=1 USE_MICROSOFT_LDAP=1 -.ELSE #"$(GUI)$(COM)"!="WNTMSC" -CONFIGURE_DIR=. -BUILD_DIR=src/interfaces/libpq - -CONFIGURE_ACTION = ./configure --without-readline --disable-shared --with-openssl --with-ldap - -.IF "$(OS)" != "WNT" && "$(SYSTEM_OPENLDAP) != "YES" -CONFIGURE_ACTION += CPPFLAGS="-I $(SOLARVER)$/$(INPATH)$/inc$/openldap" -CONFIGURE_ACTION += LDFLAGS="$(SOLARLIB)" -CONFIGURE_ACTION += EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" -.ENDIF - -.IF "$(CROSS_COMPILING)" == "YES" -CONFIGURE_ACTION += --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF - -.IF "$(WITH_KRB5)" == "YES" -CONFIGURE_ACTION += --with-krb5 -.ENDIF -.IF "$(WITH_GSSAPI)" == "YES" -CONFIGURE_ACTION += --with-gssapi -.ENDIF - -BUILD_ACTION = make -j$(GMAKE_MODULE_PARALLELISM) all-static-lib libpq-flags.mk - -.ENDIF # "$(GUI)$(COM)"=="WNTMSC" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk - diff --git a/postgresql/prj/d.lst b/postgresql/prj/d.lst index 8f6d9ab2e680..e69de29bb2d1 100644 --- a/postgresql/prj/d.lst +++ b/postgresql/prj/d.lst @@ -1,8 +0,0 @@ -mkdir: %_DEST%\inc\postgresql - -..\%__SRC%\misc\build\postgresql-*\src\include\postgres_ext.h %_DEST%\inc\postgresql -..\%__SRC%\misc\build\postgresql-*\src\interfaces\libpq\libpq-fe.h %_DEST%\inc\postgresql -..\%__SRC%\misc\build\postgresql-*\src\interfaces\libpq\libpq-flags.mk %_DEST%\inc\postgresql -..\%__SRC%\misc\build\postgresql-*\src\interfaces\libpq\libpq.a %_DEST%\lib -..\%__SRC%\misc\build\postgresql-*\src\interfaces\libpq\libpq.lib %_DEST%\lib - diff --git a/postgresql/prj/dmake b/postgresql/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/postgresql/prj/dmake +++ /dev/null |