linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit faa1e2e94bb66017b00f696536ff0b82c750452a parent 85d5f914de8072a5574dc90f368373624f1b686d Author: Jul <jul@9o.is> Date: Fri, 31 Oct 2025 00:58:14 -0400 add libpng Diffstat:
| M | .gitmodules | | | 4 | ++++ |
| M | gen.sh | | | 1 | + |
| M | ninja/rules.ninja | | | 6 | ++++++ |
| A | pkg/libpng/config.h | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
| A | pkg/libpng/gen.sh | | | 62 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | pkg/libpng/repo | | | 1 | + |
6 files changed, 118 insertions(+), 0 deletions(-)
diff --git a/.gitmodules b/.gitmodules @@ -118,3 +118,7 @@ path = pkg/bzip2/repo url = git://sourceware.org/git/bzip2.git ignore = all +[submodule "libpng"] + path = pkg/libpng/repo + url = https://github.com/glennrp/libpng + ignore = all diff --git a/gen.sh b/gen.sh @@ -29,6 +29,7 @@ subgen pkg/fe subgen pkg/fspec-sync subgen pkg/fzy subgen pkg/less +subgen pkg/libpng subgen pkg/libtermkey subgen pkg/linux-headers subgen pkg/lpeg diff --git a/ninja/rules.ninja b/ninja/rules.ninja @@ -23,6 +23,12 @@ rule ar command = rm -f $out && $ar crs $out $in description = AR $out +rule cpp + command = $cc -MD -MF $out.d $cflags -E -P -o $out $in + depfile = $out.d + deps = gcc + description = CPP $out + rule copy command = ln -f $in $out description = COPY $out diff --git a/pkg/libpng/config.h b/pkg/libpng/config.h @@ -0,0 +1,44 @@ +#define HAVE_DLFCN_H 1 +/* #undef HAVE_FEENABLEEXCEPT */ +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_LIBM */ +#define HAVE_LIBZ 1 +#define HAVE_POW 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define LT_OBJDIR ".libs/" +#define PACKAGE "libpng" +#define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" +#define PACKAGE_NAME "libpng" +#define PACKAGE_STRING "libpng 1.6.43" +#define PACKAGE_TARNAME "libpng" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "1.6.43" +/* #undef PNG_ARM_NEON_API_SUPPORTED */ +/* #undef PNG_ARM_NEON_CHECK_SUPPORTED */ +/* #undef PNG_ARM_NEON_OPT */ +/* #undef PNG_INTEL_SSE_OPT */ +/* #undef PNG_LOONGARCH_LSX_OPT */ +/* #undef PNG_MIPS_MMI_API_SUPPORTED */ +/* #undef PNG_MIPS_MMI_CHECK_SUPPORTED */ +/* #undef PNG_MIPS_MMI_OPT */ +/* #undef PNG_MIPS_MSA_API_SUPPORTED */ +/* #undef PNG_MIPS_MSA_CHECK_SUPPORTED */ +/* #undef PNG_MIPS_MSA_OPT */ +/* #undef PNG_POWERPC_VSX_API_SUPPORTED */ +/* #undef PNG_POWERPC_VSX_CHECK_SUPPORTED */ +/* #undef PNG_POWERPC_VSX_OPT */ +#define STDC_HEADERS 1 +/* #undef TM_IN_SYS_TIME */ +#define VERSION "1.6.43" +#define restrict __restrict__ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif diff --git a/pkg/libpng/gen.sh b/pkg/libpng/gen.sh @@ -0,0 +1,62 @@ +fetch git + +cflags " + -D HAVE_CONFIG_H + -I $dir + -I $outdir/include + -isystem $pkgdir/zlib/include +" + +build awk $outdir/pnglibconf.tf4 '$srcdir/pngconf.h $srcdir/scripts/pnglibconf.dfa $srcdir/pngusr.dfa' '|' $srcdir/scripts/options.awk +bind expr '-f $srcdir/scripts/options.awk out=/dev/stdout version=search' +sync $srcdir/pngconf.h $srcdir/scripts/pnglibconf.dfa $srcdir/pngusr.dfa + +build awk $outdir/pnglibconf.c $outdir/pnglibconf.tf4 +bind expr '-f $srcdir/scripts/options.awk out=/dev/stdout' + +build cpp $outdir/pnglibconf.tf1 $outdir/pnglibconf.c '||' pkg/zlib/headers + +build awk $outdir/include/pnglibconf.h $outdir/pnglibconf.tf1 +bind expr '-f $srcdir/scripts/dfn.awk out=/dev/stdout' + +build copy $outdir/include/png.h $srcdir/png.h +build copy $outdir/include/pngconf.h $srcdir/pngconf.h +sync $srcdir/png.h $srcdir/pngconf.h + +headers " + $outdir/include/pnglibconf.h + $outdir/include/png.h + $outdir/include/pngconf.h +" + +dep " + zlib/headers + $outdir/include/pnglibconf.h +" + +if [ $TARGET_ARCH == x86_64 ]; then + libpng=" + intel/intel_init.c + intel/filter_sse2_intrinsics.c + " +fi + +lib libpng.a " + png.c + pngerror.c + pngget.c + pngmem.c + pngpread.c + pngread.c + pngrio.c + pngrtran.c + pngrutil.c + pngset.c + pngtrans.c + pngwio.c + pngwrite.c + pngwtran.c + pngwutil.c + ${libpng-} + $pkgdir/zlib/libz.a +" diff --git a/pkg/libpng/repo b/pkg/libpng/repo @@ -0,0 +1 @@ +Subproject commit ed217e3e601d8e462f7fd1e04bed43ac42212429