2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2009-11-09 01:13:41 +00:00
|
|
|
|
|
|
|
PKG := postgresql
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.postgresql.org/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := PostgreSQL
|
2009-11-09 01:13:41 +00:00
|
|
|
$(PKG)_IGNORE :=
|
2017-02-16 16:58:07 +00:00
|
|
|
$(PKG)_VERSION := 9.2.4
|
|
|
|
$(PKG)_CHECKSUM := d97dd918a88a4449225998f46aafa85216a3f89163a3411830d6890507ffae93
|
2009-11-09 01:13:41 +00:00
|
|
|
$(PKG)_SUBDIR := postgresql-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := postgresql-$($(PKG)_VERSION).tar.bz2
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_URL := https://ftp.postgresql.org/pub/source/v$($(PKG)_VERSION)/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc openssl pthreads zlib
|
2009-11-09 01:13:41 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2017-03-05 03:41:39 +00:00
|
|
|
$(WGET) -q -O- 'https://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \
|
2010-12-23 01:42:24 +00:00
|
|
|
grep 'refs/tags/REL9[0-9_]*"' | \
|
2010-11-07 10:49:22 +00:00
|
|
|
$(SED) 's,.*refs/tags/REL\(.*\)".*,\1,g;' | \
|
2009-11-09 01:13:41 +00:00
|
|
|
$(SED) 's,_,.,g' | \
|
2013-05-22 10:33:04 +01:00
|
|
|
$(SORT) -V | \
|
|
|
|
tail -1
|
2009-11-09 01:13:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2011-10-24 16:47:39 +01:00
|
|
|
cd '$(1)' && autoconf
|
2010-12-12 02:26:38 +00:00
|
|
|
cp -Rp '$(1)' '$(1).native'
|
2017-09-23 15:53:26 +01:00
|
|
|
# Since we build only client library, use bogus tzdata to satisfy configure.
|
2016-08-16 06:12:49 +01:00
|
|
|
# pthreads is needed in both LIBS and PTHREAD_LIBS
|
2009-11-09 01:13:41 +00:00
|
|
|
cd '$(1)' && ./configure \
|
2014-02-09 12:29:51 +00:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2009-11-09 01:25:31 +00:00
|
|
|
--disable-rpath \
|
2009-12-06 18:41:34 +00:00
|
|
|
--without-tcl \
|
|
|
|
--without-perl \
|
|
|
|
--without-python \
|
|
|
|
--without-gssapi \
|
|
|
|
--without-krb5 \
|
|
|
|
--without-pam \
|
|
|
|
--without-ldap \
|
|
|
|
--without-bonjour \
|
2009-12-11 13:52:04 +00:00
|
|
|
--with-openssl \
|
2009-12-11 22:04:25 +00:00
|
|
|
--without-readline \
|
2009-12-06 18:41:34 +00:00
|
|
|
--without-ossp-uuid \
|
|
|
|
--without-libxml \
|
|
|
|
--without-libxslt \
|
2009-11-09 01:25:31 +00:00
|
|
|
--with-zlib \
|
2009-12-06 19:29:12 +00:00
|
|
|
--with-system-tzdata=/dev/null \
|
2016-08-26 07:41:59 +01:00
|
|
|
CFLAGS="-DSSL_library_init=OPENSSL_init_ssl" \
|
2016-08-16 06:12:49 +01:00
|
|
|
LIBS="-lsecur32 `'$(TARGET)-pkg-config' openssl pthreads --libs`" \
|
2013-05-23 15:38:06 +01:00
|
|
|
ac_cv_func_getaddrinfo=no
|
2016-08-16 06:12:49 +01:00
|
|
|
|
|
|
|
# enable_thread_safety means "build internal pthreads" on windows
|
|
|
|
# disable it and link mingw-w64 pthreads to and avoid name conflicts
|
|
|
|
$(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' \
|
|
|
|
install \
|
|
|
|
enable_thread_safety=no \
|
|
|
|
PTHREAD_LIBS="`'$(TARGET)-pkg-config' pthreads --libs`"
|
2014-07-01 22:46:39 +01:00
|
|
|
$(MAKE) -C '$(1)'/src/port -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(1)'/src/bin/psql -j '$(JOBS)' install
|
2010-11-17 02:56:10 +00:00
|
|
|
$(INSTALL) -m644 '$(1)/src/include/pg_config.h' '$(PREFIX)/$(TARGET)/include/'
|
|
|
|
$(INSTALL) -m644 '$(1)/src/include/postgres_ext.h' '$(PREFIX)/$(TARGET)/include/'
|
2013-12-26 05:29:24 +00:00
|
|
|
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include/libpq'
|
|
|
|
$(INSTALL) -m644 '$(1)'/src/include/libpq/* '$(PREFIX)/$(TARGET)/include/libpq/'
|
2010-01-22 01:54:38 +00:00
|
|
|
# Build a native pg_config.
|
2010-02-16 03:12:53 +00:00
|
|
|
$(SED) -i 's,-DVAL_,-D_DISABLED_VAL_,g' '$(1).native'/src/bin/pg_config/Makefile
|
2010-02-15 01:40:09 +00:00
|
|
|
cd '$(1).native' && ./configure \
|
|
|
|
--prefix='$(PREFIX)/$(TARGET)' \
|
|
|
|
--disable-shared \
|
|
|
|
--disable-rpath \
|
|
|
|
--without-tcl \
|
|
|
|
--without-perl \
|
|
|
|
--without-python \
|
|
|
|
--without-gssapi \
|
|
|
|
--without-krb5 \
|
|
|
|
--without-pam \
|
|
|
|
--without-ldap \
|
|
|
|
--without-bonjour \
|
|
|
|
--without-openssl \
|
|
|
|
--without-readline \
|
|
|
|
--without-ossp-uuid \
|
|
|
|
--without-libxml \
|
|
|
|
--without-libxslt \
|
|
|
|
--without-zlib \
|
|
|
|
--with-system-tzdata=/dev/null
|
|
|
|
$(MAKE) -C '$(1).native'/src/port -j '$(JOBS)'
|
2011-08-04 13:58:35 +01:00
|
|
|
$(MAKE) -C '$(1).native'/src/bin/pg_config -j '$(JOBS)' install
|
2011-08-07 09:26:54 +01:00
|
|
|
ln -sf '$(PREFIX)/$(TARGET)/bin/pg_config' '$(PREFIX)/bin/$(TARGET)-pg_config'
|
2009-11-09 01:13:41 +00:00
|
|
|
endef
|
2013-05-23 15:38:06 +01:00
|
|
|
|