X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fphp;h=9944ca0d6561538573a0ba98679b82aa0d7f5dae;hb=89b725d539327897df19c5ea824b094b1316f067;hp=87f343b0c136d4e8decfcad0b4a820a4a44ddbe9;hpb=564ec1bbb321286571c30da20b81620c33b18e6f;p=hvlinux.git diff --git a/stage5/pkg/php b/stage5/pkg/php index 87f343b..9944ca0 100644 --- a/stage5/pkg/php +++ b/stage5/pkg/php @@ -2,41 +2,41 @@ hvconfig_pre() { - sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' \ - ${LFS_TMP}/${PACKAGE}/ext/dba/dba_db4.c - # Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql # directive (make sure you specified path to where MySQL is installed on # your system). # Build directory doesn't work: - # gcc: Zend/zend_language_scanner.c: No such file or directory - CONFIGURE_OPTS=" \ - ${CONFIGURE_OPTS} \ - --with-apxs2=/usr/sbin/apxs \ - --enable-force-cgi-redirect \ - --enable-discard-path \ + # gcc: Zend/zend_language_scanner.c: No such file or directory + # --mandir: + # If not specified, php installs some man pages under /usr/php + # (phpize.1, php.1 and php-config.1) + CONFIGURE_OPTS+=" \ + --with-apxs2 \ --with-config-file-path=/etc \ + --mandir=/usr/share/man \ --with-zlib \ --enable-bcmath \ --with-bz2 \ - --with-gd \ - --with-freetype-dir=/usr \ - --with-t1lib \ - --enable-gd-native-ttf \ --enable-calendar \ - --enable-dba \ - --enable-exif \ + --enable-dba=shared \ + --with-gdbm \ + --with-gmp \ --enable-ftp \ --with-gettext \ --enable-mbstring \ - --with-ncurses \ --with-readline \ - --with-openssl=/usr \ - --with-ldap \ --with-mysql=/usr \ - --with-imap=/usr/lib/uw-imap \ - --with-imap-ssl=/usr/include/openssl" + --with-openssl=/usr \ + --with-gd \ + --with-freetype-dir=/usr \ + --with-t1lib \ + --enable-gd-native-ttf \ + --enable-exif" + +# IMAP +# --with-imap=/usr/lib/uw-imap \ +# --with-imap-ssl=/usr/include/openssl" } hvbuild_post() @@ -44,16 +44,21 @@ hvbuild_post() if [ -f /etc/php.ini ]; then cp /etc/php.ini /etc/php.ini.old fi - cp ${LFS_TMP}/${PACKAGE}/php.ini-dist /etc/php.ini + cp ${LFS_TMP}/${PACKAGE}/php.ini-production /etc/php.ini - # To enable PHP support in the Apache web server, a new AddType directive - # must be added to the httpd.conf file. - if ! grep -q "application/x-httpd-php" /etc/apache/httpd.conf; then - echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf - fi + if [ "x${USE_HTTPD}" = "xyes" ]; then + # To enable PHP support in the Apache web server, a new AddType + # directive must be added to the httpd.conf file. + if ! grep -q "application/x-httpd-php" /etc/httpd/httpd.conf; then + echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf + fi + + # Est-ce nécessaire? + #cgi.discard_path = 1 - if ! grep -q "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php"; then - sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" \ - /etc/apache/httpd.conf + if ! grep -q "DirectoryIndex" /etc/httpd/httpd.conf | grep "index.php"; then + sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \ + /etc/httpd/httpd.conf + fi fi }