wok-6.x view xv/receipt @ rev 25553
Up amd-microcode (2021.Sep.10), intel-microcode (20230214)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 09 14:47:24 2023 +0000 (19 months ago) |
parents | 7cf304e72e40 |
children |
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 LICENSE="other"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.trilon.com/xv/xv.html"
11 WGET_URL="ftp://ftp.trilon.com/pub/$PACKAGE/$TARBALL"
12 PATCH1="$SF_MIRROR/png-mng/xv-3.10a-jumbo-patches-20070520.tar.gz"
13 PATCH2="http://sonic.net/~roelofs/code/xv-3.10a-enhancements.20070520-20081216.diff"
14 EXTRA_SOURCE_FILES="$PATCH1 $PATCH2"
16 DEPENDS="xorg"
17 BUILD_DEPENDS="xorg-dev"
19 current_version()
20 {
21 wget -O - http://www.trilon.com/xv/downloads.html 2>/dev/null | \
22 sed '/tar.gz/!d;s|.*/xv-||;s|.tar.*||;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 for i in $PATCH1 $PATCH2 ; do
29 [ -s $SOURCES_REPOSITORY/$(basename $i) ] ||
30 wget -P $SOURCES_REPOSITORY $i
31 done
32 cd .. ; tar xzf $SOURCES_REPOSITORY/$(basename $PATCH1) ; cd $src
33 #patch -p0 < $SOURCES_REPOSITORY/$(basename $PATCH2)
34 sed -i 's/.*stdio.*/&\n#include <stdlib.h>/' xcmap.c bggen.c
35 sed -i 's/ gets *(\(.*\))/ fgets(\1,sizeof(\1)-1,stdin)/' vdcomp.c
36 sed -i 's/mktemp/mkstemp/' *.c
37 cat > tiff/RANLIB.csh <<EOT
38 #!/bin/sh
39 exec ranlib \$@
40 EOT
41 chmod +x tiff/RANLIB.csh
42 sed -i 's|.*extern.*sys_errlist.*|//&|;s|sys_errlist.x.|strerror(x)|' xv.h
43 sed -i -e 's|undef USE_GUNZIP|define USE_GUNZIP\n#define USE_GETCWD|' \
44 -e 's|/usr/local/bin/gunzip -q|/bin/gunzip|' config.h
45 make jpeg/libjpeg.a tiff/libtiff.a &&
46 make
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/bin $fs/usr/share/doc/slitaz $fs/usr/share/applications
53 cp $src/xv $src/bggen $src/vdcomp $src/xcmap $src/xvpictoppm $fs/usr/bin
54 cp $src/README $fs/usr/share/doc/slitaz/README.xv
55 cat > $fs/usr/share/applications/xv.desktop <<EOT
56 [Desktop Entry]
57 Encoding=UTF-8
58 Categories=Application;Graphics;Utility
59 Exec=xv %f
60 Icon=image
61 StartupNotify=true
62 Type=Application
63 Terminal=false
64 Name=Image manipulation
65 EOT
66 }