summaryrefslogtreecommitdiffstats
path: root/development/php82
diff options
context:
space:
mode:
Diffstat (limited to 'development/php82')
-rw-r--r--development/php82/README36
-rw-r--r--development/php82/doinst.sh18
-rw-r--r--development/php82/php82.SlackBuild222
-rw-r--r--development/php82/php82.info10
-rw-r--r--development/php82/slack-desc19
5 files changed, 305 insertions, 0 deletions
diff --git a/development/php82/README b/development/php82/README
new file mode 100644
index 0000000000..badb203e43
--- /dev/null
+++ b/development/php82/README
@@ -0,0 +1,36 @@
+PHP is an HTML-embedded scripting language. It shares syntax
+characteristics with C, Java, and Perl. The primary objective behind
+this language is to make a fast and easy-to-use scripting language for
+dynamic web sites.
+
+This installation is compatible with the official php package and
+doesn't overwrite any stock files.
+
+This script doesn't build mod_php. You can use php-fpm or built-in
+development server.
+
+NOTE:
+
+Because of this old PEAR bug:
+
+https://pear.php.net/bugs/bug.php?id=20383
+
+Some directories and files will be created on the build file-system as
+this is built:
+
+/usr/lib64/php/8.2/.channels/.alias/
+/usr/lib64/php/8.2/.channels/.alias/pear.txt
+/usr/lib64/php/8.2/.channels/.alias/pecl.txt
+/usr/lib64/php/8.2/.channels/.alias/phpdocs.txt
+/usr/lib64/php/8.2/.channels/__uri.reg
+/usr/lib64/php/8.2/.channels/doc.php.net.reg
+/usr/lib64/php/8.2/.channels/pear.php.net.reg
+/usr/lib64/php/8.2/.channels/pecl.php.net.reg
+/usr/lib64/php/8.2/.depdb
+/usr/lib64/php/8.2/.depdblock
+/usr/lib64/php/8.2/.filemap
+/usr/lib64/php/8.2/.lock
+/usr/lib64/php/8.2/.registry/
+/usr/lib64/php/8.2/.registry/.channel.__uri/
+/usr/lib64/php/8.2/.registry/.channel.doc.php.net/
+/usr/lib64/php/8.2/.registry/.channel.pecl.php.net/
diff --git a/development/php82/doinst.sh b/development/php82/doinst.sh
new file mode 100644
index 0000000000..231f5ea07d
--- /dev/null
+++ b/development/php82/doinst.sh
@@ -0,0 +1,18 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+# Keep same perms on rc.php-fpm.new:
+if [ -e etc/rc.d/rc.php-fpm-8.2 ]; then
+ cp -a etc/rc.d/rc.php-fpm-8.2 etc/rc.d/rc.php-fpm-8.2.new.incoming
+ cat etc/rc.d/rc.php-fpm-8.2.new > etc/rc.d/rc.php-fpm-8.2.new.incoming
+ mv etc/rc.d/rc.php-fpm-8.2.new.incoming etc/rc.d/rc.php-fpm-8.2.new
+fi
+config etc/rc.d/rc.php-fpm-8.2.new
diff --git a/development/php82/php82.SlackBuild b/development/php82/php82.SlackBuild
new file mode 100644
index 0000000000..99b38a8960
--- /dev/null
+++ b/development/php82/php82.SlackBuild
@@ -0,0 +1,222 @@
+#!/bin/bash
+
+# Build and package PHP FPM 8.2
+# Copyright 2023 Eugene Wissner, Germany, Dachau
+#
+# by: David Cantrell <david@slackware.com>
+# Modified for PHP 4-5 by volkerdi@slackware.com
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2019, 2020, 2021 Patrick Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=php82
+VERSION=${VERSION:-8.2.19}
+BUILD=${BUILD:-2}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+VERSION_SUFFIX=8.2
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf php-$VERSION
+tar xvf $CWD/php-$VERSION.tar.xz
+cd php-$VERSION
+chown -R root:root .
+
+# Sometimes they ship a few of these:
+find . -name "*.orig" -delete
+
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i "s|build$|php/${VERSION_SUFFIX}/build|" scripts/Makefile.frag
+sed -i "s|build\"$|php/${VERSION_SUFFIX}/build\"|" scripts/phpize.in
+
+EXTENSION_DIR=/usr/lib${LIBDIRSUFFIX}/php/${VERSION_SUFFIX}/extensions \
+CFLAGS="$SLKCFLAGS -DU_DEFINE_FALSE_AND_TRUE=1" \
+CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1 -DU_DEFINE_FALSE_AND_TRUE=1" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-libdir=lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc/php/${VERSION_SUFFIX} \
+ --datarootdir=/usr/share \
+ --datadir=/usr/share \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --program-suffix=-$VERSION_SUFFIX \
+ --without-apxs2 \
+ --enable-fpm \
+ --with-fpm-user=apache \
+ --with-fpm-group=apache \
+ --enable-zts \
+ --enable-pcntl \
+ --enable-mbregex \
+ --enable-tokenizer=shared \
+ --with-config-file-scan-dir=/etc/php/${VERSION_SUFFIX}/php.d \
+ --with-config-file-path=/etc/php/${VERSION_SUFFIX} \
+ --with-layout=PHP \
+ --disable-sigchild \
+ --with-libxml \
+ --with-expat \
+ --enable-simplexml \
+ --enable-xmlreader=shared \
+ --enable-dom=shared \
+ --enable-filter \
+ --disable-debug \
+ --with-openssl=shared \
+ --with-external-pcre \
+ --with-zlib=shared,/usr \
+ --enable-bcmath=shared \
+ --with-bz2=shared,/usr \
+ --enable-calendar=shared \
+ --enable-ctype=shared \
+ --with-curl=shared \
+ --enable-dba=shared \
+ --with-gdbm=/usr \
+ --with-db4=/usr \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --enable-gd=shared \
+ --with-external-gd \
+ --with-jpeg \
+ --with-xpm \
+ --with-gettext=shared,/usr \
+ --with-gmp=shared,/usr \
+ --with-iconv=shared \
+ --with-imap-ssl=/usr \
+ --with-pdo-pgsql=shared,/usr/bin/pg_config \
+ --with-pgsql=shared,/usr/bin/pg_config \
+ --with-ldap=shared \
+ --enable-mbstring=shared \
+ --enable-mysqlnd=shared \
+ --with-mysqli=shared,mysqlnd \
+ --with-mysql-sock=/var/run/mysql/mysql.sock \
+ --with-iodbc=shared,/usr \
+ --enable-pdo=shared \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-sqlite=shared,/usr \
+ --with-pdo-odbc=shared,iODBC,/usr \
+ --with-pspell=shared,/usr \
+ --with-enchant=shared,/usr \
+ --enable-shmop=shared \
+ --with-snmp=shared,/usr \
+ --enable-soap=shared \
+ --enable-sockets \
+ --with-sqlite3=shared \
+ --enable-sysvmsg \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --with-xsl=shared,/usr \
+ --with-zip=shared \
+ --enable-intl=shared \
+ --enable-opcache \
+ --enable-shared=yes \
+ --enable-static=no \
+ --with-gnu-ld \
+ --with-pic \
+ --enable-phpdbg \
+ --with-sodium \
+ --with-password-argon2 \
+ --without-readline \
+ --with-libedit \
+ --with-pear=/usr/lib${LIBDIRSUFFIX}/php/${VERSION_SUFFIX} \
+ --includedir=/usr/include/php/${VERSION_SUFFIX} \
+ --with-tidy=shared \
+ --build=$ARCH-slackware-linux
+
+make
+make install INSTALL_ROOT=$PKG
+
+mkdir -p $PKG/etc/rc.d
+cp sapi/fpm/init.d.php-fpm $PKG/etc/rc.d/rc.php-fpm-${VERSION_SUFFIX}.new
+chmod 644 $PKG/etc/rc.d/rc.php-fpm-${VERSION_SUFFIX}.new
+
+# Strip ELF objects.
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# PHP sometimes puts junk in the root directory:
+( cd $PKG
+ rm -rf .channels .depdb .depdblock .filemap .lock .registry
+)
+
+rm -r $PKG/usr/share/fpm $PKG/usr/bin/pear $PKG/usr/bin/peardev
+mv $PKG/usr/bin/pecl $PKG/usr/bin/pecl-${VERSION_SUFFIX}
+install -m 644 php.ini-development php.ini-production $PKG/etc/php/${VERSION_SUFFIX}/
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CODING_STANDARDS* CONTRIBUTING* EXTENSIONS* LICENSE* NEWS* README* UPGRADING* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/php82/php82.info b/development/php82/php82.info
new file mode 100644
index 0000000000..8226919538
--- /dev/null
+++ b/development/php82/php82.info
@@ -0,0 +1,10 @@
+PRGNAM="php82"
+VERSION="8.2.19"
+HOMEPAGE="https://www.php.net/"
+DOWNLOAD="https://www.php.net/distributions/php-8.2.19.tar.xz"
+MD5SUM="97f3cc144fd6937cf44fbec5810eafe9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="postgresql"
+MAINTAINER="Eugene Wissner"
+EMAIL="belka@caraus.de"
diff --git a/development/php82/slack-desc b/development/php82/slack-desc
new file mode 100644
index 0000000000..0302f903d2
--- /dev/null
+++ b/development/php82/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+php82: php82 (HTML-embedded scripting language)
+php82:
+php82: PHP is an HTML-embedded scripting language. It shares syntax
+php82: characteristics with C, Java, and Perl. The primary objective behind
+php82: this language is to make a fast and easy-to-use scripting language
+php82: for dynamic web sites.
+php82:
+php82: Homepage: https://www.php.net/
+php82:
+php82:
+php82: