Mon Sep 26 05:22:23 2022 UTC ()
Fix obsolete PERL and note that upstream no longer exists.


(jnemeth)
diff -r1.19 -r1.20 pkgsrc/comms/op_panel/Makefile
diff -r1.5 -r1.6 pkgsrc/comms/op_panel/distinfo
diff -r0 -r1.1 pkgsrc/comms/op_panel/patches/patch-op__server.pl

cvs diff -r1.19 -r1.20 pkgsrc/comms/op_panel/Makefile (expand / switch to unified diff)

--- pkgsrc/comms/op_panel/Makefile 2022/06/28 11:31:06 1.19
+++ pkgsrc/comms/op_panel/Makefile 2022/09/26 05:22:23 1.20
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1# $NetBSD: Makefile,v 1.19 2022/06/28 11:31:06 wiz Exp $ 1# $NetBSD: Makefile,v 1.20 2022/09/26 05:22:23 jnemeth Exp $
2# 2#
3 3
4DISTNAME= op_panel-0.30 4DISTNAME= op_panel-0.30
5#PKGREVISION= 9 5PKGREVISION= 5
6PKGREVISION= 4 
7CATEGORIES= comms 6CATEGORIES= comms
8MASTER_SITES= http://www.asternic.org/files/ 7# now points to somebody's personal page
 8# MASTER_SITES= http://www.asternic.org/files/
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://www.asternic.org/ 11# now points to somebody's personal page
 12# HOMEPAGE= https://www.asternic.org/
12COMMENT= Flash Operator Panel for Asterisk 13COMMENT= Flash Operator Panel for Asterisk
13LICENSE= gnu-gpl-v2 14LICENSE= gnu-gpl-v2
14 15
15FOP= op_panel 16FOP= op_panel
16MESSAGE_SUBST+= FOP=${FOP} 17MESSAGE_SUBST+= FOP=${FOP}
17 18
18RCD_SCRIPTS+= ${FOP} 19RCD_SCRIPTS+= ${FOP}
19 20
20USE_LANGUAGES= # none 21USE_LANGUAGES= # none
21NO_BUILD= yes 22NO_BUILD= yes
22USE_TOOLS+= perl:run 23USE_TOOLS+= perl:run
23REPLACE_PERL+= op_server.pl 24REPLACE_PERL+= op_server.pl
24 25

cvs diff -r1.5 -r1.6 pkgsrc/comms/op_panel/distinfo (expand / switch to unified diff)

--- pkgsrc/comms/op_panel/distinfo 2021/10/26 10:06:02 1.5
+++ pkgsrc/comms/op_panel/distinfo 2022/09/26 05:22:23 1.6
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1$NetBSD: distinfo,v 1.5 2021/10/26 10:06:02 nia Exp $ 1$NetBSD: distinfo,v 1.6 2022/09/26 05:22:23 jnemeth Exp $
2 2
3BLAKE2s (op_panel-0.30.tar.gz) = 91b260e8f1034760170211906b78760b6696e57181c6cc4ea3b705dc0cefc07c 3BLAKE2s (op_panel-0.30.tar.gz) = 91b260e8f1034760170211906b78760b6696e57181c6cc4ea3b705dc0cefc07c
4SHA512 (op_panel-0.30.tar.gz) = 1fe5a1b2f5d005aeb1adf8ea20f6ed1cd7bd6968f26a6e9947f72be2494dd8268ced212b0ffa501597f30859d8b73c5c57b6e2f3c17f1746674e1be5f96ed454 4SHA512 (op_panel-0.30.tar.gz) = 1fe5a1b2f5d005aeb1adf8ea20f6ed1cd7bd6968f26a6e9947f72be2494dd8268ced212b0ffa501597f30859d8b73c5c57b6e2f3c17f1746674e1be5f96ed454
5Size (op_panel-0.30.tar.gz) = 355782 bytes 5Size (op_panel-0.30.tar.gz) = 355782 bytes
 6SHA1 (patch-op__server.pl) = 9460da17aa849292f8cf06a9c9e608136d3cae6a

File Added: pkgsrc/comms/op_panel/patches/patch-op__server.pl
$NetBSD: patch-op__server.pl,v 1.1 2022/09/26 05:22:23 jnemeth Exp $

* fixup obsolete PERL

