Skip to content

Commit

Permalink
perl-net-libdnet: provide patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed Nov 17, 2024
1 parent 6f09752 commit fad14da
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/perl-net-libdnet/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ license=('GPL' 'PerlArtistic')
depends=('perl' 'perl-class-gomor' 'libdnet')
makedepends=('perl-extutils-makemaker')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/G/GO/GOMOR/$_cpanname-$pkgver.tar.gz")
sha512sums=('fe62a7f59cf752fb6dd05233b83773ecd98db4b5cce447ba6c8fdbe4a173a061487003274eaf3ee6c1da5dc6a9da55f10ba021cb5b2140b673fa7bcd91a2f0c5')
source=("http://www.cpan.org/authors/id/G/GO/GOMOR/$_cpanname-$pkgver.tar.gz"
'lengths.patch')
sha512sums=('fe62a7f59cf752fb6dd05233b83773ecd98db4b5cce447ba6c8fdbe4a173a061487003274eaf3ee6c1da5dc6a9da55f10ba021cb5b2140b673fa7bcd91a2f0c5'
'4e90c52275114ef68e3972fba56ef147dbcc21302cf49969aaf88f9ac1b3395ba44f8f801b54054598f958bf0f8760d3205f939793a209d63f82547de8c63084')

prepare() {
cd "$_cpanname-$pkgver"

patch -Np2 -b -z .orig<../lengths.patch

export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
Expand Down
111 changes: 111 additions & 0 deletions packages/perl-net-libdnet/lengths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
diff -up src/Net-Libdnet-0.99/Libdnet.xs.orig src/Net-Libdnet-0.99/Libdnet.xs
--- src/Net-Libdnet-0.99/Libdnet.xs.orig 2024-09-14 20:27:08.080000000 -0600
+++ src/Net-Libdnet-0.99/Libdnet.xs 2024-09-14 20:28:48.510000000 -0600
@@ -262,7 +262,7 @@ _obsolete_addr_cmp(SvA, SvB)
CODE:
char *StrA, *StrB;
struct addr SadA, SadB;
- int len;
+ long unsigned int len;

/*
we cannot avoid ugly nesting, because
@@ -306,7 +306,7 @@ _obsolete_addr_bcast(SvAd)
CODE:
char *StrAd;
struct addr SadAd, SadBc;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvAd) ){
@@ -344,7 +344,7 @@ _obsolete_addr_net(SvAd)
CODE:
char *StrAd;
struct addr SadAd, SadBc;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvAd) ){
@@ -385,7 +385,7 @@ _obsolete_arp_add(SvProtoAddr, SvHwAddr)
struct arp_entry SarEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvProtoAddr) ){
@@ -448,7 +448,7 @@ _obsolete_arp_delete(SvProtoAddr)
struct arp_entry SarEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvProtoAddr) ){
@@ -497,7 +497,7 @@ _obsolete_arp_get(SvProtoAddr)
struct arp_entry SarEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvProtoAddr) ){
@@ -553,7 +553,7 @@ _obsolete_intf_get(SvName)
intf_t *ItIntf;
struct intf_entry SieEntry;
char *StrName;
- int len;
+ long unsigned int len;

/* prepare undefined hash */
HvUndef = newHV();
@@ -599,7 +599,7 @@ _obsolete_intf_get_src(SvAddr)
struct intf_entry SieEntry;
struct addr SaAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* prepare undefined hash */
HvUndef = newHV();
@@ -650,7 +650,7 @@ _obsolete_intf_get_dst(SvAddr)
struct intf_entry SieEntry;
struct addr SaAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* prepare undefined hash */
HvUndef = newHV();
@@ -701,7 +701,7 @@ _obsolete_route_add(SvDstAddr, SvGwAddr)
struct route_entry SrtEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvDstAddr) ){
@@ -764,7 +764,7 @@ _obsolete_route_delete(SvDstAddr)
struct route_entry SrtEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvDstAddr) ){
@@ -813,7 +813,7 @@ _obsolete_route_get(SvDstAddr)
struct route_entry SrtEntry;
struct addr SadAddr;
char *StrAddr;
- int len;
+ long unsigned int len;

/* check input */
if( !SvOK(SvDstAddr) ){
2 changes: 1 addition & 1 deletion packages/perl-net-rawip/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkgdesc='Perl extension to manipulate raw IP packets with interface to B<libpcap
arch=('x86_64' 'aarch64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('libpcap>=1.3.0' 'perl')
depends=('libpcap-1.4' 'perl')
url='http://search.cpan.org/dist/Net-RawIP'
source=("http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/$_pkgname-$pkgver.tar.gz")
sha512sums=('c48c77389db9dc8d5c64d67e5c62bac5e3314dbc36bcfa51aa20d07224492edaa65f5c71d47ca0b804ac62b1b02387e172cd3561eadaa3a1a8040968b182b3ca')
Expand Down

0 comments on commit fad14da

Please sign in to comment.