diff options
author | adridg <adridg@FreeBSD.org> | 2018-04-06 20:09:21 +0800 |
---|---|---|
committer | adridg <adridg@FreeBSD.org> | 2018-04-06 20:09:21 +0800 |
commit | 9467634db1ed773e5d1afdaa252768923b8bf706 (patch) | |
tree | 9d979824dec9b54248a5d76c5bca4bb181d009f3 | |
parent | b4ee7f74f13cadac71bef9a03aeb58a9442bd877 (diff) | |
download | freebsd-ports-gnome-9467634db1ed773e5d1afdaa252768923b8bf706.tar.gz freebsd-ports-gnome-9467634db1ed773e5d1afdaa252768923b8bf706.tar.zst freebsd-ports-gnome-9467634db1ed773e5d1afdaa252768923b8bf706.zip |
The find module for QScintilla included with sqlitebrowser has never worked
(well) on FreeBSD. Then the port used en embedded copy of QScintilla.
Switch to using the system QScintilla.
This change is triggered by CMake 3.11, which tried to build the embedded
QScintilla slightly differently. That fails because there are header
files declaring enum { SCI_CANREDO = 2016 } *and also* header files
that #define SCI_CANREDO 2016; the include order is very fragile.
Also reported upstream.
Reviewed by: lbartoletti_tuxfamily (maintainer)
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D14930
-rw-r--r-- | databases/sqlitebrowser/Makefile | 4 | ||||
-rw-r--r-- | databases/sqlitebrowser/files/patch-cmake_FindQScintilla.cmake | 27 |
2 files changed, 30 insertions, 1 deletions
diff --git a/databases/sqlitebrowser/Makefile b/databases/sqlitebrowser/Makefile index e6eba3890dc5..ae0acef1ab3d 100644 --- a/databases/sqlitebrowser/Makefile +++ b/databases/sqlitebrowser/Makefile @@ -3,6 +3,7 @@ PORTNAME= sqlitebrowser PORTVERSION= 3.10.1 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= databases @@ -14,9 +15,10 @@ LICENSE_COMB= dual LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${LOCALBASE}/lib/libantlr.a:devel/antlr +LIB_DEPENDS= libqscintilla2_qt5.so:devel/qscintilla2-qt5 USES= cmake desktop-file-utils sqlite -CMAKE_ARGS+= -DUSE_QT5:BOOL=TRUE +CMAKE_ARGS+= -DQT_INCLUDE_DIR=${QT_INCDIR} -DQT_LIBRARY_DIR=${QT_LIBDIR} USE_QT5= core gui network printsupport testlib widgets \ buildtools_build linguisttools_build qmake_build USE_GITHUB= yes diff --git a/databases/sqlitebrowser/files/patch-cmake_FindQScintilla.cmake b/databases/sqlitebrowser/files/patch-cmake_FindQScintilla.cmake new file mode 100644 index 000000000000..7698da71c802 --- /dev/null +++ b/databases/sqlitebrowser/files/patch-cmake_FindQScintilla.cmake @@ -0,0 +1,27 @@ +The find module sets QSCINTILLA_INCLUDE_DIR to the directory containing +qsciscintilla.h, which in our case is already in the subdirectory Qsci/, +so (also) try another path for the version file. Accept only the Qt5 +versions of the library. + +--- cmake/FindQScintilla.cmake.orig 2017-09-20 13:59:51 UTC ++++ cmake/FindQScintilla.cmake +@@ -53,6 +53,10 @@ set ( QSCINTILLA_INCLUDE_DIRS ${QSCINTIL + + # version + set ( _VERSION_FILE ${QSCINTILLA_INCLUDE_DIR}/Qsci/qsciglobal.h ) ++if ( NOT EXISTS ${_VERSION_FILE} ) ++ set ( _VERSION_FILE ${QSCINTILLA_INCLUDE_DIR}/qsciglobal.h ) ++endif() ++ + if ( EXISTS ${_VERSION_FILE} ) + file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QSCINTILLA_VERSION_STR" ) + if ( _VERSION_LINE ) +@@ -80,7 +84,7 @@ endif () + + + find_library ( QSCINTILLA_LIBRARY +- NAMES qscintilla qscintilla2 libqscintilla2 ++ NAMES qscintilla2_qt5 libqscintilla2_qt5 + HINTS ${QT_LIBRARY_DIR} + ) + |