diff --git a/.gitmodules b/.gitmodules index a6ebfdef..030eaed2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -161,6 +161,9 @@ [submodule "pkg/libpciaccess/src"] path = pkg/libpciaccess/src url = https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git +[submodule "pkg/libpkgconf/src"] + path = pkg/libpkgconf/src + url = https://github.com/pkgconf/pkgconf [submodule "pkg/libplacebo/src"] path = pkg/libplacebo/src url = https://code.videolan.org/videolan/libplacebo.git @@ -210,6 +213,9 @@ path = pkg/musl/src url = git://git.musl-libc.org/musl ignore = all +[submodule "pkg/muon/src"] + path = pkg/muon/src + url = https://git.sr.ht/~lattis/muon [submodule "pkg/ncompress/src"] path = pkg/ncompress/src url = https://github.com/vapier/ncompress.git diff --git a/pkg/libpkgconf/gen.lua b/pkg/libpkgconf/gen.lua new file mode 100644 index 00000000..3cb27a30 --- /dev/null +++ b/pkg/libpkgconf/gen.lua @@ -0,0 +1,23 @@ +cflags{ + '-I $dir', + '-I $srcdir', +} + +pkg.hdrs = { + copy('$outdir/libpkgconf', '$srcdir/libpkgconf', { + 'libpkgconf.h', + 'bsdstubs.h', + 'stdinc.h', + 'libpkgconf-api.h', + 'iter.h', + })} + +lib('libpkgconf.a', [[libpkgconf/( + audit.c cache.c client.c + pkg.c bsdstubs.c fragment.c + argvsplit.c fileio.c tuple.c + dependency.c queue.c path.c + personality.c parser.c +)]]) + +fetch 'git' diff --git a/pkg/libpkgconf/libpkgconf/config.h b/pkg/libpkgconf/libpkgconf/config.h new file mode 100644 index 00000000..5a8089f4 --- /dev/null +++ b/pkg/libpkgconf/libpkgconf/config.h @@ -0,0 +1,32 @@ +#define SYSTEM_LIBDIR "/lib:/usr/lib" +#define SYSTEM_INCLUDEDIR "/include:/usr/include" +#define PKG_DEFAULT_PATH "/usr/lib/pkgconf" +#define PERSONALITY_PATH "/etc/pkgconf/personality.d" +#define HAVE_DECL_REALLOCARRAY 1 +#define HAVE_DECL_STRLCAT 1 +#define HAVE_DECL_STRLCPY 1 +#define HAVE_DECL_STRNDUP 1 +#define HAVE_DLFCN_H 1 +#define HAVE_INTTYPES_H 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 "pkgconf" +#define PACKAGE_BUGREPORT "https://github.com/pkgconf/pkgconf/issues/new" +#define PACKAGE_NAME "pkgconf" +#define PACKAGE_STRING "pkgconf 2.3.0" +#define PACKAGE_TARNAME "pkgconf" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "2.3.0" +#define STDC_HEADERS 1 +#define VERSION "2.3.0" +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGE_FILES */ +/* #undef _TIME_BITS */ +/* #undef __MINGW_USE_VC2005_COMPAT */ diff --git a/pkg/libpkgconf/src b/pkg/libpkgconf/src new file mode 160000 index 00000000..a88c0d96 --- /dev/null +++ b/pkg/libpkgconf/src @@ -0,0 +1 @@ +Subproject commit a88c0d962a987c62d98ede5a738e37ec71005cbd diff --git a/pkg/libpkgconf/ver b/pkg/libpkgconf/ver new file mode 100644 index 00000000..183e9c52 --- /dev/null +++ b/pkg/libpkgconf/ver @@ -0,0 +1 @@ +2.3.0 r0 \ No newline at end of file diff --git a/pkg/muon/.gitigore b/pkg/muon/.gitigore new file mode 100644 index 00000000..a2d786ab --- /dev/null +++ b/pkg/muon/.gitigore @@ -0,0 +1,2 @@ +/local.ninja +/tools.ninja diff --git a/pkg/muon/gen.lua b/pkg/muon/gen.lua new file mode 100644 index 00000000..729c87e7 --- /dev/null +++ b/pkg/muon/gen.lua @@ -0,0 +1,132 @@ +cflags{ + '-Wall', + '-std=c99', + '-pedantic', + '-D MUON_PLATFORM_posix', + '-D MUON_ENDIAN=0', + '-D MUON_STATIC', + '-D MUON_BOOTSTRAPPED', + '-I $outdir', + '-I $srcdir/include', + '-I $srcdir/subprojects/tinyjson', + '-isystem $builddir/pkg/libpkgconf', +} + +sub('tools.ninja', function() + toolchain(config.host) + cflags{'-I $srcdir/include'} + exe('embedder', {'tools/embedder.c'}) +end) + +rule('embedder', '$outdir/embedder $args >$out') + +local embedded_files = { + 'commands/copyfile.meson', + 'commands/coverage.meson', + 'commands/delete_suffix.meson', + 'commands/i18n/gettext.meson', + 'commands/i18n/itstool.meson', + 'commands/i18n/msgfmthelper.meson', + 'commands/vcs_tagger.meson', + 'lib/cmake_prelude.meson', + 'modules/_test.meson', + 'modules/gnome.meson', + 'modules/i18n.meson', + 'options/global.meson', + 'options/per_project.meson', + 'python/python_info.py', + 'runtime/dependencies.meson', +} + +local args = {} +for _, file in ipairs(embedded_files) do + table.insert(args, '$srcdir/src/script/'..file) + table.insert(args, file) +end + +build('embedder', '$outdir/embedded_files.h', {expand{'$srcdir/src/script', embedded_files}, '|', '$outdir/embedder'}, {args=args}) + +build('copy', '$outdir/version.c', '$dir/version.c') + +pkg.deps = { + 'pkg/libpkgconf/headers', + '$outdir/embedded_files.h, +} + +lib('libtinyjson.a', {'subprojects/tinyjson/tiny-json.c'}) + +exe('muon', [[ +$outdir/version.c +src/( + args.c cmd_install.c cmd_subprojects.c cmd_test.c + coerce.c compilers.c embedded.c + error.c guess.c install.c log.c + machine_file.c machines.c main.c + memmem.c meson_opts.c options.c + opts.c rpmvercmp.c sha_256.c + vsenv.c wrap.c ui_null.c + backend/( + backend.c common_args.c introspect.c ninja.c output.c xcode.c + ninja/( + alias_target.c coverage.c build_target.c + custom_target.c rules.c + ) + ) + datastructures/( + arr.c bucket_arr.c hash.c stack.c + ) + formats/( + editorconfig.c ini.c + lines.c tap.c xml.c + ) + functions/( + array.c boolean.c both_libs.c + build_target.c compiler.c + configuration_data.c custom_target.c + dependency.c dict.c disabler.c + environment.c external_program.c + feature_opt.c file.c generator.c + kernel.c modules.c machine.c meson.c + number.c run_result.c + source_configuration.c source_set.c + string.c subproject.c + kernel/( + build_target.c configure_file.c + custom_target.c dependency.c + install.c options.c subproject.c + ) + modules/( + fs.c getopt.c keyval.c pkgconfig.c + python.c sourceset.c subprojects.c toolchain.c + ) + ) + lang/( + analyze.c compiler.c eval.c + fmt.c func_lookup.c lexer.c + object.c object_iterators.c parser.c + serial.c string.c typecheck.c + vm.c workspace.c + ) + platform/( + assert.c filesystem.c os.c mem.c + path.c run_cmd.c uname.c + posix/( + filesystem.c init.c log.c + os.c path.c rpath_fixer.c + run_cmd.c term.c timer.c + uname.c + ) + ) + external/( + libarchive_null.c libcurl_null.c + libpkgconf.c samurai_null.c + tinyjson.c readline_builtin.c + ) +) +libtinyjson.a +$builddir/pkg/libpkgconf/libpkgconf.a +]]) + +file('bin/muon', '755', '$outdir/muon') + +fetch 'git' diff --git a/pkg/muon/src b/pkg/muon/src new file mode 160000 index 00000000..4344eb5d --- /dev/null +++ b/pkg/muon/src @@ -0,0 +1 @@ +Subproject commit 4344eb5d0bce5adca6921dfa1feef0f20bb015c7 diff --git a/pkg/muon/ver b/pkg/muon/ver new file mode 100644 index 00000000..b5f83ec1 --- /dev/null +++ b/pkg/muon/ver @@ -0,0 +1 @@ +0.4.0 r0 diff --git a/pkg/muon/version.c b/pkg/muon/version.c new file mode 100644 index 00000000..547a6444 --- /dev/null +++ b/pkg/muon/version.c @@ -0,0 +1,9 @@ +#include "compat.h" + +#include "version.h" + +const struct muon_version muon_version = { + .version = "0.4.0", + .vcs_tag = "4344eb5d", + .meson_compat = "1.5.99", +};