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

Last change on this file since 23263 was 21859, checked in by rhwood@…, 13 years ago

Change /Applications/DarwinPorts to /Applications/MacPorts everywhere

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 21859 2007-02-10 17:04:17Z rhwood@macports.org $
2PortSystem              1.0
3
4name            gpsbabel
5version         1.2.7
6categories      textproc comms
7maintainers     thomas+darwinports@stromberg.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 535da9798714e53a9584e22ac7d651d3
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       LIBUSB="" \
25                            INHIBIT_USB="-DNO_USB"
26        build.args-append       LIBUSB="-lusb /System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation /System/Library/Frameworks/IOKit.framework/Versions/Current/IOKit" \
27                            INHIBIT_USB="" \
28                                               
29}
30
31variant tk {
32        depends_run                     bin:wish:tk
33        patchfiles-append       patch-guibabel
34        post-destroot {
35                xinstall -m 0755 ${worksrcpath}/guibabel ${destroot}${prefix}/bin
36        }
37}
38
39use_configure   no
40build.args              EXTRA_CFLAGS="-I${prefix}/include" \
41                                LIBEXPAT="-L${prefix}/lib -lexpat" \
42                                LIBUSB="" \
43                                INHIBIT_USB="-DNO_USB"
44
45destroot {
46        cd ${worksrcpath}
47        xinstall -m 0755 -d ${destroot}${prefix}/bin
48        xinstall -m 0755 gpsbabel ${destroot}${prefix}/bin/
49        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
50        xinstall -m 0644 README README.contrib README.magnav \
51                README.mapconverter README.psp README.xmapwpt \
52                ${destroot}${prefix}/share/doc/${name}
53        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}/contrib
54        xinstall -m 0644 contrib/correctCoordinates.pl contrib/gpx2xfig \
55                ${destroot}${prefix}/share/doc/${name}/contrib
56}
57
58platform darwin {
59        post-patch {
60                # Patch with version from pre-compiled application for now.
61                # Authors have been notified of these changes for future
62                # release.
63                file copy -force ${filespath}/objects.nib \
64                        ${worksrcpath}/macgpsbabel/English.lproj/MainMenu.nib
65                file copy -force ${filespath}/InfoPlist.strings \
66                        ${worksrcpath}/macgpsbabel/English.lproj
67                reinplace "s|__VERSION|${version}_${revision} (DarwinPorts)|" \
68                        ${worksrcpath}/macgpsbabel/English.lproj/InfoPlist.strings
69        }
70        post-configure {
71                # test whether or not we can compile AppleScript
72                ui_info "Checking for AppleScript support ..."
73                cd ${worksrcpath}/macgpsbabel
74                if {[catch "exec osacompile -o conftest -e nop" output]} {
75                        ui_info "$output"
76                        ui_info "... MacGPSBabel.app will NOT be built."
77                } else {
78                        ui_info "... MacGPSBabel.app can be built."
79                }
80        }
81        post-build {
82                if {[file exist ${worksrcpath}/macgpsbabel/conftest]} {
83                        build.dir               "${worksrcpath}/macgpsbabel"
84                        build.type              pbx
85                        build.target    -buildstyle Deployment -target MacGPSBabel
86                        build.args
87                        system "[command build]"
88                }
89        }
90        post-destroot {
91                if {[file exist ${worksrcpath}/macgpsbabel/conftest]} {
92                        if {$xcodeversion == "2.1"} {
93                            cd ${worksrcpath}/macgpsbabel/build/Deployment
94                        } else {
95                            cd ${worksrcpath}/macgpsbabel/build
96                        }
97                        xinstall -d -m 0755 ${destroot}/Applications/MacPorts
98                        system "cp -R MacGPSBabel.app ${destroot}/Applications/MacPorts"
99                }
100        }
101}
102
Note: See TracBrowser for help on using the repository browser.