Changeset 143668


Ignore:
Timestamp:
Dec 17, 2015, 11:42:44 AM (3 years ago)
Author:
ryandesign@…
Message:

PsyncX: use perl5.22; make logfile writable; run psync 32-bit because it uses Carbon

Location:
trunk/dports/aqua/PsyncX
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/PsyncX/Portfile

    r122473 r143668  
    33
    44PortSystem          1.0
     5PortGroup           perl5 1.0
    56PortGroup           xcode 1.0
    67
    78name                PsyncX
    89version             2.2.2
    9 revision            2
     10revision            3
    1011categories          aqua sysutils
    1112maintainers         ryandesign openmaintainer
     
    2425worksrcdir          trunk
    2526
    26 set perl_version    5.16
    27 depends_lib         port:perl${perl_version} \
    28                     port:p${perl_version}-macosx-file
     27perl5.branches      5.22
    2928
    30 # p5.12-macosx-file is 32-bit only
     29depends_lib         port:perl${perl5.major} \
     30                    port:p${perl5.major}-macosx-file
     31
     32# p5-macosx-file is 32-bit only
    3133supported_archs     i386 ppc
    3234
     
    5052                    ${worksrcpath}/CronJob.m \
    5153                    ${worksrcpath}/runpsync
    52     reinplace "s|@PERL@|${prefix}/bin/perl${perl_version}|g" \
     54    reinplace "s|@PERL@|${perl5.bin}|g" \
    5355                    ${worksrcpath}/psyncapplescript \
    5456                    ${worksrcpath}/psyncwriter \
     57                    ${worksrcpath}/runpsync
     58    reinplace "s|@PSYNC@|${prefix}/bin/psync-${perl5.major}|g" \
    5559                    ${worksrcpath}/runpsync
    5660}
     
    5862post-destroot {
    5963    xinstall -W ${worksrcpath} psyncwriter runpsync ${destroot}${prefix}/bin
     64}
     65
     66post-activate {
     67    touch ${prefix}/var/log/psync.log
     68    file attributes ${prefix}/var/log/psync.log -permissions a+rw
    6069}
    6170
  • trunk/dports/aqua/PsyncX/files/patch-runpsync.diff

    r122473 r143668  
    1 --- runpsync.orig       2006-07-17 00:42:35.000000000 -0500
    2 +++ runpsync    2011-05-07 23:24:24.000000000 -0500
     1--- runpsync.orig       2015-12-17 05:29:52.000000000 -0600
     2+++ runpsync    2015-12-17 05:31:03.000000000 -0600
    33@@ -1,4 +1,4 @@
    44-#!/usr/bin/perl
     
    77 ### Copyright 2003 AcornSoft ###
    88 
    9 @@ -43,11 +43,11 @@
     9@@ -13,7 +13,7 @@
     10 $arch = "";
     11 }
     12 
     13-$psync = "$arch/usr/local/bin/psync";
     14+$psync = "$arch@PSYNC@";
     15 
     16 # Turn off buffering
     17 $|=1;
     18@@ -56,8 +56,8 @@
    1019 
    1120 if(-d $mainHD && -d $secondHD) {
     
    1726 $now=localtime();
    1827 print "Backup begun $now\n";
    19 -open(INPUT, "/usr/local/bin/psync $d $f $r '$mainHD' '$secondHD'|");
    20 +open(INPUT, "@PREFIX@/bin/psync $d $f $r '$mainHD' '$secondHD'|");
    21  
    22  while(<INPUT>) {
    23  print $_;
    24 @@ -58,7 +58,7 @@
     28 open(INPUT, "$psync $d $f $r '$mainHD' '$secondHD'|");
     29@@ -71,7 +71,7 @@
    2530 close STDOUT;
    2631 } # end if
  • trunk/dports/aqua/PsyncX/files/runpsync

    r78445 r143668  
    22
    33### Copyright 2003 AcornSoft ###
     4
     5use Config;
     6$osx_version = qx/sw_vers -productVersion | cut -d . -f 2/;
     7chomp $osx_version;
     8if ($osx_version > 4) {
     9# run 32-bit because MacOSX::File uses Carbon
     10$arch = "/usr/bin/arch -" . (substr($Config{byteorder}, 0, 1) == "1" ? "i386" : "ppc") . " ";
     11} else {
     12# arch on 10.4 and earlier doesn't have this capability
     13$arch = "";
     14}
     15
     16$psync = "$arch/usr/local/bin/psync";
    417
    518# Turn off buffering
     
    4861$now=localtime();
    4962print "Backup begun $now\n";
    50 open(INPUT, "/usr/local/bin/psync $d $f $r '$mainHD' '$secondHD'|");
     63open(INPUT, "$psync $d $f $r '$mainHD' '$secondHD'|");
    5164
    5265while(<INPUT>) {
     
    5467}
    5568$now=localtime();
    56 print "Backup completed: $now";
     69print "Backup completed: $now\n";
    5770close INPUT;
    5871close STDOUT;
Note: See TracChangeset for help on using the changeset viewer.