View | Details | Raw Unified | Return to bug 183684
Collapse All | Expand All

(-)./Makefile (-11 / +3 lines)
Lines 2-14 Link Here
2
# $FreeBSD: net-mgmt/p5-FusionInventory-Agent-Task-NetDiscovery/Makefile 327757 2013-09-20 22:24:43Z bapt $
2
# $FreeBSD: net-mgmt/p5-FusionInventory-Agent-Task-NetDiscovery/Makefile 327757 2013-09-20 22:24:43Z bapt $
3
3
4
PORTNAME=	FusionInventory-Agent-Task-NetDiscovery
4
PORTNAME=	FusionInventory-Agent-Task-NetDiscovery
5
PORTVERSION=	1.5
5
PORTVERSION=	2.1
6
CATEGORIES=	net-mgmt
6
CATEGORIES=	net-mgmt
7
MASTER_SITES=	CPAN
7
MASTER_SITES=	CPAN
8
MASTER_SITE_SUBDIR=	CPAN:FUSINV
8
MASTER_SITE_SUBDIR=	CPAN:FUSINV
9
PKGNAMEPREFIX=	p5-
9
PKGNAMEPREFIX=	p5-
10
10
11
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	5u623l20@gmail.com
12
COMMENT=	Network discovery support for FusionInventory Agent
12
COMMENT=	Network discovery support for FusionInventory Agent
13
13
14
LICENSE=	GPLv2
14
LICENSE=	GPLv2
Lines 22-36 Link Here
22
		p5-XML-TreePP>=0:${PORTSDIR}/textproc/p5-XML-TreePP
22
		p5-XML-TreePP>=0:${PORTSDIR}/textproc/p5-XML-TreePP
23
RUN_DEPENDS:=	${BUILD_DEPENDS}
23
RUN_DEPENDS:=	${BUILD_DEPENDS}
24
24
25
MAN3=		FusionInventory::Agent::Task::NetDiscovery.3
26
27
USES=		perl5
25
USES=		perl5
28
USE_PERL5=	configure
26
USE_PERL5=	configure
29
27
30
NO_STAGE=	yes
28
.include <bsd.port.mk>
31
.include <bsd.port.pre.mk>
32
33
post-patch:
34
	${RM} ${WRKSRC}/lib/FusionInventory/Agent/Task/NetDiscovery.pm.orig
35
36
.include <bsd.port.post.mk>
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (FusionInventory-Agent-Task-NetDiscovery-1.5.tar.gz) = ed1c07f41ef1f769d8396c9ba33de6b3dac32e0b7cf4cf35ce436f2642d74985
1
SHA256 (FusionInventory-Agent-Task-NetDiscovery-2.1.tar.gz) = 868ed07ef563bda7d1d6cb7bfb27239c8a6215f256a3a2f572668068e3a51c9a
2
SIZE (FusionInventory-Agent-Task-NetDiscovery-1.5.tar.gz) = 66587
2
SIZE (FusionInventory-Agent-Task-NetDiscovery-2.1.tar.gz) = 47603
(-)./files/patch-Makefile.PL (+72 lines)
Line 0 Link Here
1
--- Makefile.PL.orig	2013-11-05 19:35:08.000000000 +0600
2
+++ Makefile.PL	2013-11-05 19:36:19.000000000 +0600
3
@@ -37,69 +37,3 @@
4
 requires 'Net::SNMP'              => undef;
5
 
6
 WriteAll;
