wok-next view gettext/receipt @ rev 20709

cdrdao: add patch.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 26 17:09:29 2018 +0300 (2018-05-26)
parents 2d4ad53f3c69
children 342b30daff76
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gettext"
4 VERSION="0.19.8.1"
5 CATEGORY="development"
6 SHORT_DESC="Utilities for the GNU Translation Project"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/gettext/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gettext.html"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
15 BUILD_DEPENDS_arm="attr-dev ncurses-dev libxml2-tools libxml2-dev"
16 BUILD_DEPENDS="libcroco-dev libxml2-dev glib-dev acl-dev emacs \
17 xorg-libXrandr-dev xorg-libXfixes-dev"
18 SPLIT="gettext-base gettext-tools emacs-pkg-po-mode gettext"
20 compile_rules() {
21 case "$ARCH" in
22 arm) ARCH_ARGS="--disable-acl";;
23 esac
25 ./configure $CONFIGURE_ARGS $ARCH_ARGS && make && make install || return 1
27 chmod 0755 $install/usr/lib/preloadable_libintl.so
29 # stripped gettext.sh
30 rm $install/usr/bin/gettext.sh
31 install -m755 $stuff/gettext.sh $install/usr/bin
33 # emacs-pkg-po-mode --------
35 site_lisp="$install/usr/share/emacs/site-lisp"
36 # Installing start file
37 mkdir -p $site_lisp/site-start.d
38 cp -a $src/gettext-tools/misc/start-po.el $site_lisp/site-start.d/50-start-po.el
40 # Installing po-mode
41 mkdir -p $site_lisp/po-mode
42 cp -a $src/gettext-tools/misc/po*.el $site_lisp/po-mode
44 # byte-compile files, remove src
45 for file in $site_lisp/po-mode/*.el; do
46 echo -n "Byte-compiling $(basename $file)"
47 emacs -batch -f batch-byte-compile $file 2>/dev/null; err=$?
48 status
49 [ "$err" -eq 0 ] && rm -f $file
50 done
51 }
53 # Just to be sure when cross compiling, gettext is part of base system.
54 testsuite() {
55 readelf -h $install/usr/bin/gettext
56 }
58 genpkg_rules() {
59 case $PACKAGE in
60 gettext-base)
61 copy gettext gettext.sh envsubst ngettext
62 CAT="base-system|base tools"
63 DEPENDS="glibc-base"
64 ;;
65 gettext-tools)
66 copy msgcat msgfmt msgmerge xgettext \
67 libgettextlib*.so* libgettextsrc*.so*
68 CAT="libs|tools"
69 DEPENDS="acl attr glib libcroco libgomp liblzma libxml2 ncurses \
70 pcre zlib"
71 ;;
72 emacs-pkg-po-mode)
73 copy emacs/
74 DEPENDS="emacs"
75 CAT="development|Emacs major mode for editing or modifying PO files"
76 ;;
77 gettext)
78 copy @std @dev @rm
79 rm -rf $fs/usr/share/doc/ # @dev files here
80 # Runtime depends, then dev-depends
81 DEPENDS="gettext-base gettext-tools libcroco liblzma libxml2 \
82 acl-dev attr-dev libcroco-dev libxml2-dev glib-dev pcre-dev m4"
83 TAGS="LFS"
84 ;;
85 esac
86 }
88 post_install_emacs_pkg_po_mode() {
89 chroot "$1/" tazpkg reconfigure emacs
90 }
92 post_remove_emacs_pkg_po_mode() {
93 chroot "$1/" tazpkg reconfigure emacs
94 }