# $Id: Portfile,v 1.2 2005/02/16 05:45:14 rshaw Exp $ PortSystem 1.0 name gpsbabel version 1.2.4 categories textproc comms maintainers thomas+darwinports@stromberg.org rshaw@opendarwin.org description GPSBabel converts/uploads GPS waypoints, tracks, and routes long_description GPSBabel converts GPS waypoints, tracks, and routes \ from one format to another, whether that format is a \ common mapping format like Delorme, Streets and \ Trips, or even a serial upload or download to a GPS \ unit such as those from Garmin and Magellan. homepage http://gpsbabel.sourceforge.net platforms darwin master_sites sourceforge checksums md5 90adf3f0aabbe2c63ed1054465629525 depends_lib lib:libexpat.0:expat # Note: Not yet supported on MacOSX, but may work on others variant usb { depends_lib-append lib:libusb-0.1.4:libusb build.args-delete LIBEXPAT="-L${prefix}/lib -lexpat" build.args-append LIBEXPAT="-L${prefix}/lib -lexpat -lusb" \ INHIBIT_USB="" } variant tk { depends_run bin:wish:tk patchfiles-append patch-guibabel post-destroot { xinstall -m 0755 ${worksrcpath}/guibabel ${destroot}${prefix}/bin } } use_configure no build.args EXTRA_CFLAGS="-I${prefix}/include" \ LIBEXPAT="-L${prefix}/lib -lexpat" destroot { cd ${worksrcpath} xinstall -m 0755 -d ${destroot}${prefix}/bin xinstall -m 0755 gpsbabel ${destroot}${prefix}/bin/ xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name} xinstall -m 0644 README README.contrib README.magnav \ README.mapconverter README.psp README.xmapwpt \ ${destroot}${prefix}/share/doc/${name} xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}/contrib xinstall -m 0644 contrib/correctCoordinates.pl contrib/gpx2xfig \ ${destroot}${prefix}/share/doc/${name}/contrib } platform darwin { patchfiles-append patch-project.pbxproj post-patch { # Patch with version from pre-compiled application for now. # Authors have been notified of these changes for future # release. file copy -force ${filespath}/objects.nib \ ${worksrcpath}/macgpsbabel/English.lproj/MainMenu.nib file copy -force ${filespath}/InfoPlist.strings \ ${worksrcpath}/macgpsbabel/English.lproj reinplace "s|__VERSION|${version}_${revision} (DarwinPorts)|" \ ${worksrcpath}/macgpsbabel/English.lproj/InfoPlist.strings } post-configure { # test whether or not we can compile AppleScript ui_info "Checking for AppleScript support ..." cd ${worksrcpath}/macgpsbabel if {[catch "exec osacompile -o conftest -e nop" output]} { ui_info "$output" ui_info "... MacGPSBabel.app will NOT be built." } else { ui_info "... MacGPSBabel.app can be built." } } post-build { if {[file exist ${worksrcpath}/macgpsbabel/conftest]} { build.dir "${worksrcpath}/macgpsbabel" build.type pbx build.target -buildstyle Deployment -target MacGPSBabel build.args system "[command build]" } } post-destroot { if {[file exist ${worksrcpath}/macgpsbabel/conftest]} { cd ${worksrcpath}/macgpsbabel/build xinstall -d -m 0755 ${destroot}/Applications/DarwinPorts system "cp -R MacGPSBabel.app ${destroot}/Applications/DarwinPorts" } } }