Ticket #34346: aquaterm-v2.2.Portfile

File aquaterm-v2.2.Portfile, 2.6 KB (added by mojca (Mojca Miklavec), 13 years ago)

Repository includes adapters, but I need to find out how to change workpath properly

Line 
1# $Id: Portfile 85443 2011-10-13 23:51:45Z dports@macports.org $
2
3PortSystem              1.0
4PortGroup               xcode 1.0
5PortGroup               github 1.0
6
7github.setup            AquaTerm AquaTerm 1.1.1 tempv
8name                    aquaterm
9categories              aqua math science
10maintainers             mcalhoun openmaintainer
11license                 BSD
12description             AquaTerm is a viewer that displays vector graphics on Mac OS X
13long_description        AquaTerm is a viewer app that displays vector \
14                        graphics.  Other apps connect to AquaTerm using a \
15                        simple remote object messaging protocol.  By adding \
16                        \"adapters\" to legacy code very little coding is \
17                        needed to bring it to OS X.
18platforms               darwin
19homepage                http://aquaterm.sourceforge.net/
20
21checksums               rmd160  b31033699d2f7edbf78e669b872e8c7881230461 \
22                        sha256  d6216b10b4410c93c5f1b3c300543abc64a0c5ed2572fcebf822efb3cab0514f
23
24build.dir               ${worksrcpath}/aquaterm
25
26# we could set LOCAL_LIBRARY_DIR to ${prefix}/Library,
27# but since users can change --with-frameworks-dir variable, the only way to do it properly
28# seem to be modifying INSTALL_PATH to ensure aquaterm is installed into FRAMEWORKS_DIR.
29#
30# INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; -> INSTALL_PATH = "$(FRAMEWORKS_DIR)";
31post-patch {
32    reinplace "s|LOCAL_LIBRARY_DIR./Frameworks|FRAMEWORKS_DIR)|g" ${worksrcpath}/aquaterm/AquaTerm.xcodeproj/project.pbxproj
33}
34
35xcode.target            AquaTerm
36xcode.configuration     Default
37
38xcode.build.settings    USER_APPS_DIR=${applications_dir} FRAMEWORKS_DIR=${frameworks_dir}
39
40xcode.destroot.type     mixed
41xcode.destroot.settings USER_APPS_DIR=${applications_dir} FRAMEWORKS_DIR=${frameworks_dir}
42
43post-patch {
44    reinplace "s|/usr/local|${prefix}|g" \
45        ${worksrcpath}/adapters/pgplot/ChangeLog \
46        ${worksrcpath}/adapters/pgplot/g77_gcc_AQT.conf \
47        ${worksrcpath}/adapters/pgplot/xlf_gcc_AQT.conf
48    reinplace "s|\$(HOME)|${prefix}|g" \
49        ${worksrcpath}/adapters/c/Makefile \
50        ${worksrcpath}/adapters/fortran/Makefile
51    reinplace "s|/*<PREFIX>|${prefix}|g" \
52        ${worksrcpath}/adapters/pgplot/g77_cc_AQT.conf \
53        ${worksrcpath}/adapters/pgplot/g77_gcc_AQT.conf \
54        ${worksrcpath}/adapters/pgplot/xlf_gcc_AQT.conf
55    reinplace "s|/sw|${prefix}|g" \
56        ${worksrcpath}/adapters/pgplot/ReadMe
57}
58
59post-destroot {
60    xinstall -d -m 0755 ${destroot}${prefix}/share/AquaTerm
61    copy ${worksrcpath}/adapters ${destroot}${prefix}/share/AquaTerm
62}