Nomacs : new recipe (#1962)

This commit is contained in:
miqlas
2017-12-26 20:39:14 +01:00
committed by waddlesplash
parent 586e3404ac
commit 8276fd166a
3 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
resource app_signature "@APP_SIGNATURE@";
resource app_flags B_MULTIPLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = @INTERNAL@,
short_info = "Nomacs ImageLounge",
long_info = "@LONG_INFO@"
};
resource vector_icon {
$"6E6369660204FF9903006699080A04B480B480C980B480C980C980B480C9800A"
$"06B840B900C5BFB900404040C680BE40C680BE40400207C380C73FC380C73FC3"
$"80C7A9C2BFC800C329C800C2BFC800BB40C800BB40C800BAD6C800BA80C73FBA"
$"80C7A9BA80C6D6BB40C680BAD6C680BB40C680C2BFC680C2BFC680C329C680C3"
$"80C73FC380C6D6C380C73F0206C149BAB8C149BAB8C0FFBB02C03ABAB8C084BB"
$"02BFEFBA6DC03AB9A8BFEFB9F3C03AB9A8C368B67AC368B67AC3B3B62FC478B6"
$"7AC42DB62FC4C2B6C4C478B789C4C2B73FC478B7890A062020B90020B900B480"
$"B480B480B480B90020B9000A0620CB0020C500B480C500B480C980B900C980B9"
$"00CB000A06CB00CB00C500CB00C500C980C980C980C980C500CB00C5000A06CB"
$"0020CB00B900C980B900C980B480C500B480C50020080A0001002022220A0101"
$"012022220A0101022022220A0101032022220A0101042022220A010105202222"
$"0A0101062022220A010107202222"
};

View File

@@ -0,0 +1,120 @@
SUMMARY="Qt-based image viewer"
DESCRIPTION="nomacs is a free, open source image viewer, which supports \
multiple platforms. You can use it for viewing all common image formats \
including RAW and psd images."
HOMEPAGE="https://nomacs.org/"
COPYRIGHT="2011-2013 Markus Diem
2011-2013 Stefan Fiel
2011-2013 Florian Kleber"
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI_1="https://github.com/nomacs/nomacs/archive/3.8.0.tar.gz"
SOURCE_URI_2="https://github.com/nomacs/nomacs-plugins/archive/3.8.0.tar.gz"
SOURCE_FILENAME_1="nomacs-$portVersion.tar.gz"
SOURCE_FILENAME_2="nomacs-plugins-$portVersion.tar.gz"
CHECKSUM_SHA256_1="f43ad1507f2890db2fbaa0cb110de3ac5efe754cf2e7a053eaabfed4d5e06845"
CHECKSUM_SHA256_2="5a700b27990fb72ae8582e69143389d0cf9c9313f9b361348b9bb8339b3dabdc"
ADDITIONAL_FILES="nomacs.rdef.in"
#PATCHES="nomacs-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
krita$secondaryArchSuffix = $portVersion
app:Krita$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libexiv2$secondaryArchSuffix
lib:libexpat$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libopencv_core$secondaryArchSuffix
lib:libopencv_imgproc$secondaryArchSuffix
lib:libQt5Concurrent$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5PrintSupport$secondaryArchSuffix
lib:libQt5Svg$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libraw$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libexiv2$secondaryArchSuffix
devel:libexpat$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:liblcms2$secondaryArchSuffix
devel:libopencv_core$secondaryArchSuffix
devel:libopencv_imgproc$secondaryArchSuffix
devel:libQt5Concurrent$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5PrintSupport$secondaryArchSuffix
devel:libQt5Svg$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libraw$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:lcov
cmd:make
cmd:python2
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cd ImageLounge
mkdir -p plugins
cp -r $sourceDir2/nomacs-plugins-$portVersion/* plugins
mkdir -p build
cd build
cmake .. \
$cmakeDirArgs
make $jobArgs
}
INSTALL()
{
cd ImageLounge/build
make install
local APP_SIGNATURE="application/x-vnd.qt5-ImageLounge"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local INTERNAL="0"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@INTERNAL@|$INTERNAL|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/nomacs.rdef.in > nomacs.rdef
mkdir -p $appsDir/Nomacs $manDir
mv $prefix/bin/nomacs $appsDir/Nomacs/Nomacs
mv $prefix/lib $appsDir/Nomacs
mv $prefix/share/man/man1 $manDir
rm -rf $prefix/bin $prefix/share
addResourcesToBinaries nomacs.rdef $appsDir/Nomacs/Nomacs
addAppDeskbarSymlink $appsDir/Nomacs/Nomacs
}

View File

@@ -0,0 +1,26 @@
From 105ea97e05c203c9d5623687889b41c7d6637282 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 25 Dec 2017 22:08:42 +0100
Subject: Haiku build fix
diff --git a/ImageLounge/CMakeLists.txt b/ImageLounge/CMakeLists.txt
index d6f9775..82834d2 100644
--- a/ImageLounge/CMakeLists.txt
+++ b/ImageLounge/CMakeLists.txt
@@ -98,9 +98,11 @@ elseif(NOT MSVC)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT HAIKU)
# Codecov
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage")
+else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -g -O0 -fprofile-arcs -ftest-coverage -lexpat")
endif()
# find Qt
--
2.15.0