diff options
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/nextcloud-client/files/nextcloud-client-3.2.3-inkscape.patch | 79 | ||||
-rw-r--r-- | net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild | 2 |
2 files changed, 81 insertions, 0 deletions
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 new file mode 100644 index 000000000000..8b02ab2a8086 --- /dev/null +++ b/net-misc/nextcloud-client/files/nextcloud-client-3.2.3-inkscape.patch @@ -0,0 +1,79 @@ +diff -Naur desktop-3.2.3.orig/src/gui/CMakeLists.txt desktop-3.2.3/src/gui/CMakeLists.txt +--- desktop-3.2.3.orig/src/gui/CMakeLists.txt 2021-06-24 12:04:33.000000000 +0200 ++++ desktop-3.2.3/src/gui/CMakeLists.txt 2021-07-06 19:20:34.225000546 +0200 +@@ -241,75 +241,6 @@ + set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME}) + endif() + +-# Generate png icons from svg +-find_program(INKSCAPE +- NAMES inkscape inkscape.exe +- REQUIRED +- HINTS "C:\\Program Files\\Inkscape\\bin" "/usr/bin" ENV INKSCAPE_DIR) +-# REQUIRED keyword is only supported on CMake 3.18 and above +-if (NOT INKSCAPE) +- message(FATAL_ERROR "Could not find inkscape. Set INKSCAPE_DIR to the path of executable.") +-endif() +- +-function(generate_sized_png_from_svg icon_path size) +- get_filename_component(icon_name_dir ${icon_path} DIRECTORY) +- get_filename_component(icon_name_wle ${icon_path} NAME_WLE) +- +- if (EXISTS "${icon_name_dir}/${size}-${icon_name_wle}.png") +- return() +- endif() +- +- set(icon_output_name "${size}-${icon_name_wle}.png") +- message(STATUS "Generate ${icon_output_name}") +- execute_process(COMMAND +- "${INKSCAPE}" -w ${size} -h ${size} "${icon_path}" -o "${icon_output_name}" +- WORKING_DIRECTORY "${icon_name_dir}" +- RESULT_VARIABLE +- INKSCAPE_SIDEBAR_ERROR +- OUTPUT_QUIET +- ERROR_QUIET) +- +- if (INKSCAPE_SIDEBAR_ERROR) +- message(FATAL_ERROR +- "inkscape could not generate icon: ${INKSCAPE_SIDEBAR_ERROR}") +- else() +- endif() +-endfunction() +- +-if ((APPLICATION_ICON_SET MATCHES "PNG") +- AND +- (NOT EXISTS "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg")) +- # We may have no svg application icon in when customers use PNG +- # icons in brander, but theme.qrc expects a svg icon. +- file(TOUCH "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg") +-endif() +- +-if(APPLE) +- set(MACOS_SIDEBAR_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-sidebar.svg") +- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 16) +- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 32) +- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 64) +- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 128) +- generate_sized_png_from_svg(${MACOS_SIDEBAR_ICON_SVG} 256) +-endif() +- +-if(WIN32) +- set(STARTMENU_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-w10startmenu.svg") +- generate_sized_png_from_svg(${STARTMENU_ICON_SVG} 70) +- generate_sized_png_from_svg(${STARTMENU_ICON_SVG} 150) +-endif() +- +-set(APP_ICON_SVG "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg") +-generate_sized_png_from_svg(${APP_ICON_SVG} 16) +-generate_sized_png_from_svg(${APP_ICON_SVG} 24) +-generate_sized_png_from_svg(${APP_ICON_SVG} 32) +-generate_sized_png_from_svg(${APP_ICON_SVG} 48) +-generate_sized_png_from_svg(${APP_ICON_SVG} 64) +-generate_sized_png_from_svg(${APP_ICON_SVG} 128) +-generate_sized_png_from_svg(${APP_ICON_SVG} 256) +-generate_sized_png_from_svg(${APP_ICON_SVG} 512) +-generate_sized_png_from_svg(${APP_ICON_SVG} 1024) +- + file(GLOB_RECURSE OWNCLOUD_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon*") + if(APPLE) + file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-sidebar*") diff --git a/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild b/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild index 7e82191086ca..4bf713797b35 100644 --- a/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild +++ b/net-misc/nextcloud-client/nextcloud-client-3.2.3.ebuild @@ -53,6 +53,8 @@ DEPEND="${COMMON_DEPEND} RDEPEND="${COMMON_DEPEND}" +PATCHES=( "${FILESDIR}"/${P}-inkscape.patch ) + S="${WORKDIR}/desktop-${PV/_/-}" src_prepare() { |