File build-fixes.patch of Package phd2

diff -ru orig/cmake_modules/FindINDI.cmake mod/cmake_modules/FindINDI.cmake
--- orig/cmake_modules/FindINDI.cmake	2025-12-02 08:32:06.171606061 +0100
+++ mod/cmake_modules/FindINDI.cmake	2025-12-02 08:56:47.152954714 +0100
@@ -19,7 +19,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 
 macro(_INDI_check_version)
-    file(READ "${INDI_INCLUDE_DIR}/indiversion.h" _INDI_version_header)
+    file(READ "${INDI_INCLUDE_DIR}/indiapi.h" _INDI_version_header)
 
     string(REGEX MATCH "#define INDI_VERSION_MAJOR[ \t]+([0-9]+)" _INDI_version_major_match "${_INDI_version_header}")
     set(INDI_VERSION_MAJOR "${CMAKE_MATCH_1}")
diff -ru orig/cmake_modules/PHD2Packaging.cmake mod/cmake_modules/PHD2Packaging.cmake
--- orig/cmake_modules/PHD2Packaging.cmake	2025-12-02 08:32:06.171606061 +0100
+++ mod/cmake_modules/PHD2Packaging.cmake	2025-12-02 08:56:47.154542840 +0100
@@ -73,7 +73,7 @@
           DESTINATION bin
           RENAME phd2)
   install(FILES ${PHD_INSTALL_LIBS}
-          DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/phd2/)
+          DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/phd2/)
   install(FILES ${PHD_PROJECT_ROOT_DIR}/icons/phd2_48.png
           DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps/
           RENAME "phd2.png")
diff -ru orig/src/cam_ogma.cpp mod/src/cam_ogma.cpp
--- orig/src/cam_ogma.cpp	2025-12-02 08:32:06.443110758 +0100
+++ mod/src/cam_ogma.cpp	2025-12-02 08:56:47.155415673 +0100
@@ -37,7 +37,7 @@
 #if defined(OGMA_CAMERA)
 
 # include "cam_ogma.h"
-# include "ogmacam.h"
+#include <libogmacam/ogmacam.h>
 
 // Touptek API uses these Windows definitions even on non-Windows platforms
 # ifndef S_OK
diff -ru orig/thirdparty/thirdparty.cmake mod/thirdparty/thirdparty.cmake
--- orig/thirdparty/thirdparty.cmake	2025-12-02 08:32:06.480402261 +0100
+++ mod/thirdparty/thirdparty.cmake	2025-12-02 09:00:11.494217797 +0100
@@ -606,21 +606,6 @@
   )
 endif()
 
-if (NOT OPENSOURCE_ONLY)
-  include(FetchContent)
-  FetchContent_Declare(
-    OGMAcamSDK
-    GIT_REPOSITORY https://github.com/OGMAvision/OGMAcamSDK.git
-    GIT_TAG 5e83d81384479b1684b97e9f6936e453050da4cb
-  )
-  FetchContent_MakeAvailable(OGMAcamSDK)
-  include_directories(${ogmacamsdk_SOURCE_DIR}/inc)
-  if (WIN32)
-    list(APPEND PHD_LINK_EXTERNAL ${ogmacamsdk_SOURCE_DIR}/win/${WINDOWS_ARCH}/ogmacam.lib)
-    list(APPEND PHD_COPY_EXTERNAL_ALL ${ogmacamsdk_SOURCE_DIR}/win/${WINDOWS_ARCH}/ogmacam.dll)
-  endif()
-endif()
-
 # Various camera libraries
 if(WIN32)
   # Video for Windows, directshow and windows media
@@ -1076,11 +1061,8 @@
     # The binary libraries below do not support FreeBSD, ignore them
     # when building for FreeBSD.
     if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-      find_library(asiCamera2
-             NAMES ASICamera2
-             NO_DEFAULT_PATHS
-             PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/linux/${zwoarch})
 
+      find_library(asiCamera2 NAMES ASICamera2)
       if(NOT asiCamera2)
         message(FATAL_ERROR "Cannot find the asiCamera2 drivers")
       endif()
@@ -1089,11 +1071,7 @@
       add_definitions(-DHAVE_ZWO_CAMERA=1)
       list(APPEND PHD_LINK_EXTERNAL ${asiCamera2})
 
