wok-next annotate xv/receipt @ rev 20232

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