wok-undigest rev 1220

copied gettext recipe from wok-next
author Hans-G?nter Theisgen
date Fri Nov 15 17:25:32 2019 +0100 (2019-11-15)
parents 8c041a0b4dc0
children d3ac6f7487ab
files gettext/description.gettext-base.txt gettext/description.gettext-tools.txt gettext/description.gettext.txt gettext/receipt gettext/stuff/gettext.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gettext/description.gettext-base.txt	Fri Nov 15 17:25:32 2019 +0100
     1.3 @@ -0,0 +1,3 @@
     1.4 +This package offers to programmers, translators, and even users, a well 
     1.5 +integrated set of tools and documentation to develop native language support for
     1.6 +applications.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gettext/description.gettext-tools.txt	Fri Nov 15 17:25:32 2019 +0100
     2.3 @@ -0,0 +1,7 @@
     2.4 +This package is a part of GNU gettext, it contains:
     2.5 +
     2.6 +  * `xgettext`: Extract translatable strings from given input files
     2.7 +  * `msgmerge`: Merges two Uniforum style .po files together
     2.8 +  * `msgfmt`:   Generate binary message catalog from textual translation
     2.9 +    description
    2.10 +  * `msgcat`:   Concatenates and merges the specified PO files
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/gettext/description.gettext.txt	Fri Nov 15 17:25:32 2019 +0100
     3.3 @@ -0,0 +1,17 @@
     3.4 +This is the GNU gettext package. It is interesting for authors or maintainers of
     3.5 +other packages or programs which they want to see internationalized. As one step
     3.6 +the handling of messages in different languages should be implemented. For this
     3.7 +task GNU gettext provides the needed tools and library functions.
     3.8 +
     3.9 +It is also interesting for translators, because GNU gettext provides the
    3.10 +'msgmerge' program, which prepares a message catalog before a translation
    3.11 +update.
    3.12 +
    3.13 +Users of GNU packages should also install GNU gettext because some other GNU
    3.14 +packages will use the gettext program included in this package to
    3.15 +internationalize the messages given by shell scripts.
    3.16 +
    3.17 +  * [The homepage of this package](http://www.gnu.org/software/gettext/)
    3.18 +  * [The primary FTP site for its distribution]
    3.19 +    (ftp://ftp.gnu.org/pub/gnu/gettext/)
    3.20 +  * Send comments and bug reports to <bug-gnu-gettext@gnu.org>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/gettext/receipt	Fri Nov 15 17:25:32 2019 +0100
     4.3 @@ -0,0 +1,88 @@
     4.4 +# SliTaz package receipt v2.
     4.5 +
     4.6 +PACKAGE="gettext"
     4.7 +VERSION="0.19.8.1"
     4.8 +CATEGORY="development"
     4.9 +SHORT_DESC="Utilities for the GNU Translation Project"
    4.10 +MAINTAINER="devel@slitaz.org"
    4.11 +LICENSE="GPL3"
    4.12 +WEB_SITE="https://www.gnu.org/software/gettext/"
    4.13 +LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gettext.html"
    4.14 +
    4.15 +TARBALL="$PACKAGE-$VERSION.tar.xz"
    4.16 +WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    4.17 +
    4.18 +BUILD_DEPENDS="libcroco-dev libxml2-dev glib-dev acl-dev emacs \
    4.19 +libxrandr-dev libxfixes-dev"
    4.20 +SPLIT="$PACKAGE-base $PACKAGE emacs-pkg-po-mode $PACKAGE-dev"
    4.21 +
    4.22 +compile_rules() {
    4.23 +	./configure $CONFIGURE_ARGS &&
    4.24 +	make &&
    4.25 +	make install || return 1
    4.26 +
    4.27 +	chmod 0755 $install/usr/lib/preloadable_libintl.so
    4.28 +
    4.29 +	# stripped gettext.sh
    4.30 +	rm $install/usr/bin/gettext.sh
    4.31 +	install -m755 $stuff/gettext.sh $install/usr/bin
    4.32 +
    4.33 +	# emacs-pkg-po-mode --------
    4.34 +
    4.35 +	site_lisp="$install/usr/share/emacs/site-lisp"
    4.36 +	# Installing start file
    4.37 +	mkdir -p $site_lisp/site-start.d
    4.38 +	cp -a $src/gettext-tools/misc/start-po.el $site_lisp/site-start.d/50-start-po.el
    4.39 +
    4.40 +	# Installing po-mode
    4.41 +	mkdir -p $site_lisp/po-mode
    4.42 +	cp -a $src/gettext-tools/misc/po*.el $site_lisp/po-mode
    4.43 +
    4.44 +	# byte-compile files, remove src
    4.45 +	for file in $site_lisp/po-mode/*.el; do
    4.46 +		echo -n "Byte-compiling $(basename $file)"
    4.47 +		emacs -batch -f batch-byte-compile $file 2>/dev/null; err=$?
    4.48 +		status
    4.49 +		[ "$err" -eq 0 ] && rm -f $file
    4.50 +	done
    4.51 +}
    4.52 +
    4.53 +# Just to be sure when cross compiling, gettext is part of base system.
    4.54 +testsuite() {
    4.55 +	readelf -h $install/usr/bin/gettext
    4.56 +}
    4.57 +
    4.58 +genpkg_rules() {
    4.59 +	case $PACKAGE in
    4.60 +		gettext-base)
    4.61 +			copy gettext gettext.sh envsubst ngettext
    4.62 +			CAT="base-system|base tools"
    4.63 +			DEPENDS="glibc-base"
    4.64 +			;;
    4.65 +		gettext)
    4.66 +			copy msgcat msgfmt msgmerge xgettext \
    4.67 +				libgettextlib*.so* libgettextsrc*.so*
    4.68 +			DEPENDS="acl glib libcroco libgomp libxml2 ncurses"
    4.69 +			TAGS="LFS"
    4.70 +			;;
    4.71 +		emacs-pkg-po-mode)
    4.72 +			copy emacs/
    4.73 +			DEPENDS="emacs"
    4.74 +			CAT="development|Emacs major mode for editing or modifying PO files"
    4.75 +			;;
    4.76 +		*-dev)
    4.77 +			copy @std @dev @rm
    4.78 +			rm -rf $fs/usr/share/doc/ # @dev files here
    4.79 +			# Runtime depends, then dev-depends
    4.80 +			DEPENDS="gettext-base gettext libxml2"
    4.81 +			;;
    4.82 +	esac
    4.83 +}
    4.84 +
    4.85 +post_install_emacs_pkg_po_mode() {
    4.86 +	chroot "$1/" tazpkg reconfigure emacs
    4.87 +}
    4.88 +
    4.89 +post_remove_emacs_pkg_po_mode() {
    4.90 +	chroot "$1/" tazpkg reconfigure emacs
    4.91 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/gettext/stuff/gettext.sh	Fri Nov 15 17:25:32 2019 +0100
     5.3 @@ -0,0 +1,7 @@
     5.4 +#!/bin/sh
     5.5 +eval_gettext() {
     5.6 +  gettext "$1" | (export PATH $(envsubst --variables "$1"); envsubst "$1")
     5.7 +}
     5.8 +eval_ngettext() {
     5.9 +  ngettext "$1" "$2" "$3" | (export PATH $(envsubst --variables "$1 $2"); envsubst "$1 $2")
    5.10 +}