Skip to content

Commit f24da3e

Browse files
committedJul 12, 2013
freebsd support (applies #7909)
1 parent 56055ce commit f24da3e

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed
 

‎src/app/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ IF (APPLE)
481481
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/app.info.plist.in")
482482
ENDIF(APPLE)
483483

484+
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
485+
FIND_LIBRARY(EXECINFO_LIBRARY NAMES execinfo)
486+
TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} ${EXECINFO_LIBRARY})
487+
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
488+
484489
IF (POSTGRES_FOUND)
485490
TARGET_LINK_LIBRARIES (${QGIS_APP_NAME} ${POSTGRES_LIBRARY})
486491
ENDIF (POSTGRES_FOUND)

‎src/app/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ typedef SInt32 SRefCon;
7979
#include "qgsrectangle.h"
8080
#include "qgslogger.h"
8181

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

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

301-
#if defined(linux) && !defined(ANDROID)
301+
#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
302302
// Set up the custom qWarning/qDebug custom handler
303303
qInstallMsgHandler( myMessageOutput );
304304

‎src/plugins/grass/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ TARGET_LINK_LIBRARIES(grassplugin
155155
${OPENPTY_LIBRARY}
156156
)
157157

158+
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
159+
TARGET_LINK_LIBRARIES(grassplugin ulog)
160+
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
161+
158162
# override default path where built files are put to allow running qgis without installing
159163
# the binary goes under libexec subdir
160164
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}/grass/bin)

‎src/plugins/grass/qtermwidget/kpty.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
#define HAVE_LIBUTIL_H
5151
#endif
5252

53+
#if defined(__FreeBSD__)
54+
#define HAVE_UTEMPTER
55+
#endif
56+
5357
#include <sys/types.h>
5458
#include <sys/ioctl.h>
5559
#include <sys/time.h>

0 commit comments

Comments
 (0)
Please sign in to comment.