Update nomacs to 3.6.1.

- previous version 2.2.0 from 2014, used Qt4, did not build with CMake 3.9
 - current released version from 2017, Qt5

Maintainer timeout (16 days)

PR:		221918
Approved by:	rakuco (mentor)
Submitted by:	tcberner
This commit is contained in:
Adriaan de Groot 2017-09-15 18:31:22 +00:00
parent 1f9a5f3715
commit fd9378b955
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449919
5 changed files with 41 additions and 113 deletions

View File

@ -1,42 +1,37 @@
# $FreeBSD$
PORTNAME= nomacs
PORTVERSION= 2.2.0
PORTREVISION= 8
PORTVERSION= 3.6.1
CATEGORIES= graphics
MASTER_SITES= SF/nomacs/nomacs-${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
MAINTAINER= bsd@tuxproject.de
COMMENT= Small, fast, and free image viewer
LICENSE= GPLv3
BROKEN= Does not build with CMake 3.9, needs update
LIB_DEPENDS= libexiv2.so:graphics/exiv2 \
libsysinfo.so:devel/libsysinfo \
libopencv_core.so:graphics/opencv-core
USES= cmake desktop-file-utils dos2unix pkgconfig tar:bzip2
USE_QT4= gui network linguist_build moc_build \
qmake_build rcc_build uic_build
DOS2UNIX_REGEX= .*\.(cpp|h|txt)
libopencv_highgui.so:graphics/opencv \
libopencv_core.so:graphics/opencv-core \
liblcms2.so:graphics/lcms2 \
libtbb.so:devel/tbb
WRKTOP= ${WRKDIR}
WRKSUBDIR= ${DISTNAME:S,-source,,}
WRKSRC= ${WRKTOP}/${WRKSUBDIR}
USES= cmake desktop-file-utils dos2unix pkgconfig tar:bzip2
USE_QT5= concurrent core gui network printsupport svg widgets \
buildtools_build linguisttools_build qmake_build
DOS2UNIX_REGEX= .*\.(cpp|h|txt)
OPTIONS_DEFINE= RAW TIFF
OPTIONS_DEFAULT= RAW TIFF
RAW_LIB_DEPENDS= libraw.so:graphics/libraw
RAW_CMAKE_OFF= -DENABLE_RAW=0
RAW_CMAKE_BOOL= ENABLE_RAW
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
TIFF_CMAKE_OFF= -DENABLE_TIFF=0
TIFF_CMAKE_BOOL= ENABLE_TIFF
post-patch:
@${REINPLACE_CMD} -e 's|share/man/man1|man/man1|' \
${WRKSRC}/CMakeLists.txt
USE_GITHUB= yes
WRKSRC_SUBDIR= ImageLounge
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (nomacs-2.2.0-source.tar.bz2) = 10825140bd856334aa3ba3a59c93f7205ec9218321d5ded20a70a43af424a884
SIZE (nomacs-2.2.0-source.tar.bz2) = 1392489
TIMESTAMP = 1503992141
SHA256 (nomacs-nomacs-3.6.1_GH0.tar.gz) = 09b289cac51a5fdccc02aa4a60405bbbd4b5bfdb6b2a52ca5b0cb3b0f7a87068
SIZE (nomacs-nomacs-3.6.1_GH0.tar.gz) = 28604636

View File

@ -1,63 +0,0 @@
--- cmake/Unix.cmake
+++ cmake/Unix.cmake
@@ -34,17 +34,15 @@
endif(NOT EXIV2_FOUND)
# search for opencv
-unset(OpenCV_FOUND CACHE)
+unset(OPENCVCORE_FOUND CACHE)
if(ENABLE_OPENCV)
- find_package(OpenCV 2.1.0 REQUIRED core imgproc)
- if (NOT OpenCV_LIBRARIES) # OpenCV_FOUND can not be used since it is set in Ubuntu 12.04 (without finding opencv)
- # Older OpenCV versions only supplied pkg-config files
- if(PKG_CONFIG_FOUND)
- pkg_check_modules(OpenCV opencv>=2.1.0)
- endif()
+ find_package(OpenCVCore COMPONENTS core imgproc REQUIRED)
+
+ if (NOT OPENCV_CORE_LIBRARY)
+ message(FATAL_ERROR "OpenCV libraries not found, but requested.")
endif()
- if(NOT OpenCV_FOUND)
+ if (NOT OPENCVCORE_FOUND)
message(FATAL_ERROR "OpenCV not found, but requested.")
endif()
@@ -56,7 +54,7 @@
# search for libraw
if(ENABLE_RAW)
- if(NOT OpenCV_FOUND)
+ if(NOT OPENCVCORE_FOUND)
message(FATAL_ERROR "OpenCV is mandotory when enabling RAW. You have to enable ENABLE_OPENCV")
endif()
@@ -72,7 +70,7 @@
unset(TIFF_INCLUDE_DIR CACHE)
unset(TIFF_LIBRARY CACHE)
if(ENABLE_TIFF)
- if(NOT OpenCV_FOUND)
+ if(NOT OPENCVCORE_FOUND)
message(FATAL_ERROR "OpenCV is mandotory when enabling TIFF. You have to enable ENABLE_OPENCV")
endif()
find_package(TIFF)
@@ -84,6 +82,9 @@
endif()
endif(ENABLE_TIFF)
+# sysinfo library
+FIND_LIBRARY(SYSINFO_LIBRARY NAMES sysinfo)
+
#search for quazip
unset(QUAZIP_SOURCE_DIRECTORY CACHE)
unset(QUAZIP_INCLUDE_DIRECTORY CACHE)
@@ -128,6 +129,8 @@
SET(WEBP_INCLUDE_DIR "")
SET(WEBP_SOURCE "")
if(ENABLE_WEBP)
+ find_package(Threads REQUIRED)
+
add_definitions(-DNDEBUG -DWEBP_USE_THREAD)
file(GLOB WEBP_DEC_SRCS

View File

@ -1,29 +1,11 @@
--- cmake/UnixBuildTarget.cmake
--- cmake/UnixBuildTarget.cmake.orig 2017-08-29 07:50:23 UTC
+++ cmake/UnixBuildTarget.cmake
@@ -3,7 +3,7 @@
set(BINARY_NAME ${CMAKE_PROJECT_NAME})
link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS})
add_executable(${BINARY_NAME} WIN32 MACOSX_BUNDLE ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_MOC_SRC} ${NOMACS_RCC} ${NOMACS_HEADERS} ${NOMACS_RC} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${LIBQPSD_MOC_SRC} ${WEBP_SOURCE} ${QUAZIP_SOURCES} ${QUAZIP_MOC_SRC})
- target_link_libraries(${BINARY_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARY} ${ZLIB_LIBRARY})
+ target_link_libraries(${BINARY_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OPENCV_CORE_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} ${SYSINFO_LIBRARY} ${VERSION_LIB} ${TIFF_LIBRARY} ${ZLIB_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
@@ -80,7 +80,7 @@ install(FILES ${NOMACS_QM} DESTINATION share/nomacs/tr
# manpage
install(FILES Readme/nomacs.1 DESTINATION share/man/man1)
# appdata
-install(FILES nomacs.appdata.xml DESTINATION /usr/share/appdata/)
+install(FILES nomacs.appdata.xml DESTINATION share/appdata/)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET_TARGET_PROPERTIES(${BINARY_NAME} PROPERTIES LINK_FLAGS -fopenmp)
@@ -49,7 +49,7 @@
set(DLL_NAME lib${CMAKE_PROJECT_NAME})
#set(LIB_NAME optimized ${DLL_NAME}.lib debug ${DLL_NAME}d.lib)
LIST(REMOVE_ITEM NOMACS_SOURCES ${CMAKE_SOURCE_DIR}/src/main.cpp)
- link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS} ${CMAKE_BINARY_DIR})
+ link_directories(${LIBRAW_LIBRARY_DIRS} ${SYSINFO_LIBRARY_DIRS} ${OPENCV_CORE_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS} ${CMAKE_BINARY_DIR})
add_executable(${BINARY_NAME} WIN32 MACOSX_BUNDLE src/main.cpp ${NOMACS_MOC_SRC_SU} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${NOMACS_RC})
target_link_libraries(${BINARY_NAME} ${QT_LIBRARIES} ${VERSION_LIB} ${DLL_NAME})
@@ -57,7 +57,7 @@
set_target_properties(${BINARY_NAME} PROPERTIES IMPORTED_IMPLIB "")
add_library(${DLL_NAME} SHARED ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_MOC_SRC} ${NOMACS_RCC} ${NOMACS_HEADERS} ${NOMACS_RC} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${LIBQPSD_MOC_SRC} ${WEBP_SOURCE} ${QUAZIP_SOURCES} ${QUAZIP_MOC_SRC})
- target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS})
+ target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OPENCV_CORE_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} ${SYSINFO_LIBRARY} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS})
add_dependencies(${BINARY_NAME} ${DLL_NAME})
if (ENABLE_QT5)
# "make dist" target
string(TOLOWER ${PROJECT_NAME} CPACK_PACKAGE_NAME)

