source: trunk/dports/aqua/aquaterm/Portfile @ 29575

Last change on this file since 29575 was 29575, checked in by yves@…, 12 years ago

Remove cd command

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 29575 2007-09-30 14:37:26Z yves@macports.org $
2
3PortSystem              1.0
4
5name                    aquaterm
6version                 1.0.1
7categories              aqua math science
8maintainers             davidm@astro.berkeley.edu
9description             AquaTerm is a viewer that displays vector graphics on Mac OS X
10long_description        AquaTerm is a viewer app that displays vector \
11                                        graphics.  Other apps connect to AquaTerm using a \
12                                        simple remote object messaging protocol.  By adding \
13                                        "adapters" to legacy code very little coding is \
14                                        needed to bring it to OS X.
15platforms               darwin
16homepage                http://aquaterm.sourceforge.net/
17master_sites    sourceforge
18distname                ${name}_src.${version}
19checksums               md5 aquaterm_src.1.0.1.tar.gz e9d3ecdfe770d6f09a748add9886d1a9 \
20                                sha1 aquaterm_src.1.0.1.tar.gz d5770bb3a95cfae21c5c39c96171a52d9af8ae24 \
21                                rmd160 aquaterm_src.1.0.1.tar.gz 24410589dd8c3071b6e0d5e652b7d92933d86b5f
22worksrcdir              .
23
24patch {
25        # Change default location of AquaTerm.app to avoid requiring the
26        # use of AQUATERM_PATH.
27        reinplace "s|AquaTerm.app|MacPorts/AquaTerm.app|g" \
28                ${workpath}/aquaterm/AQTClientManager.m
29}
30
31configure {
32        reinplace "s|/Users/per/Documents/Source/aquaterm/||" \
33                ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj
34        reinplace "s|/tmp/AquaTerm.dst||" \
35                ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj
36        reinplace "s|/usr/local/lib|${prefix}/lib|" \
37                ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj
38        file mkdir ${workpath}/${name}/build/include
39        system "cd ${workpath}/${name} &&
40            ln -s ../.. build/include/aquaterm"
41
42        reinplace "s|/usr/local|${prefix}|g" \
43                ${workpath}/adapters/pgplot/ChangeLog \
44                ${workpath}/adapters/pgplot/g77_gcc_AQT.conf \
45                ${workpath}/adapters/pgplot/xlf_gcc_AQT.conf
46        reinplace "s|\$(HOME)|${prefix}|g" \
47                ${workpath}/adapters/c/Makefile \
48                ${workpath}/adapters/fortran/Makefile
49        reinplace "s|/*<PREFIX>|${prefix}|g" \
50                ${workpath}/adapters/pgplot/g77_cc_AQT.conf \
51                ${workpath}/adapters/pgplot/g77_gcc_AQT.conf \
52                ${workpath}/adapters/pgplot/xlf_gcc_AQT.conf
53        reinplace "s|/sw|${prefix}|g" \
54                ${workpath}/adapters/pgplot/ReadMe
55}
56
57set xcodebuilddir               build
58
59platform darwin 7 {
60         post-extract {
61                      cd ${workpath}/${name}
62                      file link -symbolic AquaTermFwk-Info.plist AquaTerm.framework-Info.plist
63        }
64}
65
66platform darwin 8 {
67if {$xcodeversion == "2.1"} {
68        set xcodebuilddir       build/Deployment
69}
70}
71
72build.type              pbx
73build.dir               ${workpath}/${name}
74build.target    -buildstyle Deployment -target AquaTerm
75post-build {
76        system "install_name_tool -id ${prefix}/lib/libaquaterm.1.dylib \
77                ${workpath}/${name}/${xcodebuilddir}/AquaTerm.framework/Versions/Current/AquaTerm"
78        system "install_name_tool -change /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm ${prefix}/lib/libaquaterm.1.dylib \
79                ${workpath}/${name}/${xcodebuilddir}/AquaTerm.app/Contents/MacOS/AquaTerm"
80}
81
82destroot {
83        xinstall -d -m 0755 ${destroot}/Applications/MacPorts
84        xinstall -d -m 0755 ${destroot}/Library/Frameworks
85        xinstall -d -m 0755 ${destroot}${prefix}/include/${name}
86        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
87
88        xinstall -m 0644 -W ${workpath}/${name} AQTAdapter.h aquaterm.h \
89                ${destroot}${prefix}/include/${name}
90
91        system "cd ${workpath}/${name}/${xcodebuilddir} &&
92            ln AquaTerm.framework/Versions/Current/AquaTerm libaquaterm.${version}.dylib &&
93            ln -s libaquaterm.${version}.dylib ${destroot}${prefix}/lib/libaquaterm.dylib &&
94            ln -s libaquaterm.${version}.dylib ${destroot}${prefix}/lib/libaquaterm.1.dylib"
95           
96        xinstall -m 0755 ${workpath}/${name}/${xcodebuilddir}/libaquaterm.${version}.dylib \
97            ${destroot}${prefix}/lib
98        copy ${workpath}/${name}/${xcodebuilddir}/AquaTerm.app \
99            ${destroot}/Applications/MacPorts
100        copy ${workpath}/${name}/${xcodebuilddir}/AquaTerm.framework \
101            ${destroot}/Library/Frameworks
102
103       
104        foreach f {c fortran gnuplot pgplot plplot} {
105            copy ${workpath}/adapters/$f ${destroot}${prefix}/share/${name}
106        }
107}
108
Note: See TracBrowser for help on using the repository browser.