Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 16:37:28 +0000 (UTC)
From:      =?UTF-8?Q?Alexandre_C=2e_Guimar=c3=a3es?= <rigoletto@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r510018 - in head/net-p2p: transmission-cli/files transmission-gtk
Message-ID:  <201908271637.x7RGbS1n074700@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rigoletto
Date: Tue Aug 27 16:37:27 2019
New Revision: 510018
URL: https://svnweb.freebsd.org/changeset/ports/510018

Log:
  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)

Added:
  head/net-p2p/transmission-cli/files/patch-gtk_CMakeLists.txt   (contents, props changed)
Modified:
  head/net-p2p/transmission-gtk/Makefile

Added: head/net-p2p/transmission-cli/files/patch-gtk_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/transmission-cli/files/patch-gtk_CMakeLists.txt	Tue Aug 27 16:37:27 2019	(r510018)
@@ -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)

Modified: head/net-p2p/transmission-gtk/Makefile
==============================================================================
--- head/net-p2p/transmission-gtk/Makefile	Tue Aug 27 15:52:46 2019	(r510017)
+++ head/net-p2p/transmission-gtk/Makefile	Tue Aug 27 16:37:27 2019	(r510018)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-PORTREVISION=	4
+PORTREVISION=	5
 PKGNAMESUFFIX=	-gtk
 
 LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908271637.x7RGbS1n074700>