tech-pkg archive

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

Re: gtk? and PKGLOCALEDIR=lib



To avoid unnecessary changes in current packages, only setting USE_PKGLOCALEDIR in packages
should indeed be simpler. 

The following, then, simplifies the biz for gnu-configure:
> diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk
> index 2503abe..22ca78a 100644
> --- a/mk/configure/gnu-configure.mk
> +++ b/mk/configure/gnu-configure.mk
> @@ -6,7 +6,7 @@ _PKG_VARS.gnu-configure=        GNU_CONFIGURE GNU_CONFIGURE_PREFIX \
>         SET_LIBDIR GNU_CONFIGURE_LIBSUBDIR \
>         GNU_CONFIGURE_LIBDIR GNU_CONFIGURE_INFODIR GNU_CONFIGURE_MANDIR \
>         CONFIGURE_HAS_LIBDIR CONFIGURE_HAS_MANDIR CONFIGURE_HAS_INFODIR \
> -       OVERRIDE_DIRDEPTH.configure \
> +       CONFIGURE_HAS_LOCALEDIR OVERRIDE_DIRDEPTH.configure \
>         USE_GNU_CONFIGURE_HOST
>  
>  HAS_CONFIGURE=                 defined
> @@ -83,6 +83,21 @@ GNU_CONFIGURE_MANDIR?=       ${GNU_CONFIGURE_PREFIX}/man
>  CONFIGURE_ARGS+=       --mandir=${GNU_CONFIGURE_MANDIR:Q}
>  .endif
>  
> +# PKGLOCALEDIR is the subdirectory of ${PREFIX} into which the locale
> +# specific files are installed unless the software was configured with
> +# an installation prefix other than ${PREFIX}.
> +#
> +CONFIGURE_HAS_LOCALEDIR?=   yes
> +.if ${GNU_CONFIGURE_PREFIX} == ${PREFIX}
> +GNU_CONFIGURE_LOCALEDIR?=  ${GNU_CONFIGURE_PREFIX}/${PKGLOCALEDIR}/locale
> +.else
> +GNU_CONFIGURE_LOCALEDIR?=  ${GNU_CONFIGURE_PREFIX}/locale
> +.endif
> +.if !empty(USE_PKGLOCALEDIR:Uno:M[yY][eE][sS]) && \
> +    !empty(CONFIGURE_HAS_LOCALEDIR:M[yY][eE][sS])
> +CONFIGURE_ARGS+=       --localedir=${GNU_CONFIGURE_LOCALEDIR:Q}
> +.endif
> +
>  ######################################################################
>  ### configure-scripts-override (PRIVATE)
>  ######################################################################


Therefore, if a package sets USE_PKGLOCALEDIR=yes and configure has issues with the
argument '--localedir=...' then CONFIGURE_HAS_LOCALEDIR=no should simply be set as well
(which should be relatively rare for GNU packages).

-- 
Richard PALO



Home | Main Index | Thread Index | Old Index