[packages/adapter: 343/631] - adapter for new php extension virtuals

glen glen at pld-linux.org
Mon Sep 12 20:03:12 CEST 2016


commit 30cd4686061549fde9ee811e435ece5efd3e2522
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Nov 8 23:56:41 2006 +0000

    - adapter for new php extension virtuals
    
    Changed files:
        adapter.awk -> 1.330

 adapter.awk | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/adapter.awk b/adapter.awk
index 993c1e9..c8503f4 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -713,7 +713,7 @@ preamble == 1 {
 		value = substr($0, index($0, $2));
 		$0 = format_requires($1, value);
 	}
-
+    
 	# BR: tar (and others) is to common (rpm-build requires it)
 	if (field ~ /^buildrequires:/) {
 		l = substr($0, index($0, $2));
@@ -747,8 +747,15 @@ preamble == 1 {
 		sub(/^ant-junit$/, "jakarta-ant", $2);
 		sub(/^ldapjdk$/, "ldapsdk", $2);
 		sub(/^saxon-scripts$/, "saxon", $2);
+
+        replace_php_virtual_deps();
 	}
 
+	if (field ~ /^requires:/) {
+        replace_php_virtual_deps();
+    }
+
+
 	# obsolete/unwanted tags
 	if (field ~ /vendor:|packager:|distribution:|docdir:|prefix:|icon:|author:|author-email:|metadata-version:/) {
 		next
@@ -1601,4 +1608,22 @@ function add_br(br)
     BR[BR_count++] = br
 }
 
+# php virtual deps as discussed in devel-en
+function replace_php_virtual_deps()
+{
+    pkg = $2
+    if (pkg ~ /^php-/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs)/) {
+        sub(/^php-/, "php(", pkg);
+        sub(/$/, ")", pkg);
+        $2 = pkg
+    }
+
+    if (pkg ~/^php$/) {
+        $2 = "webserver(php)";
+        if ($4 ~ /^[0-9]:/) {
+            $4 = substr($4, 3);
+        }
+    }
+}
+
 # vim:ts=4:sw=4:et
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list