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.

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