# $Id: Portfile 29575 2007-09-30 14:37:26Z yves@macports.org $ PortSystem 1.0 name aquaterm version 1.0.1 categories aqua math science maintainers davidm@astro.berkeley.edu description AquaTerm is a viewer that displays vector graphics on Mac OS X long_description AquaTerm is a viewer app that displays vector \ graphics. Other apps connect to AquaTerm using a \ simple remote object messaging protocol. By adding \ "adapters" to legacy code very little coding is \ needed to bring it to OS X. platforms darwin homepage http://aquaterm.sourceforge.net/ master_sites sourceforge distname ${name}_src.${version} checksums md5 aquaterm_src.1.0.1.tar.gz e9d3ecdfe770d6f09a748add9886d1a9 \ sha1 aquaterm_src.1.0.1.tar.gz d5770bb3a95cfae21c5c39c96171a52d9af8ae24 \ rmd160 aquaterm_src.1.0.1.tar.gz 24410589dd8c3071b6e0d5e652b7d92933d86b5f worksrcdir . patch { # Change default location of AquaTerm.app to avoid requiring the # use of AQUATERM_PATH. reinplace "s|AquaTerm.app|MacPorts/AquaTerm.app|g" \ ${workpath}/aquaterm/AQTClientManager.m } configure { reinplace "s|/Users/per/Documents/Source/aquaterm/||" \ ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj reinplace "s|/tmp/AquaTerm.dst||" \ ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj reinplace "s|/usr/local/lib|${prefix}/lib|" \ ${workpath}/${name}/AquaTerm.pbproj/project.pbxproj file mkdir ${workpath}/${name}/build/include system "cd ${workpath}/${name} && ln -s ../.. build/include/aquaterm" reinplace "s|/usr/local|${prefix}|g" \ ${workpath}/adapters/pgplot/ChangeLog \ ${workpath}/adapters/pgplot/g77_gcc_AQT.conf \ ${workpath}/adapters/pgplot/xlf_gcc_AQT.conf reinplace "s|\$(HOME)|${prefix}|g" \ ${workpath}/adapters/c/Makefile \ ${workpath}/adapters/fortran/Makefile reinplace "s|/*|${prefix}|g" \ ${workpath}/adapters/pgplot/g77_cc_AQT.conf \ ${workpath}/adapters/pgplot/g77_gcc_AQT.conf \ ${workpath}/adapters/pgplot/xlf_gcc_AQT.conf reinplace "s|/sw|${prefix}|g" \ ${workpath}/adapters/pgplot/ReadMe } set xcodebuilddir build platform darwin 7 { post-extract { cd ${workpath}/${name} file link -symbolic AquaTermFwk-Info.plist AquaTerm.framework-Info.plist } } platform darwin 8 { if {$xcodeversion == "2.1"} { set xcodebuilddir build/Deployment } } build.type pbx build.dir ${workpath}/${name} build.target -buildstyle Deployment -target AquaTerm post-build { system "install_name_tool -id ${prefix}/lib/libaquaterm.1.dylib \ ${workpath}/${name}/${xcodebuilddir}/AquaTerm.framework/Versions/Current/AquaTerm" system "install_name_tool -change /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm ${prefix}/lib/libaquaterm.1.dylib \ ${workpath}/${name}/${xcodebuilddir}/AquaTerm.app/Contents/MacOS/AquaTerm" } destroot { xinstall -d -m 0755 ${destroot}/Applications/MacPorts xinstall -d -m 0755 ${destroot}/Library/Frameworks xinstall -d -m 0755 ${destroot}${prefix}/include/${name} xinstall -d -m 0755 ${destroot}${prefix}/share/${name} xinstall -m 0644 -W ${workpath}/${name} AQTAdapter.h aquaterm.h \ ${destroot}${prefix}/include/${name} system "cd ${workpath}/${name}/${xcodebuilddir} && ln AquaTerm.framework/Versions/Current/AquaTerm libaquaterm.${version}.dylib && ln -s libaquaterm.${version}.dylib ${destroot}${prefix}/lib/libaquaterm.dylib && ln -s libaquaterm.${version}.dylib ${destroot}${prefix}/lib/libaquaterm.1.dylib" xinstall -m 0755 ${workpath}/${name}/${xcodebuilddir}/libaquaterm.${version}.dylib \ ${destroot}${prefix}/lib copy ${workpath}/${name}/${xcodebuilddir}/AquaTerm.app \ ${destroot}/Applications/MacPorts copy ${workpath}/${name}/${xcodebuilddir}/AquaTerm.framework \ ${destroot}/Library/Frameworks foreach f {c fortran gnuplot pgplot plplot} { copy ${workpath}/adapters/$f ${destroot}${prefix}/share/${name} } }