pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/wxGTK32 x11/wxGTK32: rebuild .mo locale files duri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/776a17086534
branches:  trunk
changeset: 382888:776a17086534
user:      dbj <dbj%pkgsrc.org@localhost>
date:      Sun Aug 07 22:40:52 2022 +0000

description:
x11/wxGTK32: rebuild .mo locale files during build phase

thanks joerg@ for pointing this out

diffstat:

 x11/wxGTK32/Makefile |  34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diffs (82 lines):

diff -r 73276c0f0ffa -r 776a17086534 x11/wxGTK32/Makefile
--- a/x11/wxGTK32/Makefile      Sun Aug 07 22:22:32 2022 +0000
+++ b/x11/wxGTK32/Makefile      Sun Aug 07 22:40:52 2022 +0000
@@ -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 @@
 # 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 @@
 
 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 @@
 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_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}



Home | Main Index | Thread Index | Old Index