# php8/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. This package installs two versions of PHP5: CGI SAPI and CLI SAPI. The CGI executable is named "php-cgi", but it can be executed using either of the following two names: "php-cgi" or "php-fcgi". The pro- gram's functionality is the same, in either case. The CLI executable is named "php-cli", but it can be executed using either of the following two names: "php" or "php-cli". The program's functionality is the same, in either case. #--------------------------------------------------------------------- 2. "php8" needs to be built, for now, with "gettext" disabled; i.e., with "--without-gettext" specified during the "configure" stage. This is due to eccentric code that "configure" uses to locate "libintl. h". If the code is patched, it may be possible to enable "gettext" by re- placing "--without-gettext" with: --with-gettext=$PRODTREE/gettext #--------------------------------------------------------------------- 3. "lighttpd" and similar web servers should be configured to use "php-cgi" through FastCGI. For example, in the case of "lighttpd", if the "php8" directory tree is "/usr/local/php8", the relevant lines from the server configuration file (lighttpd.conf) might look like this: # Modify the path used here appropriately fastcgi.server = ( ".php" => (( "bin-path" => "/usr/local/php8/bin/php-cgi" , ... #--------------------------------------------------------------------- 4. Command-line PHP7 scripts should be structured as follows: #!/usr/bin/env php #--------------------------------------------------------------------- 5. "php*" releases 5.2.10 and up had problems related to PEAR support. As a workaround, this package presently disables the feature in ques- tion. #--------------------------------------------------------------------- [buildtimes] 00.09 hours (or 005.62 minutes) - 2021 L.A. dedi box: 6x2 CPU 32GB RAM 00.13 hours (or 007.57 minutes) - Dell Inspiron 6400 2.0 GHz Intel Duo 7200 2GB RAM 00.14 hours (or 008.45 minutes) - ThinkPad W530 i7 4x2 32GB RAM 00.24 hours (or 014.53 minutes) - ThinkPad E540 i7 4x2 16GB RAM 00.26 hours (or 015.78 minutes) - Toshiba Satellite C655 E-300 CPU 4GB RAM #--------------------------------------------------------------------- [settings] altpkg = yes build = default exepack = yes kill = killall -qw php-fpm license = See "license*.txt" in installed tree licfile = LICENSE nosyslinks = yes tmpsize = 602M unpack = relaxed setpaths = gettext libgmp #--------------------------------------------------------------------- [depends] actools aspell bison3 brotli bzip2 curl db expat flex fontconfig freetype2 gawk gdbm gettext gnutls3 grep jpeg libbsd libexif libffi libgcrypt libgd libgmp libgpg-error libicu libidn2 libmhash libpng libpsl librtmp libsasl libunistring libwebp libxml2 libxslt libzip mariadb mcrypt ncurses nettle3 nghttp2 oniguruma openldap openssl p11kit pcre pkgconf postgresql re2c readline sed sendmail sqlite2 sqlite3 t1lib xorg xzutils zlib zstd #--------------------------------------------------------------------- [configure] DATADIR=$PKGDIR_PROD/share/php ETCDIR=$PKGDIR_PROD/etc/php8 mkdir -p $DATADIR $ETCDIR export LACINCDIRS=$LACSYSINCDIR:$LACINCDIRS DIR_MDB=$PRODTREE/mariadb DIR_PDB=$PRODTREE/postgresql bash ./configure \ --prefix=$PKGDIR_PROD \ --build=$LACARCHBUILD \ --host=$LACARCHHOST \ \ --sysconfdir=$ETCDIR \ --datadir=$DATADIR \ --localstatedir=/var \ \ --disable-debug \ --disable-soap \ \ --enable-bcmath \ --enable-calendar \ --enable-dba=shared \ --enable-exif \ --enable-fpm \ --enable-ftp \ --enable-gd \ --enable-intl \ --enable-mbstring \ --enable-mysqlnd \ --enable-shared \ --enable-sockets \ --enable-sqlite-utf8 \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ \ --with-bz2=$PRODTREE/bzip2 \ --with-config-file-path=$ETCDIR \ --with-curl=$PRODTREE/curl \ --with-db4=$PRODTREE/db \ --with-exec-dir=$PKGDIR_PROD/bin \ --with-ffi \ --with-freetype-dir=$PRODTREE/freetype2 \ --with-gdbm=$PRODTREE/gdbm \ --with-gmp=$PRODTREE/libgmp \ --with-jpeg \ --with-libxml-dir=$PRODTREE/libxml2 \ --with-mhash=$PRODTREE/mhash \ --with-mysqli \ --with-openssl=$PRODTREE/openssl \ --with-openssl-dir=$PRODTREE/openssl \ --with-pcre-regex=$PRODTREE/pcre \ --with-pdo-mysql \ --with-pdo-pgsql=$DIR_PDB \ --with-pgsql=$DIR_PDB \ --with-pspell=$PRODTREE/aspell \ --with-readline=$PRODTREE/readline \ --with-t1lib=$PRODTREE/t1lib \ --with-webp \ --with-xpm \ --with-xsl=$PRODTREE/libxslt \ --with-zip \ --with-zlib=$PRODTREE/zlib \ --with-zlib-dir=$PRODTREE/zlib \ --with-mysql-sock=/var/run/php-fpm.sock \ \ --without-ldap \ --without-pear #--------------------------------------------------------------------- [postbuild] ETCDIR=$PKGDIR_PROD/etc/php8 MANDIR=$PKGDIR_PROD/man/man1 mkdir -p $ETCDIR $MANDIR mv php.ini-production php.ini cat $PKGDIR_SPECIAL/ini-add.txt >> php.ini foo=`$PKGDIR_PROD/bin/php-config --extension-dir` if test -z "$foo"; then echo php-config error; exit 1; fi foo=`echo $foo | sed -e "s|/*$|/|"` sed -e "s|^extension_dir *=.*|extension_dir = $foo|" \ -e "s|^short_open_tag *=.*|short_open_tag = On|" \ -i php.ini cp -p php.ini $ETCDIR/ cp -p sapi/cli/php.1 $MANDIR/ cd $PKGDIR_PROD/bin/ mv php{,-cli} ln -nsf php-cgi php-fcgi ln -nsf php-cli php if test -z "`grep nobody /etc/group`"; then groupadd nobody fi cd $ETCDIR sed -e "s@__META_PREFIX__@$PKGDIR_PROD@g" \ < $PKGDIR_SPECIAL/php-fpm.conf.in \ > php-fpm.conf # sed -e 's/^;*error_log =.*/error_log = \/var\/log\/php-fpm.log/' \ # -e 's/^;*&pid =.*/pid = \/var\/run\/php-fpm.pid/' \ # -i php-fpm.conf #--------------------------------------------------------------------- [setup.boot] # This shouldn't be needed if the "httpd" servers used are configured # correctly. # $PKGDIR_PROD/sbin/php-fpm & #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = http://www.php.net/ url_tarball = https://www.php.net/distributions/php-8.0.22.tar.xz url_lfs = http://www.linuxfromscratch.org/blfs/view/stable/\ general/php.html #--------------------------------------------------------------------- [history] 170506 Added package. Started with 7.1.4. 170913 Updated to 7.1.9 171021 Updated to 7.1.10 171102 Updated to 7.1.11 180114 Updated to 7.1.13 180303 Updated to 7.1.15 180323 Patched to build against libressl 2.7.0 180814 Updated to 7.2.8 180903 Updated to 7.2.9 181107 Updated to 7.2.12 181206 Updated to 7.2.13 210218 Updated to 7.4.15 210508 Updated to 7.4.19 210613 Updated to 7.4.20 210912 Updated to 7.4.23 211120 Updated to 7.4.26 211220 Updated to 7.4.27 220108 Build "gd" extension 220213 Updated to 8.0.10 220817 Updated to 8.0.22 220817 Build more extensions