1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

Fix build on PPC64 and on others with unusual environments

- If OPTIONS don't match the environment, pass suitable CMake
   arguments; modernise the one for gpsd
 - Import patches from Gentoo, already submitted upstream, for
   dealing with optional dependencies

Reported by:	Piotr Kubaj
Obtained from:	Andreas Sturmlechner
This commit is contained in:
Adriaan de Groot 2019-01-09 22:40:25 +00:00
parent 8d284636de
commit a74276786a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=489837
3 changed files with 70 additions and 25 deletions

View File

@ -37,10 +37,10 @@ OPTIONS_SUB= yes
GPS_DESC= Support for GPS position provider
GPS_LIB_DEPENDS= libgps.so:astro/gpsd
GPS_CMAKE_OFF= -DWITH_libgps:BOOL=FALSE
GPS_CMAKE_BOOL_ON= WITH_libgps
WEBENGINE_DESC= Add dependency on qt5-webengine
WEBENGINE_USE= QT=webengine
WEBENGINE_CMAKE_BOOL= WEBENGINE
WEBENGINE_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets
.include <bsd.port.mk>

View File

@ -1,15 +1,29 @@
--- CMakeLists.txt.orig 2018-12-30 17:28:44 UTC
From bc206d50cf8c0d0fc9f90cce58a2499ec945bd29 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Wed, 9 Jan 2019 20:41:28 +0100
Subject: [PATCH] Avoid overwriting Qt5_FOUND with Qt5DBus or Qt5WebEngine
disabled
---
CMakeLists.txt | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9261a67a4..82f7206d2 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -76,6 +76,7 @@ include( MarbleMacros )
# Generate the tiles with the tilecreator at compile time
# if this option is set, srtm.jpg will not be installed but the generated tiles instead
option(MOBILE "Create a Marble version optimized for handheld devices")
+option(WEBENGINE "Build browser plugin" ON)
@@ -121,18 +121,13 @@ find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED
)
####################################################
# Build a D-Bus interface for the Marble widget
@@ -128,15 +129,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL Android)
)
if(CMAKE_SYSTEM_NAME STREQUAL Android)
- find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED
- COMPONENTS
- Positioning
- Multimedia
- )
+ find_package(Qt5Positioning ${REQUIRED_QT_VERSION} REQUIRED)
+ find_package(Qt5Multimedia)
+
set ( MARBLE_NO_WEBKITWIDGETS TRUE )
else()
- find_package(Qt5 ${REQUIRED_QT_VERSION}
@ -17,20 +31,19 @@
- WebEngine
- WebEngineWidgets
- )
+ if(WEBENGINE)
+ find_package(Qt5 ${REQUIRED_QT_VERSION}
+ COMPONENTS
+ WebEngine
+ WebEngineWidgets
+ )
+ find_package(Qt5WebEngine ${REQUIRED_QT_VERSION})
+ find_package(Qt5WebEngineWidgets ${REQUIRED_QT_VERSION})
- if ( NOT Qt5WebEngineWidgets_FOUND )
- set ( MARBLE_NO_WEBKITWIDGETS TRUE )
- endif()
+ if( NOT Qt5WebEngineWidgets_FOUND )
+ set ( MARBLE_NO_WEBKITWIDGETS TRUE )
+ endif()
+ endif()
if ( NOT Qt5WebEngineWidgets_FOUND )
set ( MARBLE_NO_WEBKITWIDGETS TRUE )
@@ -140,7 +135,7 @@ else()
endif()
if (BUILD_WITH_DBUS)
- find_package(Qt5 ${REQUIRED_QT_VERSION} COMPONENTS DBus)
+ find_package(Qt5DBus ${REQUIRED_QT_VERSION} COMPONENTS)
if (NOT Qt5DBus_FOUND)
set(MARBLE_NO_DBUS TRUE)
endif()
--
2.20.1

View File

@ -0,0 +1,32 @@
diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt
index 155c0fc51..1ce5f5f52 100644
--- src/lib/marble/CMakeLists.txt
+++ src/lib/marble/CMakeLists.txt
@@ -1,4 +1,4 @@
-PROJECT(marblewidget)
+# PROJECT(marblewidget)
macro_optional_find_package(Phonon4Qt5 QUIET)
marble_set_package_properties( Phonon4Qt5 PROPERTIES
@@ -13,6 +13,10 @@ endif()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config-phonon.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-phonon.h)
+if(MARBLE_NO_WEBKITWIDGETS)
+ add_definitions(-DMARBLE_NO_WEBKITWIDGETS)
+endif()
+
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
@@ -47,10 +51,6 @@ set(MARBLE_ABI_VERSION "28")
########### next target ###############
-if(MARBLE_NO_WEBKITWIDGETS)
-add_definitions(-DMARBLE_NO_WEBKITWIDGETS)
-endif()
-
set(marblewidget_SRCS
${geodata_SRCS}
${graphicsview_SRCS}