opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

gen.lua (917B)


      1 cflags({
      2 	'-std=c99', '-Wall', '-Wextra',
      3 	'-D _POSIX_C_SOURCE',
      4 	'-isystem $builddir/pkg/libs/libpng/include',
      5 	'-isystem $builddir/pkg/libs/zlib/include',
      6 	'-I $srcdir/third_party/cexcept',
      7 	'-I $srcdir/src/gifread',
      8 	'-I $srcdir/src/minitiff',
      9 	'-I $srcdir/src/opngreduc',
     10 	'-I $srcdir/src/pngxtern',
     11 	'-I $srcdir/src/pnmio',
     12 })
     13 
     14 pkg.deps = {'pkg/libs/libpng/headers', 'pkg/libs/zlib/headers'}
     15 
     16 lib('libdeps.a', [[src/(
     17 	opngreduc/opngreduc.c
     18 	gifread/gifread.c
     19 	pngxtern/(
     20 		pngxread.c pngxrbmp.c pngxrgif.c pngxrjpg.c pngxrpnm.c
     21 		pngxrtif.c
     22 		pngxio.c pngxmem.c pngxset.c
     23 	)
     24 	pnmio/(pnmin.c pnmout.c pnmutil.c)
     25 	minitiff/(tiffread.c tiffutil.c)
     26 )]])
     27 
     28 exe('optipng', [[
     29 	src/optipng/(
     30 		optipng.c
     31 		optim.c
     32 		bitset.c
     33 		ioutil.c
     34 		ratio.c
     35 		wildargs.c
     36 	)
     37 	libdeps.a
     38 	$builddir/pkg/libs/libpng/libpng.a.d
     39 ]])
     40 file('bin/optipng', '755', '$outdir/optipng')
     41 man({'$srcdir/src/optipng/man/optipng.1'})
     42 
     43 fetch('curl')