[143668] trunk/dports/aqua/PsyncX
ryandesign at macports.org
ryandesign at macports.org
Thu Dec 17 03:42:45 PST 2015
Revision: 143668
https://trac.macports.org/changeset/143668
Author: ryandesign at macports.org
Date: 2015-12-17 03:42:44 -0800 (Thu, 17 Dec 2015)
Log Message:
-----------
PsyncX: use perl5.22; make logfile writable; run psync 32-bit because it uses Carbon
Modified Paths:
--------------
trunk/dports/aqua/PsyncX/Portfile
trunk/dports/aqua/PsyncX/files/patch-runpsync.diff
trunk/dports/aqua/PsyncX/files/runpsync
Modified: trunk/dports/aqua/PsyncX/Portfile
===================================================================
--- trunk/dports/aqua/PsyncX/Portfile 2015-12-17 11:37:20 UTC (rev 143667)
+++ trunk/dports/aqua/PsyncX/Portfile 2015-12-17 11:42:44 UTC (rev 143668)
@@ -2,11 +2,12 @@
# $Id$
PortSystem 1.0
+PortGroup perl5 1.0
PortGroup xcode 1.0
name PsyncX
version 2.2.2
-revision 2
+revision 3
categories aqua sysutils
maintainers ryandesign openmaintainer
homepage http://psyncx.sourceforge.net/
@@ -23,11 +24,12 @@
svn.revision 29
worksrcdir trunk
-set perl_version 5.16
-depends_lib port:perl${perl_version} \
- port:p${perl_version}-macosx-file
+perl5.branches 5.22
-# p5.12-macosx-file is 32-bit only
+depends_lib port:perl${perl5.major} \
+ port:p${perl5.major}-macosx-file
+
+# p5-macosx-file is 32-bit only
supported_archs i386 ppc
# I don't know why these files aren't in the psyncx subversion repository.
@@ -49,16 +51,23 @@
${worksrcpath}/CronController.m \
${worksrcpath}/CronJob.m \
${worksrcpath}/runpsync
- reinplace "s|@PERL@|${prefix}/bin/perl${perl_version}|g" \
+ reinplace "s|@PERL@|${perl5.bin}|g" \
${worksrcpath}/psyncapplescript \
${worksrcpath}/psyncwriter \
${worksrcpath}/runpsync
+ reinplace "s|@PSYNC@|${prefix}/bin/psync-${perl5.major}|g" \
+ ${worksrcpath}/runpsync
}
post-destroot {
xinstall -W ${worksrcpath} psyncwriter runpsync ${destroot}${prefix}/bin
}
+post-activate {
+ touch ${prefix}/var/log/psync.log
+ file attributes ${prefix}/var/log/psync.log -permissions a+rw
+}
+
# "PsyncX is officially unsupported" —http://psyncx.sourceforge.net/
livecheck.type none
Modified: trunk/dports/aqua/PsyncX/files/patch-runpsync.diff
===================================================================
--- trunk/dports/aqua/PsyncX/files/patch-runpsync.diff 2015-12-17 11:37:20 UTC (rev 143667)
+++ trunk/dports/aqua/PsyncX/files/patch-runpsync.diff 2015-12-17 11:42:44 UTC (rev 143668)
@@ -1,13 +1,22 @@
---- runpsync.orig 2006-07-17 00:42:35.000000000 -0500
-+++ runpsync 2011-05-07 23:24:24.000000000 -0500
+--- runpsync.orig 2015-12-17 05:29:52.000000000 -0600
++++ runpsync 2015-12-17 05:31:03.000000000 -0600
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@PERL@
### Copyright 2003 AcornSoft ###
-@@ -43,11 +43,11 @@
+@@ -13,7 +13,7 @@
+ $arch = "";
+ }
+-$psync = "$arch/usr/local/bin/psync";
++$psync = "$arch at PSYNC@";
+
+ # Turn off buffering
+ $|=1;
+@@ -56,8 +56,8 @@
+
if(-d $mainHD && -d $secondHD) {
-print `touch /var/log/psync.log`;
@@ -16,12 +25,8 @@
+open(STDOUT, "| tee @PREFIX@/var/log/psync.log");
$now=localtime();
print "Backup begun $now\n";
--open(INPUT, "/usr/local/bin/psync $d $f $r '$mainHD' '$secondHD'|");
-+open(INPUT, "@PREFIX@/bin/psync $d $f $r '$mainHD' '$secondHD'|");
-
- while(<INPUT>) {
- print $_;
-@@ -58,7 +58,7 @@
+ open(INPUT, "$psync $d $f $r '$mainHD' '$secondHD'|");
+@@ -71,7 +71,7 @@
close STDOUT;
} # end if
else {
Modified: trunk/dports/aqua/PsyncX/files/runpsync
===================================================================
--- trunk/dports/aqua/PsyncX/files/runpsync 2015-12-17 11:37:20 UTC (rev 143667)
+++ trunk/dports/aqua/PsyncX/files/runpsync 2015-12-17 11:42:44 UTC (rev 143668)
@@ -2,6 +2,19 @@
### Copyright 2003 AcornSoft ###
+use Config;
+$osx_version = qx/sw_vers -productVersion | cut -d . -f 2/;
+chomp $osx_version;
+if ($osx_version > 4) {
+# run 32-bit because MacOSX::File uses Carbon
+$arch = "/usr/bin/arch -" . (substr($Config{byteorder}, 0, 1) == "1" ? "i386" : "ppc") . " ";
+} else {
+# arch on 10.4 and earlier doesn't have this capability
+$arch = "";
+}
+
+$psync = "$arch/usr/local/bin/psync";
+
# Turn off buffering
$|=1;
@@ -47,13 +60,13 @@
open(STDOUT, "| tee /var/log/psync.log");
$now=localtime();
print "Backup begun $now\n";
-open(INPUT, "/usr/local/bin/psync $d $f $r '$mainHD' '$secondHD'|");
+open(INPUT, "$psync $d $f $r '$mainHD' '$secondHD'|");
while(<INPUT>) {
print $_;
}
$now=localtime();
-print "Backup completed: $now";
+print "Backup completed: $now\n";
close INPUT;
close STDOUT;
} # end if
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151217/267e7521/attachment.html>
More information about the macports-changes
mailing list