Makefile.top | 2 Module_tail_build.mk | 1 RepositoryModule_ooo.mk | 1 config_host.mk.in | 1 configure.ac | 2 connectivity/Library_postgresql-sdbc-impl.mk | 6 + ooo.lst.in | 2 postgresql/ExternalPackage_postgresql.mk | 32 +++++++++ postgresql/ExternalProject_postgresql.mk | 41 ++++++++++++ postgresql/Makefile | 7 ++ postgresql/Module_postgresql.mk | 22 ++++++ postgresql/UnpackedTarball_postgresql.mk | 24 +++++++ postgresql/makefile.mk | 92 --------------------------- postgresql/prj/d.lst | 8 -- solenv/gbuild/Library.mk | 2 solenv/gbuild/LinkTarget.mk | 11 +++ tail_build/prj/build.lst | 2 17 files changed, 152 insertions(+), 104 deletions(-)
New commits: commit ffcaa7651f5761c884b57e1c0f0ff0f92b803194 Author: Peter Foley <pefol...@verizon.net> Date: Sun Oct 21 09:15:12 2012 -0400 convert postgresql to gbuild Change-Id: Ia1345904a819d8edfad53c8882be35b398e8bc6e diff --git a/Makefile.top b/Makefile.top index 0e85de6..a37dc0b 100644 --- a/Makefile.top +++ b/Makefile.top @@ -122,6 +122,7 @@ oox\ package\ packimages\ padmin\ +postgresql\ psprint_config\ pyuno\ qadevOOo\ @@ -241,7 +242,6 @@ odk\ openldap\ openssl\ pango\ -postgresql\ postprocess\ python\ redland\ diff --git a/Module_tail_build.mk b/Module_tail_build.mk index b6c6512..9ee18e2 100644 --- a/Module_tail_build.mk +++ b/Module_tail_build.mk @@ -112,6 +112,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\ oox \ package \ padmin \ + $(call gb_Helper_optional,POSTGRESQL,postgresql) \ psprint_config \ $(call gb_Helper_optional,PYUNO,pyuno) \ $(call gb_Helper_optional,QADEVOOO,qadevOOo) \ diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk index acdb736..a9e3b2f 100644 --- a/RepositoryModule_ooo.mk +++ b/RepositoryModule_ooo.mk @@ -121,6 +121,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ package \ packimages \ padmin \ + $(call gb_Helper_optional,POSTGRESQL,postgresql) \ psprint_config \ $(call gb_Helper_optional,PYUNO,pyuno) \ $(if $(strip $(OOO_JUNIT_JAR)),\ diff --git a/config_host.mk.in b/config_host.mk.in index 7aca33b..503d4ae 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -463,6 +463,7 @@ export POPPLER_CFLAGS=@POPPLER_CFLAGS@ export POPPLER_LIBS=@POPPLER_LIBS@ export POSTGRESQL_INC=@POSTGRESQL_INC@ export POSTGRESQL_LIB=@POSTGRESQL_LIB@ +export POSTGRESQL_TARBALL=@POSTGRESQL_TARBALL@ export PREBUILD_MOZAB=@PREBUILD_MOZAB@ export PREFIXDIR=@PREFIXDIR@ export PRODUCT=@PRODUCT@ diff --git a/configure.ac b/configure.ac index b48aa5d..6521130 100644 --- a/configure.ac +++ b/configure.ac @@ -7780,6 +7780,7 @@ if test "x$enable_postgresql_sdbc" != "xno"; then POSTGRESQL_LIB="" POSTGRESQL_INC="%OVERRIDE_ME%" BUILD_TYPE="$BUILD_TYPE POSTGRESQL" + POSTGRESQL_TARBALL="061a9f17323117c9358ed60f33ecff78-postgresql-9.1.1.tar.bz2" fi fi if test "${SYSTEM_POSTGRESQL}" = "YES"; then @@ -7804,6 +7805,7 @@ AC_SUBST(BUILD_POSTGRESQL_SDBC) AC_SUBST(SYSTEM_POSTGRESQL) AC_SUBST(POSTGRESQL_INC) AC_SUBST(POSTGRESQL_LIB) +AC_SUBST(POSTGRESQL_TARBALL) dnl =================================================================== diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk index 7e525a9..b5094cb 100644 --- a/connectivity/Library_postgresql-sdbc-impl.mk +++ b/connectivity/Library_postgresql-sdbc-impl.mk @@ -64,7 +64,11 @@ $(eval $(call gb_Library_use_externals,postgresql-sdbc-impl,\ ifneq ($(SYSTEM_POSTGRESQL),YES) ifneq ($(GUI)$(COM),WNTMSC) -include $(OUTDIR)/inc/postgresql/libpq-flags.mk +$(eval $(call gb_Library_use_external_package,postgresql-sdbc-impl,\ + postgresql \ +)) + +-include $(OUTDIR)/inc/postgresql/libpq-flags.mk $(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\ $(if $(filter-out MACOSX,$(OS)),-Wl$(COMMA)--as-needed) \ diff --git a/ooo.lst.in b/ooo.lst.in index f3cfcc2..0b64496 100644 --- a/ooo.lst.in +++ b/ooo.lst.in @@ -33,7 +33,7 @@ dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz fb7ba5c2182be4e73748859967455455-README_stax-api-1.0-2-sources.txt fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz -061a9f17323117c9358ed60f33ecff78-postgresql-9.1.1.tar.bz2 +@POSTGRESQL_TARBALL@ 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz 3dd55b952826d2b32f51308f2f91aa89-gettext-0.18.1.1.tar.gz 9f6e85e1e38490c3956f4415bcd33e6e-glib-2.28.1.tar.gz diff --git a/postgresql/ExternalPackage_postgresql.mk b/postgresql/ExternalPackage_postgresql.mk new file mode 100644 index 0000000..d86c105 --- /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 0000000..db1deb2 --- /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 0000000..ccb1c85 --- /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 0000000..978cc06 --- /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 0000000..f6b9472 --- /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 e4e5021..0000000 --- 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 8f6d9ab..e69de29 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 e69de29..0000000 diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index d07fe24..a3c3f52 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -210,6 +210,8 @@ $(eval $(foreach method,\ add_external_headers \ use_package \ use_packages \ + use_external_package \ + use_external_packages \ use_unpacked \ add_package_headers \ add_sdi_headers \ diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 870bad1..efe6a3a 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -1139,6 +1139,17 @@ define gb_LinkTarget_use_packages $(foreach package,$(2),$(call gb_LinkTarget_use_package,$(1),$(package))) endef +# use a external package, possibly from another module (i.e. via OUTDIR) +define gb_LinkTarget_use_external_package +$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \ + $(call gb_ExternalPackage_get_target,$(strip $(2))) + +endef + +define gb_LinkTarget_use_external_packages +$(foreach package,$(2),$(call gb_LinkTarget_use_external_package,$(1),$(package))) +endef + # Use sources from unpacked tarball of an external project define gb_LinkTarget_use_unpacked $(call gb_LinkTarget_get_external_headers_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,$(2)) diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst index ed6c2db..aa1394b 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 FONTCONFIG:fontconfig FREETYPE:freetype GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz MYTHES:mythes NSS:nss OPENLDAP:openldap OPENSSL:openssl POSTGRESQL:postgresql PYTHON:python REDLAND:redland stax XPDF:xpdf ZLIB:zlib external sal solenv soltools NULL +tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit CURL:curl EXPAT:expat FONTCONFIG:fontconfig FREETYPE:freetype GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz MYTHES:mythes NSS:nss OPENLDAP:openldap OPENSSL:openssl PYTHON:python REDLAND:redland stax XPDF:xpdf ZLIB:zlib external sal solenv soltools NULL tb tail_build\prj nmake - all tb_prj NULL _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits