aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2017-02-10 17:13:41 +0800
committerkrion <krion@FreeBSD.org>2017-02-10 17:13:41 +0800
commit419c7ec0d4c79c872e204c74416653324911335f (patch)
tree3303a1edcb2fcec592cdb61c9f46b0ee3fe90c16 /dns
parentccc2ed3a166e04caecae931a565fbcac23c2e6e2 (diff)
downloadfreebsd-ports-gnome-419c7ec0d4c79c872e204c74416653324911335f.tar.gz
freebsd-ports-gnome-419c7ec0d4c79c872e204c74416653324911335f.tar.zst
freebsd-ports-gnome-419c7ec0d4c79c872e204c74416653324911335f.zip
Fix stale dependencies.
PR: 216526 Submitted by: bhtooefr@gmail.com Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D9488
Diffstat (limited to 'dns')
-rw-r--r--dns/ddclient/Makefile5
-rw-r--r--dns/ddclient/files/patch-ddclient63
2 files changed, 56 insertions, 12 deletions
diff --git a/dns/ddclient/Makefile b/dns/ddclient/Makefile
index 662263c4a4f7..751c0b9ed871 100644
--- a/dns/ddclient/Makefile
+++ b/dns/ddclient/Makefile
@@ -3,6 +3,7 @@
PORTNAME= ddclient
PORTVERSION= 3.8.3
+PORTREVISION= 1
CATEGORIES= dns
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -18,7 +19,7 @@ USE_PERL5= run
USE_RC_SUBR= ${PORTNAME}
-RUN_DEPENDS= p5-JSON-Any>=0:converters/p5-JSON-Any
+RUN_DEPENDS= p5-JSON-PP>=0:converters/p5-JSON-PP
SUB_FILES= pkg-message ddclient_force
@@ -31,7 +32,7 @@ SSL_RUN_DEPENDS=ca_root_nss>0:security/ca_root_nss \
PORTDOCS= COPYRIGHT ChangeLog README.cisco README.ssl README.md \
sample-etc_cron.d_ddclient sample-etc_dhclient-exit-hooks \
sample-etc_dhcpc_dhcpcd-eth0.exe sample-etc_ppp_ip-up.local
-PLIST_FILES= etc/ddclient.conf.sample etc/periodic/daily/ddclient_force \
+PLIST_FILES= "@sample etc/ddclient.conf.sample" etc/periodic/daily/ddclient_force \
sbin/ddclient
post-patch:
diff --git a/dns/ddclient/files/patch-ddclient b/dns/ddclient/files/patch-ddclient
index 0891470636ac..9424ccd4615e 100644
--- a/dns/ddclient/files/patch-ddclient
+++ b/dns/ddclient/files/patch-ddclient
@@ -1,14 +1,14 @@
---- ./ddclient.orig 2011-07-25 19:41:39.000000000 -0700
-+++ ./ddclient 2011-07-25 19:41:48.000000000 -0700
-@@ -19,6 +18,7 @@
+--- ddclient.orig 2015-05-30 21:37:38.000000000 +1200
++++ ddclient 2017-02-08 11:00:23.812579000 +1300
+@@ -25,6 +25,7 @@
use Getopt::Long;
use Sys::Hostname;
use IO::Socket;
+use POSIX 'setsid';
- my ($VERSION) = q$Revision: 157 $ =~ /(\d+)/;
+ # my ($VERSION) = q$Revision: 184 $ =~ /(\d+)/;
-@@ -29,9 +29,9 @@
+@@ -35,9 +36,9 @@
$program =~ s/d$//;
my $now = time;
my $hostname = hostname();
@@ -21,7 +21,7 @@
my $msgs = '';
my $last_msgs = '';
-@@ -39,7 +39,7 @@
+@@ -45,7 +46,7 @@
local $file = '';
local $lineno = '';
@@ -30,7 +30,7 @@
sub T_ANY {'any'};
sub T_STRING {'string'};
-@@ -678,6 +678,9 @@
+@@ -743,6 +744,9 @@
;
} elsif (opt('daemon')) {
$SIG{'CHLD'} = 'IGNORE';
@@ -40,7 +40,7 @@
my $pid = fork;
if ($pid < 0) {
print STDERR "${program}: can not fork ($!)\n";
-@@ -685,10 +688,9 @@
+@@ -750,10 +754,9 @@
} elsif ($pid) {
exit 0;
}
@@ -53,7 +53,7 @@
}
# write out the pid file if we're daemon'ized
-@@ -1478,17 +1480,17 @@
+@@ -1544,17 +1547,17 @@
## execute the command.
local *FD;
if (! open(FD, $cmd)) {
@@ -75,7 +75,24 @@
} else {
$ok = 1;
-@@ -1878,6 +1880,7 @@
+@@ -1878,13 +1881,13 @@
+ ## load_json_support
+ ######################################################################
+ sub load_json_support {
+- my $json_loaded = eval {require JSON::Any};
++ my $json_loaded = eval {require JSON::PP};
+ unless ($json_loaded) {
+ fatal(<<"EOM");
+-Error loading the Perl module JSON::Any needed for cloudflare update.
++Error loading the Perl module JSON::PP needed for cloudflare update.
+ EOM
+ }
+- import JSON::Any;
++ import JSON::PP (qw/decode_json/);
+ }
+ ######################################################################
+ ## geturl
+@@ -1957,6 +1960,7 @@
$sd = IO::Socket::SSL->new(
PeerAddr => $peer,
PeerPort => $port,
@@ -83,3 +100,29 @@
Proto => 'tcp',
MultiHomed => 1,
Timeout => opt('timeout'),
+@@ -4096,9 +4100,9 @@
+
+ # Strip header
+ $reply =~ s/^.*?\n\n//s;
+- my $response = JSON::Any->jsonToObj($reply);
+- if ($response->{result} eq 'error') {
+- failed ("%s", $response->{msg});
++ my $response = eval {decode_json($reply)};
++ if (!defined $response || !defined $response->{result}) {
++ failed ("invalid json or result.");
+ next;
+ }
+
+@@ -4128,9 +4132,9 @@
+
+ # Strip header
+ $reply =~ s/^.*?\n\n//s;
+- $response = JSON::Any->jsonToObj($reply);
+- if ($response->{result} eq 'error') {
+- failed ("%s", $response->{msg});
++ $response = eval {decode_json($reply)};
++ if (!defined $response || !defined $response->{result}) {
++ failed ("invalid json or result.");
+ } else {
+ success ("%s -- Updated Successfully to %s", $domain, $ip);
+