Commit: 62c5a34c94dc986cf8103c7a9e2f081b24f31327
Parent: 7845385846f586944712f612a7a06e654db270bf
Author: Randy Palamar
Date: Sat, 18 Nov 2023 19:04:49 -0700
add media/optipng
Diffstat:
8 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/pkg/gen.lua b/pkg/gen.lua
@@ -5,6 +5,7 @@ subgen('devel')
subgen('editors')
subgen('lang')
subgen('libs')
+subgen('media')
subgen('net')
subgen('sys')
subgen('textproc')
diff --git a/pkg/media/gen.lua b/pkg/media/gen.lua
@@ -0,0 +1 @@
+subgen('optipng')
diff --git a/pkg/media/optipng/.gitignore b/pkg/media/optipng/.gitignore
@@ -0,0 +1,2 @@
+/optipng-0.7.7.tar.gz
+/src
diff --git a/pkg/media/optipng/gen.lua b/pkg/media/optipng/gen.lua
@@ -0,0 +1,42 @@
+cflags({
+ '-std=c99', '-Wall', '-Wextra',
+ '-D _POSIX_C_SOURCE',
+ '-isystem $builddir/pkg/libs/libpng/include',
+ '-I $srcdir/src/cexcept',
+ '-I $srcdir/src/gifread',
+ '-I $srcdir/src/minitiff',
+ '-I $srcdir/src/opngreduc',
+ '-I $srcdir/src/pngxtern',
+ '-I $srcdir/src/pnmio',
+})
+
+pkg.deps = {'pkg/libs/libpng/headers'}
+
+lib('libdeps.a', [[src/(
+ opngreduc/opngreduc.c
+ gifread/gifread.c
+ pngxtern/(
+ pngxread.c pngxrbmp.c pngxrgif.c pngxrjpg.c pngxrpnm.c
+ pngxrtif.c
+ pngxio.c pngxmem.c pngxset.c
+ )
+ pnmio/(pnmin.c pnmout.c pnmutil.c)
+ minitiff/(tiffread.c tiffutil.c)
+)]])
+
+exe('optipng', [[
+ src/optipng/(
+ optipng.c
+ optim.c
+ bitset.c
+ ioutil.c
+ ratio.c
+ wildargs.c
+ )
+ libdeps.a
+ $builddir/pkg/libs/libpng/libpng.a.d
+]])
+file('bin/optipng', '755', '$outdir/optipng')
+man({'$srcdir/src/optipng/man/optipng.1'})
+
+fetch('curl')
diff --git a/pkg/media/optipng/sha256 b/pkg/media/optipng/sha256
@@ -0,0 +1 @@
+4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452 optipng-0.7.7.tar.gz
diff --git a/pkg/media/optipng/url b/pkg/media/optipng/url
@@ -0,0 +1 @@
+url = "https://prdownloads.sourceforge.net/optipng/optipng-0.7.7.tar.gz"
diff --git a/pkg/media/optipng/ver b/pkg/media/optipng/ver
@@ -0,0 +1 @@
+0.7.7 r0
diff --git a/sets.lua b/sets.lua
@@ -12,6 +12,7 @@ S.bin = {
'md4c',
'msmtp',
'openbsd',
+ 'optipng',
'pigz',
'pwgen',
'qbe',