[packages/nomacs] - fix building with system quazip - rel 1

baggins baggins at pld-linux.org
Sat Apr 16 18:53:05 CEST 2016


commit 7ca6d37a417494796e679bc095921d1c43bb13fe
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Apr 16 18:52:47 2016 +0200

    - fix building with system quazip
    - rel 1

 nomacs.spec      |  8 +++++-
 quazip-qt5.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 1 deletion(-)
---
diff --git a/nomacs.spec b/nomacs.spec
index ef2048e..402d555 100644
--- a/nomacs.spec
+++ b/nomacs.spec
@@ -4,13 +4,14 @@ Summary:	Lightweight image viewer
 Summary(pl.UTF-8):	Lekka przeglądarka obrazków
 Name:		nomacs
 Version:	3.0.0
-Release:	0.1
+Release:	1
 License:	GPL v3+
 Group:		X11/Applications
 Source0:	https://github.com/nomacs/nomacs/releases/download/%{version}/%{name}-%{version}-source.tar.bz2
 # Source0-md5:	e1630a4371d0e0f8aba9358ab20d43e5
 Source1:	%{name}.appdata.xml
 Patch0:		cmake.patch
+Patch1:		quazip-qt5.patch
 URL:		http://nomacs.org/
 BuildRequires:	cmake >= 2.6
 BuildRequires:	desktop-file-utils
@@ -52,6 +53,7 @@ np. projekty architektów w celu pokazania postępów.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 dos2unix Readme/*
 
@@ -62,6 +64,7 @@ dos2unix Readme/*
 install -d build
 cd build
 %cmake \
+	-DENABLE_PLUGINS=ON \
 	-DENABLE_RAW=1 \
 	-DUSE_SYSTEM_WEBP=ON \
 	-DUSE_SYSTEM_QUAZIP=ON \
@@ -90,15 +93,18 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
 rm -rf $RPM_BUILD_ROOT
 
 %post
+/sbin/ldconfig
 %update_desktop_database
 
 %postun
+/sbin/ldconfig
 %update_desktop_database
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc Readme/{COPYRIGHT,LICENSE.OPENCV,README}
 %attr(755,root,root) %{_bindir}/%{name}
+%attr(755,root,root) %{_libdir}/libnomacslib.so
 %{_mandir}/man1/%{name}.1*
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/translations
diff --git a/quazip-qt5.patch b/quazip-qt5.patch
new file mode 100644
index 0000000..d37538a
--- /dev/null
+++ b/quazip-qt5.patch
@@ -0,0 +1,76 @@
+--- nomacs-3.0.0/cmake/FindQuaZIP.cmake~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/cmake/FindQuaZIP.cmake	2016-04-16 18:23:10.391672184 +0200
+@@ -6,9 +6,9 @@
+ if(QUAZIP_INCLUDE_DIRECTORY AND QUAZIP_LIBRARIES)
+   set(QUAZIP_FOUND TRUE)
+ else()
+-  find_path(QUAZIP_INCLUDE_DIRECTORY NAMES quazip/quazip.h)
++  find_path(QUAZIP_INCLUDE_DIRECTORY NAMES quazip5/quazip.h)
+ 
+-  find_library(QUAZIP_LIBRARIES NAMES quazip)
++  find_library(QUAZIP_LIBRARIES NAMES quazip5)
+ 
+   include(FindPackageHandleStandardArgs)
+   find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_INCLUDE_DIRECTORY QUAZIP_LIBRARIES)
+--- nomacs-3.0.0/src/DkImageLoader.cpp~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/src/DkImageLoader.cpp	2016-04-16 18:26:05.820609479 +0200
+@@ -74,7 +74,7 @@
+ 
+ // quazip
+ #ifdef WITH_QUAZIP
+-#include <quazip/JlCompress.h>
++#include <quazip5/JlCompress.h>
+ #endif
+ 
+ // opencv
+@@ -2025,4 +2025,4 @@
+ 	return mCurrentImage->fileName();
+ }
+ 
+-}
+\ No newline at end of file
++}
+--- nomacs-3.0.0/src/DkBasicLoader.cpp~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/src/DkBasicLoader.cpp	2016-04-16 18:26:23.390836011 +0200
+@@ -51,7 +51,7 @@
+ 
+ // quazip
+ #ifdef WITH_QUAZIP
+-#include <quazip/JlCompress.h>
++#include <quazip5/JlCompress.h>
+ #endif
+ 
+ #ifdef WITH_WEBP
+--- nomacs-3.0.0/src/DkImageContainer.cpp~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/src/DkImageContainer.cpp	2016-04-16 18:26:39.697712795 +0200
+@@ -41,7 +41,7 @@
+ 
+ // quazip
+ #ifdef WITH_QUAZIP
+-#include <quazip/JlCompress.h>
++#include <quazip5/JlCompress.h>
+ #endif
+ #pragma warning(pop)		// no warnings from includes - end
+ 
+--- nomacs-3.0.0/src/DkDialog.cpp~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/src/DkDialog.cpp	2016-04-16 18:26:57.017935843 +0200
+@@ -92,7 +92,7 @@
+ 
+ // quazip
+ #ifdef WITH_QUAZIP
+-#include <quazip/JlCompress.h>
++#include <quazip5/JlCompress.h>
+ #endif
+ 
+ #pragma warning(pop)		// no warnings from includes - end
+--- nomacs-3.0.0/cmake/UnixBuildTarget.cmake~	2015-12-17 11:01:42.000000000 +0100
++++ nomacs-3.0.0/cmake/UnixBuildTarget.cmake	2016-04-16 18:44:12.575613004 +0200
+@@ -93,7 +93,7 @@
+ 		  
+   add_library(${DLL_NAME} SHARED ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_HEADERS} ${NOMACS_RC} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${WEBP_SOURCE}  ${QUAZIP_SOURCES} ${NOMACS_RESOURCES} ${NOMACS_RCC})
+   target_include_directories(${DLL_NAME} PRIVATE  ${OpenCV_INCLUDE_DIRS})
+-  target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${WEBP_LIBRARIES} ${WEBP_STATIC_LIBRARIES})
++  target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${QUAZIP_LIBRARIES} ${WEBP_LIBRARIES} ${WEBP_STATIC_LIBRARIES})
+   add_dependencies(${BINARY_NAME} ${DLL_NAME})
+   set_target_properties(${DLL_NAME} PROPERTIES PREFIX "")
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nomacs.git/commitdiff/7ca6d37a417494796e679bc095921d1c43bb13fe



More information about the pld-cvs-commit mailing list