Skip to content

Commit

Permalink
php8.1: add php8.1-pear subpackage.
Browse files Browse the repository at this point in the history
  • Loading branch information
TinfoilSubmarine committed Sep 26, 2022
1 parent c368342 commit 0abc2b6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions srcpkgs/php8.1-pear
28 changes: 24 additions & 4 deletions srcpkgs/php8.1/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'php8.1'
pkgname=php8.1
version=8.1.10
revision=1
revision=2
_php_version=8.1
wrksrc="php-${version}"
hostmakedepends="bison pkg-config apache-devel"
Expand All @@ -23,7 +23,7 @@ conf_files="/etc/php${_php_version}/php.ini"
lib32disabled=yes

if [ -n "$CROSS_BUILD" ]; then
# phar needs php to build
# phar and pear need php to build
hostmakedepends+=" php${_php_version}"
CFLAGS+=" -DHAVE_LIBDL
-DHAVE_DLOPEN
Expand Down Expand Up @@ -90,7 +90,7 @@ do_build() {
--with-mysqli=shared,mysqlnd \
--with-openssl=shared \
--with-external-pcre \
--without-pear \
--with-pear=/usr/share/pear${_php_version} \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-odbc=shared,unixODBC,$XBPS_CROSS_BASE/usr \
--with-pdo-pgsql=shared,$XBPS_CROSS_BASE/usr \
Expand All @@ -112,7 +112,7 @@ do_build() {

EXTENSION_DIR="/usr/lib/php${_php_version}/modules"
export EXTENSION_DIR
PEAR_INSTALLDIR=/usr/share/pear
PEAR_INSTALLDIR=/usr/share/pear${_php_version}
export PEAR_INSTALLDIR
EXTRA_LIBS="-ldl"
export EXTRA_LIBS
Expand Down Expand Up @@ -218,6 +218,26 @@ php8.1-embed_package() {
}
}

php8.1-pear_package() {
lib32disabled=yes
depends="php${_php_version}-${version}_${revision}"
short_desc+=' - PHP Extension and Application Repository'
conf_files="/etc/php${_php_version}/pear.conf"
pkg_install() {
cd ${wrksrc}/build
local _env="INSTALL_ROOT=${PKGDESTDIR} PHP_PEAR_PHP_BIN=php${_php_version}"
if [ -n "$CROSS_BUILD" ]; then
_env+=" PEAR_PHP=/usr/bin/php${_php_version}"
fi
make install-pear ${_env}
rm -rf ${PKGDESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry}
rm -rf ${PKGDESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry}
mv ${PKGDESTDIR}/usr/bin/pear{,${_php_version}}
mv ${PKGDESTDIR}/usr/bin/peardev{,${_php_version}}
mv ${PKGDESTDIR}/usr/bin/pecl{,${_php_version}}
}
}

php8.1-enchant_package() {
lib32disabled=yes
depends="php${_php_version}-${version}_${revision}"
Expand Down

0 comments on commit 0abc2b6

Please sign in to comment.