po/meson.build

Sat, 09 Aug 2025 18:21:54 -0500

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sat, 09 Aug 2025 18:21:54 -0500
changeset 43308
6a22b547f0c8
parent 42473
c2cb3f628555
permissions
-rw-r--r--

Add builtin library dependency for introspection

Without specifying, gir defaults to the system pidgin/purple libraries by default,
which fails the build when new symbols were added and gir failed to link for them.

The failed build log before patch:
```
FAILED: pidgin/Pidgin-3.0.gir
...
/usr/bin/ld: /usr/local/lib/x86_64-linux-gnu/libpidgin3.so: undefined reference to `purple_image_get_filename'
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command '['ccache', 'cc', '-o', '/home/goodspeed/Development/pidgin/build/tmp-introspectineovzv0/Pidgin-3.0', '/home/goodspeed/Development/pidgin/build/tmp-introspectineovzv0/Pidgin-3.0.o', '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', '-L/home/goodspeed/Development/pidgin/build/libpurple', '-Wl,-rpath,/home/goodspeed/Development/pidgin/build/libpurple', '-L/usr/local/lib/x86_64-linux-gnu', '-Wl,-rpath,/usr/local/lib/x86_64-linux-gnu', '-L/home/goodspeed/Development/pidgin/build/pidgin', '-Wl,-rpath,/home/goodspeed/Development/pidgin/build/pidgin', '-L/home/goodspeed/Development/pidgin/build/libpurple', '-Wl,-rpath,/home/goodspeed/Development/pidgin/build/libpurple', '-L/usr/local/lib/x86_64-linux-gnu', '-Wl,-rpath,/usr/local/lib/x86_64-linux-gnu', '-L/usr/local/lib/x86_64-linux-gnu', '-Wl,-rpath,/usr/local/lib/x86_64-linux-gnu', '-lpidgin3', '-lpurple3', '-lglib-2.0', '-lgplugin-gtk4', '-lgplugin', '-lgmodule-2.0', '-lgtk-4', '-lpangocairo-1.0', '-lpango-1.0', '-lharfbuzz', '-lgdk_pixbuf-2.0', '-lcairo-gobject', '-lcairo', '-lvulkan', '-lgraphene-1.0', '-lgio-2.0', '-lgobject-2.0', '-lgtksourceview-5', '-ljson-glib-1.0', '-ladwaita-1', '-lspelling-1', '-lm', '-lbirb', '-lgstreamer-1.0', '-lsoup-3.0', '-lxml2', '-lgstapp-1.0', '-lgstbase-1.0', '-lseagull', '-lsqlite3', '-lgirepository-1.0', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lglib-2.0', '-lglib-2.0']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed.
```

Testing Done:
Succeed building pidgin with an out-of-date pidgin installed on system. Introspection no longer uses the system library and links fine now.

Reviewed at https://reviews.imfreedom.org/r/4098/

40461
25f653ee017e Change the logic for determining whether or not to install translations
Gary Kramlich <grim@reaperworld.com>
parents: 39707
diff changeset
1 i18n = import('i18n')
25f653ee017e Change the logic for determining whether or not to install translations
Gary Kramlich <grim@reaperworld.com>
parents: 39707
diff changeset
2
41297
4960320545ef Move our i18n setup to the glib preset.
Gary Kramlich <grim@reaperworld.com>
parents: 40461
diff changeset
3 # use the glib preset which is defined at
4960320545ef Move our i18n setup to the glib preset.
Gary Kramlich <grim@reaperworld.com>
parents: 40461
diff changeset
4 # https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/i18n.py#L93
4960320545ef Move our i18n setup to the glib preset.
Gary Kramlich <grim@reaperworld.com>
parents: 40461
diff changeset
5 # at the time of this comment.
42454
37bcbcd66c6f Set our gettext package to pidgin3 so it can we can install next to pidgin2
Gary Kramlich <grim@reaperworld.com>
parents: 41485
diff changeset
6 i18n.gettext(GETTEXT_PACKAGE, preset : 'glib')
42473
c2cb3f628555 Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents: 42454
diff changeset
7
c2cb3f628555 Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents: 42454
diff changeset
8 devenv.append('PURPLE_LOCALE_DIR', meson.current_build_dir())

mercurial