cmake: replace intltool with gettext
requires gettext 0.19.7 or higher
This commit is contained in:
parent
444f15edf8
commit
8c160aad2d
|
@ -536,6 +536,11 @@ add_subdirectory(libtransmission)
|
||||||
|
|
||||||
set(MAC_PROJECT_DIR macosx)
|
set(MAC_PROJECT_DIR macosx)
|
||||||
|
|
||||||
|
if(ENABLE_GTK AND ENABLE_NLS)
|
||||||
|
find_package(Gettext 0.19.7 REQUIRED)
|
||||||
|
add_subdirectory(po)
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(P daemon cli utils gtk qt mac)
|
foreach(P daemon cli utils gtk qt mac)
|
||||||
string(TOUPPER "${P}" P_ID)
|
string(TOUPPER "${P}" P_ID)
|
||||||
if(ENABLE_${P_ID})
|
if(ENABLE_${P_ID})
|
||||||
|
@ -550,11 +555,6 @@ if(ENABLE_DAEMON OR ENABLE_GTK OR ENABLE_QT)
|
||||||
tr_install_web(${CMAKE_INSTALL_DATAROOTDIR}/${TR_NAME})
|
tr_install_web(${CMAKE_INSTALL_DATAROOTDIR}/${TR_NAME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GTK AND ENABLE_NLS)
|
|
||||||
find_package(Gettext REQUIRED)
|
|
||||||
add_subdirectory(po)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(INSTALL_DOC)
|
if(INSTALL_DOC)
|
||||||
install(FILES AUTHORS COPYING NEWS README.md extras/rpc-spec.txt extras/send-email-when-torrent-done.sh DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
install(FILES AUTHORS COPYING NEWS README.md extras/rpc-spec.txt extras/send-email-when-torrent-done.sh DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -49,12 +49,10 @@ add_custom_command(
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ENABLE_NLS)
|
if(ENABLE_NLS)
|
||||||
find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge REQUIRED)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
|
set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${${PROJECT_NAME}_DESKTOP_FILE}
|
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}
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --desktop -d ${CMAKE_SOURCE_DIR}/po --template ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in -o ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
|
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
@ -62,7 +60,7 @@ if(ENABLE_NLS)
|
||||||
set(${PROJECT_NAME}_APPDATA_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.appdata.xml")
|
set(${PROJECT_NAME}_APPDATA_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.appdata.xml")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${${PROJECT_NAME}_APPDATA_FILE}
|
OUTPUT ${${PROJECT_NAME}_APPDATA_FILE}
|
||||||
COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --xml-style --utf8 ${CMAKE_SOURCE_DIR}/po ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in ${${PROJECT_NAME}_APPDATA_FILE}
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --xml -d ${CMAKE_SOURCE_DIR}/po --template ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in -o ${${PROJECT_NAME}_APPDATA_FILE}
|
||||||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in
|
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,25 +8,25 @@ Copyright 2017 Endless Mobile, Inc.
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>GPL-2.0 OR GPL-3.0</project_license>
|
<project_license>GPL-2.0 OR GPL-3.0</project_license>
|
||||||
|
|
||||||
<_name>Transmission</_name>
|
<name>Transmission</name>
|
||||||
<_summary>Download and share files over BitTorrent</_summary>
|
<summary>Download and share files over BitTorrent</summary>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
<!-- Translators: these are the application description paragraphs in the AppData file. -->
|
<!-- Translators: these are the application description paragraphs in the AppData file. -->
|
||||||
<_p>
|
<p>
|
||||||
BitTorrent is a peer-to-peer file-sharing protocol that is commonly used to
|
BitTorrent is a peer-to-peer file-sharing protocol that is commonly used to
|
||||||
distribute large amounts of data between multiple users.
|
distribute large amounts of data between multiple users.
|
||||||
</_p>
|
</p>
|
||||||
<_p>
|
<p>
|
||||||
Transmission is a BitTorrent client with an easy-to-use frontend on top a
|
Transmission is a BitTorrent client with an easy-to-use frontend on top a
|
||||||
cross-platform backend.
|
cross-platform backend.
|
||||||
Native frontends are available for OS X and Windows, as well as command line and
|
Native frontends are available for OS X and Windows, as well as command line and
|
||||||
web frontends.
|
web frontends.
|
||||||
</_p>
|
</p>
|
||||||
<_p>
|
<p>
|
||||||
Notable features of Transmission include support for Local Peer Discovery, encryption,
|
Notable features of Transmission include support for Local Peer Discovery, encryption,
|
||||||
DHT, µTP, PEX and Magnet Link.
|
DHT, µTP, PEX and Magnet Link.
|
||||||
</_p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
<url type="homepage">https://transmissionbt.com/</url>
|
<url type="homepage">https://transmissionbt.com/</url>
|
||||||
<screenshots>
|
<screenshots>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
_Name=Transmission
|
Name=Transmission
|
||||||
_GenericName=BitTorrent Client
|
GenericName=BitTorrent Client
|
||||||
_Comment=Download and share files over BitTorrent
|
Comment=Download and share files over BitTorrent
|
||||||
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||||
_Keywords=torrents;downloading;uploading;share;sharing;
|
Keywords=torrents;downloading;uploading;share;sharing;
|
||||||
Exec=transmission-gtk %U
|
Exec=transmission-gtk %U
|
||||||
Icon=transmission
|
Icon=transmission
|
||||||
Terminal=false
|
Terminal=false
|
||||||
|
@ -17,9 +17,9 @@ X-AppInstall-Keywords=torrent
|
||||||
Actions=Pause;Minimize;
|
Actions=Pause;Minimize;
|
||||||
|
|
||||||
[Desktop Action Pause]
|
[Desktop Action Pause]
|
||||||
_Name=Start Transmission with All Torrents Paused
|
Name=Start Transmission with All Torrents Paused
|
||||||
Exec=transmission-gtk --paused
|
Exec=transmission-gtk --paused
|
||||||
|
|
||||||
[Desktop Action Minimize]
|
[Desktop Action Minimize]
|
||||||
_Name=Start Transmission Minimized
|
Name=Start Transmission Minimized
|
||||||
Exec=transmission-gtk --minimized
|
Exec=transmission-gtk --minimized
|
||||||
|
|
Loading…
Reference in New Issue