Author: mlandres Date: Mon Sep 15 11:42:09 2008 New Revision: 11064 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11064&view=rev Log: Fix building of transaltions. Added: trunk/libzypp/cmake/modules/FindGettext.cmake Modified: trunk/libzypp/package/libzypp.changes Added: trunk/libzypp/cmake/modules/FindGettext.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/cmake/modules/FindGettext.cmake?rev=11064&view=auto ============================================================================== --- trunk/libzypp/cmake/modules/FindGettext.cmake (added) +++ trunk/libzypp/cmake/modules/FindGettext.cmake Mon Sep 15 11:42:09 2008 @@ -0,0 +1,63 @@ +# - Find GNU gettext tools +# This module looks for the GNU gettext tools. This module defines the +# following values: +# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool. +# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool. +# GETTEXT_FOUND: True if gettext has been found. +# +# Additionally it provides the following macros: +# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN ) +# This will create a target "translations" which will convert the +# given input po files into the binary output mo file. If the +# ALL option is used, the translations will also be created when +# building the default target. + +FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge) + +FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt) + +MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile) + + SET(_gmoFiles) + GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) + GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) + +#MESSAGE( STATUS "pot: ${_potFile} converted to ${_potBasename}") + + SET(_addToAll) + IF(${_firstPoFile} STREQUAL "ALL") + SET(_addToAll "ALL") + SET(_firstPoFile) + ENDIF(${_firstPoFile} STREQUAL "ALL") + + FOREACH (_currentPoFile ${ARGN}) + GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE) + GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH) + GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE) + SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) + + ADD_CUSTOM_COMMAND( + OUTPUT ${_gmoFile} +#COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} +#DEPENDS ${_absPotFile} ${_absFile} + DEPENDS ${_absFile} + ) + + INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo) + SET(_gmoFiles ${_gmoFiles} ${_gmoFile}) + + ENDFOREACH (_currentPoFile ) + + ADD_CUSTOM_TARGET(translations ${_addToAll} DEPENDS ${_gmoFiles}) + +ENDMACRO(GETTEXT_CREATE_TRANSLATIONS ) + +IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) + SET(GETTEXT_FOUND TRUE) +ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) + SET(GETTEXT_FOUND FALSE) + IF (GetText_REQUIRED) + MESSAGE(FATAL_ERROR "GetText not found") + ENDIF (GetText_REQUIRED) +ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) \ No newline at end of file Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11064&r1=11063&r2=11064&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Mon Sep 15 11:42:09 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Sep 15 11:40:04 CEST 2008 - ma@suse.de + +- Fix building of transaltions. +- revision 11064 + +------------------------------------------------------------------- Sun Sep 14 00:10:21 CEST 2008 - jkupec@suse.cz - ServiceInfo.clearReposTo{Enable,Disable}() methods added -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org