Date: Thursday, March 30, 2023 @ 21:58:46
Author: dvzrv
Revision: 1431343
Add both legacy and current versions of optdepends.
Add both php-{,legacy-}* to optdepends to no longer require deriving specific
ones and become more flexible.
Modified:
nextcloud/trunk/PKGBUILD
----------+
PKGBUILD | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-03-30 21:46:57 UTC (rev 1431342)
+++ PKGBUILD 2023-03-30 21:58:46 UTC (rev 1431343)
@@ -109,8 +109,6 @@
}
package() {
- local _dep_ver=""
-
_get_php_versions
depends=(
"php-interpreter<$_max_php"
@@ -117,24 +115,28 @@
"php-gd-interpreter<$_max_php"
)
- # NOTE: this sets a custom php postfix based on whether php-legacy needs to
be used
- if [[ "$_php_interpreter" != *php ]]; then
- _dep_ver="-legacy"
- fi
-
- # NOTE: due to weird makepkg checks we can't add optdepends with dynamically
derived contents directly
- _optdepends=(
- "php$_dep_ver-apcu: for caching with APCU"
- "php$_dep_ver-apache: to use the Apache web server"
- "php$_dep_ver-fpm: to run in fastCGI process manager"
- "php$_dep_ver-imagick: for preview generation"
- "php$_dep_ver-memcached: for caching with memcached"
- "php$_dep_ver-pgsql: to use the PostgreSQL database backend"
- "php$_dep_ver-redis: for caching with redis"
- "php$_dep_ver-sqlite: to use the SQLite database backend"
- "uwsgi-plugin-php$_dep_ver: run as application container"
+ # NOTE: due to insufficient package tooling we can not rely on version
+ # information in optdepends, which is why we add both php and php-legacy
versions
+ optdepends+=(
+ "php-apache: to use the Apache web server (latest PHP)"
+ "php-legacy-apache: to use the Apache web server"
+ "php-apcu: for caching with APCU (latest PHP)"
+ "php-legacy-apcu: for caching with APCU"
+ "php-fpm: to run in fastCGI process manager (latest PHP)"
+ "php-legacy-fpm: to run in fastCGI process manager"
+ "php-imagick: for preview generation (latest PHP)"
+ "php-legacy-imagick: for preview generation"
+ "php-memcached: for caching with memcached (latest PHP)"
+ "php-legacy-memcached: for caching with memcached"
+ "php-pgsql: to use the PostgreSQL database backend (latest PHP)"
+ "php-legacy-pgsql: to use the PostgreSQL database backend"
+ "php-redis: for caching with redis (latest PHP)"
+ "php-legacy-redis: for caching with redis"
+ "php-sqlite: to use the SQLite database backend (latest PHP)"
+ "php-legacy-sqlite: to use the SQLite database backend"
+ "uwsgi-plugin-php: run as application container (latest PHP)"
+ "uwsgi-plugin-php-legacy: run as application container"
)
- optdepends+=("${_optdepends[@]}")
cd $pkgname
# sysusers.d integration