Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # $OpenBSD: Makefile,v 1.227 2017/06/13 12:59:47 schwarze Exp $
  2. COMMENT-main= PostgreSQL RDBMS (client)
  3. COMMENT-server= PostgreSQL RDBMS (server)
  4. COMMENT-docs= PostgreSQL RDBMS documentation
  5. COMMENT-contrib=PostgreSQL RDBMS contributions
  6. COMMENT-plpython=Python procedural language for PostgreSQL
  7. COMMENT-pg_upgrade=Support for upgrading PostgreSQL data from previous version
  8. VERSION= 9.6.3
  9. PREV_MAJOR= 9.5
  10. DISTNAME= postgresql-${VERSION}
  11. PKGNAME-main= postgresql-client-${VERSION}
  12. PKGNAME-server= postgresql-server-${VERSION}
  13. PKGNAME-docs= postgresql-docs-${VERSION}
  14. PKGNAME-contrib=postgresql-contrib-${VERSION}
  15. PKGNAME-plpython=postgresql-plpython-${VERSION}
  16. PKGNAME-pg_upgrade=postgresql-pg_upgrade-${VERSION}
  17. REVISION-main= 0
  18. REVISION-server= 1
  19. REVISION-contrib= 0
  20. REVISION-pg_upgrade= 0
  21. CATEGORIES= databases
  22. SHARED_LIBS= ecpg 7.8 \
  23. ecpg_compat 4.8 \
  24. pgtypes 4.7 \
  25. pq 6.9
  26. HOMEPAGE= http://www.postgresql.org/
  27. MAINTAINER= Pierre-Emmanuel Andre <pea@openbsd.org>
  28. # BSD
  29. PERMIT_PACKAGE_CDROM= Yes
  30. WANTLIB += c crypto m readline ssl termcap z
  31. MASTER_SITES= https://ftp.postgresql.org/pub/source/v${VERSION}/ \
  32. ftp://ftp.postgresql.org/pub/source/v${VERSION}/
  33. MULTI_PACKAGES= -docs -main -server -contrib -pg_upgrade -plpython
  34. MAKE_FILE= GNUmakefile
  35. V_MAJOR= ${VERSION:R}
  36. SUBST_VARS= VERSION V_MAJOR PREV_MAJOR
  37. USE_GMAKE= Yes
  38. CONFIGURE_STYLE=gnu
  39. MODULES= lang/python gcc4
  40. MODPY_RUNDEP= No
  41. # for __sync_lock_test_and_set
  42. MODGCC4_ARCHS= arm
  43. CONFIGURE_ENV= ac_cv_path_PYTHON=${MODPY_BIN} \
  44. CPPFLAGS="-I${LOCALBASE}/include" \
  45. LDFLAGS="-L${LOCALBASE}/lib"
  46. CONFIGURE_ARGS= --disable-rpath --with-openssl=/usr \
  47. --with-bsd-auth \
  48. --with-perl \
  49. --with-python \
  50. --with-pam=no \
  51. --with-uuid=bsd \
  52. --enable-integer-datetimes \
  53. --includedir="${PREFIX}/include/postgresql" \
  54. --datadir="${PREFIX}/share/postgresql" \
  55. --docdir="${PREFIX}/share/doc/postgresql" \
  56. --with-includes="${INCLUDES}" \
  57. --with-libraries="${LOCALBASE}/lib" \
  58. --with-system-tzdata="/usr/share/zoneinfo" \
  59. --with-openssl \
  60. --with-libxml \
  61. --disable-thread-safety
  62. # There is no spinlock support for hppa and alpha yet. Until we have access to
  63. # a system to get this working, disable them for now. There is
  64. # (apparently) a serious performance hit doing this.
  65. .if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "alpha"
  66. CONFIGURE_ARGS+=--disable-spinlocks
  67. .endif
  68. MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/config
  69. ALL_TARGET= world
  70. INSTALL_TARGET= install-world
  71. LIB_DEPENDS-main= textproc/libxml
  72. WANTLIB-main = ${WANTLIB} xml2
  73. LIB_DEPENDS-server= databases/postgresql=${VERSION} \
  74. ${LIB_DEPENDS-main}
  75. WANTLIB-server= ${WANTLIB-main} perl pq>=4
  76. RUN_DEPENDS-contrib= databases/postgresql,-server=${VERSION}
  77. LIB_DEPENDS-contrib= databases/postgresql=${VERSION} \
  78. ${LIB_DEPENDS-main}
  79. WANTLIB-contrib= ${WANTLIB-main} pq>=4
  80. RUN_DEPENDS-pg_upgrade= databases/postgresql,-server=${VERSION} \
  81. databases/postgresql-previous
  82. LIB_DEPENDS-pg_upgrade= databases/postgresql=${VERSION} \
  83. ${LIB_DEPENDS-main}
  84. WANTLIB-pg_upgrade= ${WANTLIB-main} pq>=4
  85. LIB_DEPENDS-plpython= ${MODPY_LIB_DEPENDS}
  86. WANTLIB-plpython = c m pthread util \
  87. ${MODPY_WANTLIB}
  88. RUN_DEPENDS-plpython= databases/postgresql,-server=${VERSION}
  89. WANTLIB-docs=
  90. PKG_ARCH-docs= *
  91. MAKE_ENV= LIBpq_MAJOR=${LIBpq_VERSION:R} \
  92. LIBpq_MINOR=${LIBpq_VERSION:E} \
  93. LIBecpg_MAJOR=${LIBecpg_VERSION:R} \
  94. LIBecpg_MINOR=${LIBecpg_VERSION:E} \
  95. LIBecpg_compat_MAJOR=${LIBecpg_compat_VERSION:R} \
  96. LIBecpg_compat_MINOR=${LIBecpg_compat_VERSION:E} \
  97. LIBpgtypes_MAJOR=${LIBpgtypes_VERSION:R} \
  98. LIBpgtypes_MINOR=${LIBpgtypes_VERSION:E}
  99. # Regression tests must be done manually and not as root. Successful
  100. # runs have been achieved on the i386 using the following:
  101. #
  102. # $ ulimit -p 128
  103. # $ ulimit -n 1024
  104. # $ make test NO_TEST=No
  105. #
  106. # Note, you may also need to change a variety of SYSV IPC parameters.
  107. # See pkg/README-server for more details
  108. NO_TEST= Yes
  109. DOCS= ${WRKSRC}/COPYRIGHT ${WRKSRC}/HISTORY \
  110. ${WRKSRC}/INSTALL ${WRKSRC}/README \
  111. ${WRKSRC}/doc/TODO
  112. # Work around Makefile issue where it attempts to rebuild
  113. # the documentation even if it is not necessary.
  114. pre-build:
  115. touch ${WRKSRC}/doc/src/sgml/*-stamp
  116. INSTALL_REPLACE = 's/^install_bin = .*$$/ifdef BSD_INSTALL_SCRIPT\ninstall_bin
  117. INSTALL_REPLACE += = \$$\(subst -m 755,,\$${BSD_INSTALL_SCRIPT}\)
  118. INSTALL_REPLACE += \nelse\ninstall_bin = \/usr\/bin\/install -c -o ${BINOWN}
  119. INSTALL_REPLACE += -g ${BINGRP}\nendif/'
  120. post-install:
  121. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postgresql
  122. ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/postgresql
  123. perl -i -pe ${INSTALL_REPLACE} \
  124. ${PREFIX}/lib/postgresql/pgxs/src/Makefile.global
  125. .include <bsd.port.mk>