-      find_library(toupcam
-             NAMES toupcam
-             NO_DEFAULT_PATHS
-             NO_CMAKE_SYSTEM_PATH
-             PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/toupcam/linux/${toupcam_arch})
+      find_library(toupcam NAMES toupcam)
       if(NOT toupcam)
         message(FATAL_ERROR "Cannot find the toupcam drivers")
       endif()
@@ -1101,25 +1079,16 @@
       include_directories(${PHD_PROJECT_ROOT_DIR}/cameras/toupcam/include)
       add_definitions(-DHAVE_TOUPTEK_CAMERA=1)
       list(APPEND PHD_LINK_EXTERNAL ${toupcam})
-      list(APPEND PHD_INSTALL_LIBS ${toupcam})
 
-      find_library(ogmacam
-             NAMES ogmacam
-             NO_DEFAULT_PATHS
-             NO_CMAKE_SYSTEM_PATH
-             PATHS ${ogmacamsdk_SOURCE_DIR}/linux/${toupcam_arch})
+      find_library(ogmacam NAMES ogmacam)
       if(NOT ogmacam)
         message(FATAL_ERROR "Cannot find the ogmacam drivers")
       endif()
       message(STATUS "Found ogmacam lib ${ogmacam}")
       add_definitions(-DHAVE_OGMA_CAMERA=1)
       list(APPEND PHD_LINK_EXTERNAL ${ogmacam})
-      list(APPEND PHD_INSTALL_LIBS ${ogmacam})
 
-      find_library(SVBCameraSDK
-            NAMES SVBCameraSDK
-            NO_DEFAULT_PATHS
-            PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/svblibs/linux/${svbony_arch})
+      find_library(SVBCameraSDK NAMES SVBCameraSDK)
       if(NOT SVBCameraSDK)
         message(FATAL_ERROR "Cannot find the SVBCameraSDK drivers")
       endif()
@@ -1127,28 +1096,17 @@
       add_definitions(-DHAVE_SVB_CAMERA=1)
       include_directories(${PHD_PROJECT_ROOT_DIR}/cameras/svblibs/include)
       list(APPEND PHD_LINK_EXTERNAL ${SVBCameraSDK})
-      list(APPEND PHD_INSTALL_LIBS ${SVBCameraSDK})
 
-      if(IS_DIRECTORY ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch})
-        add_definitions(-DHAVE_QHY_CAMERA=1)
-        include_directories(${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/include)
-
-        # be careful not to pick up any other qhy lib on the system
-        find_library(qhylib
-               NAMES qhyccd
-               NO_DEFAULT_PATH
-               PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch})
-        if(NOT qhylib)
-          message(FATAL_ERROR "Cannot find the qhy SDK libs")
-        endif()
-        list(APPEND PHD_LINK_EXTERNAL ${qhylib})
+      find_library(qhylib NAMES qhyccd)
+      if(NOT qhylib)
+        message(FATAL_ERROR "Cannot find the qhy SDK libs")
       endif()
+      message(STATUS "Found QHY lib ${qhylib}")
+      add_definitions(-DHAVE_QHY_CAMERA=1)
+      include_directories(${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/include)
+      list(APPEND PHD_LINK_EXTERNAL ${qhylib})
 
-      find_library( playerone
-                    NAMES PlayerOneCamera
-                    NO_DEFAULT_PATHS
-                    PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/playerone/linux/${playerone_arch})
-
+      find_library( playerone NAMES PlayerOneCamera)
       if(NOT playerone)
         message(FATAL_ERROR "Cannot find the PlayerOneCamera SDK lib")
       endif()
@@ -1156,9 +1114,6 @@
       include_directories(${PHD_PROJECT_ROOT_DIR}/cameras/playerone/include)
       add_definitions(-DHAVE_PLAYERONE_CAMERA=1)
       list(APPEND PHD_LINK_EXTERNAL ${playerone})
-      # install the .so and symlinks
-      file(GLOB playerone_so_files "${playerone}*")
-      list(APPEND PHD_INSTALL_LIBS ${playerone_so_files})
 
     endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
 
openSUSE Build Service is sponsored by