View File

@ -1,20 +1,33 @@
bin/nomacs
lib/libnomacsCore.so
lib/libnomacsCore.so.3
lib/libnomacsCore.so.3.6.0
share/appdata/nomacs.appdata.xml
share/applications/nomacs.desktop
share/man/man1/nomacs.1
%%DATADIR%%/translations/nomacs_als.qm
%%DATADIR%%/translations/nomacs_ar.qm
%%DATADIR%%/translations/nomacs_az.qm
%%DATADIR%%/translations/nomacs_bg.qm
%%DATADIR%%/translations/nomacs_bs.qm
%%DATADIR%%/translations/nomacs_cs.qm
%%DATADIR%%/translations/nomacs_de.qm
%%DATADIR%%/translations/nomacs_en.qm
%%DATADIR%%/translations/nomacs_es.qm
%%DATADIR%%/translations/nomacs_fr.qm
%%DATADIR%%/translations/nomacs_hr.qm
%%DATADIR%%/translations/nomacs_it.qm
%%DATADIR%%/translations/nomacs_ja.qm
%%DATADIR%%/translations/nomacs_ko.qm
%%DATADIR%%/translations/nomacs_nl.qm
%%DATADIR%%/translations/nomacs_pl.qm
%%DATADIR%%/translations/nomacs_pt.qm
%%DATADIR%%/translations/nomacs_ru.qm
%%DATADIR%%/translations/nomacs_sl.qm
%%DATADIR%%/translations/nomacs_sk.qm
%%DATADIR%%/translations/nomacs_sl.qm
%%DATADIR%%/translations/nomacs_sr.qm
%%DATADIR%%/translations/nomacs_sv.qm
%%DATADIR%%/translations/nomacs_tr.qm
%%DATADIR%%/translations/nomacs_uk.qm
%%DATADIR%%/translations/nomacs_zh.qm
share/pixmaps/nomacs.png
share/pixmaps/nomacs.svg