[Libreoffice-commits] .: Branch 'libreoffice-3-5' - postgresql/makefile.mk postgresql/postgresql-9.1.1.patch postgresql/prj

Fridrich Strba fridrich at kemper.freedesktop.org
Fri Dec 9 02:05:21 PST 2011


 postgresql/makefile.mk            |   33 +++++++-------
 postgresql/postgresql-9.1.1.patch |   85 ++++++++++++++++++++++++++++++++++++++
 postgresql/prj/d.lst              |    8 +--
 3 files changed, 105 insertions(+), 21 deletions(-)

New commits:
commit 84738f5143cd2989a41583943b95d500493b11d0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Fri Dec 9 10:59:23 2011 +0100

    Trying to simplify the building of static libpq
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>

diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 438e2ca..6e85025 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -30,17 +30,16 @@ PRJ=.
 PRJNAME=postgresql
 TARGET=so_postgresql
 
-EXT_PROJECT_NAME=postgresql-9.1.1
-MAJOR_VER=9.1
-
 # --- Settings -----------------------------------------------------
 
 .INCLUDE :	settings.mk
 
 # --- Files --------------------------------------------------------
 
-TARFILE_NAME=$(EXT_PROJECT_NAME)
+TARFILE_NAME=postgresql-9.1.1
 TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
+PATCH_FILES=\
+	$(TARFILE_NAME).patch
 
 .IF "$(SYSTEM_POSTGRESQL)" == "YES"
 @all:
@@ -48,7 +47,16 @@ TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
 .ENDIF
 
 
-BUILD_DIR=.
+.IF "$(GUI)$(COM)"=="WNTGCC"
+CONFIGURE_DIR=.
+BUILD_DIR=src
+
+CONFIGURE_ACTION =
+BUILD_ACTION = nmake -f win32.mak
+.ELSE
+CONFIGURE_DIR=.
+BUILD_DIR=src/interfaces/libpq
+
 # TODO:
 # --datarootdir changes where libpq expects internationalisation of its messages
 #               (which we don't install anyway for now...)
@@ -57,18 +65,9 @@ BUILD_DIR=.
 .IF "$(VERBOSE)"==""
 MAKE_SILENT=-s
 .ENDIF
-BUILD_ACTION = \
-            ./configure   --sysconfdir=/etc/postgresql-common \
-			  --datarootdir=/usr/share/ \
-			  --datadir=/usr/share/postgresql/$(MAJOR_VER) \
-			  --bindir=/usr/lib/postgresql/$(MAJOR_VER)/bin \
-			  --libdir=/usr/lib/ \
-			  --includedir=/usr/include/postgresql/ \
-			  --without-readline \
-	 && DESTDIR="$(SRC_ROOT)/$(PRJNAME)/$(INPATH)/" \
-	 && export DESTDIR \
-	 && make $(MAKE_SILENT) -j$(GMAKE_MODULE_PARALLELISM) -C src/interfaces/libpq install \
-	 && ./config/install-sh -c -m 644 src/include/postgres_ext.h "$${{DESTDIR}}/usr/include/postgresql/"
+CONFIGURE_ACTION = ./configure --without-readline
+BUILD_ACTION = make $(MAKE_SILENT) -j$(GMAKE_MODULE_PARALLELISM) all-static-lib
+.ENDIF
 
 # --- Targets ------------------------------------------------------
 
