Skip to content

Commit

Permalink
Tom Russo's patches for FreeBSD:
Browse files Browse the repository at this point in the history
"I run QGIS on FreeBSD these days, and have found that I need the
attached patch to get the grass shell and gps plugin to work.  The
grass shell patch is needed even to get the thing to compile.


The grass shell patch makes sure the right include files are brought
in to get at the PTY functions.

The gpsplugin patch changes the preprocessor symbol that selects what
style of ports to probe for, and adds a block of code that scans for
USB serial adapters."



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6047 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Nov 4, 2006
1 parent 43eee2b commit defbea4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/plugins/gps_importer/qgsgpsplugingui.cpp
Expand Up @@ -286,7 +286,7 @@ void QgsGPSPluginGui::populatePortComboBoxes() {

#endif

#ifdef freebsd
#ifdef __FreeBSD__ // freebsd
// and freebsd devices (untested)
QString freebsdDev("/dev/cuaa%1");
for (int i = 0; i < 10; ++i) {
Expand All @@ -297,6 +297,18 @@ void QgsGPSPluginGui::populatePortComboBoxes() {
else
break;
}

// and the ucom devices (serial USB adaptors)
freebsdDev = "/dev/ucom%1";
for (int i = 0; i < 10; ++i) {
if (QFileInfo(freebsdDev.arg(i)).exists()) {
cmbDLPort->insertItem(freebsdDev.arg(i));
cmbULPort->insertItem(freebsdDev.arg(i));
}
else
break;
}

#endif

#ifdef sparc
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/grass/qgsgrassshell.cpp
Expand Up @@ -43,9 +43,14 @@ extern "C" {
#ifdef __NetBSD__
#include <util.h>
#else
#ifdef __FreeBSD__
#include <termios.h>
#include <libutil.h>
#else
#include <pty.h>
#endif
#endif
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
Expand Down

0 comments on commit defbea4

Please sign in to comment.