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.

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