File build-fixes.patch of Package phd2

diff -ru orig/cmake_modules/PHD2Packaging.cmake mod/cmake_modules/PHD2Packaging.cmake
--- orig/cmake_modules/PHD2Packaging.cmake	2025-04-25 22:59:34.000000000 +0200
+++ mod/cmake_modules/PHD2Packaging.cmake	2025-04-29 09:53:33.429150468 +0200
@@ -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-04-25 22:59:34.000000000 +0200
+++ mod/src/cam_ogma.cpp	2025-04-29 09:53:33.431061978 +0200
@@ -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-04-25 22:59:34.000000000 +0200
+++ mod/thirdparty/thirdparty.cmake	2025-04-29 10:06:25.152583258 +0200
@@ -594,21 +594,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/x86/ogmacam.lib)
-    list(APPEND PHD_COPY_EXTERNAL_ALL ${ogmacamsdk_SOURCE_DIR}/win/x86/ogmacam.dll)
-  endif()
-endif()
-
 # Various camera libraries
 if(WIN32)
   # Video for Windows, directshow and windows media
@@ -917,9 +902,7 @@
     # 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/${zwoarch})
+             NAMES ASICamera2)
 
       if(NOT asiCamera2)
         message(FATAL_ERROR "Cannot find the asiCamera2 drivers")
@@ -929,10 +912,8 @@
       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})
+             NAMES toupcam)
+
       if(NOT toupcam)
         message(FATAL_ERROR "Cannot find the toupcam drivers")
       endif()
@@ -940,41 +921,32 @@
       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})
+             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})
+            NAMES SVBCameraSDK)
       if(NOT SVBCameraSDK)
         message(FATAL_ERROR "Cannot find the SVBCameraSDK drivers")
       endif()
       message(STATUS "Found SVBCameraSDK lib ${SVBCameraSDK}")
       add_definitions(-DHAVE_SVB_CAMERA=1)
       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)
 
         # 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})
+               NAMES qhyccd)
         if(NOT qhylib)
           message(FATAL_ERROR "Cannot find the qhy SDK libs")
         endif()
@@ -982,9 +954,7 @@
       endif()
 
       find_library( playerone
-                    NAMES PlayerOneCamera
-                    NO_DEFAULT_PATHS
-                    PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/playerone/linux/${playerone_arch})
+                    NAMES PlayerOneCamera)
 
       if(NOT playerone)
         message(FATAL_ERROR "Cannot find the PlayerOneCamera SDK lib")
@@ -993,9 +963,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