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.

88 lines
2.7 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 - 2011 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. # sockets does not need any external lib. We have to enable it explicitly
  25. var_append confopt ' ' "--enable-sockets"
  26. for x in zlib bzip2:bz2 curl openssl libmhash:mhash gettext \
  27. libjpeg:jpeg-dir libpng:png-dir freetype1:ttf; do
  28. if pkginstalled "${x%:*}"; then
  29. var_append extraconfopt ' ' "--with-${x#*:}"
  30. fi
  31. done
  32. for x in postgresql:pgsql openldap:ldap libmcrypt:mcrypt \
  33. freetype pcre:pcre-regex; do
  34. if pkginstalled "${x%:*}"; then
  35. var_append extraconfopt " " "--with-${x#*:}=$( pkgprefix -r ${x%:*} )"
  36. fi
  37. done
  38. if pkginstalled apache; then
  39. pkgprefix -t apache
  40. var_append extraconfopt " " "--with-apxs2=$( pkgprefix sbindir apache )/apxs"
  41. else
  42. var_append extraconfopt " " "--enable-fastcgi"
  43. var_append extraconfopt " " "--enable-force-cgi-redirect"
  44. fi
  45. if pkginstalled mysql; then
  46. pkgprefix -t mysql
  47. if [ $? -eq 0 -o "$SDECFG_PKG_PHP_FORCESHARED" = 1 ]; then
  48. pkg_php_shared="=$root/$( pkgprefix mysql )"
  49. var_append CC_WRAPPER_APPEND ' ' "-Wl,--rpath $( pkgprefix libdir mysql )"
  50. else
  51. pkg_php_shared=
  52. fi
  53. var_append extraconfopt " " "--with-mysql$pkg_php_shared"
  54. var_append extraconfopt " " "--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd"
  55. fi
  56. pkginstalled libgd &&
  57. var_append extraconfopt " " "--with-gd --enable-gd-native-ttf"
  58. if [ "$SDECFG_PKG_PHP_EXTRACONFOPT" ]; then
  59. var_append extraconfopt " " "$SDECFG_PKG_PHP_EXTRACONFOPT"
  60. fi
  61. [ "$SDECFG_PKG_PHP_FPM" == 1 ] && var_append extraconfopt " " "--enable-fpm"
  62. hook_add postmake 5 'cp php.ini-* $root$docdir'
  63. # HACK ALERT
  64. fix_configure() {
  65. sed -i "s,lib/lib,${libdir##*/}/lib,g" configure
  66. for i in PHP_LDAP PHP_LDAP_SASL; do
  67. sed -i "s,$i/lib,$i/${libdir##*/}," configure
  68. done
  69. }
  70. [[ $libdir != *lib ]] && hook_add preconf 5 "fix_configure"
  71. var_append makeinstopt ' ' "INSTALL_ROOT=$root"