wok-6.x view xv/receipt @ rev 11522

gejengel: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 24 14:21:52 2011 +0100 (2011-12-24)
parents
children b2a632fc9587
line source
1 # SliTaz package receipt.
3 PACKAGE="xv"
4 VERSION="3.10a"
5 CATEGORY="non-free"
6 SHORT_DESC="Interactive image manipulation program for the X Window System."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.trilon.com/xv/xv.html"
10 WGET_URL="ftp://ftp.trilon.com/pub/$PACKAGE/$TARBALL"
11 PATCH1="$SF_MIRROR/png-mng/xv-3.10a-jumbo-patches-20070520.tar.gz"
12 PATCH2="http://sonic.net/~roelofs/code/xv-3.10a-enhancements.20070520-20081216.diff"
14 DEPENDS="xorg"
15 BUILD_DEPENDS="xorg-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 for i in $PATCH1 $PATCH2 ; do
22 [ -s $SOURCES_REPOSITORY/$(basename $i) ] ||
23 wget -P $SOURCES_REPOSITORY $i
24 done
25 cd .. ; tar xzf $SOURCES_REPOSITORY/$(basename $PATCH1) ; cd $src
26 #patch -p0 < $SOURCES_REPOSITORY/$(basename $PATCH2)
27 sed -i 's/.*stdio.*/&\n#include <stdlib.h>/' xcmap.c bggen.c
28 sed -i 's/ gets *(\(.*\))/ fgets(\1,sizeof(\1)-1,stdin)/' vdcomp.c
29 sed -i 's/mktemp/mkstemp/' *.c
30 cat > tiff/RANLIB.csh <<EOT
31 #!/bin/sh
32 exec ranlib \$@
33 EOT
34 chmod +x tiff/RANLIB.csh
35 sed -i 's|.*extern.*sys_errlist.*|//&|;s|sys_errlist.x.|strerror(x)|' xv.h
36 sed -i -e 's|undef USE_GUNZIP|define USE_GUNZIP\n#define USE_GETCWD|' \
37 -e 's|/usr/local/bin/gunzip -q|/bin/gunzip|' config.h
38 make jpeg/libjpeg.a &&
39 make
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr/bin $fs/usr/share/doc/slitaz $fs/usr/share/applications
46 cp $src/xv $src/bggen $src/vdcomp $src/xcmap $src/xvpictoppm $fs/usr/bin
47 cp $src/README $fs/usr/share/doc/slitaz/README.xv
48 cat > $fs/usr/share/applications/xv.desktop <<EOT
49 [Desktop Entry]
50 Encoding=UTF-8
51 Categories=Application;Graphics;Utility
52 Exec=xv %f
53 Icon=image
54 StartupNotify=true
55 Type=Application
56 Terminal=false
57 Name=Image manipulation
58 EOT
59 }