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.

105 lines
3.3 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 - 2007 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. if pkginstalled apache; then
  25. pkgprefix -t apache
  26. var_append extraconfopt " " "--with-apxs2=$( pkgprefix sbindir apache )/apxs"
  27. else
  28. var_append extraconfopt " " "--enable-fastcgi"
  29. var_append extraconfopt " " "--enable-force-cgi-redirect"
  30. fi
  31. var_append extraconfopt " " "--with-zlib --with-bz2"
  32. if pkginstalled mysql; then
  33. pkgprefix -t mysql
  34. if [ $? -eq 0 -o "$SDECFG_PKG_PHP_FORCESHARED" = 1 ]; then
  35. pkg_php_shared="=$root/$( pkgprefix mysql )"
  36. var_append CC_WRAPPER_APPEND ' ' "-Wl,--rpath $( pkgprefix libdir mysql )/mysql"
  37. else
  38. pkg_php_shared=''
  39. fi
  40. var_append extraconfopt " " "--with-mysql$pkg_php_shared"
  41. var_append extraconfopt " " "--enable-mysqli"
  42. var_append extraconfopt " " "--with-mysqli=$( pkgprefix bindir mysql )/mysql_config"
  43. fi
  44. if pkginstalled postgresql; then
  45. pkgprefix -t postgresql
  46. var_append extraconfopt " " "--with-pgsql=$root/$( pkgprefix postgresql )"
  47. fi
  48. if pkginstalled openldap; then
  49. pkgprefix -t openldap
  50. var_append extraconfopt " " "--with-ldap=$root/$( pkgprefix openldap )"
  51. fi
  52. pkginstalled curl && var_append extraconfopt " " "--with-curl"
  53. pkginstalled openssl && var_append extraconfopt " " "--with-openssl"
  54. if pkginstalled libmcrypt; then
  55. pkgprefix -t libmcrypt
  56. var_append extraconfopt " " "--with-mcrypt=$root/$( pkgprefix libmcrypt )"
  57. fi
  58. pkginstalled libmhash && var_append extraconfopt " " "--with-mhash"
  59. pkginstalled gettext &&
  60. var_append extraconfopt " " "--with-gettext"
  61. pkginstalled libgd &&
  62. var_append extraconfopt " " "--with-gd --enable-gd-native-ttf"
  63. pkginstalled libjpeg && var_append extraconfopt " " "--with-jpeg-dir"
  64. pkginstalled libpng && var_append extraconfopt " " "--with-png-dir"
  65. pkginstalled freetype1 && var_append extraconfopt " " "--with-ttf"
  66. pkginstalled pcre && var_append extraconfopt ' ' "--with-pcre-regex=$root/$( pkgprefix pcre )"
  67. if pkginstalled freetype; then
  68. pkgprefix -t freetype
  69. var_append extraconfopt " " "--with-freetype-dir=$root/$( pkgprefix freetype )"
  70. fi
  71. if [ "$SDECFG_PKG_PHP_EXTRACONFOPT" ]; then
  72. var_append extraconfopt " " "$SDECFG_PKG_PHP_EXTRACONFOPT"
  73. fi
  74. hook_add postmake 5 'cp php.ini-* $root$docdir'
  75. # HACK ALERT
  76. fix_configure() {
  77. sed -i "s,lib/lib,${libdir##*/}/lib,g" configure
  78. for i in PHP_LDAP PHP_LDAP_SASL; do
  79. sed -i "s,$i/lib,$i/${libdir##*/}," configure
  80. done
  81. }
  82. [[ $libdir != *lib ]] && hook_add preconf 5 "fix_configure"
  83. var_append makeinstopt ' ' "INSTALL_ROOT=$root"