wok-current view libpng+apng/receipt @ rev 25584

Fix ncursesw build
author Stanislas Leduc <shann@slitaz.org>
date Thu May 25 10:56:33 2023 +0000 (19 months ago)
parents a54924df72eb
children 5926178cd6fa
line source
1 # SliTaz package receipt.
3 PACKAGE="libpng+apng"
4 SOURCE="libpng"
5 VERSION="1.6.37"
6 SERIES="libpng16"
7 CATEGORY="x-window"
8 SHORT_DESC="Loads and saves PNG files (with APNG support)."
9 MAINTAINER="al.bobylev@gmail.com"
10 LICENSE="zlib/libpng"
11 WEB_SITE="http://www.libpng.org/pub/png/libpng.html"
13 TARBALL="$SOURCE-$VERSION.tar.xz"
14 WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL"
16 PATCH="$SOURCE-$VERSION-apng.patch.gz"
17 PATCH_URL="$SF_MIRROR/apng/$SOURCE/$SERIES/$PATCH"
19 DEPENDS="zlib"
20 BUILD_DEPENDS="gawk zlib-dev"
22 HOST_ARCH="i486 arm"
24 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - https://sourceforge.net/projects/libpng/files/ 2>/dev/null | \
28 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
29 sed '/scope="row/!d;s|.*/libpng[0-9]*/||;s|/.*||;q'
30 }
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 [ -s "$SRC/$PATCH" ] || wget -O "$SRC/$PATCH" $PATCH_URL
36 #gzip -cd $SRC/$PATCH | patch -p0
38 # try to fix apng patch...
39 gzip -cd $SRC/$PATCH > patch.apng
40 for i in $(seq 267 -1 248); do
41 sed -i "s|^\+PNG_EXPORT($i,|+PNG_EXPORT($(($i+2)),|" patch.apng
42 done
43 patch -p0 < patch.apng
45 LIBS=-lrt \
46 ./configure \
47 --prefix=/usr \
48 --disable-static \
49 $CONFIGURE_ARGS &&
50 make -j 1 &&
52 case "$ARCH" in
53 arm*)
54 make DESTDIR=$DESTDIR install ;;
55 *)
56 make check | tr [A-Z] [a-z] &&
57 make DESTDIR=$DESTDIR install ;;
58 esac
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/usr/lib
65 cp -a $install/usr/lib/*.so* $fs/usr/lib
66 }