Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions pkg/libpkgconf/gen.lua
Original file line number Diff line number Diff line change
@@ -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'
32 changes: 32 additions & 0 deletions pkg/libpkgconf/libpkgconf/config.h
Original file line number Diff line number Diff line change
@@ -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 */
1 change: 1 addition & 0 deletions pkg/libpkgconf/src
Submodule src added at a88c0d
1 change: 1 addition & 0 deletions pkg/libpkgconf/ver
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.0 r0
2 changes: 2 additions & 0 deletions pkg/muon/.gitigore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/local.ninja
/tools.ninja
132 changes: 132 additions & 0 deletions pkg/muon/gen.lua
Original file line number Diff line number Diff line change
@@ -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'
1 change: 1 addition & 0 deletions pkg/muon/src
Submodule src added at 4344eb
1 change: 1 addition & 0 deletions pkg/muon/ver
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.4.0 r0
9 changes: 9 additions & 0 deletions pkg/muon/version.c
Original file line number Diff line number Diff line change
@@ -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",
};