1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

- fix with non-standard PREFIX/LOCALBASE

- fix error with undefined variables on some services. This is upstream ticket #2:
  http://sourceforge.net/apps/trac/ddclient/ticket/2

PR:		ports/155486
Submitted by:	Rob Farmer (maintainer)
This commit is contained in:
Max Brazhnikov 2011-03-13 14:53:21 +00:00
parent 1c16116ec7
commit d725cb21aa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270795
2 changed files with 26 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= ddclient
PORTVERSION= 3.8.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= dns
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@ -35,11 +35,13 @@ PORTDOCS= COPYING COPYRIGHT Changelog README README.cisco README.ssl \
post-patch:
@${GREP} -lr '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g'
@${REINPLACE_CMD} \
-e 's|/etc/ddclient|${PREFIX}/etc|' \
-e 's|/tmp|/var/tmp|' \
-e 's|/var/cache/ddclient|/var/tmp|' \
-e '/PATH/s|/etc:/usr/local/lib:||' \
-e 's|/usr.*perl|${PERL}|g' ${WRKSRC}/ddclient
-e 's|/usr.*perl|${PERL}|g' \
-e 's|/usr/local|${LOCALBASE}|g' \
-e 's|/etc/ddclient|${PREFIX}/etc|' \
${WRKSRC}/ddclient
do-install:
@${INSTALL_DATA} ${WRKSRC}/sample-etc_ddclient.conf ${PREFIX}/etc/ddclient.conf.sample

View File

@ -0,0 +1,21 @@
--- ddclient.orig 2011-03-11 00:00:19.394750047 -0800
+++ ddclient 2011-03-11 00:04:28.967751644 -0800
@@ -2094,10 +2094,14 @@
} elsif (defined($sub) && &$sub($host)) {
$update = 1;
- } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) ||
- ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) ||
- ($cache{$host}{'mx'} ne $config{$host}{'mx'}) ||
- ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) {
+ } elsif ((defined($cache{$host}{'static'}) && defined($config{$host}{'static'}) &&
+ ($cache{$host}{'static'} ne $config{$host}{'static'})) ||
+ (defined($cache{$host}{'wildcard'}) && defined($config{$host}{'wildcard'}) &&
+ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'})) ||
+ (defined($cache{$host}{'mx'}) && defined($config{$host}{'mx'}) &&
+ ($cache{$host}{'mx'} ne $config{$host}{'mx'})) ||
+ (defined($cache{$host}{'backupmx'}) && defined($config{$host}{'backupmx'}) &&
+ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) ) {
info("updating %s because host settings have been changed.", $host);
$update = 1;