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.

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