[packages/adapter: 554/631] fill php core deps as virtual
glen
glen at pld-linux.org
Mon Sep 12 20:20:52 CEST 2016
commit 9ae5093a93bd2c5c4d76f01cd43635c255a13d24
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Aug 11 20:24:34 2012 +0300
fill php core deps as virtual
adapter.awk | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 4b8156c..cc3b897 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -697,11 +697,11 @@ preamble == 1 {
next
}
- replace_requires();
+ replace_requires(field);
}
if (field ~ /^requires:/ || field ~ /^requires\(/) {
- replace_requires();
+ replace_requires(field);
}
@@ -1859,18 +1859,20 @@ function import_rpm_macros( v) {
}
# php virtual deps as discussed in devel-en
-function replace_php_virtual_deps() {
+function replace_php_virtual_deps(field) {
pkg = $2
# if (pkg == "php-program") {
# $0 = $1 "\t/usr/bin/php"
# return
# }
-# if (pkg ~ /^php-[a-z]/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs|program|pecl-)/) {
-# sub(/^php-/, "php(", pkg);
-# sub(/$/, ") # verify this correctness -- it may be wanted to use specific not virtual dep", pkg);
-# $2 = pkg
-# }
+ if (field == "requires") {
+ if (pkg ~ /^php-(bcmath|bz2|calendar|ctype|curl|dba|dom|enchant|exif|fileinfo|filter|fpm|ftp|gd|gettext|gmp|hash|iconv|imap|interbase|intl|json|ldap|mbstring|mcrypt|mssql|mysql|mysqli|odbc|openssl|pcntl|pcre|pdo|pdo-dblib|pdo-firebird|pdo-mysql|pdo-odbc|pdo-pgsql|pdo-sqlite|pgsql|phar|posix|pspell|readline|recode|session|shmop|simplexml|snmp|soap|sockets|spl|sqlite|sqlite3|sybase-ct|sysvmsg|sysvsem|sysvshm|tidy|tokenizer|wddx|xml|xmlreader|xmlrpc|xmlwriter|xsl|zip|zlib)/) {
+ sub(/^php-/, "php(", pkg);
+ sub(/$/, ")", pkg);
+ $2 = pkg
+ }
+ }
if (pkg ~/^php$/) {
$2 = "webserver(php)";
@@ -1957,7 +1959,7 @@ function replace_groupnames(group) {
return group;
}
-function replace_requires() {
+function replace_requires(field) {
sub(/^python-setuptools-devel$/, "python-distribute", $2);
sub(/^gcc-g77/, "gcc-fortran", $2);
@@ -2207,7 +2209,7 @@ function replace_requires() {
sub(/^monodoc-core$/, "mono-monodoc", $2);
sub(/^python-gtk$/, "python-pygtk-gtk", $2);
- replace_php_virtual_deps()
+ replace_php_virtual_deps(field)
}
# vim:ts=4:sw=4
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list