wok annotate libpng+apng/receipt @ rev 24411

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