Catalog names with dots not installed properly by CMAKE
Alexander Neundorf
neundorf at kde.org
Mon Nov 14 20:21:13 UTC 2011
On Monday 14 November 2011, Albert Astals Cid wrote:
> A Dilluns, 7 de novembre de 2011, Albert Astals Cid vàreu escriure:
> > CC'in kde-buildsystem since they are the cmake gurus.
> >
> > A Dilluns, 7 de novembre de 2011, Burkhard Lück vàreu escriure:
> > > Hi,
> > >
> > > trunk has these catalognames with dots:
> > >
> > > playground-multimedia/plasma_applet_org.kde.mediacontainment.po
> > > installed as plasma_applet_org.mo
> > >
> > > playground-base/plasma_applet_org.kde.active.activityscreen.po
> > > installed as plasma_applet_org.mo
> > >
> > > playground-base/plasma_package_org.kde.activityswitcher.po
> > > installed as plasma_package_org.mo
> > >
> > > This bug is already reported here:
> > > get_filename_component interprets first period (.) as start of
> > > extension (EXT)
> > > http://cmake.org/Bug/bug_relationship_graph.php?bug_id=12282&graph=rela
> > > t ion
> > >
> > > Afaik this issue is still not fixed in the latest release of cmake.
> > >
> > > Installation fails silently, so do we need to add a workaround from the
> > > bug report to kdelibs/cmake/modules/FindGettext.cmake?
> >
> > It seems that fixing kdelibs/cmake/modules/FindGettext.cmake should not
> > be that difficult. Alex and other cmake people what do you think?
>
> Noone cares that we fail to properly install files?
>
> I've come up with this patch, anyone against it?
One of the reasons why I was "scared" of this one is that for the cmake 2.8.6
release cycle I upstreamed our modifications to cmake, so currently the
FindGettext.cmake version in cmake 2.8.6 is identical to what we have.
And the files in kdelibs/cmake/modules/ will go away, latest point is the
frameworks release.
So, I don't feel good for any changes going into kdelibs/cmake/modules/ right
now...
Well, after all, this means I'll have to apply this patch also to cmake, so we
can start to require cmake 2.8.7 at some point...
> diff --git a/cmake/modules/FindGettext.cmake
> b/cmake/modules/FindGettext.cmake index e35dced..b15f0b4 100644
> --- a/cmake/modules/FindGettext.cmake
> +++ b/cmake/modules/FindGettext.cmake
> @@ -213,7 +213,8 @@ MACRO(GETTEXT_PROCESS_PO_FILES _lang)
> # message(STATUS "2 all ${_addToAll} dest ${_installDest} args:
> ${_args}")
>
> FOREACH(_current_PO_FILE ${_args})
> - GET_FILENAME_COMPONENT(_basename ${_current_PO_FILE} NAME_WE)
> + GET_FILENAME_COMPONENT(_name ${_current_PO_FILE} NAME)
> + string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
> SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
> add_custom_command(OUTPUT ${_gmoFile}
> COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile}
> ${_current_PO_FILE}
If this behaviour is what you need, go ahead.
And thanks for the patch :-)
Alex
More information about the Kde-buildsystem
mailing list