1 |
commit: e2b4865213779444685fd3888e478454e09b6add |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 6 17:27:34 2021 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 6 17:27:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2b48652 |
7 |
|
8 |
net-misc/nextcloud-client: remove inkscape build requirement |
9 |
|
10 |
Closes: https://bugs.gentoo.org/800857 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> |
13 |
|
14 |
.../files/nextcloud-client-3.2.3-inkscape.patch | 79 ++++++++++++++++++++++ |
15 |
.../nextcloud-client/nextcloud-client-3.2.3.ebuild | 2 + |
16 |
2 files changed, 81 insertions(+) |
17 |
|
18 |
diff --git a/net-misc/nextcloud-client/files/nextcloud-client-3.2.3-inkscape.patch b/net-misc/nextcloud-client/files/nextcloud-client-3.2.3-inkscape.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..8b02ab2a808 |
21 |
--- /dev/null |
22 |
+++ b/net-misc/nextcloud-client/files/nextcloud-client-3.2.3-inkscape.patch |
23 |
@@ -0,0 +1,79 @@ |
24 |
+diff -Naur desktop-3.2.3.orig/src/gui/CMakeLists.txt desktop-3.2.3/src/gui/CMakeLists.txt |
25 |
+--- desktop-3.2.3.orig/src/gui/CMakeLists.txt 2021-06-24 12:04:33.000000000 +0200 |
26 |
++++ desktop-3.2.3/src/gui/CMakeLists.txt 2021-07-06 19:20:34.225000546 +0200 |
27 |
+@@ -241,75 +241,6 @@ |
28 |
+ set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME}) |
29 |
+ endif() |
30 |
+ |
31 |
+-# Generate png icons from svg |
32 |
+-find_program(INKSCAPE |
33 |
+- NAMES inkscape inkscape.exe |
34 |
+- REQUIRED |
35 |
+- HINTS "C:\\Program Files\\Inkscape\\bin" "/usr/bin" ENV INKSCAPE_DIR) |
36 |
+-# REQUIRED keyword is only supported on CMake 3.18 and above |
37 |
+-if (NOT INKSCAPE) |
38 |
+- message(FATAL_ERROR "Could not find inkscape. Set INKSCAPE_DIR to the path of executable.") |
39 |
+-endif() |
40 |
+- |
41 |
+-function(generate_sized_png_from_svg icon_path size) |
42 |
+- get_filename_component(icon_name_dir ${icon_path} DIRECTORY) |
43 |
+- get_filename_component(icon_name_wle ${icon_path} NAME_WLE) |
44 |
+- |
45 |
+- if (EXISTS "${icon_name_dir}/${size}-${icon_name_wle}.png") |
46 |
+- return() |
47 |
+- endif() |
48 |
+- |
49 |
+- set(icon_output_name "${size}-${icon_name_wle}.png") |
50 |
+- message(STATUS "Generate ${icon_output_name}") |
51 |
+- execute_process(COMMAND |
52 |
+- "${INKSCAPE}" -w ${size} -h ${size} "${icon_path}" -o "${icon_output_name}" |
53 |
+- WORKING_DIRECTORY "${icon_name_dir}" |
54 |
+- RESULT_VARIABLE |
55 |
+- INKSCAPE_SIDEBAR_ERROR |
56 |
+- OUTPUT_QUIET |
57 |
+- ERROR_QUIET) |
58 |
+- |
59 |
+- if (INKSCAPE_SIDEBAR_ERROR) |
60 |
+- message(FATAL_ERROR |
61 |
+- "inkscape could not generate icon: ${INKSCAPE_SIDEBAR_ERROR}") |
62 |
+- else() |
63 |
+- endif() |
64 |
+-endfunction() |
65 |
+- |
66 |
+-if ((APPLICATION_ICON_SET MATCHES "PNG") |
67 |
+- AND |
68 |
+- (NOT EXISTS "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg")) |
69 |
+- # We may have no svg application icon in when customers use PNG |
70 |
+- # icons in brander, but theme.qrc expects a svg icon. |
71 |
+- file(TOUCH "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg") |
72 |
+-endif() |
73 |
+- |
74 |
+-if(APPLE) |
75 |
+- set(MACOS_SIDEBAR_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-sidebar.svg") |
76 |
+- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 16) |
77 |
+- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 32) |
78 |
+- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 64) |
79 |
+- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 128) |
80 |
+- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 256) |
81 |
+-endif() |
82 |
+- |
83 |
+-if(WIN32) |
84 |
+- set(STARTMENU_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-w10startmenu.svg") |
85 |
+- generate_sized_png_from_svg(${STARTMENU_ICON_SVG} 70) |
86 |
+- generate_sized_png_from_svg(${STARTMENU_ICON_SVG} 150) |
87 |
+-endif() |
88 |
+- |
89 |
+-set(APP_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg") |
90 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 16) |
91 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 24) |
92 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 32) |
93 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 48) |
94 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 64) |
95 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 128) |
96 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 256) |
97 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 512) |
98 |
+-generate_sized_png_from_svg(${APP_ICON_SVG} 1024) |
99 |
+- |
100 |
+ file(GLOB_RECURSE OWNCLOUD_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon*") |
101 |
+ if(APPLE) |
102 |
+ file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-sidebar*") |
103 |
|
104 |
diff --git a/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild b/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild |
105 |
index 7e82191086c..4bf713797b3 100644 |
106 |
--- a/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild |
107 |
+++ b/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild |
108 |
@@ -53,6 +53,8 @@ DEPEND="${COMMON_DEPEND} |
109 |
|
110 |
RDEPEND="${COMMON_DEPEND}" |
111 |
|
112 |
+PATCHES=( "${FILESDIR}"/${P}-inkscape.patch ) |
113 |
+ |
114 |
S="${WORKDIR}/desktop-${PV/_/-}" |
115 |
|
116 |
src_prepare() { |