From 4d7da95906f66a10368f8689b6686199753268b9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 10 Aug 2014 12:27:56 +0200 Subject: Add support for architecture-specific fields This adds support for architecture-specific dependencies and relations. Support for this has recently been added to makepkg, see commit 2b556d8 (PKGBUILD: handle arch specific attributes, 2014-07-25) in the pacman repository for details. Signed-off-by: Lukas Fleischer --- web/template/pkg_details.php | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'web/template/pkg_details.php') diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 8a3cbcc4..3752e1aa 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -30,16 +30,30 @@ $deps = pkg_dependencies($row["ID"]); $requiredby = pkg_required($row["Name"]); usort($deps, function($x, $y) { - if ($x[1] == "depends" && $y[1] != "depends") { - return -1; + if ($x[1] != $y[1]) { + if ($x[1] == "depends") { + return -1; + } elseif ($y[1] == "depends") { + return 1; + } + return strcmp($x[1], $y[1]); + } elseif ($x[3] != $y[3]) { + return strcmp($x[3], $y[3]); + } else { + return strcmp($x[0], $y[0]); } - if ($y[1] == "depends" && $x[1] != "depends") { - return 1; - } - return $x[1] == $y[1] ? strcmp($x[0], $y[0]) : strcmp($x[1], $y[1]); }); $rels = pkg_relations($row["ID"]); + +usort($rels, function($x, $y) { + if ($x[3] != $y[3]) { + return strcmp($x[3], $y[3]); + } else { + return strcmp($x[0], $y[0]); + } +}); + $rels_c = $rels_p = $rels_r = array(); foreach ($rels as $rel) { switch ($rel[1]) { @@ -221,9 +235,9 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): - , + , - + @@ -237,9 +251,9 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): - , + , - + @@ -253,9 +267,9 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): - , + , - + @@ -344,7 +358,7 @@ if ($row["PackagerUID"]): 0): ?> -- cgit v1.2.3-24-g4f1b