Ticket #52214: net-snmp-perl-5.24.patch
File net-snmp-perl-5.24.patch, 10.3 KB (added by jeremyhu (Jeremy Huddleston Sequoia), 8 years ago) |
---|
-
Portfile
6 6 7 7 name net-snmp 8 8 version 5.7.3 9 revision 59 revision 6 10 10 categories net 11 11 license BSD 12 12 platforms darwin … … 27 27 checksums rmd160 c5cf54d5723ee417e07f1f9fa3936aef505104a2 \ 28 28 sha256 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0 29 29 30 perl5.branches 5.22 30 perl5.require_variant yes 31 perl5.conflict_variants yes 32 perl5.branches 5.22 5.24 33 perl5.create_variants ${perl5.branches} 31 34 32 35 depends_lib port:bzip2 \ 33 port:perl${perl5.major} \34 36 port:zlib 35 37 36 38 post-extract { … … 54 56 patchfiles-append patch-include-net-snmp-system-darwin17.h.diff 55 57 patchfiles-append patch-include-net-snmp-system-darwin18.h.diff 56 58 patchfiles-append patch-Makefile.in.diff 59 patchfiles-append PR-52214.patch 60 patchfiles-append 0001-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch 57 61 58 62 configure.env-append PERLPROG=${perl5.bin} 59 63 -
files/0001-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch
1 From 4e793461e96a2b4fd81142ab312d074d5c8841fa Mon Sep 17 00:00:00 2001 2 From: Bart Van Assche <bvanassche@acm.org> 3 Date: Sat, 23 Jul 2016 18:41:10 -0700 4 Subject: [PATCH] CHANGES: BUG: 2712: Fix Perl module compilation 5 6 Avoid that building the Net-SNMP Perl modules fails as follows: 7 8 ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assignment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229. 9 10 See also https://sourceforge.net/p/net-snmp/bugs/2712/. 11 --- 12 perl/ASN/Makefile.PL | 4 +--- 13 perl/Makefile.PL | 4 +--- 14 perl/OID/Makefile.PL | 5 +---- 15 perl/SNMP/Makefile.PL | 5 +---- 16 perl/TrapReceiver/Makefile.PL | 5 +---- 17 perl/agent/Makefile.PL | 5 +---- 18 perl/agent/Support/Makefile.PL | 5 +---- 19 perl/agent/default_store/Makefile.PL | 5 +---- 20 perl/default_store/Makefile.PL | 6 +----- 21 9 files changed, 9 insertions(+), 35 deletions(-) 22 23 diff --git perl/ASN/Makefile.PL perl/ASN/Makefile.PL 24 index f895a41..0e52b3a 100644 25 --- perl/ASN/Makefile.PL 26 +++ perl/ASN/Makefile.PL 27 @@ -7,9 +7,7 @@ my $lib_version; 28 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 29 # the contents of the Makefile that is written. 30 31 -%MakeParams = InitMakeParams(); 32 - 33 -WriteMakefile(%MakeParams); 34 +WriteMakefile(InitMakeParams()); 35 36 Check_Version(); 37 38 diff --git perl/Makefile.PL perl/Makefile.PL 39 index f70f991..ac36c15 100644 40 --- perl/Makefile.PL 41 +++ perl/Makefile.PL 42 @@ -3,9 +3,7 @@ use Config; 43 use Getopt::Long; 44 require 5; 45 46 -%MakeParams = InitMakeParams(); 47 - 48 -WriteMakefile(%MakeParams); 49 +WriteMakefile(InitMakeParams()); 50 51 sub InitMakeParams { 52 $nsconfig="net-snmp-config"; # in path by default 53 diff --git perl/OID/Makefile.PL perl/OID/Makefile.PL 54 index 5d94338..676c439 100644 55 --- perl/OID/Makefile.PL 56 +++ perl/OID/Makefile.PL 57 @@ -6,11 +6,8 @@ require 5; 58 use Config; 59 use Getopt::Long; 60 my $lib_version; 61 -my %MakeParams = (); 62 63 -%MakeParams = InitMakeParams(); 64 - 65 -WriteMakefile(%MakeParams); 66 +WriteMakefile(InitMakeParams()); 67 68 Check_Version(); 69 70 diff --git perl/SNMP/Makefile.PL perl/SNMP/Makefile.PL 71 index 928cb67..d7b5a2a 100644 72 --- perl/SNMP/Makefile.PL 73 +++ perl/SNMP/Makefile.PL 74 @@ -3,15 +3,12 @@ require 5; 75 use Config; 76 use Getopt::Long; 77 my $lib_version; 78 -my %MakeParams = (); 79 my $opts; 80 81 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 82 # the contents of the Makefile that is written. 83 84 -%MakeParams = InitMakeParams(); 85 - 86 -WriteMakefile(%MakeParams); 87 +WriteMakefile(InitMakeParams()); 88 89 Check_Version(); 90 91 diff --git perl/TrapReceiver/Makefile.PL perl/TrapReceiver/Makefile.PL 92 index 5c9463a..0af6aaf 100644 93 --- perl/TrapReceiver/Makefile.PL 94 +++ perl/TrapReceiver/Makefile.PL 95 @@ -3,11 +3,8 @@ require 5; 96 use Config; 97 use Getopt::Long; 98 my $lib_version; 99 -my %MakeParams = (); 100 101 -%MakeParams = InitMakeParams(); 102 - 103 -WriteMakefile(%MakeParams); 104 +WriteMakefile(InitMakeParams()); 105 106 Check_Version(); 107 108 diff --git perl/agent/Makefile.PL perl/agent/Makefile.PL 109 index b4b358a..fe105ea 100644 110 --- perl/agent/Makefile.PL 111 +++ perl/agent/Makefile.PL 112 @@ -3,11 +3,8 @@ require 5; 113 use Config; 114 use Getopt::Long; 115 my $lib_version; 116 -my %MakeParams = (); 117 118 -%MakeParams = InitMakeParams(); 119 - 120 -WriteMakefile(%MakeParams); 121 +WriteMakefile(InitMakeParams()); 122 123 Check_Version(); 124 125 diff --git perl/agent/Support/Makefile.PL perl/agent/Support/Makefile.PL 126 index 3a4f200..0dcb3f6 100644 127 --- perl/agent/Support/Makefile.PL 128 +++ perl/agent/Support/Makefile.PL 129 @@ -3,14 +3,11 @@ require 5; 130 use Config; 131 use Getopt::Long; 132 my $lib_version; 133 -my %MakeParams = (); 134 135 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 136 # the contents of the Makefile that is written. 137 138 -%MakeParams = InitMakeParams(); 139 - 140 -WriteMakefile(%MakeParams); 141 +WriteMakefile(InitMakeParams()); 142 143 Check_Version(); 144 145 diff --git perl/agent/default_store/Makefile.PL perl/agent/default_store/Makefile.PL 146 index 67d5ff0..5c6a5d6 100644 147 --- perl/agent/default_store/Makefile.PL 148 +++ perl/agent/default_store/Makefile.PL 149 @@ -3,11 +3,8 @@ require 5; 150 use Config; 151 use Getopt::Long; 152 my $lib_version; 153 -my %MakeParams = (); 154 155 -%MakeParams = InitMakeParams(); 156 - 157 -WriteMakefile(%MakeParams); 158 +WriteMakefile(InitMakeParams()); 159 160 Check_Version(); 161 162 diff --git perl/default_store/Makefile.PL perl/default_store/Makefile.PL 163 index 54996ab..221d4ed 100644 164 --- perl/default_store/Makefile.PL 165 +++ perl/default_store/Makefile.PL 166 @@ -3,12 +3,8 @@ require 5; 167 use Config; 168 use Getopt::Long; 169 my $lib_version; 170 -my %MakeParams = (); 171 - 172 -%MakeParams = InitMakeParams(); 173 - 174 -WriteMakefile(%MakeParams); 175 176 +WriteMakefile(InitMakeParams()); 177 178 sub InitMakeParams { 179 my $opts; 180 -- 181 2.10.0 182 -
files/PR-52214.patch
1 Reported at: https://trac.macports.org/ticket/52214 2 3 Fix from FreeBSD: https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?revision=396053&view=co 4 5 --- agent/snmp_perl.c.orig 2015-08-11 13:07:06 UTC 6 +++ agent/snmp_perl.c 7 @@ -5,6 +5,10 @@ 8 #include <EXTERN.h> 9 #include "perl.h" 10 11 +#ifdef U64TYPE 12 +#define U64 U64pairU32 13 +#endif 14 + 15 #include <net-snmp/net-snmp-config.h> 16 #include <net-snmp/net-snmp-includes.h> 17 #include <net-snmp/agent/net-snmp-agent-includes.h> 18 --- perl/OID/OID.xs.orig 2015-08-11 13:07:28 UTC 19 +++ perl/OID/OID.xs 20 @@ -7,6 +7,10 @@ 21 #include "perl.h" 22 #include "XSUB.h" 23 24 +#ifdef U64TYPE 25 +#define U64 U64pairU32 26 +#endif 27 + 28 #include <net-snmp/net-snmp-config.h> 29 #include <net-snmp/net-snmp-includes.h> 30 31 --- perl/SNMP/SNMP.xs.orig 2015-08-11 13:07:54 UTC 32 +++ perl/SNMP/SNMP.xs 33 @@ -16,6 +16,10 @@ 34 #include "perl.h" 35 #include "XSUB.h" 36 37 +#ifdef U64TYPE 38 +#define U64 U64pairU32 39 +#endif 40 + 41 #include <net-snmp/net-snmp-config.h> 42 #include <net-snmp/net-snmp-includes.h> 43 #include <sys/types.h> 44 --- perl/TrapReceiver/TrapReceiver.xs.orig 2015-08-11 13:08:02 UTC 45 +++ perl/TrapReceiver/TrapReceiver.xs 46 @@ -9,6 +9,10 @@ 47 48 #include "ppport.h" 49 50 +#ifdef U64TYPE 51 +#define U64 U64pairU32 52 +#endif 53 + 54 #include <net-snmp/net-snmp-config.h> 55 #include <net-snmp/net-snmp-includes.h> 56 #include <net-snmp/agent/net-snmp-agent-includes.h> 57 --- perl/agent/agent.xs.orig 2015-08-11 13:07:48 UTC 58 +++ perl/agent/agent.xs 59 @@ -9,6 +9,10 @@ 60 #include <netdb.h> 61 #include <sys/socket.h> 62 63 +#ifdef U64TYPE 64 +#define U64 U64pairU32 65 +#endif 66 + 67 #include <net-snmp/net-snmp-config.h> 68 #include <net-snmp/net-snmp-includes.h> 69 #include <net-snmp/agent/net-snmp-agent-includes.h> 70 --- perl/ASN/Makefile.PL.orig 2014-12-08 20:23:22 UTC 71 +++ perl/ASN/Makefile.PL 72 @@ -1,3 +1,4 @@ 73 +package ASN; 74 use ExtUtils::MakeMaker; 75 require 5; 76 use Config; 77 --- perl/AnyData_SNMP/Makefile.PL.orig 2015-09-03 22:27:45 UTC 78 +++ perl/AnyData_SNMP/Makefile.PL 79 @@ -1,3 +1,4 @@ 80 +package AnyData_SNMP; 81 use ExtUtils::MakeMaker; 82 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 83 # the contents of the Makefile that is written. 84 --- perl/OID/Makefile.PL.orig 2014-12-08 20:23:22 UTC 85 +++ perl/OID/Makefile.PL 86 @@ -1,3 +1,4 @@ 87 +package OID; 88 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 89 # the contents of the Makefile that is written. 90 91 --- perl/SNMP/Makefile.PL.orig 2014-12-08 20:23:22 UTC 92 +++ perl/SNMP/Makefile.PL 93 @@ -1,3 +1,4 @@ 94 +package SNMP; 95 use ExtUtils::MakeMaker; 96 require 5; 97 use Config; 98 --- perl/TrapReceiver/Makefile.PL.orig 2014-12-08 20:23:22 UTC 99 +++ perl/TrapReceiver/Makefile.PL 100 @@ -1,3 +1,4 @@ 101 +package TrapReceiver; 102 use ExtUtils::MakeMaker; 103 require 5; 104 use Config; 105 --- perl/agent/Makefile.PL.orig 2014-12-08 20:23:22 UTC 106 +++ perl/agent/Makefile.PL 107 @@ -1,3 +1,4 @@ 108 +package agent; 109 use ExtUtils::MakeMaker; 110 require 5; 111 use Config; 112 --- perl/agent/Support/Makefile.PL.orig 2014-12-08 20:23:22 UTC 113 +++ perl/agent/Support/Makefile.PL 114 @@ -1,3 +1,4 @@ 115 +package agent_Support; 116 use ExtUtils::MakeMaker; 117 require 5; 118 use Config; 119 --- perl/agent/default_store/Makefile.PL.orig 2014-12-08 20:23:22 UTC 120 +++ perl/agent/default_store/Makefile.PL 121 @@ -1,3 +1,4 @@ 122 +package agent_default_store; 123 use ExtUtils::MakeMaker; 124 require 5; 125 use Config; 126 --- perl/default_store/Makefile.PL.orig 2014-12-08 20:23:22 UTC 127 +++ perl/default_store/Makefile.PL 128 @@ -1,3 +1,4 @@ 129 +package default_store; 130 use ExtUtils::MakeMaker; 131 require 5; 132 use Config; 133 --- perl/manager/Makefile.PL.orig 2014-12-08 20:23:22 UTC 134 +++ perl/manager/Makefile.PL 135 @@ -1,3 +1,4 @@ 136 +package manager; 137 use ExtUtils::MakeMaker; 138 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 139 # the contents of the Makefile that is written.