net-p2p/transmission-gtk: Fix .desktop file when NLS disabled.
When the NLS option is disabled the installed transmission-gtk.desktop file contains fields that start with and underscore, like _Name instead of Name. When the NLS option is enabled these are replaced by translations. The attached patch adds a simple sed command that removes the underscores when NLS is disabled. PR: 240125 Submitted by: tijl Approved by: tcberner (mentor)
This commit is contained in:
parent
6daa26c9cf
commit
dc6f6f2591
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=510018
36
net-p2p/transmission-cli/files/patch-gtk_CMakeLists.txt
Normal file
36
net-p2p/transmission-cli/files/patch-gtk_CMakeLists.txt
Normal file
@ -0,0 +1,36 @@
|
||||
--- gtk/CMakeLists.txt.orig 2018-05-01 17:18:29 UTC
|
||||
+++ gtk/CMakeLists.txt
|
||||
@@ -48,15 +48,22 @@ add_custom_command(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
+set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
|
||||
if(ENABLE_NLS)
|
||||
find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge REQUIRED)
|
||||
- set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
|
||||
add_custom_command(
|
||||
OUTPUT ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style --utf8 ${CMAKE_SOURCE_DIR}/po ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
|
||||
VERBATIM
|
||||
)
|
||||
+else()
|
||||
+ add_custom_command(
|
||||
+ OUTPUT ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
+ COMMAND sed s/^_// ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in > ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
+ DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
|
||||
+ VERBATIM
|
||||
+ )
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
@@ -186,8 +193,4 @@ if(INSTALL_DOC)
|
||||
install(FILES ${TR_NAME}-gtk.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
endif()
|
||||
|
||||
-if(ENABLE_NLS)
|
||||
- install(FILES ${${PROJECT_NAME}_DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
-else()
|
||||
- install(FILES transmission-gtk.desktop.in DESTINATION ${CMAKE_INSTALL_DATADIR}/applications RENAME ${TR_NAME}-gtk.desktop)
|
||||
-endif()
|
||||
+install(FILES ${${PROJECT_NAME}_DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
@ -1,6 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
PKGNAMESUFFIX= -gtk
|
||||
|
||||
LIB_DEPENDS= libdbus-glib-1.so:devel/dbus-glib \
|
||||
|
Loading…
Reference in New Issue
Block a user