Skip to content

Commit

Permalink
graphics/qgis: Readd patch to fix flex version
Browse files Browse the repository at this point in the history
For FreeBSD versions < 1300501 the existing version of FLEX in base is
unsufficient. Readd old patch to install the ports version of FLEX.

CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
  (message): Could NOT find FLEX: Found unsuitable version "2.5.37",
  but required is at least "2.6" (found /usr/bin/flex)
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:598
    (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake/Modules/FindFLEX.cmake:269
    (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:339 (find_package)

Thanks to Martin Birgmeier <d8zNeCFG@aon.at> for reporting.

PR:		274793
  • Loading branch information
rhurlin committed Oct 30, 2023
1 parent 1d03b86 commit a5b13ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions graphics/qgis/Makefile
@@ -1,5 +1,6 @@
PORTNAME= qgis
DISTVERSION= 3.34.0
PORTREVISION= 1
CATEGORIES= graphics geography
MASTER_SITES= https://qgis.org/downloads/

Expand Down Expand Up @@ -157,6 +158,13 @@ SERVER_CMAKE_BOOL= WITH_SERVER WITH_SERVER_PLUGINS WITH_QSPATIALITE

.include <bsd.port.pre.mk>

# QGIS requires flex >= 2.5.6, see
# https://github.com/qgis/QGIS/blob/fb0f334b06e0828e5695ffcaa7c7eb82d6516cb0/INSTALL.md
.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1300501)
BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:textproc/flex
CMAKE_ARGS+= -DFLEX_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/flex
.endif

pre-patch:
# Only PostgreSQL Client headers, not Server
@${REINPLACE_CMD} -e 's|set(POSTGRES_INCLUDE_DIR \$${PostgreSQL_INCLUDE_DIRS})|set(POSTGRES_INCLUDE ${LOCALBASE}/include)|g' \
Expand Down

0 comments on commit a5b13ac

Please sign in to comment.