pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/krita krita: fix build with exiv2>=0.27
details: https://anonhg.NetBSD.org/pkgsrc/rev/c7b5364b561a
branches: trunk
changeset: 336527:c7b5364b561a
user: nia <nia%pkgsrc.org@localhost>
date: Wed Jul 17 00:39:57 2019 +0000
description:
krita: fix build with exiv2>=0.27
would be better to update this, but that seems to require a few things
that aren't in pkgsrc yet. just backport the patch for now.
diffstat:
graphics/krita/distinfo | 11 +-
graphics/krita/patches/patch-CMakeLists.txt | 22 +
graphics/krita/patches/patch-cmake_modules_FindExiv2.cmake | 90 +++++++
graphics/krita/patches/patch-cmake_modules_FindLibExiv2.cmake | 125 ++++++++++
graphics/krita/patches/patch-libs_ui_CMakeLists.txt | 25 ++
graphics/krita/patches/patch-libs_ui_kisexiv2_kis__exif__io.cpp | 73 +++++
graphics/krita/patches/patch-libs_ui_kisexiv2_kis__exiv2.h | 18 +
graphics/krita/patches/patch-libs_ui_kisexiv2_kis__iptc__io.cpp | 27 ++
graphics/krita/patches/patch-libs_ui_kisexiv2_kis__xmp__io.cpp | 29 ++
graphics/krita/patches/patch-plugins_impex_jpeg_CMakeLists.txt | 35 ++
10 files changed, 454 insertions(+), 1 deletions(-)
diffs (truncated from 502 to 300 lines):
diff -r 6bbca2365a32 -r c7b5364b561a graphics/krita/distinfo
--- a/graphics/krita/distinfo Wed Jul 17 00:16:49 2019 +0000
+++ b/graphics/krita/distinfo Wed Jul 17 00:39:57 2019 +0000
@@ -1,8 +1,17 @@
-$NetBSD: distinfo,v 1.4 2018/10/05 20:11:53 maya Exp $
+$NetBSD: distinfo,v 1.5 2019/07/17 00:39:57 nia Exp $
SHA1 (krita-4.1.3.tar.gz) = 7be35bdfa1163d5c718622d1dbe121153201a7d4
RMD160 (krita-4.1.3.tar.gz) = e48ebf62845913ca85c965b0a51d7f82cc91ce72
SHA512 (krita-4.1.3.tar.gz) = b0d9d8fecdf9f49e6431d0e31fdd6df2f53e654f64e93a05c73afbbdff0625c072a00347e667f1ba87c6d145185fe98d0518df3a4c0c56ccb944216a42d53d5c
Size (krita-4.1.3.tar.gz) = 243979838 bytes
+SHA1 (patch-CMakeLists.txt) = 92dee70269c2e9d5c22ef73aeacdeb1c50f21836
+SHA1 (patch-cmake_modules_FindExiv2.cmake) = 2ef3712de4acf89e685e63666212408497b3de53
+SHA1 (patch-cmake_modules_FindLibExiv2.cmake) = 2dd9d73a7f45297c6d697ff3da181dd5c14a4880
SHA1 (patch-krita_data_CMakeLists.txt) = bc0a37c1a60a2e0702c4a87b70ae0abf8359cc45
+SHA1 (patch-libs_ui_CMakeLists.txt) = bbdcb9eb9aeb7ce4c4c3a55c1d82a7c47117741f
+SHA1 (patch-libs_ui_kisexiv2_kis__exif__io.cpp) = 6b982fcd4a8b5fadf0efff6caaa769ccae3c10aa
+SHA1 (patch-libs_ui_kisexiv2_kis__exiv2.h) = 9be33078755584485a1653ec2998a5fce6e32b90
+SHA1 (patch-libs_ui_kisexiv2_kis__iptc__io.cpp) = 088167d6be1b82a0c6618dd26a11b7e1cf2f0c64
+SHA1 (patch-libs_ui_kisexiv2_kis__xmp__io.cpp) = 981e8494d19706da5efdf4b24904161b9a74a425
+SHA1 (patch-plugins_impex_jpeg_CMakeLists.txt) = ed99d0d7e4f116c0d4f780b61bca38884773762c
SHA1 (patch-xcftools.h) = eeeed207e9b1995999a16efbbae91ed8f6255f48
diff -r 6bbca2365a32 -r c7b5364b561a graphics/krita/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/krita/patches/patch-CMakeLists.txt Wed Jul 17 00:39:57 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2019/07/17 00:39:57 nia Exp $
+
+Fix building against exiv2-0.27
+
+Upstream commit:
+https://github.com/KDE/krita/commit/6b6758bb37da4997be36a7e2a839b07278160559.patch
+
+--- CMakeLists.txt.orig 2018-09-26 12:23:39.000000000 +0000
++++ CMakeLists.txt
+@@ -600,11 +600,7 @@ set_package_properties(Eigen3 PROPERTIES
+ ##
+ ## Test for exiv2
+ ##
+-find_package(Exiv2 0.16 REQUIRED)
+-set_package_properties(Exiv2 PROPERTIES
+- DESCRIPTION "Image metadata library and tools"
+- URL "http://www.exiv2.org"
+- PURPOSE "Required by Krita")
++find_package(LibExiv2 0.16 REQUIRED)
+
+ ##
+ ## Test for lcms
diff -r 6bbca2365a32 -r c7b5364b561a graphics/krita/patches/patch-cmake_modules_FindExiv2.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/krita/patches/patch-cmake_modules_FindExiv2.cmake Wed Jul 17 00:39:57 2019 +0000
@@ -0,0 +1,90 @@
+$NetBSD: patch-cmake_modules_FindExiv2.cmake,v 1.1 2019/07/17 00:39:57 nia Exp $
+
+Fix building against exiv2-0.27
+
+Upstream commit:
+https://github.com/KDE/krita/commit/6b6758bb37da4997be36a7e2a839b07278160559.patch
+
+--- cmake/modules/FindExiv2.cmake.orig 2018-09-26 12:18:03.000000000 +0000
++++ cmake/modules/FindExiv2.cmake
+@@ -1,80 +0,0 @@
+-# - Try to find the Exiv2 library
+-#
+-# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need
+-# before doing FIND_PACKAGE(Exiv2). The default is 0.12.
+-#
+-# Once done this will define
+-#
+-# EXIV2_FOUND - system has libexiv2
+-# EXIV2_INCLUDE_DIR - the libexiv2 include directory
+-# EXIV2_LIBRARIES - Link these to use libexiv2
+-# EXIV2_DEFINITIONS - Compiler switches required for using libexiv2
+-#
+-# The minimum required version of Exiv2 can be specified using the
+-# standard syntax, e.g. find_package(Exiv2 0.17)
+-#
+-# For compatibility, also the variable EXIV2_MIN_VERSION can be set to the minimum version
+-# you need before doing FIND_PACKAGE(Exiv2). The default is 0.12.
+-
+-# Copyright (c) 2010, Alexander Neundorf, <neundorf%kde.org@localhost>
+-# Copyright (c) 2008, Gilles Caulier, <caulier.gilles%gmail.com@localhost>
+-#
+-# Redistribution and use is allowed according to the terms of the BSD license.
+-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+-
+-# Support EXIV2_MIN_VERSION for compatibility:
+-if(NOT Exiv2_FIND_VERSION)
+- set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}")
+-endif(NOT Exiv2_FIND_VERSION)
+-
+-# the minimum version of exiv2 we require
+-if(NOT Exiv2_FIND_VERSION)
+- set(Exiv2_FIND_VERSION "0.12")
+-endif(NOT Exiv2_FIND_VERSION)
+-
+-
+-if (NOT WIN32)
+- # use pkg-config to get the directories and then use these values
+- # in the FIND_PATH() and FIND_LIBRARY() calls
+- find_package(PkgConfig)
+- pkg_check_modules(PC_EXIV2 QUIET exiv2)
+- set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER})
+-endif (NOT WIN32)
+-
+-
+-find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp
+- HINTS
+- ${PC_EXIV2_INCLUDEDIR}
+- ${PC_EXIV2_INCLUDE_DIRS}
+- )
+-
+-find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2
+- HINTS
+- ${PC_EXIV2_LIBDIR}
+- ${PC_EXIV2_LIBRARY_DIRS}
+- )
+-
+-
+-# Get the version number from exiv2/version.hpp and store it in the cache:
+-if(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
+- file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT)
+- string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
+- set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}")
+-
+- string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
+- set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}")
+-
+- string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
+- set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}")
+-
+- set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE STRING "Version number of Exiv2" FORCE)
+-endif(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
+-
+-set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}")
+-
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR
+- VERSION_VAR EXIV2_VERSION)
+-
+-mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY)
+-
diff -r 6bbca2365a32 -r c7b5364b561a graphics/krita/patches/patch-cmake_modules_FindLibExiv2.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/krita/patches/patch-cmake_modules_FindLibExiv2.cmake Wed Jul 17 00:39:57 2019 +0000
@@ -0,0 +1,125 @@
+$NetBSD: patch-cmake_modules_FindLibExiv2.cmake,v 1.1 2019/07/17 00:39:57 nia Exp $
+
+Fix building against exiv2-0.27
+
+Upstream commit:
+https://github.com/KDE/krita/commit/6b6758bb37da4997be36a7e2a839b07278160559.patch
+
+--- cmake/modules/FindLibExiv2.cmake.orig 2019-07-16 21:53:46.613301975 +0000
++++ cmake/modules/FindLibExiv2.cmake
+@@ -0,0 +1,115 @@
++#.rst:
++# FindLibExiv2
++# ------------
++#
++# Try to find the Exiv2 library.
++#
++# This will define the following variables:
++#
++# ``LibExiv2_FOUND``
++# System has LibExiv2.
++#
++# ``LibExiv2_VERSION``
++# The version of LibExiv2.
++#
++# ``LibExiv2_INCLUDE_DIRS``
++# This should be passed to target_include_directories() if
++# the target is not used for linking.
++#
++# ``LibExiv2_LIBRARIES``
++# The LibExiv2 library.
++# This can be passed to target_link_libraries() instead of
++# the ``LibExiv2::LibExiv2`` target
++#
++# If ``LibExiv2_FOUND`` is TRUE, the following imported target
++# will be available:
++#
++# ``LibExiv2::LibExiv2``
++# The Exiv2 library
++#
++# Since 5.53.0.
++#
++#=============================================================================
++# Copyright (c) 2018, Christophe Giboudeaux, <christophe%krop.fr@localhost>
++# Copyright (c) 2010, Alexander Neundorf, <neundorf%kde.org@localhost>
++# Copyright (c) 2008, Gilles Caulier, <caulier.gilles%gmail.com@localhost>
++#
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions
++# are met:
++#
++# 1. Redistributions of source code must retain the copyright
++# notice, this list of conditions and the following disclaimer.
++# 2. Redistributions in binary form must reproduce the copyright
++# notice, this list of conditions and the following disclaimer in the
++# documentation and/or other materials provided with the distribution.
++# 3. The name of the author may not be used to endorse or promote products
++# derived from this software without specific prior written permission.
++#
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++#=============================================================================
++
++find_package(PkgConfig QUIET)
++pkg_check_modules(PC_EXIV2 QUIET exiv2)
++
++find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp
++ HINTS ${PC_EXIV2_INCLUDEDIR}
++)
++
++find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2
++ HINTS ${PC_EXIV2_LIBRARY_DIRS}
++)
++
++set(LibExiv2_VERSION ${PC_EXIV2_VERSION})
++
++if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS)
++ # With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp
++ foreach(_exiv2_version_file "version.hpp" "exv_conf.h")
++ if(EXISTS "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}")
++ file(READ "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}" _exiv_version_file_content)
++ string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MAJOR_VERSION_MATCH ${_exiv_version_file_content})
++ string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MINOR_VERSION_MATCH ${_exiv_version_file_content})
++ string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\([0-9]+\\)" EXIV2_PATCH_VERSION_MATCH ${_exiv_version_file_content})
++ if(EXIV2_MAJOR_VERSION_MATCH)
++ string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MAJOR_VERSION ${EXIV2_MAJOR_VERSION_MATCH})
++ string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MINOR_VERSION ${EXIV2_MINOR_VERSION_MATCH})
++ string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_PATCH_VERSION ${EXIV2_PATCH_VERSION_MATCH})
++ endif()
++ endif()
++ endforeach()
++
++ set(LibExiv2_VERSION "${EXIV2_MAJOR_VERSION}.${EXIV2_MINOR_VERSION}.${EXIV2_PATCH_VERSION}")
++endif()
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibExiv2
++ FOUND_VAR LibExiv2_FOUND
++ REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS
++ VERSION_VAR LibExiv2_VERSION
++)
++
++mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES)
++
++if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2)
++ add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED)
++ set_target_properties(LibExiv2::LibExiv2 PROPERTIES
++ IMPORTED_LOCATION "${LibExiv2_LIBRARIES}"
++ INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}"
++ )
++endif()
++
++include(FeatureSummary)
++set_package_properties(LibExiv2 PROPERTIES
++ URL "http://www.exiv2.org"
++ DESCRIPTION "Image metadata support"
++)
diff -r 6bbca2365a32 -r c7b5364b561a graphics/krita/patches/patch-libs_ui_CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/krita/patches/patch-libs_ui_CMakeLists.txt Wed Jul 17 00:39:57 2019 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-libs_ui_CMakeLists.txt,v 1.1 2019/07/17 00:39:57 nia Exp $
+
+Fix building against exiv2-0.27
+
+Upstream commit:
+https://github.com/KDE/krita/commit/6b6758bb37da4997be36a7e2a839b07278160559.patch
+
+--- libs/ui/CMakeLists.txt.orig 2018-09-26 12:18:03.000000000 +0000
++++ libs/ui/CMakeLists.txt
+@@ -1,6 +1,5 @@
+ include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/qtlockedfile
+- ${EXIV2_INCLUDE_DIR}
+ )
+
+ include_directories(SYSTEM
+@@ -541,7 +540,7 @@ add_library(kritaui SHARED ${kritaui_HEA
+ generate_export_header(kritaui BASE_NAME kritaui)
+
+ target_link_libraries(kritaui KF5::CoreAddons KF5::Completion KF5::I18n KF5::ItemViews Qt5::Network
+- kritaimpex kritacolor kritaimage kritalibbrush kritawidgets kritawidgetutils ${PNG_LIBRARIES} ${EXIV2_LIBRARIES}
++ kritaimpex kritacolor kritaimage kritalibbrush kritawidgets kritawidgetutils ${PNG_LIBRARIES} LibExiv2::LibExiv2
+ )
+
+ if (HAVE_QT_MULTIMEDIA)
Home |
Main Index |
Thread Index |
Old Index