Ticket #7109: Portfile.patch

File Portfile.patch, 3.6 KB (added by adfernandes (Andrew Fernandes), 18 years ago)

Patch the 1.0.b2 build to 1.0.0

  • Portfile

    old new  
    1 # $Id: Portfile,v 1.6 2005/08/11 21:33:14 rshaw Exp $
     1# $Id: $
     2
    23PortSystem              1.0
    34
    45name                    aquaterm
    5 version                 1.0.b2
    6 revision                1
     6version                 1.0.0
     7revision                0
    78categories              aqua math science
    89maintainers             darwinports@opendarwin.org
    910description             AquaTerm is a viewer that displays vector graphics on Mac OS X
     
    1617homepage                http://aquaterm.sourceforge.net/
    1718master_sites    sourceforge
    1819distname                ${name}_src.${version}
    19 checksums               md5 18208162ad73de4b69ff5e884240eb2e
    20 worksrcdir              ${name}_src
     20checksums       md5 aquaterm_src.1.0.0.tar.gz 937461dfefb62178bee960bfe88e0991 \
     21                                sha1 aquaterm_src.1.0.0.tar.gz b45f84265710fb39efa6ad8dd7b89bb5b00827b2 \
     22                                rmd160 aquaterm_src.1.0.0.tar.gz e89074ad5ab7ee610b3bc620143e895a53d8392f \
     23worksrcdir              .
    2124
    2225patch {
    2326        # gcc 4 cannot find aquaterm/AQTAdapter.h in ObjC source files.
    2427        # adding a -I would be the right thing to do, but I'm not sure about
    2528        # how to patch the ProjectBuilder project.
    2629        reinplace "s|#import <aquaterm/AQTAdapter.h>|#import \"AQTAdapter.h\"|g" \
    27                 ${worksrcpath}/aquaterm/Demo.m
     30                ${workpath}/aquaterm/Demo.m
    2831        reinplace "s|#import <aquaterm/AQTAdapter.h>|#import \"AQTAdapter.h\"|g" \
    29                 ${worksrcpath}/aquaterm/Bugs.m
     32                ${workpath}/aquaterm/Bugs.m
    3033        reinplace "s|#import <aquaterm/AQTAdapter.h>|#import \"AQTAdapter.h\"|g" \
    31                 ${worksrcpath}/aquaterm/Timing.m
     34                ${workpath}/aquaterm/Timing.m
    3235}
    3336
    3437configure {
    35         cd ${worksrcpath}/${name}
     38        cd ${workpath}/${name}
    3639        reinplace "s|/Users/per/Documents/Source/aquaterm/||" \
    3740                AquaTerm.pbproj/project.pbxproj
    3841        reinplace "s|/tmp/AquaTerm.dst||" \
     
    4245        file mkdir build/include
    4346        system "ln -s ../.. build/include/aquaterm"
    4447
    45         cd ${worksrcpath}/adapters
     48        cd ${workpath}/adapters
    4649        reinplace "s|/usr/local|${prefix}|g" \
    4750                pgplot/ChangeLog pgplot/g77_gcc_AQT.conf pgplot/xlf_gcc_AQT.conf
    4851        reinplace "s|\$(HOME)|${prefix}|g" \
     
    6164}
    6265
    6366build.type              pbx
    64 build.dir               ${worksrcpath}/${name}
     67build.dir               ${workpath}/${name}
    6568build.target    -buildstyle Deployment -target AquaTerm
    6669post-build {
    6770        system "install_name_tool -id ${prefix}/lib/libaquaterm.1.dylib \
    68                 ${worksrcpath}/${name}/${xcodebuilddir}/libaquaterm.1.0.0.dylib"
    69         system "install_name_tool -change ${prefix}/lib/libaquaterm.1.0.0.dylib ${prefix}/lib/libaquaterm.1.dylib \
    70                 ${worksrcpath}/${name}/${xcodebuilddir}/AquaTerm.app/Contents/MacOS/AquaTerm"
     71                ${workpath}/${name}/${xcodebuilddir}/AquaTerm.framework/Versions/Current/AquaTerm"
     72        system "install_name_tool -change /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm ${prefix}/lib/libaquaterm.1.dylib \
     73                ${workpath}/${name}/${xcodebuilddir}/AquaTerm.app/Contents/MacOS/AquaTerm"
    7174}
    7275
    7376destroot {
    74         cd ${worksrcpath}/${name}
     77        cd ${workpath}/${name}
    7578        xinstall -d -m 0755 ${destroot}${prefix}/include/${name}
    7679        xinstall -m 0644 AQTAdapter.h aquaterm.h \
    7780                ${destroot}${prefix}/include/${name}
    7881
    79         cd ${worksrcpath}/${name}/${xcodebuilddir}
     82        cd ${workpath}/${name}/${xcodebuilddir}
     83        system "ln AquaTerm.framework/Versions/Current/AquaTerm libaquaterm.1.0.0.dylib"
    8084        xinstall -m 0755 libaquaterm.1.0.0.dylib ${destroot}${prefix}/lib
    8185        system "ln -s libaquaterm.1.0.0.dylib \
    8286                ${destroot}${prefix}/lib/libaquaterm.dylib"
     
    8589        xinstall -d -m 0755 ${destroot}/Applications/DarwinPorts
    8690        system "cp -R AquaTerm.app ${destroot}/Applications/DarwinPorts"
    8791
    88         cd ${worksrcpath}/adapters
     92        cd ${workpath}/adapters
    8993        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
    9094        system "cp -R c fortran gnuplot pgplot plplot \
    9195                ${destroot}${prefix}/share/${name}"