wok-next annotate xv/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d43bf7aae921
children
rev   line source
al@20503 1 # SliTaz package receipt v2.
pascal@11204 2
pascal@11204 3 PACKAGE="xv"
pascal@11204 4 VERSION="3.10a"
pascal@11204 5 CATEGORY="non-free"
al@20503 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"
al@20503 9 WEB_SITE="http://www.trilon.com/xv/xv.html"
al@20503 10
pascal@11204 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@11204 12 WGET_URL="ftp://ftp.trilon.com/pub/$PACKAGE/$TARBALL"
pascal@11204 13 PATCH1="$SF_MIRROR/png-mng/xv-3.10a-jumbo-patches-20070520.tar.gz"
pascal@11204 14 PATCH2="http://sonic.net/~roelofs/code/xv-3.10a-enhancements.20070520-20081216.diff"
pascal@14337 15 EXTRA_SOURCE_FILES="$PATCH1 $PATCH2"
pascal@11204 16
pascal@11204 17 BUILD_DEPENDS="xorg-dev"
pascal@11204 18
al@20503 19 compile_rules() {
al@21020 20 for i in $PATCH1 $PATCH2; do
al@20503 21 [ -s $SRC/$(basename $i) ] || wget -P $SRC $i
pascal@11204 22 done
al@21020 23 cd ..; tar xzf $SRC/$(basename $PATCH1); cd $src
al@20513 24 #patch -p0 < $SRC/$(basename $PATCH2)
pascal@11204 25 sed -i 's/.*stdio.*/&\n#include <stdlib.h>/' xcmap.c bggen.c
pascal@11204 26 sed -i 's/ gets *(\(.*\))/ fgets(\1,sizeof(\1)-1,stdin)/' vdcomp.c
pascal@11204 27 sed -i 's/mktemp/mkstemp/' *.c
pascal@11204 28 cat > tiff/RANLIB.csh <<EOT
pascal@11204 29 #!/bin/sh
pascal@11204 30 exec ranlib \$@
pascal@11204 31 EOT
pascal@11204 32 chmod +x tiff/RANLIB.csh
pascal@11204 33 sed -i 's|.*extern.*sys_errlist.*|//&|;s|sys_errlist.x.|strerror(x)|' xv.h
pascal@11204 34 sed -i -e 's|undef USE_GUNZIP|define USE_GUNZIP\n#define USE_GETCWD|' \
pascal@11204 35 -e 's|/usr/local/bin/gunzip -q|/bin/gunzip|' config.h
al@20503 36
pascal@11204 37 make jpeg/libjpeg.a &&
pascal@20232 38 make tiff/libtiff.a &&
al@20503 39 make || return 1
al@20503 40
al@20503 41 mkdir -p $fs/usr/bin
al@20503 42 cp xv bggen vdcomp xcmap xvpictoppm $install/usr/bin/
al@20503 43 cook_pick_docs README
pascal@11204 44 }
pascal@11204 45
al@20503 46 genpkg_rules() {
al@20503 47 copy @std
al@20503 48 DEPENDS="xorg"
pascal@11204 49 }