source: trunk/dports/textproc/gpsbabel/Portfile @ 12733

Last change on this file since 12733 was 11008, checked in by rshaw, 15 years ago

Updated to gpsbabel release 1.2.4
Adds building of MacGPSBabel.app on Darwin/MacOSX

  • Property svn:eol-style set to native
File size: 3.1 KB
Line 
1# $Id: Portfile,v 1.2 2005/02/16 05:45:14 rshaw Exp $
2PortSystem              1.0
3
4name            gpsbabel
5version         1.2.4
6categories      textproc comms
7maintainers     thomas+darwinports@stromberg.org rshaw@opendarwin.org
8description     GPSBabel converts/uploads GPS waypoints, tracks, and routes
9long_description        GPSBabel converts GPS waypoints, tracks, and routes \
10                                        from one format to another, whether that format is a \
11                                        common mapping format like Delorme, Streets and \
12                                        Trips, or even a serial upload or download to a GPS \
13                                        unit such as those from Garmin and Magellan.
14homepage                http://gpsbabel.sourceforge.net
15platforms               darwin
16master_sites    sourceforge
17checksums               md5 90adf3f0aabbe2c63ed1054465629525
18
19depends_lib             lib:libexpat.0:expat
20
21# Note: Not yet supported on MacOSX, but may work on others
22variant usb {
23        depends_lib-append      lib:libusb-0.1.4:libusb
24        build.args-delete       LIBEXPAT="-L${prefix}/lib -lexpat"
25        build.args-append       LIBEXPAT="-L${prefix}/lib -lexpat -lusb" \
26                                                INHIBIT_USB=""
27}
28
29variant tk {
30        depends_run                     bin:wish:tk
31        patchfiles-append       patch-guibabel
32        post-destroot {
33                xinstall -m 0755 ${worksrcpath}/guibabel ${destroot}${prefix}/bin
34        }
35}
36
37use_configure   no
38build.args              EXTRA_CFLAGS="-I${prefix}/include" \
39                                LIBEXPAT="-L${prefix}/lib -lexpat"
40
41destroot {
42        cd ${worksrcpath}
43        xinstall -m 0755 -d ${destroot}${prefix}/bin
44        xinstall -m 0755 gpsbabel ${destroot}${prefix}/bin/
45        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
46        xinstall -m 0644 README README.contrib README.magnav \
47                README.mapconverter README.psp README.xmapwpt \
48                ${destroot}${prefix}/share/doc/${name}
49        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}/contrib
50        xinstall -m 0644 contrib/correctCoordinates.pl contrib/gpx2xfig \
51                ${destroot}${prefix}/share/doc/${name}/contrib
52}
53
54platform darwin {
55        patchfiles-append       patch-project.pbxproj
56        post-patch {
57                # Patch with version from pre-compiled application for now.
58                # Authors have been notified of these changes for future
59                # release.
60                file copy -force ${filespath}/objects.nib \
61                        ${worksrcpath}/macgpsbabel/English.lproj/MainMenu.nib
62                file copy -force ${filespath}/InfoPlist.strings \
63                        ${worksrcpath}/macgpsbabel/English.lproj
64                reinplace "s|__VERSION|${version}_${revision} (DarwinPorts)|" \
65                        ${worksrcpath}/macgpsbabel/English.lproj/InfoPlist.strings
66        }
67        post-configure {
68                # test whether or not we can compile AppleScript
69                ui_info "Checking for AppleScript support ..."
70                cd ${worksrcpath}/macgpsbabel
71                if {[catch "exec osacompile -o conftest -e nop" output]} {
72                        ui_info "$output"
73                        ui_info "... MacGPSBabel.app will NOT be built."
74                } else {
75                        ui_info "... MacGPSBabel.app can be built."
76                }
77        }
78        post-build {
79                if {[file exist ${worksrcpath}/macgpsbabel/conftest]} {
80                        build.dir               "${worksrcpath}/macgpsbabel"
81                        build.type              pbx
82                        build.target    -buildstyle Deployment -target MacGPSBabel
83                        build.args
84                        system "[command build]"
85                }
86        }
87        post-destroot {
88                if {[file exist ${worksrcpath}/macgpsbabel/conftest]} {
89                        cd ${worksrcpath}/macgpsbabel/build
90                        xinstall -d -m 0755 ${destroot}/Applications/DarwinPorts
91                        system "cp -R MacGPSBabel.app ${destroot}/Applications/DarwinPorts"
92                }
93        }
94}
95
Note: See TracBrowser for help on using the repository browser.