diff --git a/postgresql/postgresql-9.1.1.patch b/postgresql/postgresql-9.1.1.patch
new file mode 100644
index 0000000..cafb4a3
--- /dev/null
+++ b/postgresql/postgresql-9.1.1.patch
@@ -0,0 +1,85 @@
+--- misc/postgresql-9.1.1/src/interfaces/libpq/win32.mak	2011-09-22 23:57:57.000000000 +0200
++++ misc/build/postgresql-9.1.1/src/interfaces/libpq/win32.mak	2011-12-09 10:44:54.151291450 +0100
+@@ -11,18 +11,19 @@
+ 
+ # CPU="i386" or CPU environment of nmake.exe (AMD64 or IA64)
+ 
+-!IF ("$(CPU)" == "")||("$(CPU)" == "i386")
+-CPU=i386
++!IF ("$(CPU)" == "")||("$(CPU)" == "I")
++MACHINE=i386
+ !MESSAGE Building the Win32 static library...
+ !MESSAGE
+-!ELSEIF ("$(CPU)" == "IA64")||("$(CPU)" == "AMD64")
++!ELSEIF ("$(CPU)" == "X")
++MACHINE=AMD64
+ ADD_DEFINES=/D "WIN64" /Wp64 /GS
+ ADD_SECLIB=bufferoverflowU.lib
+ !MESSAGE Building the Win64 static library...
+ !MESSAGE
+ !ELSE
+ !MESSAGE Please check a CPU=$(CPU) ?
+-!MESSAGE CPU=i386 or AMD64 or IA64
++!MESSAGE CPU=I or X
+ !ERROR Make aborted.
+ !ENDIF
+ 
+@@ -54,7 +55,7 @@
+ !ENDIF
+ 
+ !IF "$(KFW_LIB_PATH)" == ""
+-KFW_LIB_PATH=C:\kfw-2.6.5\lib\$(CPU)
++KFW_LIB_PATH=C:\kfw-2.6.5\lib\$(MACHINE)
+ !MESSAGE Using default Kerberos Library directory: $(KFW_LIB_PATH)
+ !ENDIF
+ 
+@@ -67,18 +68,11 @@
+ CPP=cl.exe
+ RSC=rc.exe
+ 
+-!IFDEF DEBUG
+-OUTDIR=.\Debug
+-INTDIR=.\Debug
+-CPP_OBJS=.\Debug/
+-!ELSE
+-OUTDIR=.\Release
+-INTDIR=.\Release
+-CPP_OBJS=.\Release/
+-!ENDIF
+-
++OUTDIR=$(OUTDIR)/lib
++INTDIR=$(OUTDIR)/lib
++CPP_OBJS=$(OUTDIR)/slo/
+ 
+-ALL : config "$(OUTDIR)\$(OUTFILENAME).lib" "$(OUTDIR)\$(OUTFILENAME).dll"
++ALL : config "$(OUTDIR)\$(OUTFILENAME).lib"
+ 
+ CLEAN :
+ 	- at erase "$(INTDIR)\getaddrinfo.obj"
+@@ -178,7 +172,7 @@
+ "$(OUTDIR)" :
+     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+ 
+-CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)" \
++CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. $(SOLARINC) \
+  /D "FRONTEND" $(DEBUGDEF) \
+  /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
+  /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c  \
+@@ -205,7 +199,7 @@
+ LINK32=link.exe
+ LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shfolder.lib wsock32.lib ws2_32.lib secur32.lib $(SSL_LIBS)  $(KFW_LIB) $(ADD_SECLIB) \
+  /nologo /subsystem:windows /dll $(LOPT) /incremental:no \
+- /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:$(CPU) \
++ /pdb:"$(OUTDIR)\libpqdll.pdb" /machine:$(MACHINE) \
+  /out:"$(OUTDIR)\$(OUTFILENAME).dll"\
+  /implib:"$(OUTDIR)\$(OUTFILENAME)dll.lib"  \
+  /libpath:"$(SSL_LIB_PATH)" /libpath:"$(KFW_LIB_PATH)" \
+@@ -222,7 +216,7 @@
+ <<
+ 
+ "$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
+-	$(RSC) $(RSC_PROJ) libpq-dist.rc
++	$(RSC) $(SOLARINC) $(RSC_PROJ) libpq-dist.rc
+ 
+ 
+ "$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(INTDIR)\libpq.res"
diff --git a/postgresql/prj/d.lst b/postgresql/prj/d.lst
index 4582682..88c3a86 100644
--- a/postgresql/prj/d.lst
+++ b/postgresql/prj/d.lst
@@ -1,7 +1,7 @@
 mkdir: %_DEST%\inc\postgresql
 
-..\%__SRC%\usr\include\postgresql\libpq-fe.h %_DEST%\inc\postgresql\
-..\%__SRC%\usr\include\postgresql\postgres_ext.h %_DEST%\inc\postgresql\
-..\%__SRC%\usr\lib\libpq.a %_DEST%\lib\libpq.a
-#..\%__SRC%\usr\share\locale\* %_DEST%\ TODO
+..\%__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.a %_DEST%\lib\
+..\%__SRC%\lib\*.lib %_DEST%\lib\*.lib
 


More information about the Libreoffice-commits mailing list