forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-gfx/nomacs: fix build with dev-libs/quazip-0.7.2
Gentoo-bug: 598354 Package-Manager: portage-2.3.2
- Loading branch information
Michael Palimaka
committed
Oct 28, 2016
1 parent
479cd94
commit e047965
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
inherit cmake-utils fdo-mime | ||
|
||
DESCRIPTION="Qt-based image viewer" | ||
HOMEPAGE="http://www.nomacs.org/" | ||
SRC_URI="https://github.com/${PN}/${PN}/archive/3.4.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="GPL-3+" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~amd64-linux" | ||
IUSE="+jpeg opencv raw tiff zip" | ||
|
||
REQUIRED_USE=" | ||
raw? ( opencv ) | ||
tiff? ( opencv ) | ||
" | ||
|
||
RDEPEND=" | ||
dev-qt/qtconcurrent:5 | ||
dev-qt/qtcore:5 | ||
dev-qt/qtgui:5[jpeg?] | ||
dev-qt/qtnetwork:5 | ||
dev-qt/qtprintsupport:5 | ||
dev-qt/qtsvg:5 | ||
dev-qt/qtwidgets:5 | ||
>=media-gfx/exiv2-0.25:= | ||
opencv? ( media-libs/opencv:=[-qt4] ) | ||
raw? ( >=media-libs/libraw-0.14:= ) | ||
tiff? ( media-libs/tiff:0 ) | ||
zip? ( >=dev-libs/quazip-0.7.2[qt5] ) | ||
" | ||
DEPEND="${RDEPEND} | ||
dev-qt/linguist-tools:5 | ||
virtual/pkgconfig | ||
" | ||
|
||
S="${WORKDIR}/${P}/ImageLounge" | ||
|
||
PATCHES=( "${FILESDIR}/${P}-no-opencv.patch" ) # bug 592134 | ||
|
||
src_prepare() { | ||
default | ||
|
||
# fix build with quazip-0.7.2 - bug 598354 | ||
sed -i -e "s/find_package(QuaZIP/find_package(QuaZip5/" cmake/Unix.cmake || die | ||
sed -e "s/include <quazip/&5/" \ | ||
-i src/DkLoader/DkImageLoader.cpp \ | ||
-i src/DkLoader/DkImageContainer.cpp \ | ||
-i src/DkLoader/DkBasicLoader.cpp \ | ||
-i src/DkGui/DkDialog.cpp || die | ||
|
||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DENABLE_OPENCV=$(usex opencv) | ||
-DENABLE_RAW=$(usex raw) | ||
-DENABLE_TIFF=$(usex tiff) | ||
-DENABLE_QUAZIP=$(usex zip) | ||
-DUSE_SYSTEM_QUAZIP=ON | ||
) | ||
cmake-utils_src_configure | ||
} | ||
|
||
pkg_postinst() { | ||
fdo-mime_desktop_database_update | ||
} | ||
|
||
pkg_postrm() { | ||
fdo-mime_desktop_database_update | ||
} |