diff options
Diffstat (limited to 'packages/media-gfx/nomacs/nomacs.exlib')
-rw-r--r-- | packages/media-gfx/nomacs/nomacs.exlib | 103 |
1 files changed, 69 insertions, 34 deletions
diff --git a/packages/media-gfx/nomacs/nomacs.exlib b/packages/media-gfx/nomacs/nomacs.exlib index 24ed87e..ebccf59 100644 --- a/packages/media-gfx/nomacs/nomacs.exlib +++ b/packages/media-gfx/nomacs/nomacs.exlib @@ -1,51 +1,86 @@ # Distributed under the terms of the GNU General Public License v2 +# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru> -WORK="${WORK}"/ImageLounge require cmake [ api=2 ] -require github +require github [ user=nomacs ] + -export_exlib_phases src_configure SUMMARY="Qt-based image viewer" HOMEPAGE="https://nomacs.org/" LICENCES="GPL-3+" SLOT="0" MYOPTIONS=" - jpeg - opencv - ( - raw - tiff - ) - [[ *requires = opencv ]] - zip + zip [[ description = [ Build support for zip archives ] ]] " +if ! ever at_least 3.10; then + MYOPTIONS+=" + opencv [[ description = [ Build support for media-libs/opencv ] ]] + ( + raw [[ description = [ Add support for raw image formats ] ]] + tiff + ) + [[ *requires = opencv ]] + " +else + MYOPTIONS+=" + raw [[ description = [ Add support for raw image formats ] ]] + tiff + " +fi + + DEPENDENCIES=" - build+run: - x11-libs/qtbase:5[gui] - x11-libs/qtsvg:5 - graphics/exiv2 - opencv? ( media-libs/opencv[qt5] ) - raw? ( media-libs/libraw ) - tiff? ( - x11-libs/qtimageformats[tiff] - media-libs/tiff - ) - zip? ( app-arch/quazip ) + build+run: + graphics/exiv2 + x11-libs/qtbase:5[gui] + x11-libs/qtsvg:5 + raw? ( media-libs/libraw ) + tiff? ( + x11-libs/qtimageformats[tiff] + media-libs/tiff + ) + zip? ( app-arch/quazip ) " -nomacs_src_configure() { - local cmakeparams=() - cmakeparams+=( - $(cmake_enable opencv OPENCV) - $(cmake_enable raw RAW) - $(cmake_enable tiff TIFF) - $(cmake_enable zip QUAZIP) - -DUSE_SYSTEM_QUAZIP=ON - -DENABLE_TRANSLATIONS=ON - ) - ecmake "${cmakeparams[@]}" -} +if ! ever at_least 3.10; then + DEPENDENCIES+=" + opencv? ( media-libs/opencv[qt5] ) + " +else + DEPENDENCIES+=" + media-libs/opencv[qt5] + " +fi + + + +CMAKE_SOURCE="${WORK}"/ImageLounge + +CMAKE_SRC_CONFIGURE_PARAMS+=( + -DUSE_SYSTEM_QUAZIP=ON + -DENABLE_TRANSLATIONS=ON +) + +if ever at_least 3.10; then + CMAKE_SRC_CONFIGURE_PARAMS+=( + -DENABLE_OPENCV=TRUE + ) +fi + + +CMAKE_SRC_CONFIGURE_OPTION_ENABLES=( + "raw RAW" + "tiff TIFF" + "zip QUAZIP" +) + +if ! ever at_least 3.10; then + CMAKE_SRC_CONFIGURE_OPTION_ENABLES+=( + "opencv OPENCV" + ) +fi + |