OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../php/php.conf
  5. # Copyright (C) 2006 - 2012 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if [ "$prefix_auto" == 1 ]; then
  17. prefix=opt/php
  18. set_confopt
  19. fi
  20. # seems not to handle --libdir...
  21. var_append confopt ' ' "--with-libdir=${libdir##*/}"
  22. # global php.ini goes into sysconfdir
  23. var_append confopt ' ' "--with-config-file-path=$sysconfdir"
  24. # --enable because no dependency
  25. # soap also needs --enable-libxml and --with-openssl
  26. for x in sockets mbstring mbregex calendar bcmath soap; do
  27. var_append confopt ' ' "--enable-${x}"
  28. done
  29. for x in zlib bzip2:bz2 curl openssl libmhash:mhash gettext \
  30. libjpeg:jpeg-dir libpng:png-dir freetype1:ttf; do
  31. if pkginstalled "${x%:*}"; then
  32. var_append extraconfopt ' ' "--with-${x#*:}"
  33. fi
  34. done
  35. # pg82 is a separately maintained postgresql version 8.2.x
  36. # please do not remove it
  37. for x in postgresql:pgsql pg82:pgsql openldap:ldap libmcrypt:mcrypt \
  38. pcre:pcre-regex; do
  39. if pkginstalled "${x%:*}"; then
  40. var_append extraconfopt " " "--with-${x#*:}=$( pkgprefix -r ${x%:*} )"
  41. fi
  42. done
  43. if pkginstalled apache; then
  44. pkgprefix -t apache
  45. var_append extraconfopt " " "--with-apxs2=$( pkgprefix bindir apache )/apxs"
  46. fi
  47. if pkginstalled freetype; then
  48. var_append confopt " " "--with-freetype-dir=$( pkgprefix -r freetype )"
  49. fi
  50. if pkginstalled mysql; then
  51. pkgprefix -t mysql
  52. if [ $? -eq 0 -o "$SDECFG_PKG_PHP_FORCESHARED" = 1 ]; then
  53. pkg_php_shared="=$root/$( pkgprefix mysql )"
  54. var_append CC_WRAPPER_APPEND ' ' "-Wl,--rpath $( pkgprefix libdir mysql )"
  55. else
  56. pkg_php_shared=
  57. fi
  58. var_append extraconfopt " " "--with-mysql$pkg_php_shared"
  59. var_append extraconfopt " " "--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd"
  60. fi
  61. pkginstalled libgd &&
  62. var_append extraconfopt " " "--with-gd --enable-gd-native-ttf"
  63. if [ "$SDECFG_PKG_PHP_EXTRACONFOPT" ]; then
  64. var_append extraconfopt " " "$SDECFG_PKG_PHP_EXTRACONFOPT"
  65. fi
  66. # Since php 5.4.0 more than one SAPI can be built at one run
  67. # so there is no reason to not force the FPM SAPI always
  68. var_append extraconfopt " " "--enable-fpm"
  69. hook_add postmake 5 'cp php.ini-* $root$docdir'
  70. # HACK ALERT
  71. fix_configure() {
  72. sed -i "s,lib/lib,${libdir##*/}/lib,g" configure
  73. for i in PHP_LDAP PHP_LDAP_SASL; do
  74. sed -i "s,$i/lib,$i/${libdir##*/}," configure
  75. done
  76. }
  77. [[ $libdir != *lib ]] && hook_add preconf 5 "fix_configure"
  78. var_append makeinstopt ' ' "INSTALL_ROOT=$root"