diff options
author | dbj <dbj@pkgsrc.org> | 2022-08-07 22:40:52 +0000 |
---|---|---|
committer | dbj <dbj@pkgsrc.org> | 2022-08-07 22:40:52 +0000 |
commit | a71b3a0675942f6feba0c286ff118fa03991052b (patch) | |
tree | e267eec1e1e7957f95265b242296ada7f79ac5bf /x11 | |
parent | c108a2983c3a05109d7342433f7060a4da477a9c (diff) | |
download | pkgsrc-a71b3a0675942f6feba0c286ff118fa03991052b.tar.gz |
x11/wxGTK32: rebuild .mo locale files during build phase
thanks joerg@ for pointing this out
Diffstat (limited to 'x11')
-rw-r--r-- | x11/wxGTK32/Makefile | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/x11/wxGTK32/Makefile b/x11/wxGTK32/Makefile index fecb9e587b5..3c316ece430 100644 --- a/x11/wxGTK32/Makefile +++ b/x11/wxGTK32/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2022/08/04 04:49:40 dbj Exp $ +# $NetBSD: Makefile,v 1.10 2022/08/07 22:40:52 dbj Exp $ DISTNAME= wxWidgets-3.2.0 PKGNAME= ${DISTNAME:S/wxWidgets/wxGTK32/} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_GITHUB:=wxWidgets/} GITHUB_PROJECT= wxWidgets @@ -15,7 +15,7 @@ COMMENT= Cross-platform wxWidgets GUI library (3.2 stable branch) # LGPLv2 with additional permission; http://opensource.org/licenses/wxwindows LICENSE= gnu-lgpl-v2 -USE_TOOLS+= pkg-config +USE_TOOLS+= pkg-config msgfmt USE_LANGUAGES= c c++ PLIST_SRC+= ${PLIST_SRC_DFLT} @@ -24,16 +24,16 @@ DOCDIR= share/wx-3.2/doc/wxWidgets INSTALLATION_DIRS+= ${DOCDIR} INSTALLATION_DIRS+= bin +INSTALLATION_DIRS+= share/wx-3.2/aclocal REPLACE_SH= wx-config.in wx-config-inplace.in .include "../../mk/bsd.prefs.mk" -# We build using configure by default -# The software supports building using cmake but -# the default cmake configuration is different. -# In particular it installs unused headers. -# +# We now build using cmake by default +# However, the cmake build system installs +# unused headers that the configure build system doesn't. + # This option is expected to be a temporary hack. # We should fix cmake builds to match configure builds # and remove support for building with GNU_CONFIGURE @@ -48,6 +48,10 @@ USE_CMAKE= yes PLIST_SRC+= PLIST.cmake CMAKE_ARGS+= -DCMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON +# Note that this CMAKE_INSTALL_BINDIR override is probably +# not the correct way to do this. In particular if you remove +# this option, it doesn't fall back to "bin" as I expected. +# I will hopefully figure out a better fix for this -- dbj@ CMAKE_ARGS+= -DCMAKE_INSTALL_BINDIR:PATH=libexec/wx-3.2 . if ${OPSYS} != "Linux" # https://github.com/wxWidgets/wxWidgets/issues/22646 @@ -99,13 +103,23 @@ SUBST_SED.fix-paths= -e 's,/usr/pkg/include,${PREFIX}/include,g' SUBST_VARS.fix-paths= PREFIX .endif +post-build: + ${RM} ${WRKSRC}/locale/*.mo + # We could do this: + # ${GMAKE} -C ${WRKSRC}/locale MSGFMT=${TOOLS_PATH.msgfmt:Q} allmo + # But that seems to bring an unnecessary build dependency on gmake + # So instead, we do: + for f in ${WRKSRC}/locale/*.po; do \ + lang=`basename $${f} .po`; \ + ${TOOLS_PATH.msgfmt:Q} -c -o "${WRKSRC}/locale/$${lang}.mo" "$${f}"; \ + done + post-install: for f in ${WRKSRC}/locale/*.mo; do \ - lang="$$(basename "$${f}" .mo)"; \ + lang=`basename $${f} .mo`; \ ${INSTALL_DATA_DIR} "${DESTDIR}/${PREFIX}/share/wx-3.2/locale/$${lang}/LC_MESSAGES"; \ ${INSTALL_DATA} "$${f}" "${DESTDIR}/${PREFIX}/share/wx-3.2/locale/$${lang}/LC_MESSAGES/wxstd.mo"; \ done - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/wx-3.2/aclocal ${INSTALL_DATA} ${WRKSRC}/wxwin.m4 ${DESTDIR}${PREFIX}/share/wx-3.2/aclocal/wxwin.m4 ${INSTALL_DATA} ${WRKSRC}/docs/licence.txt ${DESTDIR}${PREFIX}/${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/docs/lgpl.txt ${DESTDIR}${PREFIX}/${DOCDIR} |