20 | | long_description GPSD is a service daemon that handles GPSes and other navigation-related sensors \ |
21 | | reporting over USB, serial, TCP/IP, or UDP connections and presents reports in \ |
22 | | a well-documented JSON application. |
| 18 | long_description GPSD is a service daemon that handles GPSes and other \ |
| 19 | navigation-related sensors reporting over USB, serial, \ |
| 20 | TCP/IP, or UDP connections and presents reports in \ |
| 21 | a well-documented JSON format. The package also \ |
| 22 | includes a number of clients which can be run against \ |
| 23 | a local GPSD or a GPSD on another machine. |
30 | | depends_lib-append port:ncurses port:python27 |
31 | | depends_build-append port:scons |
| 31 | depends_lib-append port:ncurses |
| 32 | |
| 33 | depends_build port:scons |
| 34 | |
| 35 | # The Python executables now specify "python2" in the shebang line; hence |
| 36 | # the dependency on python2_select. |
| 37 | # |
| 38 | # GPSD requires Python 2.6 or 2.7, but since the scons port requires 2.7, |
| 39 | # we don't bother with a 2.6 variant. |
| 40 | # |
| 41 | depends_run port:python2_select port:python27 |
55 | | LDFLAGS="${configure.ldflags}" \ |
56 | | PYTHON=${prefix}/bin/python2.7 |
| 71 | LDFLAGS="${configure.ldflags}" |
| 72 | |
| 73 | # Allow the regression tests to be run via "port test gpsd". |
| 74 | # |
| 75 | # The speed of the daemon tests is highly dependent on the WRITE_PAD value. |
| 76 | # In particular, the "ais-nmea-sample" test (with >85000 lines of test data) |
| 77 | # takes over 44 minutes to run with the standard (for OSX) 30ms WRITE_PAD. |
| 78 | # Empirically, 200us seems to be adequate on a MacPro, and 500us seems to be |
| 79 | # adequate on a PowerBook G4, so we use 1ms here. If needed, this value can |
| 80 | # be overridden with WRITE_PAD=XXX on the command line, but only if WRITE_PAD |
| 81 | # is included in extra_env in macports.conf. In all cases, the WRITE_PAD |
| 82 | # value in use is reported by the test framework and is visible with -v. |
| 83 | # |
| 84 | # Note also that the MacPorts sandbox doesn't allow ptys, so the daemon tests |
| 85 | # report "gpsfake: ptys not available, falling back to UDP.", but still work. |
| 86 | # This can be worked around by running "scons testregress" directly in |
| 87 | # ${worksrcpath}, rather than running it via "port test". |
| 88 | # |
| 89 | # The test phase duplicates the arguments and environment (except WRITE_PAD) |
| 90 | # from the build phase, mainly to avoid gratuitous rebuilds between the phases. |
| 91 | # |
| 92 | test.run yes |
| 93 | test.target testregress |
| 94 | set test.args ${build.args} |
| 95 | set test.env ${build.env} |
| 96 | if { [info exists ::env(WRITE_PAD)] } { |
| 97 | test.env-append WRITE_PAD=$::env(WRITE_PAD) |
| 98 | } else { |
| 99 | test.env-append WRITE_PAD=0.001 |
| 100 | } |
65 | | variant qt description {Build Qt bindings} { |
66 | | build.args-delete libQgpsmm=no |
67 | | destroot.args-delete libQgpsmm=no |
| 120 | if {[catch {exec which -s python2}]} { |
| 121 | notes " |
| 122 | ##################################################################### |
| 123 | # Running any of the Python utilities requires the python2 command. # |
| 124 | # This can be set up via python2_select, e.g.: # |
| 125 | # # |
| 126 | # sudo port select --set python2 python27 # |
| 127 | # # |
| 128 | #####################################################################" |
| 129 | } |
| 130 | |
| 131 | if {${os.platform} == "darwin"} { |
| 132 | # Qt5 isn't officially supported for OSX < 10.8 |
| 133 | if {${os.major} < 12} { |
| 134 | set qt_default 4 |
| 135 | variant qt conflicts qt5 description {Build Qt4 bindings} {} |
| 136 | variant qt4 conflicts qt5 description {Build Qt4 bindings} {} |
| 137 | variant qt5 conflicts qt qt4 description {Build Qt5 bindings} {} |
| 138 | } else { |
| 139 | set qt_default 5 |
| 140 | variant qt conflicts qt4 description {Build Qt5 bindings} {} |
| 141 | variant qt4 conflicts qt qt5 description {Build Qt4 bindings} {} |
| 142 | variant qt5 conflicts qt4 description {Build Qt5 bindings} {} |
| 143 | } |
| 144 | } else { |
| 145 | set qt_default 0 |
| 146 | variant qt4 conflicts qt5 description {Build Qt4 bindings} {} |
| 147 | variant qt5 conflicts qt4 description {Build Qt5 bindings} {} |
| 148 | } |
| 149 | |
| 150 | if {[variant_isset qt4] || [variant_isset qt] && $qt_default == 4} { |
| 151 | PortGroup qt4 1.0 |
| 152 | # The following lines are a workaround for #50347 |
| 153 | build.env-append PKG_CONFIG_PATH=${qt_pkg_config_dir} |
| 154 | test.env-append PKG_CONFIG_PATH=${qt_pkg_config_dir} |
| 155 | } |
| 156 | |
| 157 | if {[variant_isset qt5] || [variant_isset qt] && $qt_default == 5} { |
| 158 | PortGroup qt5 1.0 |
| 159 | build.args-append qt_versioned=5 |
| 160 | test.args-append qt_versioned=5 |
| 161 | } |
| 162 | |
| 163 | if {[variant_isset qt] || [variant_isset qt4] || [variant_isset qt5]} { |
| 164 | build.args-delete qt=no |
| 165 | build.args-append qt=yes |
| 166 | test.args-delete qt=no |
| 167 | test.args-append qt=yes |
| 168 | destroot.args-delete qt=no |
| 169 | destroot.args-append qt=yes |
80 | | build.args-append dbus=yes dbus_export=yes |
81 | | destroot.args-append dbus=yes dbus_export=yes |
| 186 | build.args-delete dbus_export=no |
| 187 | build.args-append dbus_export=yes |
| 188 | test.args-delete dbus_export=no |
| 189 | test.args-append dbus_export=yes |
| 190 | destroot.args-delete dbus_export=no |
| 191 | destroot.args-append dbus_export=yes |
| 192 | } |
| 193 | |
| 194 | variant xgps \ |
| 195 | description {Include xgps/xgpsspeed X11 clients (dependency-intensive)} { |
| 196 | depends_run-append port:py-gobject port:py-pygtk |
| 197 | build.args-delete xgps=no |
| 198 | build.args-append xgps=yes |
| 199 | test.args-delete xgps=no |
| 200 | test.args-append xgps=yes |
| 201 | destroot.args-delete xgps=no |
| 202 | destroot.args-append xgps=yes |