7
-
8
-# substitute prefix everywhere
9
-$MY::variables{DATADIR} =~ s/\$\(PREFIX\)/$MY::variables{PREFIX}/;
10
-
11
-print <<EOF;
12
-
13
-Installation summary
14
---------------------
15
-prefix: $MY::variables{PREFIX}
16
-constant data installation directory: $MY::variables{DATADIR}
17
-
18
-EOF
19
-
20
-package MY;
21
-
22
-our %setup;
23
-our %variables;
24
-
25
-# force a perl-independant prefix for everything but perl modules
26
-sub constants {
27
-    my ($self) = @_;
28
-
29
-    # for some reason, initialising variables from the global scope doesn't work
30
-    %variables = (
31
-        PREFIX               => '/usr/local',
32
-        INSTALLLIB           => '$(DATADIR)/lib',
33
-        INSTALLSITELIB       => '$(DATADIR)/lib',
34
-        INSTALLVENDORLIB     => '$(DATADIR)/lib',
35
-        INSTALLMAN3DIR       => '$(PREFIX)/share/man/man3',
36
-        INSTALLSITEMAN3DIR   => '$(PREFIX)/share/man/man3',
37
-        INSTALLVENDORMAN3DIR => '$(PREFIX)/share/man/man3',
38
-        DATADIR              => '$(PREFIX)/share/fusioninventory',
39
-        FULLPERLRUN          => '$(FULLPERL) -I$(DATADIR)/lib'
40
-    );
41
-
42
-    # allow variables detected from agent setup to override defaults
43
-    foreach my $name (keys %variables) {
44
-        $variables{$name} = $setup{$name} if $setup{$name};
45
-    }
46
-
47
-    # allow variables defined on command line to override defaults
48
-    foreach my $name (keys %variables) {
49
-        $variables{$name} = $self->{ARGS}->{$name} if $self->{ARGS}->{$name};
50
-    }
51
-
52
-    # get all standard MM variables definitions, and override them if needed
53
-    my @code = split(/\n/, $self->SUPER::constants(@_));
54
-    foreach my $line (@code) {
55
-        # Skip comments
56
-        next if $line =~ /^\s*#/;
57
-        # Skip everything which isn't a var assignment.
58
-        next unless $line =~ /^([A-Z0-9_]+) =/;
59
-        my $name = $1;
60
-        # skip variables we're not interested
61
-        next unless $variables{$name};
62
-
63
-        $line = "$name = $variables{$name}";
64
-    }
65
-
66
-    # add out own variables
67
-    foreach my $name (qw/DATADIR/) {
68
-        push @code, "$name = $variables{$name}";
69
-    }
70
-
71
-    return join("\n", @code);
72
-}
(-)./files/patch-lib-FusionInventory-Agent-Task-NetDiscovery.pm (-11 lines)
Lines 1-11 Link Here
1
--- lib/FusionInventory/Agent/Task/NetDiscovery.pm	2011-05-05 13:42:10.000000000 +0200
2
+++ lib/FusionInventory/Agent/Task/NetDiscovery.pm	2012-02-14 16:04:54.652712095 +0100
3
@@ -41,7 +41,7 @@
4
 
5
     $s .= $_ foreach @_;
6
 
7
-    return unless $s =~ /Nmap version (\S+) /;
8
+    return unless $s =~ /Nmap version (\d*\.?\d+)/;
9
 
10
     return $1;
11
 }
(-)./pkg-plist (-2 / +5 lines)
Lines 1-5 Link Here
1
%%SITE_PERL%%/FusionInventory/Agent/SNMP.pm
1
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery.pm
2
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery.pm
2
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Dico.pm
3
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Dictionary.pm
3
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Alcatel.pm
4
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Alcatel.pm
4
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Axis.pm
5
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Axis.pm
5
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Ddwrt.pm
6
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Ddwrt.pm
Lines 11-17 Link Here
11
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Samsung.pm
12
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Samsung.pm
12
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Wyse.pm
13
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Wyse.pm
13
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Zebranet.pm
14
%%SITE_PERL%%/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/Zebranet.pm
14
%%SITE_PERL%%/mach/auto/FusionInventory/Agent/Task/NetDiscovery/.packlist
15
%%PERL5_MAN3%%/FusionInventory::Agent::Task::NetDiscovery::Dictionary.3.gz
16
%%PERL5_MAN3%%/FusionInventory::Agent::Task::NetDiscovery.3.gz
17
%%PERL5_MAN3%%/FusionInventory::Agent::SNMP.3.gz
15
@dirrm %%SITE_PERL%%/mach/auto/FusionInventory/Agent/Task/NetDiscovery
18
@dirrm %%SITE_PERL%%/mach/auto/FusionInventory/Agent/Task/NetDiscovery
16
@dirrmtry %%SITE_PERL%%/mach/auto/FusionInventory/Agent/Task
19
@dirrmtry %%SITE_PERL%%/mach/auto/FusionInventory/Agent/Task
17
@dirrmtry %%SITE_PERL%%/mach/auto/FusionInventory/Agent
20
@dirrmtry %%SITE_PERL%%/mach/auto/FusionInventory/Agent

Return to bug 183684