opkg

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

gen.lua (1306B)


      1 cflags({
      2 	'-D HAVE_CONFIG_H',
      3 	'-I $dir',
      4 	'-I $outdir/include',
      5 	'-isystem $builddir/pkg/libs/zlib/include',
      6 })
      7 
      8 build('awk', '$outdir/pnglibconf.tf4', {
      9 	'$srcdir/pngconf.h',
     10 	'$srcdir/scripts/pnglibconf.dfa',
     11 	'$srcdir/pngusr.dfa',
     12 	'|', '$srcdir/scripts/options.awk',
     13 }, {expr='-f $srcdir/scripts/options.awk out=/dev/stdout version=search'})
     14 build('awk', '$outdir/pnglibconf.c', '$outdir/pnglibconf.tf4', {
     15 	expr='-f $srcdir/scripts/options.awk out=/dev/stdout',
     16 })
     17 build('cpp', '$outdir/pnglibconf.tf1', {'$outdir/pnglibconf.c', '||', 'pkg/libs/zlib/headers'})
     18 build('awk', '$outdir/include/pnglibconf.h', '$outdir/pnglibconf.tf1', {
     19 	expr='-f $srcdir/scripts/dfn.awk out=/dev/stdout',
     20 })
     21 
     22 pkg.hdrs = {
     23 	copy('$outdir/include', '$srcdir', {'png.h', 'pngconf.h'}),
     24 	'$outdir/include/pnglibconf.h',
     25 	install=true,
     26 }
     27 pkg.deps = {'$outdir/include/pnglibconf.h', 'pkg/libs/zlib/headers'}
     28 
     29 lib('libpng.a', [[
     30 	png.c pngerror.c
     31 	pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c
     32 	pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
     33 	@aarch64 arm/(arm_init.c filter_neon.S filter_neon_intrinsics.c palette_neon_intrinsics.c)
     34 	@x86_64 intel/(intel_init.c filter_sse2_intrinsics.c)
     35 	$builddir/pkg/libs/zlib/libz.a
     36 ]])
     37 file('lib/libpng.a', '644', '$outdir/libpng.a')
     38 
     39 fetch('git')