linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 1259ce52008d18a018474538eba210da60d0ae69 parent d547729a1d8aa31a58dafe7b49094f4a9f401512 Author: Jul <jul@9o.is> Date: Thu, 28 Aug 2025 18:04:16 +0800 add byacc Diffstat:
| M | gen.sh | | | 1 | + |
| M | ninja/functions.sh | | | 6 | +++++- |
| A | pkg/byacc/gen.sh | | | 30 | ++++++++++++++++++++++++++++++ |
| A | pkg/byacc/include/config.h | | | 37 | +++++++++++++++++++++++++++++++++++++ |
| A | pkg/byacc/version | | | 4 | ++++ |
5 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/gen.sh b/gen.sh @@ -19,6 +19,7 @@ include $basedir/ninja/rules.ninja subgen pkg/abduco subgen pkg/b3sum +subgen pkg/byacc subgen pkg/fspec-sync subgen pkg/less subgen pkg/mandoc diff --git a/ninja/functions.sh b/ninja/functions.sh @@ -1,6 +1,10 @@ setv() { _v1=$1; shift; - printf '%s = %s\n' "$_v1" "$*" >> "$_ninja_writepath" + _vs= + for _v in $*; do + _vs="$_vs $_v" + done + printf '%s = %s\n' "$_v1" "$_vs" >> "$_ninja_writepath" } bind() { diff --git a/pkg/byacc/gen.sh b/pkg/byacc/gen.sh @@ -0,0 +1,30 @@ +cflags " + -I $dir/include + -D HAVE_CONFIG_H + -D YYPATCH=20241231 +" + +byacc_srcs=" + closure.c + error.c + graph.c + lalr.c + lr0.c + main.c + mkpar.c + mstring.c + output.c + reader.c + symtab.c + verbose.c + warshall.c + yaccpar.c +" + +host() { + exe yacc $byacc_srcs +} + +exe yacc $byacc_srcs +bin yacc +man yacc.1 diff --git a/pkg/byacc/include/config.h b/pkg/byacc/include/config.h @@ -0,0 +1,37 @@ +#define GCC_NORETURN __attribute__((noreturn)) +#define GCC_PRINTF 1 +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) +#define GCC_SCANF 1 +#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) +#define GCC_UNUSED __attribute__((unused)) +#define HAVE_FCNTL_H 1 +#define HAVE_GETOPT 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETOPT_HEADER 1 +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_LIBDBMALLOC */ +/* #undef HAVE_LIBDMALLOC */ +#define HAVE_MEMORY_H 1 +#define HAVE_MKSTEMP 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDNORETURN_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 HAVE_VSNPRINTF 1 +/* #undef MAXTABLE */ +#define MIXEDCASE_FILENAMES 1 +/* #undef NEED_GETOPT_H */ +/* #undef NO_LEAKS */ +#define STDC_HEADERS 1 +#define STDC_NORETURN _Noreturn +#define SYSTEM_NAME "linux-musl" +/* #undef USE_DBMALLOC */ +/* #undef USE_DMALLOC */ +/* #undef USE_VALGRIND */ +/* #undef YYBTYACC */ +/* #undef YY_NO_LEAKS */ +/* #undef mode_t */ diff --git a/pkg/byacc/version b/pkg/byacc/version @@ -0,0 +1,4 @@ +method=curl +url=https://invisible-mirror.net/archives/byacc/byacc-20241231.tgz +sha256=192c2fae048d4e7f514ba451627f9c4e612765099f819c19191f9fde3e609673 +rel=0