Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Commit 064dea3

Browse files
committed
build libeconf as source on linux
1 parent 77ed82f commit 064dea3

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ jobs:
8686
pcre2-dev pcre2-static \
8787
libffi-dev \
8888
xz-dev xz-static \
89-
util-linux-dev util-linux-static \
90-
libeconf-dev
89+
util-linux-dev util-linux-static
9190
echo "=== Verifying static libs ==="
92-
ls /usr/lib/libglib-2.0.a /usr/lib/libgio-2.0.a /usr/lib/libgobject-2.0.a /usr/lib/libxml2.a /usr/lib/libz.a /usr/lib/libpcre2-8.a /usr/lib/libffi.a /usr/lib/liblzma.a /usr/lib/libmount.a /usr/lib/libblkid.a /usr/lib/libeconf.a
93-
echo "=== All static libs found ==="
91+
ls /usr/lib/libglib-2.0.a /usr/lib/libgio-2.0.a /usr/lib/libgobject-2.0.a /usr/lib/libxml2.a /usr/lib/libz.a /usr/lib/libpcre2-8.a /usr/lib/libffi.a /usr/lib/liblzma.a /usr/lib/libmount.a /usr/lib/libblkid.a
9492
meson setup builddir --default-library=static --prefer-static
9593
meson compile -C builddir
9694
file builddir/wixl

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "libgsf"]
88
path = libgsf
99
url = https://gitlab.gnome.org/GNOME/libgsf.git
10+
[submodule "libeconf"]
11+
path = libeconf
12+
url = https://github.com/openSUSE/libeconf.git

libeconf

Submodule libeconf added at a9d0c3d

meson.build

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,24 @@ libmsi_dep = declare_dependency(
250250
dependencies: libmsi_deps,
251251
)
252252

253+
# --- libeconf (static, built from source — needed on Linux for libblkid) ---
254+
platform_link_deps = []
255+
if host_machine.system() == 'linux'
256+
libeconf = static_library('econf',
257+
'libeconf/lib/econf_error.c',
258+
'libeconf/lib/getfilecontents.c',
259+
'libeconf/lib/get_value_def.c',
260+
'libeconf/lib/helpers.c',
261+
'libeconf/lib/keyfile.c',
262+
'libeconf/lib/libeconf.c',
263+
'libeconf/lib/libeconf_ext.c',
264+
'libeconf/lib/mergefiles.c',
265+
'libeconf/lib/readconfig.c',
266+
include_directories: include_directories('libeconf/include', 'libeconf/lib'),
267+
)
268+
platform_link_deps = [libeconf]
269+
endif
270+
253271
# --- Platform-specific link args ---
254272
if host_machine.system() == 'windows'
255273
platform_link_args = [
@@ -258,7 +276,7 @@ if host_machine.system() == 'windows'
258276
'-lbcrypt',
259277
]
260278
elif host_machine.system() == 'linux'
261-
platform_link_args = ['-static', '-leconf']
279+
platform_link_args = ['-static']
262280
else
263281
platform_link_args = []
264282
endif
@@ -301,7 +319,7 @@ wixl = executable('wixl',
301319
],
302320
c_args: ['-include', meson.project_build_root() / 'config.h'],
303321
include_directories: [inc_dirs, gcab_inc_dirs],
304-
link_with: libcommon,
322+
link_with: [libcommon] + platform_link_deps,
305323
dependencies: [libmsi_dep, libgcab_dep, glib, gio, libxml],
306324
link_args: platform_link_args,
307325
install: true,

0 commit comments

Comments
 (0)