tech-pkg archive

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

gtk? and PKGLOCALEDIR=lib



This mostly concerns:
>../../mk/platform/SCO_SV.mk:PKGLOCALEDIR?=      lib
>../../mk/platform/SunOS.mk:PKGLOCALEDIR?=       lib
>../../mk/platform/UnixWare.mk:PKGLOCALEDIR?=    lib

here in particular SunOS.
Been noticing lots of problems around gettext notably with meld (extract from truss):
> 891244/1:	open64("/opt/local/share/locale/locale.alias", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR.UTF-8/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR.utf8/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.UTF-8/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.utf8/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr/LC_MESSAGES/messages.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR.UTF-8/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR.utf8/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.UTF-8/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.utf8/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr/LC_MESSAGES/gtk30.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	sigaction(SIGPIPE, 0x080464E0, 0x08046550)	= 0
> 891244/1:	open64("/opt/local/share/locale/fr_FR.UTF-8/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR.utf8/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr_FR/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.UTF-8/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr.utf8/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT
> 891244/1:	open64("/opt/local/share/locale/fr/LC_MESSAGES/gtk30-properties.mo", O_RDONLY) Err#2 ENOENT

> $ ls /opt/local/*/locale/*.alias
> /opt/local/lib/locale/locale.alias

Looking further I notice that configure seems to need some TLC because:
> $ egrep -i LOCALEDIR /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status
> /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status:S["localedir"]="/opt/local/share/locale"
> /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status:D["GTK_LOCALEDIR"]=" \"/opt/local/share/locale\""
> /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status:/@localedir@/p
> /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status:*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
> /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/config.status:  s&@localedir@&/opt/local/share/locale&g
but
> $ egrep -i LOCALEDIR /tmp/pkgsrc/x11/gtk3/work/gtk+-3.16.3/Makefile
> localedir = /opt/local/lib/locale

source code uses GTK_LOCALEDIR most everywhere, so the net effect is that even though
the .mo files seem installed in the right place, gtk3 looks elsewhere for it!

The following are the primary patch hunks that seem to get over this:

for Makefile
> @@ -32,6 +32,7 @@ CONFIGURE_ARGS+=      --disable-papi
>  # Avoid regeneration of Makefile.in after configure.ac patch
>  CONFIGURE_ARGS+=       --disable-maintainer-mode
>  MAKE_ENV+=             PKGLOCALEDIR=${PKGLOCALEDIR}
> +CONFIGURE_ARGS+=       --localedir=${PREFIX}/${PKGLOCALEDIR}/locale
>  TEST_TARGET=           check
>  
>  PKGCONFIG_OVERRIDE+=   gdk-3.0.pc.in

and $WRKSRC/configure

> -@@ -24467,8 +24469,20 @@ fi
> +@@ -21918,11 +21920,11 @@ glib_save_datarootdir="$datarootdir"
> + test "x$prefix" = xNONE && prefix=$ac_default_prefix
> + test "x$exec_prefix" = xNONE && exec_prefix=$prefix
> + datarootdir=`eval echo "${datarootdir}"`
> +-if test "x$CATOBJEXT" = "x.mo" ; then
> +-  localedir=`eval echo "${libdir}/locale"`
> +-else
> +-  localedir=`eval echo "${datadir}/locale"`
> +-fi
> ++#if test "x$CATOBJEXT" = "x.mo" ; then
> ++#  localedir=`eval echo "${libdir}/locale"`
> ++#else
> ++#  localedir=`eval echo "${datadir}/locale"`
> ++#fi
> + prefix="$glib_save_prefix"
> + exec_prefix="$glib_save_exec_prefix"
> + datarootdir="$glib_save_datarootdir"
> +@@ -24516,8 +24518,20 @@ fi

I'd just like to know if anybody running on a concerned platforms has
noticed this, and secondly, to ensure that I understand correctly that
USE_PKGLOCALEDIR is indeed meant to replace both $localedir *and* $gnulocaledir
(among others) and that this type of configure fix is not only suitable but correct.

BTW, gtk2 is more or less in the same boat.

Finally, I have:
> $ ls /opt/local/share/locale/fr/LC_MESSAGES/ |wc -w
>       26
Do I presume correctly that *all* these should be found in '/opt/local/lib/locale' on my platform?

-- 
Richard PALO




Home | Main Index | Thread Index | Old Index