pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/libgtop



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Mon Aug 19 05:59:56 UTC 2019

Modified Files:
        pkgsrc/sysutils/libgtop: Makefile distinfo
Added Files:
        pkgsrc/sysutils/libgtop/patches: patch-lib_lib.pl

Log Message:
libgtop: fix build with Perl >= 5.30

As of Perl 5.30, it's no longer permitted to set $[ to a non-zero
value, which was causing the lib.pl script to fail. Adjust the script
to use zero-based indexing. (Upstream has also changed this script
accordingly in subsequent releases, but this isn't a straight lift from
there, as the ingoing features.def input file format has also changed
in intervening releases, and there were other, unrelated changes
applied too.) This is a workaround until this package is updated to a
newer release (that is non-trivial because of the number of local
patches, etc.). Addresses PR pkg/54475.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 pkgsrc/sysutils/libgtop/Makefile
cvs rdiff -u -r1.35 -r1.36 pkgsrc/sysutils/libgtop/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/libgtop/patches/patch-lib_lib.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/libgtop/Makefile
diff -u pkgsrc/sysutils/libgtop/Makefile:1.59 pkgsrc/sysutils/libgtop/Makefile:1.60
--- pkgsrc/sysutils/libgtop/Makefile:1.59       Sun Aug 11 13:23:09 2019
+++ pkgsrc/sysutils/libgtop/Makefile    Mon Aug 19 05:59:56 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.59 2019/08/11 13:23:09 wiz Exp $
+# $NetBSD: Makefile,v 1.60 2019/08/19 05:59:56 gutteridge Exp $
 
 DISTNAME=              libgtop-2.28.4
-PKGREVISION=           15
+PKGREVISION=           16
 CATEGORIES=            sysutils gnome
 MASTER_SITES=          ${MASTER_SITE_GNOME:=sources/libgtop/2.28/}
 EXTRACT_SUFX=          .tar.bz2

Index: pkgsrc/sysutils/libgtop/distinfo
diff -u pkgsrc/sysutils/libgtop/distinfo:1.35 pkgsrc/sysutils/libgtop/distinfo:1.36
--- pkgsrc/sysutils/libgtop/distinfo:1.35       Mon Jan 21 03:31:05 2019
+++ pkgsrc/sysutils/libgtop/distinfo    Mon Aug 19 05:59:56 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.35 2019/01/21 03:31:05 youri Exp $
+$NetBSD: distinfo,v 1.36 2019/08/19 05:59:56 gutteridge Exp $
 
 SHA1 (libgtop-2.28.4.tar.bz2) = b6f002cc80a61dc0908dd96e0b543113a46bc4b7
 RMD160 (libgtop-2.28.4.tar.bz2) = 96ac76aa409bbd202bedacd94df14cd549e10d6b
@@ -36,6 +36,7 @@ SHA1 (patch-dk) = c95e5aa709dff7685af03f
 SHA1 (patch-dl) = 9d6a44be02ec21d195076125c0cdfe5b51a0ab0a
 SHA1 (patch-dm) = ef08973aecacb1fb69f258632dd36edfdafd8c50
 SHA1 (patch-dn) = 66f66731a3abd1290f67d62f9ef654f68756bccb
+SHA1 (patch-lib_lib.pl) = f581a74c7a80519ed850ff050295dd805dcdd4db
 SHA1 (patch-sysdeps_bsd_cpu.c) = e6b2b1e90385340128505fcab1c5c4aa510e165a
 SHA1 (patch-sysdeps_bsd_glibtop__machine.h) = 1682156e3cb21d335499e38b6b91b8c315f1b962
 SHA1 (patch-sysdeps_bsd_netload.c) = d143e392982afdd095fd052f857bfca2319ac7e7

Added files:

Index: pkgsrc/sysutils/libgtop/patches/patch-lib_lib.pl
diff -u /dev/null pkgsrc/sysutils/libgtop/patches/patch-lib_lib.pl:1.1
--- /dev/null   Mon Aug 19 05:59:56 2019
+++ pkgsrc/sysutils/libgtop/patches/patch-lib_lib.pl    Mon Aug 19 05:59:56 2019
@@ -0,0 +1,72 @@
+$NetBSD: patch-lib_lib.pl,v 1.1 2019/08/19 05:59:56 gutteridge Exp $
+
+Adjust indexing basis for compatibility with Perl >=5.30.
+
+--- lib/lib.pl.orig    2011-06-01 15:40:47.000000000 +0000
++++ lib/lib.pl
+@@ -1,6 +1,5 @@
+ #!/usr/bin/perl
+ 
+-$[ = 1;                       # set array base to 1
+ $, = ' ';             # set output field separator
+ $\ = "\n";            # set output record separator
+ 
+@@ -86,9 +85,9 @@ while (<>) {
+ sub output {
+     local($line) = @_;
+     @line_fields = split(/\|/, $line, 9999);
+-    $retval = $line_fields[1];
+-    $feature = $line_fields[2];
+-    $param_def = $line_fields[4];
++    $retval = $line_fields[0];
++    $feature = $line_fields[1];
++    $param_def = $line_fields[3];
+ 
+     $orig = $feature;
+     $feature =~ s/^@//;
+@@ -106,16 +105,16 @@ sub output {
+     }
+ 
+     if ($param_def eq 'string') {
+-      $call_param = ', ' . $line_fields[5];
++      $call_param = ', ' . $line_fields[4];
+       $param_buf = '';
+       $buf_set = '';
+       $param_decl = ",\n            " . $space . '    const char *' .
+ 
+-        $line_fields[5];
+-      $send_ptr = "\n\tconst void *send_ptr = " . $line_fields[5] . ';';
++        $line_fields[4];
++      $send_ptr = "\n\tconst void *send_ptr = " . $line_fields[4] . ';';
+       $send_size = "\n\tconst size_t send_size =\n\t\tstrlen (" .
+ 
+-        $line_fields[5] . ') + 1;';
++        $line_fields[4] . ') + 1;';
+     }
+     else {
+       $call_param = '';
+@@ -128,7 +127,7 @@ sub output {
+       if ($nr_params) {
+           $param_buf = "\n\tstruct {\n";
+       }
+-      for ($param = 1; $param <= $nr_params; $param++) {
++      for ($param = 0; $param < $nr_params; $param++) {
+           $list = $params[$param];
+           $type = $params[$param];
+           $type =~ s/\(.*//;
+@@ -137,13 +136,13 @@ sub output {
+           $count = (@fields = split(/,/, $list, 9999));
+ 
+           if ($count > 0) {
+-              for ($field = 1; $field <= $count; $field++) {
++              for ($field = 0; $field < $count; $field++) {
+                   $param_buf .= "\t\t$convert{$type} buf_$fields[$field];\n";
+                   $buf_set .= "\tparam_buf.buf_$fields[$field] = $fields[$field];\n";
+               }
+           }
+ 
+-          for ($field = 1; $field <= $count; $field++) {
++          for ($field = 0; $field < $count; $field++) {
+               if ($param_decl eq '') {
+                   $param_decl = ",\n            " . $space . '    ';
+               }



Home | Main Index | Thread Index | Old Index