Upstream fix for ki18n_install_ts_files
authorYaakov Selkowitz <yselkowi@redhat.com>
Fri, 14 Jul 2017 18:12:05 +0000 (13:12 -0500)
committerYaakov Selkowitz <yselkowi@redhat.com>
Fri, 14 Jul 2017 18:12:05 +0000 (13:12 -0500)
5.35.0-install-ts.patch [new file with mode: 0644]
kf5-ki18n.cygport

diff --git a/5.35.0-install-ts.patch b/5.35.0-install-ts.patch
new file mode 100644 (file)
index 0000000..6bb8b11
--- /dev/null
@@ -0,0 +1,65 @@
+diff -ur -x po -x 'doxygen.*' kf5-ki18n-5.35.0-2.x86_64/src/ki18n-5.35.0/cmake/KF5I18NMacros.cmake kf5-ki18n-5.36.0-1.x86_64/src/ki18n-5.36.0/cmake/KF5I18NMacros.cmake
+--- kf5-ki18n-5.35.0-2.x86_64/src/ki18n-5.35.0/cmake/KF5I18NMacros.cmake       2017-06-03 05:08:32.000000000 -0500
++++ kf5-ki18n-5.36.0-1.x86_64/src/ki18n-5.36.0/cmake/KF5I18NMacros.cmake       2017-07-06 14:17:44.000000000 -0500
+@@ -123,6 +123,8 @@
+     if (NOT TARGET pofiles)
+         add_custom_target(pofiles)
++    endif()
++    if (NOT TARGET tsfiles)
+         add_custom_target(tsfiles)
+     endif()
+     add_dependencies(pofiles pofiles-${pathmd5})
+@@ -132,7 +134,49 @@
+     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dirname} DESTINATION ${destname})
+ endfunction()
+-function(ki18n_install_ts_files _lang)
+-    message(AUTHOR_WARNING "KI18N_INSTALL_TS_FILES is deprecated!")
+-    ki18n_install(${_lang})
++#install the scripts for a given language in the target folder
++#usage: KI18N_INSTALL_TS_FILES("ja" ${scripts_dir})
++function(KI18N_INSTALL_TS_FILES lang scripts_dir)
++   file(GLOB_RECURSE ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${scripts_dir}/*)
++   set(pmapc_files)
++   foreach(ts_file ${ts_files})
++      string(REGEX MATCH "\\.svn/" in_svn ${ts_file})
++      if(NOT in_svn)
++         # If ts_file is "path/to/foo/bar.js"
++         # We want subpath to contain "foo"
++         get_filename_component(subpath ${ts_file} DIRECTORY)
++         get_filename_component(subpath ${subpath} NAME)
++         install(FILES ${ts_file}
++                 DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath})
++         # If current file is a pmap, also install the compiled version.
++         get_filename_component(ts_ext ${ts_file} EXT)
++         if(ts_ext STREQUAL ".pmap")
++            set(pmap_file ${ts_file})
++            get_filename_component(pmap_basename ${ts_file} NAME)
++            set(pmapc_basename "${pmap_basename}c")
++            set(pmapc_file "${lang}-${subpath}-${pmapc_basename}")
++            add_custom_command(OUTPUT ${pmapc_file}
++               COMMAND ${PYTHON_EXECUTABLE}
++               ARGS
++               -B
++               ${_ki18n_pmap_compile_script}
++               ${CMAKE_CURRENT_SOURCE_DIR}/${pmap_file}
++               ${pmapc_file}
++               DEPENDS ${pmap_file})
++            install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pmapc_file}
++                    DESTINATION ${LOCALE_INSTALL_DIR}/${lang}/LC_SCRIPTS/${subpath}
++                    RENAME ${pmapc_basename})
++            list(APPEND pmapc_files ${pmapc_file})
++         endif()
++      endif()
++   endforeach()
++   if(pmapc_files)
++      if(NOT TARGET pmapfiles)
++         add_custom_target(pmapfiles)
++      endif()
++      set(pmapc_target "pmapfiles-${lang}")
++      string(REPLACE "@" "_" pmapc_target ${pmapc_target})
++      add_custom_target(${pmapc_target} ALL DEPENDS ${pmapc_files})
++      add_dependencies(pmapfiles ${pmapc_target})
++   endif()
+ endfunction()
index 1df0c48f8e6a5dc67f997dd7adc7ae337f207ef0..55c545711395a13efd34a5184057bf6c422930a5 100644 (file)
@@ -2,7 +2,7 @@ inherit kf5
 
 NAME="kf5-ki18n"
 VERSION=5.35.0
-RELEASE=1
+RELEASE=2
 CATEGORY="Libs"
 SUMMARY="KDE 5 text internationalization library"
 DESCRIPTION="KI18n provides functionality for internationalizing user interface
@@ -10,6 +10,8 @@ text in applications, based on the GNU Gettext translation system. It wraps the
 standard Gettext functionality, so that the programmers and translators can use
 the familiar Gettext tools and workflows."
 
+PATCH_URI="5.35.0-install-ts.patch"
+
 PKG_NAMES="libKF5I18n5 libKF5I18n-devel"
 libKF5I18n5_CONTENTS="
        usr/bin/cygKF5I18n-5.dll
This page took 0.03758 seconds and 5 git commands to generate.