Skip to content

Commit

Permalink
classes/port-display.php: start using $port->UsesPython() & $port->Us…
Browse files Browse the repository at this point in the history
…esPHP()

remove debugging comments
  • Loading branch information
dlangille committed Sep 10, 2024
1 parent 8b2b1db commit 1f76c46
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions classes/port-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,15 +762,14 @@ function DisplayDependencyLine() {

// check to see if USES= contains python
if (!empty($port->uses)) {
$USES_PYTHON = in_array(USES_PYTHON, preg_split('/\s+|:/', $port->uses));
$USES_PYTHON = $port->UsesPython();
}

// check to see if USES= contains php
if (!empty($port->uses)) {
$USES_PHP = in_array(USES_PHP, preg_split('/\s+|:/', $port->uses));
$USES_PHP = $port->UsesPHP();
}


# if there is python in there...
if (!empty($USES_PYTHON)) {
# it is a python port if it starts with py37-, for example.
Expand Down Expand Up @@ -1548,15 +1547,14 @@ function Display() {
#

$package_names = array_keys($packages_array);
# echo 'before sorting';
# var_dump($package_names);
if (count($package_names) > 1 && $this->port->UsesPython()) {
# echo 'this port uses python, so we are invoking pkg_prefix_sort()';
$package_names = pkg_prefix_sort($package_names);
}

# foreach ($packages_array as $package_name => $package) {
# here, we access the data in package name sorted order
# it's easier to sort the names along, then used that to access the data.
foreach ($package_names as $key => $package_name) {
# get the package data for this package name
$package = $packages_array[$package_name];
$HTML .= '<table class="packages"><caption>' . $package_name . '</caption><tr><th>ABI</th>';

Expand Down

0 comments on commit 1f76c46

Please sign in to comment.