Skip to content
Permalink
Browse files

freebsd support (applies #7909)

  • Loading branch information
jef-n committed Jul 12, 2013
1 parent 56055ce commit f24da3e51e863ecd81fd14a93ab89c6def15280d
Showing with 18 additions and 5 deletions.
  1. +5 −0 src/app/CMakeLists.txt
  2. +5 −5 src/app/main.cpp
  3. +4 −0 src/plugins/grass/CMakeLists.txt
  4. +4 −0 src/plugins/grass/qtermwidget/kpty.cpp
@@ -481,6 +481,11 @@ IF (APPLE)
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/app.info.plist.in")
ENDIF(APPLE)

IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FIND_LIBRARY(EXECINFO_LIBRARY NAMES execinfo)
TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} ${EXECINFO_LIBRARY})
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")

IF (POSTGRES_FOUND)
TARGET_LINK_LIBRARIES (${QGIS_APP_NAME} ${POSTGRES_LIBRARY})
ENDIF (POSTGRES_FOUND)
@@ -79,7 +79,7 @@ typedef SInt32 SRefCon;
#include "qgsrectangle.h"
#include "qgslogger.h"

#if defined(linux) && !defined(ANDROID)
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
#include <unistd.h>
#include <execinfo.h>
#include <signal.h>
@@ -194,7 +194,7 @@ LONG WINAPI qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo )
}
#endif

#if defined(linux) && !defined(ANDROID)
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
void qgisCrash( int signal )
{
qFatal( "QGIS died on signal %d", signal );
@@ -231,7 +231,7 @@ void myMessageOutput( QtMsgType type, const char *msg )
|| 0 == strncmp( msg, "QPainter::", 10 ) )
{
#if 0
#if defined(linux) && !defined(ANDROID)
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
fprintf( stderr, "Stacktrace (run through c++filt):\n" );
void *buffer[256];
int nptrs = backtrace( buffer, sizeof( buffer ) / sizeof( *buffer ) );
@@ -253,7 +253,7 @@ void myMessageOutput( QtMsgType type, const char *msg )
case QtFatalMsg:
{
fprintf( stderr, "Fatal: %s\n", msg );
#if defined(linux) && !defined(ANDROID)
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
if ( access( "/usr/bin/c++filt", X_OK ) )
{
( void ) write( STDERR_FILENO, "Stacktrace (c++filt NOT FOUND):\n", 32 );
@@ -298,7 +298,7 @@ int main( int argc, char *argv[] )
#endif // _MSC_VER
#endif // WIN32

#if defined(linux) && !defined(ANDROID)
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
// Set up the custom qWarning/qDebug custom handler
qInstallMsgHandler( myMessageOutput );

@@ -155,6 +155,10 @@ TARGET_LINK_LIBRARIES(grassplugin
${OPENPTY_LIBRARY}
)

IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
TARGET_LINK_LIBRARIES(grassplugin ulog)
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")

# override default path where built files are put to allow running qgis without installing
# the binary goes under libexec subdir
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}/grass/bin)
@@ -50,6 +50,10 @@
#define HAVE_LIBUTIL_H
#endif

#if defined(__FreeBSD__)
#define HAVE_UTEMPTER
#endif

#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/time.h>

0 comments on commit f24da3e

Please sign in to comment.
You can’t perform that action at this time.