From a8b017466a84bdf46fe6bd1576c07087cc38a081 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Sun, 10 Jul 2022 00:08:58 +0530 Subject: [PATCH 1/2] php8.1: fix man pages Replace man pages containing only a single `.so` directive with symlinks to the intended man page --- srcpkgs/php8.1/template | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/srcpkgs/php8.1/template b/srcpkgs/php8.1/template index e2f1ed0807d2..0364fd6d4834 100644 --- a/srcpkgs/php8.1/template +++ b/srcpkgs/php8.1/template @@ -1,7 +1,7 @@ # Template file for 'php8.1' pkgname=php8.1 version=8.1.7 -revision=2 +revision=3 _php_version=8.1 wrksrc="php-${version}" hostmakedepends="bison pkg-config apache-devel" @@ -141,6 +141,22 @@ do_build() { make ${makejobs} ${_make_env} } +_fix_manpages() { + # replace man pages containing only a single `.so` directive with + # symlinks to the intended man page + for file in $(find "${PKGDESTDIR:-$DESTDIR}/usr/share/man" -type f); do + test 1 -eq $(cat "$file" | wc -l) || continue + grep -q '^\.so[[:space:]]' "$file" || continue + target=$(sed "$file" -e 's/^\.so[[:space:]]*//' -e s='\.'=${_php_version}.=) + if [ "${target##*.}" = "${file##*.}" ]; then + target="${target##*/}" + else + target="../${target#/}" + fi + ln -sf "$target" "$file" + done +} + do_install() { cd ${wrksrc}/build local _env="INSTALL_ROOT=${DESTDIR}" @@ -153,6 +169,8 @@ do_install() { vinstall ${wrksrc}/php.ini-production 644 "etc/php${_php_version}" php.ini # remove static modules rm -f "${DESTDIR}/usr/lib/php${_php_version}/modules/*.a" + + _fix_manpages } php8.1-devel_package() { @@ -182,6 +200,7 @@ php8.1-cgi_package() { pkg_install() { cd ${wrksrc}/build make INSTALL_ROOT=${PKGDESTDIR} install-cgi + _fix_manpages } } From 261494d3b6bb46e6a8bf5950dd16c2988a0c9566 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Sun, 10 Jul 2022 01:05:39 +0530 Subject: [PATCH 2/2] php8.1: update to 8.1.8, add changelog URL The changelog URL points to the changelog for $version because the changelog in the master branch contains the details of many alpha and RC releases, which makes it difficult to find the changelog corresponding to the current pkgver. --- srcpkgs/php8.1/template | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/srcpkgs/php8.1/template b/srcpkgs/php8.1/template index 0364fd6d4834..6560459a6c4b 100644 --- a/srcpkgs/php8.1/template +++ b/srcpkgs/php8.1/template @@ -1,7 +1,7 @@ # Template file for 'php8.1' pkgname=php8.1 -version=8.1.7 -revision=3 +version=8.1.8 +revision=1 _php_version=8.1 wrksrc="php-${version}" hostmakedepends="bison pkg-config apache-devel" @@ -14,8 +14,9 @@ short_desc="HTML-embedded scripting language" maintainer="Joel Beckmeyer " license="PHP-3.01" homepage="https://www.php.net" +changelog="https://raw.githubusercontent.com/php/php-src/php-${version}/NEWS" distfiles="https://www.php.net/distributions/php-${version}.tar.gz" -checksum=5f0b422a117633c86d48d028934b8dc078309d4247e7565ea34b2686189abdd8 +checksum=889d910558d2492f7f2236921b9bcde620674c8b684ec02d126060f8ca45dc8d conf_files="/etc/php${_php_version}/php.ini"