Ignore:
Timestamp:
Feb 16, 2005, 5:45:16 AM (15 years ago)
Author:
rshaw
Message:

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

Location:
trunk/dports/textproc/gpsbabel
Files:
5 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/textproc/gpsbabel/Portfile

    r8440 r11008  
    1 # $Id: Portfile,v 1.1 2004/09/26 12:37:52 olegb Exp $
     1# $Id: Portfile,v 1.2 2005/02/16 05:45:14 rshaw Exp $
     2PortSystem              1.0
    23
    3 PortSystem 1.0
    44name            gpsbabel
    5 version         1.2.3
     5version         1.2.4
    66categories      textproc comms
    7 maintainers     thomas+darwinports@stromberg.org
    8 description     GPSBabel converts and or uploads GPS waypoints, tracks, and routes
    9 long_description        GPSBabel converts GPS waypoints, tracks, and routes from \
    10                         one format to another, whether that format is a common \
    11                         mapping format like Delorme, Streets and Trips, or even \
    12                         a serial upload or download to a GPS unit such as those \
    13                         from Garmin and Magellan.
    14 homepage        http://gpsbabel.sourceforge.net
    15 platforms       darwin
     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
    1616master_sites    sourceforge
    17 checksums       md5 bd818aba946f3956cad4ccef154abb47
     17checksums               md5 90adf3f0aabbe2c63ed1054465629525
    1818
    19 depends_lib     lib:libexpat.0:expat
    20 use_configure   no
    21 build.env       EXTRA_CFLAGS="-I${prefix}/include -L${prefix}/lib"
     19depends_lib             lib:libexpat.0:expat
    2220
    23 
    24 configure {
    25     cd ${worksrcpath}
    26     reinplace "s|/usr/local|${destroot}|g" ${worksrcpath}/Makefile
     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=""
    2727}
    2828
     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
    2941destroot {
    30         xinstall -m 755 -d ${destroot}/${prefix}/bin
    31         xinstall -m 755 -W ${worksrcpath} gpsbabel ${destroot}/${prefix}/bin/
    32         xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name}
    33         xinstall -m 644 -W ${worksrcpath} README README.contrib README.magnav \
    34                README.mapconverter README.psp README.xmapwpt \
    35                 ${destroot}/${prefix}/share/doc/${name}
     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
    3652}
     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 TracChangeset for help on using the changeset viewer.