--- op_server.pl.orig	2009-06-22 18:06:11.000000000 +0000
+++ op_server.pl
@@ -2068,7 +2068,7 @@ sub generate_linked_buttons_list {
     my ( undef, $contexto1 ) = split( /\&/, $nroboton );
     if ( !defined($contexto1) ) { $contexto1 = ""; }
 
-    if ( defined( @{ $linkbot{"$nroboton"} } ) ) {
+    if ( $linkbot{"$nroboton"} ) {
         log_debug( "$heading Esta definido linkbot {$nroboton}", 32 ) if DEBUG;
         foreach ( @{ $linkbot{"$nroboton"} } ) {
             log_debug( "$heading y contiene $_", 32 ) if DEBUG;
@@ -2152,7 +2152,7 @@ sub erase_all_sessions_from_channel {
     delete $monitoring{$canalsesion};
     if ( keys(%cache_hit) ) {
         for ( keys %cache_hit ) {
-            if ( defined( @{ $cache_hit{$_} } ) ) {
+            if ( $cache_hit{$_} ) {
                 foreach my $val ( @{ $cache_hit{$_} } ) {
                     if ( $val eq $canal ) {
                         log_debug( "$heading borro cache $_", 128 ) if DEBUG;
@@ -2195,7 +2195,7 @@ sub erase_all_sessions_from_channel {
 
         if ( keys(%linkbot) ) {
             for ( keys %linkbot ) {
-                if ( defined( @{ $linkbot{$_} } ) ) {
+                if ( $linkbot{$_} ) {
                     my @final = ();
                     foreach my $val ( @{ $linkbot{$_} } ) {
                         log_debug( "$heading linkbot($_) ne $val ?", 64 ) if DEBUG;
@@ -2720,7 +2720,7 @@ sub procesa_bloque {
     my $blaque             = shift;
     my $socket             = shift;
     my $astmanproxy_server = shift;
-    my %bloque             = %$blaque if defined(%$blaque);
+    my %bloque             = %$blaque if %$blaque;
 
     my %hash_temporal = ();
     my $evento        = "";
@@ -3125,9 +3125,9 @@ sub procesa_bloque {
             }
 
             my $tempval = $config->{$contexto}{'attendant_failure_redirect_to'};
-            $tempval =~ s/\${CHANNEL}/$hash_temporal{Channel}/g;
-            $tempval =~ s/\${EXTEN}/$part_ext[0]/g;
-            $tempval =~ s/\${CONTEXT}/$part_ext[1]/g;
+            $tempval =~ s/\$\{CHANNEL}/$hash_temporal{Channel}/g;
+            $tempval =~ s/\$\{EXTEN}/$part_ext[0]/g;
+            $tempval =~ s/\$\{CONTEXT}/$part_ext[1]/g;
 
             if ( $tempval =~ m/\@/ ) {
                 ( $dst_exten, $dst_context ) = split( /\@/, $tempval, 2 );
@@ -3254,15 +3254,15 @@ sub procesa_bloque {
 
                 if ( $srv == $hash_temporal{Server} && "SIP/$chan_name" =~ m/$match/ ) {
                     while ( ( $key, $val ) = each(%tmphash) ) {
-                        $val =~ s/\${CONTEXT}/$ctx/g;
-                        $val =~ s/\${CALLERID}/$calid/g;
-                        $val =~ s/\${CLIDNUM}/$calidnum/g;
-                        $val =~ s/\${CLIDNAME}/$calidname/g;
-                        $val =~ s/\${VOICEMAILBOX}/$voicemailbox/g;
-                        $val =~ s/\${VOICEMAILBOXNUM}/$voicemailboxnum/g;
-                        $val =~ s/\${VOICEMAILBOXCONTEXT}/$voicemailboxcontext/g;
-                        $val =~ s/\${ACCOUNTCODE}/$accode/g;
-                        $val =~ s/\${CHANNEL}/$chan_name/g;
+                        $val =~ s/\$\{CONTEXT}/$ctx/g;
+                        $val =~ s/\$\{CALLERID}/$calid/g;
+                        $val =~ s/\$\{CLIDNUM}/$calidnum/g;
+                        $val =~ s/\$\{CLIDNAME}/$calidname/g;
+                        $val =~ s/\$\{VOICEMAILBOX}/$voicemailbox/g;
+                        $val =~ s/\$\{VOICEMAILBOXNUM}/$voicemailboxnum/g;
+                        $val =~ s/\$\{VOICEMAILBOXCONTEXT}/$voicemailboxcontext/g;
+                        $val =~ s/\$\{ACCOUNTCODE}/$accode/g;
+                        $val =~ s/\$\{CHANNEL}/$chan_name/g;
                         $autosip{"$server^$chan_name"}{$key} = $val;
                     }
                     $autosip{"$server^$chan_name"}{channel}    = "SIP/$chan_name";
@@ -3435,7 +3435,7 @@ sub procesa_bloque {
             my $item_temp = $item;
             my $datoon    = "";
             my $datooff   = "";
-            $item_temp =~ s/\${value}/$valor/g;
+            $item_temp =~ s/\$\{value}/$valor/g;
             my ( $comando, $datos ) = split( /=/, $item_temp );
             if ( $datos =~ /\|/ ) {
                 ( $datoon, $datooff ) = split( /\|/, $datos );
@@ -5805,7 +5805,7 @@ sub digest_event_block {
                             if ( !defined($contexto1) ) { $contexto1 = ""; }
                             my $listabotones = "";
 
-                            if ( !defined( @{ $linkbot{"$server^$canal"} } ) ) {
+                            if ( ! $linkbot{"$server^$canal"} ) {
                                 push @{ $linkbot{"$server^$canal"} }, "";
                                 pop @{ $linkbot{"$server^$canal"} };
                                 log_debug( "$heading DEFINIENDO linkbot ($server^$canal)", 256 ) if DEBUG;
@@ -5987,7 +5987,7 @@ sub digest_event_block {
                                 if ( $canalid !~ /^Agent/ ) {
 
                                     # settimer agent needs to be discarded
-                                    if ( !defined( @{ $sesbot{$interno} } ) ) {
+                                    if ( ! $sesbot{$interno} ) {
                                         push @{ $sesbot{$interno} }, "";
                                         pop @{ $sesbot{$interno} };
                                     }
@@ -8269,12 +8269,12 @@ sub compute_monitoring_filename {
         }
         $hasha{$key} = $val;
     }
-    $filename =~ s/\${CLIDNAME}/$hasha{CLIDNAME}/gi;
-    $filename =~ s/\${CLIDNUM}/$hasha{CLIDNUM}/gi;
-    $filename =~ s/\${CLID}/$hasha{CLID}/gi;
-    $filename =~ s/\${UNIQUEID}/$hasha{UNIQUEID}/gi;
-    $filename =~ s/\${CHANNEL}/$hasha{CHANNEL}/gi;
-    $filename =~ s/\${LINK}/$hasha{LINK}/gi;
+    $filename =~ s/\$\{CLIDNAME}/$hasha{CLIDNAME}/gi;
+    $filename =~ s/\$\{CLIDNUM}/$hasha{CLIDNUM}/gi;
+    $filename =~ s/\$\{CLID}/$hasha{CLID}/gi;
+    $filename =~ s/\$\{UNIQUEID}/$hasha{UNIQUEID}/gi;
+    $filename =~ s/\$\{CHANNEL}/$hasha{CHANNEL}/gi;
+    $filename =~ s/\$\{LINK}/$hasha{LINK}/gi;
     $filename = formatdate($filename);
     $filename =~ s/\//-/gi;
     push @return, $filename;
@@ -8479,7 +8479,7 @@ sub first_client_status {
         }
         if ( keys(%botonqueuemember) ) {
             for $interno ( keys %botonqueuemember ) {
-                if ( defined( @{ $botonqueuemember{$interno} } ) ) {
+                if ( $botonqueuemember{$interno} ) {
                     my %temphash = ();
                     foreach my $val ( @{ $botonqueuemember{$interno} } ) {
                         my @datos = split( /\|/, $val );
@@ -9700,7 +9700,7 @@ sub format_clid {
     }
 
     $devuelve = join( "", reverse @result );
-    $devuelve =~ s/\${CLIDNAME}/$name/gi;
+    $devuelve =~ s/\$\{CLIDNAME}/$name/gi;
     return $devuelve;
 }
 
@@ -10449,7 +10449,7 @@ sub print_cachehit {
             for ( keys %cache_hit ) {
                 print "key $_\n";
 
-                if ( defined( @{ $cache_hit{$_} } ) ) {
+                if ( $cache_hit{$_} ) {
                     my @final = ();
                     foreach my $val ( @{ $cache_hit{$_} } ) {
                         print "\tcache_hit($_) = $val\n";
@@ -10471,7 +10471,7 @@ sub print_linkbot {
         print "---------------------------------------------------\n";
         if ( keys(%linkbot) ) {
             for ( keys %linkbot ) {
-                if ( defined( @{ $linkbot{$_} } ) ) {
+                if ( $linkbot{$_} ) {
                     my @final = ();
                     foreach my $val ( @{ $linkbot{$_} } ) {
                         print "\tlinkbot($_) = $val\n";
@@ -10495,7 +10495,7 @@ sub print_sesbot {
         print "---------------------------------------------------\n";
         if ( keys(%sesbot) ) {
             for ( keys %sesbot ) {
-                if ( defined( @{ $sesbot{$_} } ) ) {
+                if ( $sesbot{$_} ) {
                     my @final = ();
                     foreach my $val ( @{ $sesbot{$_} } ) {
                         print "\tsesbot($_) = $val\n";