wok-next view qemacs-tiny/receipt @ rev 13256

qemacs-tiny: -Werror=unused-but-set-variable fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 17 09:13:42 2012 +0200 (2012-08-17)
parents f82b9cdc36cd
children 6be450c86868
line source
1 # SliTaz package receipt.
3 PACKAGE="qemacs-tiny"
4 SOURCE="qemacs"
5 VERSION="0.3.2"
6 CATEGORY="development"
7 SHORT_DESC="Tiny emacs clone."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://bellard.org/$SOURCE/"
11 WGET_URL="${WEB_SITE}$TARBALL"
12 TAGS="editor"
14 DEPENDS=""
15 BUILD_DEPENDS=""
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
22 # quick fix for variable 'XXX' set but not used [-Werror=unused-but-set-variable]
23 sed -i -e 's/int count,/int count=count,/' \
24 -e 's/ line_count,/ line_count=line_count,/' \
25 -e 's/int len;/int len=len;/' \
26 -e 's/EditState \*e;/EditState *e=e;/' \
27 -e 's/int err,/int err=err,/' qe.c
28 sed -i 's/size_start,/size_start=size_start,/' buffer.c
29 sed -i 's/stack_ptr = 0;/&; stack[0] = stack[0];/' clang.c
30 sed -i 's/len, offset1/len=len, offset1/' latex-mode.c
31 sed -i 's/len1, len2/len1=len1, len2=len2/' dired.c
33 sed -i 's/\(define SAVED_DATA_SIZE \).*/\1 __builtin_offsetof(EditState,end_of_saved_data)/' qe.h
34 ./configure --prefix=/usr --enable-tiny && make qe
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/bin
41 cp -a $src/qe $fs/usr/bin/qemacs
42 ln -s qemacs $fs/usr/bin/qe
43 }