tech-pkg archive

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

Re: gettext-tools with g-prefix (was Re: xgettext with UI files support)



Le 25/09/15 16:45, Jonathan Perkin a écrit :
> * On 2015-09-25 at 15:20 BST, Richard PALO wrote:
> 
>> Here are the latest versions of two patches for review putting gettext into PKGNUDIR like other gnu packages:
>>
>> http://www.netbsd.org/~richard/gettext-tools.patch
>> http://www.netbsd.org/~richard/gettext.mk.patch
> 
> I'd like to push these through a full bulk build prior to committing,
> and will run that this weekend.  I think we're now at the stage where
> we understand the problem and definitely want to see this go in, but I
> have a couple of issues with the patches as they stand:
> 
>  - I've not seen a reason why the libxml2 dependency is required,
>    could you explain?  It would be nice to keep important packages
>    like this to the minimum number of dependencies necessary.
> 
>  - If BUILDLINK_INCDIRS.libxml2 is required it should go in libxml2's
>    bl3.mk file (I'll test this).  Packages shouldn't set this
>    themselves.
> 
>  - The PLIST looks wrong.  You should have entries for both the
>    bin/gfoo file and the gnu/bin/foo file.  Also use 'gnu' rather than
>    '${PKGGNUDIR}' for consistency with other packages (the PLIST
>    handling takes care of substituting it with the correct directory).
> 
> The best way to test this is by verifying that the default "gnu" value
> for PKGGNUDIR and also setting it to "" (what we do on SmartOS) both
> package correctly.
> 
> Thanks,
> 
Hi Jonathan,

OK, PLIST is fixed... strange, thought I copied from an example.

As for BUILDLINK_INCDIRS.libxml2, as indicated in the patchset:

> # gettext-tools (gnulib-m4/libxml.m4) prefers not to use pkg-config
> # so kludge in -I${BUILDLINK_PREFIX.libxml2}/include/libxml2
> BUILDLINK_INCDIRS.libxml2+=     include/libxml2

wiz@ suggested to fix it in gettext-tools as a reply to my inquiry:

>> Perhaps a valid reason to put BUILDLINK_INCDIRS.libxml2+=    include/libxml2
>> in devel/gettext-tools/hacks.mk or even explicitly in the Makefile as the workaround.
> 
> Or set the variables that should be set my the weird code, but aren't?
> Anyway, just fix it in gettext-tools and not more globally.

but as to the dependency in general, perhaps we should revisit them... from DEPENDENCIES:

> The following packages should be installed before GNU gettext is installed
> (runtime dependencies that are also build dependencies):
> 
> * GNU libiconv
>   + Not needed on systems with
>       - glibc 2.2 or newer, or
>       - MacOS X 10.3 or newer, or
>       - NetBSD 3.0 or newer.
>     But highly recommended on all other systems.
>     Needed for character set conversion of PO files from/to Unicode.
>   + Homepage:
>     http://www.gnu.org/software/libiconv/
>   + Download:
>     http://ftp.gnu.org/gnu/libiconv/
>     ftp://ftp.gnu.org/gnu/libiconv/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libiconv-prefix=DIR to 'configure'.
> 

okay, in gettext-lib

> * GNU ncurses (preferred)
>   or libtermcap (discouraged) or a curses library (legacy).
>   + Highly recommended.
>     Needed for the --color option of the 'msgcat' program.
>   + Homepage:
>     http://www.gnu.org/software/ncurses/
>   + Download:
>     http://ftp.gnu.org/gnu/ncurses/
>     ftp://ftp.gnu.org/gnu/ncurses/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-ncurses-prefix=DIR or --with-libtermcap-prefix to 'configure'.
> 

okay 

> * expat 1.95 or newer
>   + Recommended.
>     Needed for 'xgettext', so that it can parse Glade XML files.
>   + Homepage:
>     http://expat.sourceforge.net/
>   + Download:
>     http://sourceforge.net/project/showfiles.php?group_id=10127
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libexpat-prefix to 'configure'.
> 

okay

> * A Java runtime and compiler (e.g. GNU gcj or kaffe).
>   + Recommended.
>     Needed for building libintl.jar.  Also needed for 'msgfmt' and
>     'msgunfmt', so that they can handle Java classes and properties files.
>   + Homepage:
>     http://gcc.gnu.org/java/
>     http://www.kaffe.org/
>   + Download:
>     http://ftp.gnu.org/gnu/gcc/
>     http://www.kaffe.org/ftp/pub/kaffe/v1.1.x-development/
> 

Here I explicitly disabled it because it was picking up native java, 

> * A C# runtime and compiler (e.g. pnet or mono).
>   + Recommended.
>     Needed for building GNU.Gettext.dll. Also needed for 'msgfmt' and
>     'msgunfmt', so that they can handle C# resources and assemblies.
>   + Homepage:
>     http://www.southern-storm.com.au/portable_net.html
>   + Download:
>     http://www.southern-storm.com.au/portable_net.html#download
>     http://www.mono-project.com/Downloads
>   + If more than one C# is installed, pass the option --enable-csharp=IMPL
>     to 'configure', to disambiguate.
> 

okay --disable-csharp

> * git 1.6 or newer
>   + Recommended.
>     Needed by the 'autopoint' program, if not configured with --without-git
>     or --with-cvs.
>   + Homepage:
>     http://git-scm.com/
>   + Download:
>     http://www.kernel.org/pub/software/scm/git/
> 

okay  --without-git

> * The archiving utility 'tar'.
>   + Recommended.
>     Needed for the 'autopoint' program.
>     Either the platform's native tar, or GNU tar.
>   + Homepage:
>     http://www.gnu.org/software/tar/
>   + Download:
>     http://ftp.gnu.org/gnu/tar/
>     ftp://ftp.gnu.org/gnu/tar/
> 

implicitly native, should probably be USE_TOOLS+= tar:run

> * The GNU compression utility 'gzip'.
>   + Recommended.
>     Needed for the 'autopoint' program.
>   + Homepage:
>     http://www.gnu.org/software/gzip/
>   + Download:
>     http://ftp.gnu.org/gnu/gzip/
>     ftp://ftp.gnu.org/gnu/gzip/
> 
> * The compression utility 'bzip2'.
>   + Recommended.
>     Needed for the 'autopoint' program, if not configured with --without-bzip2.
>   + Homepage:
>     http://www.bzip.org/
>   + Download:
>     http://www.bzip.org/downloads.html
> 
> * The compression utility 'xz'.
>   + Recommended.
>     Needed for the 'autopoint' program, if not configured with --without-xz.
>   + Homepage:
>     http://tukaani.org/xz/
>   + Download:
>     http://tukaani.org/xz/
> 

seems okay --with-xz

from NEWS:
----------------
> 211 * Installation options:                                                         
>  212   The configure options --with-xz and --with-bzip2 can be used to specify       
>  213   alternate compression methods for the archive used by the 'autopoint'         
>  214   program. These options, together with --with-git, allow to trade              
>  215   dependencies against installed package size. --with-xz has the highest        
>  216   compression rate, followed by --with-git, followed by --with-bzip2.           
>  
----------------

> * libxml2
>   + Optional.
>     Needed for the --color option of the various programs.
>     If not present, a subset of libxml2 (included in this package) will be
>     compiled into libgettextlib.
>   + Homepage:
>     http://xmlsoft.org/
>   + Download:
>     ftp://xmlsoft.org/libxml2/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libxml2-prefix=DIR to 'configure'.
> 

I initially added this one as does many packaging systems, but freebsd-ports doesn't
thus it could be explicitly --with-included-libxml

> * GNOME glib2
>   + Optional.
>     Needed for the --color option of the various programs.
>     If not present, a subset of libglib2 (included in this package) will be
>     compiled into libgettextlib.
>   + Homepage:
>     http://developer.gnome.org/arch/gtk/glib.html
>   + Download:
>     http://ftp.gnome.org/pub/GNOME/sources/glib/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libglib-2.0-prefix=DIR to 'configure'.
> 

implicit, probably could be explicitly --with-included-glib

> * GNOME libcroco 0.6.1 or newer
>   + Optional.
>     Needed for the --color option of the various programs.
>     If not present, a copy of libcroco-0.6.1 (included in this package) will
>     be compiled into libgettextlib.
>   + Homepage:
>     http://www.freespiders.org/projects/libcroco/
>   + Download:
>     http://ftp.gnome.org/pub/GNOME/sources/libcroco/0.6/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libcroco-0.6-prefix=DIR to 'configure'.
> 

okay --with-included-libcroco

> * GNU libunistring
>   + Optional.
>     Needed for the line breaking in PO files and for xgettext.
>     If not present, a subset of libunistring (included in this package) will
>     be compiled into libgettextlib.
>   + Homepage:
>     http://www.gnu.org/software/libunistring/
>   + Download:
>     http://ftp.gnu.org/gnu/libunistring/
>     ftp://ftp.gnu.org/gnu/libunistring/
>   + If it is installed in a nonstandard directory, pass the option
>     --with-libunistring-prefix=DIR to 'configure'.
> 

implicit, probably could be --with-included-libunistring

> * CVS 1.11 or newer
>   + Optional but deprecated.
>     Needed by the 'autopoint' program, if configured with --with-cvs.
>   + Homepage:
>     http://ximbiot.com/cvs/wiki/index.php?title=Main_Page
>     http://www.nongnu.org/cvs/
>   + Download:
>     http://ftp.gnu.org/non-gnu/cvs/
> 

deprecated.

so I'll backstroke and explicitly add the missing --with-include-...

The differential is:
> richard@omnis:/home/richard/src/pkgsrc/devel/gettext-tools$ git diff Makefile 
> diff --git a/devel/gettext-tools/Makefile b/devel/gettext-tools/Makefile
> index 990ca65..fc7ec99 100644
> --- a/devel/gettext-tools/Makefile
> +++ b/devel/gettext-tools/Makefile
> @@ -10,10 +10,13 @@ DISTINFO_FILE=      ${.CURDIR}/../../devel/gettext/distinfo
>  PATCHDIR=      ${.CURDIR}/../../devel/gettext/patches
>  
>  USE_LANGUAGES=         c c++
> -USE_TOOLS+=            xz:run
> +USE_TOOLS+=            xz:run tar:run
>  CONFIGURE_ARGS+=       --program-prefix=g
>  CONFIGURE_ARGS+=       --disable-csharp
> +CONFIGURE_ARGS+=       --with-included-glib
>  CONFIGURE_ARGS+=       --with-included-libcroco
> +CONFIGURE_ARGS+=       --with-included-libxml
> +CONFIGURE_ARGS+=       --with-included-unistring
>  CONFIGURE_ARGS+=       --without-git
>  CONFIGURE_ARGS+=       --with-xz
>  CONFIGURE_ARGS+=       --without-included-gettext
> @@ -42,10 +45,6 @@ BUILDLINK_TRANSFORM+=        rm:-Wl,--disable-auto-import
>  CONFIGURE_ENV+= ac_cv_header_wctype_h=no
>  .endif
>  
> -# gettext-tools (gnulib-m4/libxml.m4) prefers not to use pkg-config
> -# so kludge in -I${BUILDLINK_PREFIX.libxml2}/include/libxml2
> -BUILDLINK_INCDIRS.libxml2+=     include/libxml2
> -
>  SYMLINK_FILES = gettext ngettext envsubst gettext.sh msgcmp msgfmt msgmerge \
>                 msgunfmt xgettext msgattrib msgcat msgcomm msgconv msgen \
>                 msgexec msgfilter msggrep msginit msguniq recode-sr-latin \
> @@ -75,6 +74,5 @@ post-install:
>  
>  .include "../../devel/gettext-lib/buildlink3.mk"
>  .include "../../textproc/expat/buildlink3.mk"
> -.include "../../textproc/libxml2/buildlink3.mk"
>  .include "../../mk/termcap.buildlink3.mk"
>  .include "../../mk/bsd.pkg.mk"

more acceptable?  observations?
-- 
Richard PALO



Home | Main Index | Thread Index | Old Index