mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
234 lines
7.6 KiB
Plaintext
234 lines
7.6 KiB
Plaintext
From 09f0325a7141876b8fd32750461b88cdb34d0232 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Fri, 13 May 2022 14:53:30 +1000
|
|
Subject: Fixes for Haiku
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 7d1e6c2..53a4e55 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -423,7 +423,7 @@ if(WITH_CORE)
|
|
#############################################################
|
|
# search for dependencies
|
|
|
|
- if(NOT WIN32 AND NOT ANDROID)
|
|
+ if(NOT WIN32 AND NOT ANDROID AND NOT HAIKU)
|
|
include(CheckFunctionExists)
|
|
CHECK_FUNCTION_EXISTS(openpty OPENPTY_IN_LIBC)
|
|
if(NOT OPENPTY_IN_LIBC)
|
|
diff --git a/external/lazperf/portable_endian.hpp b/external/lazperf/portable_endian.hpp
|
|
index 80754cf..959b0ce 100644
|
|
--- a/external/lazperf/portable_endian.hpp
|
|
+++ b/external/lazperf/portable_endian.hpp
|
|
@@ -12,7 +12,7 @@
|
|
|
|
// use standard posix style headers for apple emscripten builds as well since emscripten sdk now ships its own
|
|
// libc headers
|
|
-#if defined(__linux__) || defined(__CYGWIN__) || defined(__EMSCRIPTEN__)
|
|
+#if defined(__linux__) || defined(__HAIKU__) || defined(__CYGWIN__) || defined(__EMSCRIPTEN__)
|
|
|
|
# include <endian.h>
|
|
|
|
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
|
|
index d402462..70baffc 100644
|
|
--- a/src/app/CMakeLists.txt
|
|
+++ b/src/app/CMakeLists.txt
|
|
@@ -700,6 +700,10 @@ if (WITH_PDAL)
|
|
target_link_libraries(qgis_app ${PDAL_LIBRARIES})
|
|
endif()
|
|
|
|
+if (HAIKU)
|
|
+ target_link_libraries(qgis_app network)
|
|
+endif()
|
|
+
|
|
if(MSVC)
|
|
install(FILES qgis.ico qgis-mime.ico qgis-qgs.ico qgis-qlr.ico qgis-qml.ico qgis-qpt.ico DESTINATION icons)
|
|
endif()
|
|
diff --git a/src/app/main.cpp b/src/app/main.cpp
|
|
index 4d95020..8e3fec0 100644
|
|
--- a/src/app/main.cpp
|
|
+++ b/src/app/main.cpp
|
|
@@ -914,7 +914,7 @@ int main( int argc, char *argv[] )
|
|
#endif
|
|
|
|
|
|
-#if defined( Q_OS_UNIX ) && !defined( Q_OS_MAC ) && !defined( ANDROID )
|
|
+#if defined( Q_OS_UNIX ) && !defined( Q_OS_MAC ) && !defined( ANDROID ) && !defined(Q_OS_HAIKU)
|
|
bool myUseGuiFlag = nullptr != getenv( "DISPLAY" );
|
|
#else
|
|
bool myUseGuiFlag = true;
|
|
diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt
|
|
index ffc62d5..3581542 100644
|
|
--- a/src/process/CMakeLists.txt
|
|
+++ b/src/process/CMakeLists.txt
|
|
@@ -42,6 +42,7 @@ target_link_libraries(qgis_process
|
|
qgis_analysis
|
|
${QT_VERSION_BASE}::Core
|
|
${GEOS_LIBRARY}
|
|
+ network
|
|
)
|
|
|
|
if (WITH_3D)
|
|
--
|
|
2.51.0
|
|
|
|
|
|
From cdf7eeb78503b1d4218304f0f641cf39f9de1f90 Mon Sep 17 00:00:00 2001
|
|
From: Luc Schrijvers <begasus@gmail.com>
|
|
Date: Fri, 19 Dec 2025 07:28:49 +0100
|
|
Subject: Fix building for qws
|
|
|
|
kudos to Gentoo: https://bugs.gentoo.org/935730
|
|
|
|
diff --git a/cmake/FindQwtPolar.cmake b/cmake/FindQwtPolar.cmake
|
|
index e09d14c..cb89a24 100644
|
|
--- a/cmake/FindQwtPolar.cmake
|
|
+++ b/cmake/FindQwtPolar.cmake
|
|
@@ -12,37 +12,37 @@
|
|
# QWTPOLAR_INCLUDE_DIR = where to find headers
|
|
#
|
|
|
|
-FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
|
|
- /usr/lib
|
|
- /usr/local/lib
|
|
- "$ENV{LIB_DIR}/lib"
|
|
- "$ENV{LIB}/lib"
|
|
- )
|
|
+#FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
|
|
+# /usr/lib
|
|
+# /usr/local/lib
|
|
+# "$ENV{LIB_DIR}/lib"
|
|
+# "$ENV{LIB}/lib"
|
|
+# )
|
|
|
|
-SET(_qwtpolar_fw)
|
|
-IF (QWTPOLAR_LIBRARY MATCHES "/qwtpolar.*\\.framework")
|
|
- STRING(REGEX REPLACE "^(.*/qwtpolar.*\\.framework).*$" "\\1" _qwtpolar_fw "${QWTPOLAR_LIBRARY}")
|
|
-ENDIF ()
|
|
+#SET(_qwtpolar_fw)
|
|
+#IF (QWTPOLAR_LIBRARY MATCHES "/qwtpolar.*\\.framework")
|
|
+# STRING(REGEX REPLACE "^(.*/qwtpolar.*\\.framework).*$" "\\1" _qwtpolar_fw "${QWTPOLAR_LIBRARY}")
|
|
+#ENDIF ()
|
|
|
|
-FIND_PATH(QWTPOLAR_INCLUDE_DIR NAMES qwt_polar.h PATHS
|
|
- "${_qwtpolar_fw}/Headers"
|
|
- /usr/include
|
|
- /usr/local/include
|
|
- "$ENV{LIB_DIR}/include"
|
|
- "$ENV{INCLUDE}"
|
|
- PATH_SUFFIXES qwtpolar qwt
|
|
- )
|
|
+#FIND_PATH(QWTPOLAR_INCLUDE_DIR NAMES qwt_polar.h PATHS
|
|
+# "${_qwtpolar_fw}/Headers"
|
|
+# /usr/include
|
|
+# /usr/local/include
|
|
+# "$ENV{LIB_DIR}/include"
|
|
+# "$ENV{INCLUDE}"
|
|
+# PATH_SUFFIXES qwtpolar qwt
|
|
+# )
|
|
|
|
-IF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
|
- SET(QWTPOLAR_FOUND TRUE)
|
|
-ENDIF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
|
+#IF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
|
+# SET(QWTPOLAR_FOUND TRUE)
|
|
+#ENDIF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
|
|
|
-IF (QWTPOLAR_FOUND)
|
|
- IF (NOT QWTPOLAR_FIND_QUIETLY)
|
|
- MESSAGE(STATUS "Found QwtPolar: ${QWTPOLAR_LIBRARY}")
|
|
- ENDIF (NOT QWTPOLAR_FIND_QUIETLY)
|
|
-ELSE (QWTPOLAR_FOUND)
|
|
- IF (QWTPOLAR_FIND_REQUIRED)
|
|
- MESSAGE(FATAL_ERROR "Could not find QwtPolar")
|
|
- ENDIF (QWTPOLAR_FIND_REQUIRED)
|
|
-ENDIF (QWTPOLAR_FOUND)
|
|
+#IF (QWTPOLAR_FOUND)
|
|
+# IF (NOT QWTPOLAR_FIND_QUIETLY)
|
|
+# MESSAGE(STATUS "Found QwtPolar: ${QWTPOLAR_LIBRARY}")
|
|
+# ENDIF (NOT QWTPOLAR_FIND_QUIETLY)
|
|
+#ELSE (QWTPOLAR_FOUND)
|
|
+# IF (QWTPOLAR_FIND_REQUIRED)
|
|
+# MESSAGE(FATAL_ERROR "Could not find QwtPolar")
|
|
+# ENDIF (QWTPOLAR_FIND_REQUIRED)
|
|
+#ENDIF (QWTPOLAR_FOUND)
|
|
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
|
|
index 70baffc..0a00c9d 100644
|
|
--- a/src/app/CMakeLists.txt
|
|
+++ b/src/app/CMakeLists.txt
|
|
@@ -392,54 +392,8 @@ endif()
|
|
find_package(${QT_VERSION_BASE} COMPONENTS UiTools REQUIRED)
|
|
|
|
set (WITH_QWTPOLAR FALSE CACHE BOOL "Determines whether QwtPolar is available or whether functionality requiring QwtPolar should be disabled.")
|
|
-# Once we bump the minimum QWT VERSION to 6.2 or newer, we should get rid of WITH_QWTPOLAR
|
|
-if(QWT_VERSION_STR VERSION_GREATER_EQUAL 6.2 OR WITH_QWTPOLAR)
|
|
- add_definitions(-DWITH_QWTPOLAR)
|
|
-
|
|
- if(QWT_VERSION_STR VERSION_LESS 6.2)
|
|
- find_package(QwtPolar REQUIRED)
|
|
- else()
|
|
- set(FOUND_QwtPolar TRUE)
|
|
- set(QWTPOLAR_LIBRARY ${QWT_LIBRARY})
|
|
- set(QWTPOLAR_INCLUDE_DIR ${QWT_INCLUDE_DIR})
|
|
- add_definitions(-DQWT_POLAR_VERSION=0x060200)
|
|
- endif()
|
|
- # If not found on the system, offer the possibility to build QwtPolar
|
|
- # internally
|
|
- if(NOT FOUND_QwtPolar)
|
|
- set(DEFAULT_WITH_INTERNAL_QWTPOLAR TRUE)
|
|
- else()
|
|
- set(DEFAULT_WITH_INTERNAL_QWTPOLAR FALSE)
|
|
- endif()
|
|
- set (WITH_INTERNAL_QWTPOLAR ${DEFAULT_WITH_INTERNAL_QWTPOLAR} CACHE BOOL "Use internal build of QwtPolar")
|
|
-
|
|
- if(WITH_INTERNAL_QWTPOLAR)
|
|
- set(QGIS_APP_SRCS
|
|
- ${QGIS_APP_SRCS}
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_canvas.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_curve.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_fitter.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_grid.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_item.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_itemdict.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_layout.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_magnifier.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_marker.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_panner.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_picker.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_plot.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_renderer.cpp
|
|
- ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1/qwt_polar_spectrogram.cpp
|
|
- )
|
|
-
|
|
- set(QWTPOLAR_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external/qwtpolar-1.1.1)
|
|
-
|
|
- set(QWTPOLAR_LIBRARY "")
|
|
- endif()
|
|
-else()
|
|
set(QWTPOLAR_LIBRARY "")
|
|
set(QWTPOLAR_INCLUDE_DIR "")
|
|
-endif()
|
|
|
|
# Test data dir for QgsAppScreenShots
|
|
add_definitions(-DTEST_DATA_DIR="${TEST_DATA_DIR}")
|
|
@@ -590,7 +544,6 @@ if (WITH_3D)
|
|
endif()
|
|
|
|
target_include_directories(qgis_app SYSTEM PUBLIC
|
|
- ${QWTPOLAR_INCLUDE_DIR}
|
|
${CMAKE_SOURCE_DIR}/external/qt-unix-signals
|
|
)
|
|
|
|
@@ -598,7 +551,6 @@ add_dependencies(qgis_gui ui)
|
|
|
|
target_link_libraries(qgis_app
|
|
${QWT_LIBRARY}
|
|
- ${QWTPOLAR_LIBRARY}
|
|
${QT_VERSION_BASE}::Sql
|
|
${QT_VERSION_BASE}::UiTools
|
|
${OPTIONAL_QTWEBKIT}
|
|
--
|
|
2.51.0
|
|
|