annotate src/postgresql.mk @ 3216:11f8ec654cd4

Avoid copying or linking files that are the same when doing native build Prefer $(INSTALL) over $(LN_SF).
author John W. Eaton <jwe@octave.org>
date Wed, 07 Aug 2013 00:41:50 -0400
parents 5ef49fb3299d
children 166294cad9f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2259
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 PKG := postgresql
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 $(PKG)_IGNORE :=
2789
f20bbf45b91a update package postgresql
Mark Brand <mabrand@mabrand.nl>
parents: 2722
diff changeset
6 $(PKG)_CHECKSUM := cea9601b3acd1484fd98441b49a15ea1c42057ec
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7 $(PKG)_SUBDIR := postgresql-$($(PKG)_VERSION)
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8 $(PKG)_FILE := postgresql-$($(PKG)_VERSION).tar.bz2
2168
c35b92508318 update package postgresql
Mark Brand <mabrand@mabrand.nl>
parents: 2143
diff changeset
9 $(PKG)_URL := http://ftp.postgresql.org/pub/source/v$($(PKG)_VERSION)/$($(PKG)_FILE)
3048
5ef49fb3299d treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents: 3031
diff changeset
10 $(PKG)_DEPS := zlib openssl
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
12 ifeq ($(MXE_NATIVE_BUILD),yes)
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
13 $(PKG)_CONFIGURE_FLAGS_OPTION := $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS)
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
14 endif
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
15
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
16 ifeq ($(MXE_SYSTEM),mingw)
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
17 $(PKG)_LIGS := -lsecur32
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
18 endif
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
19
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
21 $(WGET) -q -O- 'http://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \
1523
70d4afbbd76a package postgresql: fix update macro
Mark Brand <mabrand@mabrand.nl>
parents: 1522
diff changeset
22 grep 'refs/tags/REL9[0-9_]*"' | \
1357
e5a89f1ee73e upgrade package postgresql and fix UPDATE macro
Mark Brand <mabrand@mabrand.nl>
parents: 1166
diff changeset
23 $(SED) 's,.*refs/tags/REL\(.*\)".*,\1,g;' | \
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
24 $(SED) 's,_,.,g' | \
2789
f20bbf45b91a update package postgresql
Mark Brand <mabrand@mabrand.nl>
parents: 2722
diff changeset
25 grep -v '^9\.[01]' | \
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26 head -1
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 endef
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29 define $(PKG)_BUILD
2047
5828a4a777a2 package postgresql: replace sed with patch
Mark Brand <mabrand@mabrand.nl>
parents: 2004
diff changeset
30 cd '$(1)' && autoconf
1500
09e48fb4aa19 avoid double unpacking in package postgresql
Tony Theodore <tonyt@logyst.com>
parents: 1390
diff changeset
31 cp -Rp '$(1)' '$(1).native'
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 # Since we build only client libary, use bogus tzdata to satisfy configure.
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33 cd '$(1)' && ./configure \
2997
4f9b72cf7ee7 allow native builds too
John W. Eaton <jwe@octave.org>
parents: 2924
diff changeset
34 $($(PKG)_CONFIGURE_FLAGS_OPTION) \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 3006
diff changeset
35 --prefix='$(HOST_PREFIX)' \
3013
bcc26ffe9a0f use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents: 3012
diff changeset
36 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
2924
6301eb7d67ed shared libs for postgresql
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
37 --enable-shared \
528
cc31dacda67d improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 527
diff changeset
38 --disable-rpath \
580
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
39 --without-tcl \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
40 --without-perl \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
41 --without-python \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
42 --without-gssapi \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
43 --without-krb5 \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
44 --without-pam \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
45 --without-ldap \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
46 --without-bonjour \
587
226e462a8a73 add OpenSSL support to package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 583
diff changeset
47 --with-openssl \
589
72e6bc298b7f disable readline support because it doesn't work for package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 587
diff changeset
48 --without-readline \
580
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
49 --without-ossp-uuid \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
50 --without-libxml \
3e5503e5ed58 build static library in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 528
diff changeset
51 --without-libxslt \
528
cc31dacda67d improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 527
diff changeset
52 --with-zlib \
582
6be6f016a86f build the psql.exe command line tool of package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 581
diff changeset
53 --with-system-tzdata=/dev/null \
3031
951da75fd09c improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents: 3014
diff changeset
54 LIBS="$($(PKG)_LIBS) `'$(MXE_PKG_CONFIG)' openssl --libs`"
2924
6301eb7d67ed shared libs for postgresql
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
55 $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' install haslibarule=
6301eb7d67ed shared libs for postgresql
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
56 $(MAKE) -C '$(1)'/src/port -j '$(JOBS)' haslibarule=
6301eb7d67ed shared libs for postgresql
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
57 $(MAKE) -C '$(1)'/src/bin/psql -j '$(JOBS)' install haslibarule=
3014
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 3013
diff changeset
58 $(INSTALL) -m644 '$(1)/src/include/pg_config.h' '$(HOST_INCDIR)'
b6c7244a2f66 Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents: 3013
diff changeset
59 $(INSTALL) -m644 '$(1)/src/include/postgres_ext.h' '$(HOST_INCDIR)'
656
73ebc5c43231 build a native pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 641
diff changeset
60 # Build a native pg_config.
759
bf4bcb3370fa changed coding style: make "-i" always the first argument of $(SED) (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents: 742
diff changeset
61 $(SED) -i 's,-DVAL_,-D_DISABLED_VAL_,g' '$(1).native'/src/bin/pg_config/Makefile
742
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
62 cd '$(1).native' && ./configure \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 3006
diff changeset
63 --prefix='$(HOST_PREFIX)' \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2789
diff changeset
64 $(ENABLE_SHARED_OR_STATIC) \
742
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
65 --disable-rpath \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
66 --without-tcl \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
67 --without-perl \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
68 --without-python \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
69 --without-gssapi \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
70 --without-krb5 \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
71 --without-pam \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
72 --without-ldap \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
73 --without-bonjour \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
74 --without-openssl \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
75 --without-readline \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
76 --without-ossp-uuid \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
77 --without-libxml \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
78 --without-libxslt \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
79 --without-zlib \
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
80 --with-system-tzdata=/dev/null
6f9e59f9765c improved native build of pg_config in package postgresql
Volker Grabsch <vog@notjusthosting.com>
parents: 714
diff changeset
81 $(MAKE) -C '$(1).native'/src/port -j '$(JOBS)'
1942
c658f1520f62 package postgresql: fix native pg_config
Tony Theodore <tonyt@logyst.com>
parents: 1751
diff changeset
82 $(MAKE) -C '$(1).native'/src/bin/pg_config -j '$(JOBS)' install
3216
11f8ec654cd4 Avoid copying or linking files that are the same when doing native build
John W. Eaton <jwe@octave.org>
parents: 3048
diff changeset
83 if [ $(MXE_NATIVE_BUILD) = no ]; then \
11f8ec654cd4 Avoid copying or linking files that are the same when doing native build
John W. Eaton <jwe@octave.org>
parents: 3048
diff changeset
84 $(INSTALL) -m755 '$(HOST_BINDIR)/pg_config' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pg_config'; \
11f8ec654cd4 Avoid copying or linking files that are the same when doing native build
John W. Eaton <jwe@octave.org>
parents: 3048
diff changeset
85 fi
527
6f7fcfe88cf3 new package: postgresql (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
86 endef