From d85b25eabf06cbe75cd9e617bd372e62c958411d Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: May 08 2018 07:56:49 +0000 Subject: Update to 2.6.5 Remove obsolete scriptlets Use upstream patch to disable third party camera drivers --- diff --git a/.gitignore b/.gitignore index 755ab01..bfedc60 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /phd2-2.6.4-purged.tar.xz +/phd2-2.6.5-purged.tar.xz diff --git a/phd2.spec b/phd2.spec index 3db0837..f39474f 100644 --- a/phd2.spec +++ b/phd2.spec @@ -1,6 +1,6 @@ Name: phd2 -Version: 2.6.4 -Release: 3.1%{?dist} +Version: 2.6.5 +Release: 1%{?dist} Summary: Telescope guiding software # Main program files are BSD licensed # Some components have different licenses: @@ -16,16 +16,12 @@ Source0: %{name}-%{version}-purged.tar.xz # Script to purge binaries and unneeded files from downloaded sources Source1: generate-tarball.sh -# Correct appdata files location -# https://github.com/OpenPHDGuiding/phd2/pull/658 -Patch1: phd2_appdata_location_change.patch - # Use C++14 flag Patch99: phd2_cflags.patch -# We need to disable camera firmwares we removed from sources -# This is Fedora specific and not reported upstream -Patch100: phd2_disable_cams.patch +# Backported patch from upstream to disable camera firmwares we removed from sources +# https://github.com/OpenPHDGuiding/phd2/issues/690 +Patch100: phd2_2.6.5_disable_cams.patch BuildRequires: cmake3 BuildRequires: desktop-file-utils @@ -70,7 +66,9 @@ pushd %{_target_platform} %{cmake3} -DUSE_SYSTEM_CFITSIO=ON \ -DUSE_SYSTEM_LIBUSB=ON \ -DUSE_SYSTEM_EIGEN3=ON \ - -DUSE_SYSTEM_GTEST=ON .. + -DUSE_SYSTEM_GTEST=ON \ + -DUSE_SYSTEM_LIBINDI=ON \ + -DOPENSOURCE_ONLY=ON .. %make_build @@ -86,24 +84,12 @@ popd # Tests are failing on x86 with GCC7 # https://github.com/OpenPHDGuiding/phd2/issues/608 %ifnarch %{ix86} -make test -C %{_target_platform} +env CTEST_OUTPUT_ON_FAILURE=1 make test -C %{_target_platform} %endif desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{name}.appdata.xml -%post -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %files -f %{name}.lang %doc README.txt README-PHD2.txt PHD_2.0_Architecture.docx @@ -116,6 +102,11 @@ fi %changelog +* Mon May 07 2018 Mattia Verga - 2.6.5-1 +- Upgrade to 2.6.5 +- Remove obsolete scriptlets +- Use upstream patch to disable third party drivers + * Sat Nov 11 2017 Mattia Verga - 2.6.4-3.1 - Change weak dependency to standard dependency for EPEL7 - Change macros to cmake3 in EPEL diff --git a/phd2_2.6.5_disable_cams.patch b/phd2_2.6.5_disable_cams.patch new file mode 100644 index 0000000..db633c2 --- /dev/null +++ b/phd2_2.6.5_disable_cams.patch @@ -0,0 +1,146 @@ +From 0d87a84540e90bb17e6d4183fd32d422c410861f Mon Sep 17 00:00:00 2001 +From: Andy Galasso +Date: Mon, 7 May 2018 12:19:46 -0400 +Subject: [PATCH] Linux: add option to exclude binary drivers from build (ZWO + and QHY) + +--- + cameras.h | 4 +- + thirdparty/thirdparty.cmake | 104 +++++++++++++++++++++++--------------------- + 2 files changed, 58 insertions(+), 50 deletions(-) + +diff --git a/cameras.h b/cameras.h +index 4d4ba67c..a7cdff02 100644 +--- a/cameras.h ++++ b/cameras.h +@@ -109,7 +109,9 @@ + # define QHY_CAMERA + # endif + # define INDI_CAMERA +-# define ZWO_ASI ++# ifdef HAVE_ZWO_CAMERA ++# define ZWO_ASI ++# endif + # define SXV + # ifdef HAVE_SBIG_CAMERA + # define SBIG +diff --git a/thirdparty/thirdparty.cmake b/thirdparty/thirdparty.cmake +index 2bb1de8c..88157b2d 100644 +--- a/thirdparty/thirdparty.cmake ++++ b/thirdparty/thirdparty.cmake +@@ -1207,60 +1207,66 @@ endif() # APPLE + ############################################# + if(UNIX AND NOT APPLE) + +- if (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv6(.*)") +- set(arch "armv6") +- set(qhyarch "armv6") +- elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv7(.*)|arm64|aarch64|^armv8(.*)") +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- set(arch "armv8") +- set(qhyarch "armv8") +- else() +- set(arch "armv7") +- set(qhyarch "armv7") +- endif() +- elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "x86|X86|amd64|AMD64|i.86") +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- set(arch "x64") +- set(qhyarch "x86_64") +- else() +- set(arch "x86") +- set(qhyarch "x86_32") +- endif() +- else() +- message(FATAL_ERROR "unknown system architecture") +- endif() +- +- find_path(ZWO_INCLUDE_DIR ASICamera2.h +- NO_DEFAULT_PATHS +- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras +- ) ++ if (NOT OPENSOURCE_ONLY) ++ ++ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv6(.*)") ++ set(zwoarch "armv6") ++ set(qhyarch "armv6") ++ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv7(.*)|arm64|aarch64|^armv8(.*)") ++ if(CMAKE_SIZEOF_VOID_P EQUAL 8) ++ set(zwoarch "armv8") ++ set(qhyarch "armv8") ++ else() ++ set(zwoarch "armv7") ++ set(qhyarch "armv7") ++ endif() ++ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "x86|X86|amd64|AMD64|i.86") ++ if(CMAKE_SIZEOF_VOID_P EQUAL 8) ++ set(zwoarch "x64") ++ set(qhyarch "x86_64") ++ else() ++ set(zwoarch "x86") ++ set(qhyarch "x86_32") ++ endif() ++ else() ++ message(FATAL_ERROR "unknown system architecture") ++ endif() + +- find_library(asiCamera2 +- NAMES ASICamera2 +- NO_DEFAULT_PATHS +- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/${arch}) +- if(NOT asiCamera2) +- message(FATAL_ERROR "Cannot find the asiCamera2 drivers") +- endif() +- message(STATUS "Found ASICamera2 lib ${asiCamera2}") +- set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${asiCamera2}) ++ find_path(ZWO_INCLUDE_DIR ASICamera2.h ++ NO_DEFAULT_PATHS ++ PATHS ${PHD_PROJECT_ROOT_DIR}/cameras ++ ) + +- if(IS_DIRECTORY ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch}) +- add_definitions(-DHAVE_QHY_CAMERA=1) ++ find_library(asiCamera2 ++ NAMES ASICamera2 ++ NO_DEFAULT_PATHS ++ PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/${zwoarch}) + +- # be careful not to pick up any other qhy lib on the system +- find_library( qhylib +- NAMES qhy +- NO_DEFAULT_PATH +- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch}) +- if(NOT qhylib) +- message(FATAL_ERROR "Cannot find the qhy SDK libs") ++ if(NOT asiCamera2) ++ message(FATAL_ERROR "Cannot find the asiCamera2 drivers") + endif() +- set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib}) +- endif() ++ message(STATUS "Found ASICamera2 lib ${asiCamera2}") ++ add_definitions(-DHAVE_ZWO_CAMERA=1) ++ set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${asiCamera2}) ++ ++ 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 qhy ++ 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() ++ set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib}) ++ endif() ++ ++ # temporarily disable qhy camera pending fix for link error on Ubuntu Trusty ++ remove_definitions(-DHAVE_QHY_CAMERA=1) + +- # temporarily disable qhy camera pending fix for link error on Ubuntu Trusty +- remove_definitions(-DHAVE_QHY_CAMERA=1) ++ endif() # OPENSOURCE_ONLY + + # math library is needed, and should be one of the last things to link to here + find_library(mathlib NAMES m) diff --git a/phd2_appdata_location_change.patch b/phd2_appdata_location_change.patch deleted file mode 100644 index 8e5aace..0000000 --- a/phd2_appdata_location_change.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -U 3 -dHrN -- a/cmake_modules/PHD2Packaging.cmake b/cmake_modules/PHD2Packaging.cmake ---- a/cmake_modules/PHD2Packaging.cmake 2017-09-26 00:21:15.000000000 +0200 -+++ b/cmake_modules/PHD2Packaging.cmake 2017-11-02 18:18:54.455096341 +0100 -@@ -74,7 +74,7 @@ - install(FILES ${phd_src_dir}/phd2.desktop - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/ ) - install(FILES ${phd_src_dir}/phd2.appdata.xml -- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/ ) -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/ ) - - # Make Debian package - set(CPACK_GENERATOR "DEB") diff --git a/phd2_disable_cams.patch b/phd2_disable_cams.patch deleted file mode 100644 index 96ad505..0000000 --- a/phd2_disable_cams.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -U 3 -dHrN -- a/cameras.h b/cameras.h ---- a/cameras.h 2017-09-04 23:55:17.000000000 +0200 -+++ b/cameras.h 2017-09-06 20:25:22.743663856 +0200 -@@ -109,7 +109,7 @@ - # define QHY_CAMERA - # endif - # define INDI_CAMERA --# define ZWO_ASI -+//# define ZWO_ASI - # define SXV - # ifdef HAVE_SBIG_CAMERA - # define SBIG -diff -U 3 -dHrN -- a/thirdparty/thirdparty.cmake b/thirdparty/thirdparty.cmake ---- a/thirdparty/thirdparty.cmake 2017-09-26 00:21:15.000000000 +0200 -+++ b/thirdparty/thirdparty.cmake 2017-11-02 19:04:42.283172290 +0100 -@@ -1042,35 +1042,35 @@ - set(qhyarch "x86_32") - endif() - else() -- message(FATAL_ERROR "unknown system architecture") -+ message(WARNING "unknown system architecture") - endif() - -- find_path(ZWO_INCLUDE_DIR ASICamera2.h -- PATHS -- ${PHD_PROJECT_ROOT_DIR}/cameras -- ) -- -- find_library(asiCamera2 -- NAMES ASICamera2 -- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/${arch}) -- if(NOT asiCamera2) -- message(FATAL_ERROR "Cannot find the asiCamera2 drivers") -- endif() -- set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${asiCamera2}) -- -- if(IS_DIRECTORY ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch}) -- add_definitions(-DHAVE_QHY_CAMERA=1) -+# find_path(ZWO_INCLUDE_DIR ASICamera2.h -+# PATHS -+# ${PHD_PROJECT_ROOT_DIR}/cameras -+# ) -+# -+# find_library(asiCamera2 -+# NAMES ASICamera2 -+# PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/${arch}) -+# if(NOT asiCamera2) -+# message(FATAL_ERROR "Cannot find the asiCamera2 drivers") -+# endif() -+# set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${asiCamera2}) -+# -+# 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 qhy -- 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() -- set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib}) -- endif() -+# find_library( qhylib -+# NAMES qhy -+# 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() -+# set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib}) -+# endif() - - # temporarily disable qhy camera pending fix for link error on Ubuntu Trusty - remove_definitions(-DHAVE_QHY_CAMERA=1) diff --git a/sources b/sources index a106e1d..21f6d85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (phd2-2.6.4-purged.tar.xz) = 1dedb5174d9a393cbf804a4539a38afe9fd035374cd73465bc2474180d58fdbb8b9c677b00204746de72d7d374303a17e07f8537ed71a22cafea1e889f476c86 +SHA512 (phd2-2.6.5-purged.tar.xz) = 7ec3d92d5181dca6f735f923940a464d31b1138a143e3bf31d6a6e231b8b77a504c172f2b6f833f2cab43051f0397d1901f6bc8780b92e16dbd6d556d319e92f