wok-next rev 20855

svgcleaner: up (0.9.5); add oxipng
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jun 26 15:41:27 2018 +0300 (2018-06-26)
parents 78e2f02bcc8c
children cedb51a0e63e
files oxipng/receipt oxipng/stuff/patches/oxipng.patch oxipng/stuff/patches/series svgcleaner/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/oxipng/receipt	Tue Jun 26 15:41:27 2018 +0300
     1.3 @@ -0,0 +1,28 @@
     1.4 +# SliTaz package receipt v2.
     1.5 +
     1.6 +PACKAGE="oxipng"
     1.7 +VERSION="1.0.4"
     1.8 +CATEGORY="graphics"
     1.9 +SHORT_DESC="PNG optimizer written in Rust"
    1.10 +MAINTAINER="al.bobylev@gmail.com"
    1.11 +LICENSE="MIT"
    1.12 +WEB_SITE="https://github.com/shssoichiro/oxipng"
    1.13 +
    1.14 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.15 +WGET_URL="https://github.com/shssoichiro/oxipng/archive/v$VERSION.tar.gz"
    1.16 +
    1.17 +BUILD_DEPENDS="rust"
    1.18 +
    1.19 +compile_rules() {
    1.20 +	# save caches here
    1.21 +	export CARGO_HOME=/home/cargo
    1.22 +
    1.23 +	cargo build --release &&
    1.24 +	install -Dm755 target/release/oxipng $install/usr/bin/oxipng || return 1
    1.25 +
    1.26 +	cook_pick_docs README.md
    1.27 +}
    1.28 +
    1.29 +genpkg_rules() {
    1.30 +	copy @std
    1.31 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/oxipng/stuff/patches/oxipng.patch	Tue Jun 26 15:41:27 2018 +0300
     2.3 @@ -0,0 +1,49 @@
     2.4 +--- a/README.md
     2.5 ++++ b/README.md
     2.6 +@@ -14,11 +14,13 @@
     2.7 + Oxipng can be downloaded from the [Releases](https://github.com/shssoichiro/oxipng/releases) link on the GitHub page.
     2.8 + 
     2.9 + Oxipng can also be installed from Cargo, via the following command:
    2.10 ++
    2.11 + ```
    2.12 + cargo install oxipng
    2.13 + ```
    2.14 + 
    2.15 + Alternatively, oxipng can be built from source using the latest stable or nightly Rust:
    2.16 ++
    2.17 + ```
    2.18 + git clone https://github.com/shssoichiro/oxipng.git
    2.19 + cd oxipng
    2.20 +@@ -40,16 +42,19 @@
    2.21 + ```
    2.22 + 
    2.23 + The most commonly used options are as follows:
    2.24 ++
    2.25 + * Optimization: `-o 1` through `-o 6`, lower is faster, higher is better compression.
    2.26 + The default (`-o 2`) is sufficiently fast on a modern CPU and provides 30-50% compression
    2.27 + gains over an unoptimized PNG. `-o 4` is 6 times slower than `-o 2` but can provide 5-10%
    2.28 + extra compression over `-o 2`. Using any setting higher than `-o 4` is unlikely
    2.29 + to give any extra compression gains and is not recommended.
    2.30 ++
    2.31 + * Interlacing: `-i 1` will enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm)
    2.32 + PNG interlacing on any images that are processed. `-i 0` will remove interlacing from all
    2.33 + processed images. Not specifying either will keep the same interlacing state as the
    2.34 + input image. Note: Interlacing can add 25-50% to the size of an optimized image. Only use
    2.35 + it if you believe the benefits outweight the costs for your use case.
    2.36 ++
    2.37 + * Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
    2.38 + Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
    2.39 + will never affect rendering of the image. "All" removes all metadata that is not critical
    2.40 +@@ -94,6 +99,7 @@
    2.41 + 
    2.42 + ## Benchmarks
    2.43 + 
    2.44 ++```
    2.45 + Tested oxipng 1.0.3 (compiled on rustc 1.25.0 (84203cac6 2018-03-25)) against OptiPNG version 0.7.7 on Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz with 8 logical cores
    2.46 + 
    2.47 + 
    2.48 +@@ -130,3 +136,4 @@
    2.49 + 
    2.50 + './target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
    2.51 +     4.30x faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
    2.52 ++```
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/oxipng/stuff/patches/series	Tue Jun 26 15:41:27 2018 +0300
     3.3 @@ -0,0 +1,1 @@
     3.4 +oxipng.patch
     4.1 --- a/svgcleaner/receipt	Tue Jun 26 14:16:09 2018 +0300
     4.2 +++ b/svgcleaner/receipt	Tue Jun 26 15:41:27 2018 +0300
     4.3 @@ -1,7 +1,7 @@
     4.4  # SliTaz package receipt v2.
     4.5  
     4.6  PACKAGE="svgcleaner"
     4.7 -VERSION="0.9.3"
     4.8 +VERSION="0.9.5"
     4.9  #COMMIT="9acf547"
    4.10  CATEGORY="graphics"
    4.11  SHORT_DESC="Clean up SVG files from the unnecessary data"
    4.12 @@ -22,8 +22,9 @@
    4.13  	#cargo install svgcleaner --root=$install/usr
    4.14  
    4.15  	cargo build --release
    4.16 -	mkdir -p $install/usr/bin
    4.17 -	cp -a $src/target/release/svgcleaner $install/usr/bin
    4.18 +	install -Dm755 target/release/svgcleaner $install/usr/bin/svgcleaner || return 1
    4.19 +
    4.20 +	cook_pick_docs *.md *.rst
    4.21  }
    4.22  
    4.23  genpkg_rules() {