Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/exiv2/files/, media-gfx/exiv2/
Date: Sun, 15 Oct 2017 07:46:45
Message-Id: 1508053555.a9ff0ac0ad160dc9244ead00171f4502a8f869bf.asturm@gentoo
1 commit: a9ff0ac0ad160dc9244ead00171f4502a8f869bf
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 15 07:45:55 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 15 07:45:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9ff0ac0
7
8 media-gfx/exiv2: Disable broken ccache usage
9
10 Reported-by: Michał Górny <mgorny <AT> gentoo.org>
11 Gentoo-bug: 634302
12 Package-Manager: Portage-2.3.11, Repoman-2.3.3
13
14 media-gfx/exiv2/exiv2-0.26_p20171013.ebuild | 8 ++-
15 .../exiv2/files/exiv2-0.26_p20171013-ccache.patch | 62 ++++++++++++++++++++++
16 2 files changed, 68 insertions(+), 2 deletions(-)
17
18 diff --git a/media-gfx/exiv2/exiv2-0.26_p20171013.ebuild b/media-gfx/exiv2/exiv2-0.26_p20171013.ebuild
19 index 9aa6302ffd0..edc5b163138 100644
20 --- a/media-gfx/exiv2/exiv2-0.26_p20171013.ebuild
21 +++ b/media-gfx/exiv2/exiv2-0.26_p20171013.ebuild
22 @@ -41,7 +41,10 @@ DEPEND="${RDEPEND}
23
24 DOCS=( README.md doc/ChangeLog doc/cmd.txt )
25
26 -PATCHES=( "${FILESDIR}/${P}-cmake.patch" )
27 +PATCHES=(
28 + "${FILESDIR}/${P}-cmake.patch"
29 + "${FILESDIR}/${P}-ccache.patch" # bug 634302
30 +)
31
32 pkg_setup() {
33 use doc && python-any-r1_pkg_setup
34 @@ -82,7 +85,8 @@ src_prepare() {
35
36 multilib_src_configure() {
37 local mycmakeargs=(
38 - -DEXIV2_BUILD_SAMPLES=NO
39 + -DBUILD_WITH_CCACHE=OFF
40 + -DEXIV2_BUILD_SAMPLES=OFF
41 -DEXIV2_BUILD_PO=$(usex nls)
42 -DEXIV2_ENABLE_NLS=$(usex nls)
43 -DEXIV2_ENABLE_PNG=$(usex png)
44
45 diff --git a/media-gfx/exiv2/files/exiv2-0.26_p20171013-ccache.patch b/media-gfx/exiv2/files/exiv2-0.26_p20171013-ccache.patch
46 new file mode 100644
47 index 00000000000..ece62cedce9
48 --- /dev/null
49 +++ b/media-gfx/exiv2/files/exiv2-0.26_p20171013-ccache.patch
50 @@ -0,0 +1,62 @@
51 +From 9686aa8857bcd992ee4f23d20e80dfc31679f67a Mon Sep 17 00:00:00 2001
52 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
53 +Date: Sun, 15 Oct 2017 09:28:09 +0200
54 +Subject: [PATCH] Add build switch to disable auto ccache
55 +
56 +Current usage of ccache leads to sandbox issues.
57 +Be able to switch it off for package managers that already can
58 +make use of ccache for build.
59 +---
60 + CMakeLists.txt | 1 +
61 + config/findDependencies.cmake | 12 +++++++-----
62 + config/printSummary.cmake | 1 +
63 + 3 files changed, 9 insertions(+), 5 deletions(-)
64 +
65 +diff --git a/CMakeLists.txt b/CMakeLists.txt
66 +index 80fa907c..a60d4b2e 100644
67 +--- a/CMakeLists.txt
68 ++++ b/CMakeLists.txt
69 +@@ -41,6 +41,7 @@ option( EXIV2_ENABLE_SSH "USE Libssh for SshIo"
70 + option( EXIV2_BUILD_SAMPLES "Build sample applications" ON )
71 + option( EXIV2_BUILD_PO "Build translations files" OFF )
72 + option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON )
73 ++option( BUILD_WITH_CCACHE "Use ccache to speed up compile time" ON )
74 +
75 + if ( EXIV2_ENABLE_WEBREADY )
76 + set ( EXIV2_ENABLE_CURL ON )
77 +diff --git a/config/findDependencies.cmake b/config/findDependencies.cmake
78 +index 16967763..d6af9488 100644
79 +--- a/config/findDependencies.cmake
80 ++++ b/config/findDependencies.cmake
81 +@@ -58,9 +58,11 @@ if( EXIV2_ENABLE_BUILD_PO )
82 + endif()
83 + endif()
84 +
85 +-find_program(CCACHE_FOUND ccache)
86 +-if(CCACHE_FOUND)
87 +- message(STATUS "Program ccache found")
88 +- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
89 +- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
90 ++if( BUILD_WITH_CCACHE )
91 ++ find_program(CCACHE_FOUND ccache)
92 ++ if(CCACHE_FOUND)
93 ++ message(STATUS "Program ccache found")
94 ++ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
95 ++ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
96 ++ endif()
97 + endif()
98 +diff --git a/config/printSummary.cmake b/config/printSummary.cmake
99 +index 21e444a4..62ba4e98 100644
100 +--- a/config/printSummary.cmake
101 ++++ b/config/printSummary.cmake
102 +@@ -40,6 +40,7 @@ endif()
103 + OptionOutput( "Building exiv2 command: " EXIV2_BUILD_EXIV2_COMMAND )
104 + OptionOutput( "Building samples: " EXIV2_BUILD_SAMPLES )
105 + OptionOutput( "Building PO files: " EXIV2_BUILD_PO )
106 ++OptionOutput( "Using ccache: " BUILD_WITH_CCACHE )
107 +
108 +
109 + message( STATUS "------------------------------------------------------------------" )
110 +--
111 +2.14.2
112 +