summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2021-06-08 22:55:49 -0400
committerLogan Rathbone <poprocks@gmail.com>2021-06-08 22:55:49 -0400
commitae51b769019ea5e4c32ec6e386f3d2183562c1cb (patch)
tree7944059592bcd59a662a35c18705c6c242263217 /src
parentRemove superfluous MAINTAINERS file. (diff)
downloadzenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.tar.gz
zenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.tar.bz2
zenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.zip
Port build system from autotools to meson.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am57
-rw-r--r--src/main.c2
-rw-r--r--src/meson.build51
-rw-r--r--src/zenity.h10
4 files changed, 52 insertions, 68 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index bcdd2056..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-bin_PROGRAMS = zenity
-
-bin_SCRIPTS = gdialog
-
-zenity_SOURCES = \
- about.c \
- calendar.c \
- entry.c \
- fileselection.c \
- main.c \
- msg.c \
- notification.c \
- option.c \
- option.h \
- progress.c \
- scale.c \
- text.c \
- tree.c \
- color.c \
- password.c \
- util.c \
- util.h \
- forms.c \
- zenity.h
-
-zenity_CPPFLAGS = \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- -DZENITY_DATADIR=\""$(pkgdatadir)"\" \
- $(AM_CPPFLAGS)
-
-zenity_CFLAGS = \
- $(ZENITY_CFLAGS) \
- $(LIBNOTIFY_CFLAGS) \
- $(WEBKIT_CFLAGS) \
- $(WARN_CFLAGS) \
- $(AM_CFLAGS)
-
-zenity_LDFLAGS = \
- $(AM_LDFLAGS)
-
-zenity_LDADD = \
- $(ZENITY_LIBS) \
- $(LIBNOTIFY_LIBS) \
- $(WEBKIT_LIBS)
-
-uidir = $(datadir)/zenity
-
-ui_DATA = \
- zenity.ui
-
-DISTCLEANFILES= \
- gdialog
-
-EXTRA_DIST = \
- $(ui_DATA) \
- gdialog \
- gdialog.in
diff --git a/src/main.c b/src/main.c
index 7f0c2db7..18b2a725 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,7 +43,7 @@ main (gint argc, gchar **argv) {
setlocale (LC_ALL, "");
#endif
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..748fe316
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,51 @@
+# for i in `ls *.c`; do echo " '${i}',"; done
+zenity_sources = [
+ 'about.c',
+ 'calendar.c',
+ 'color.c',
+ 'entry.c',
+ 'fileselection.c',
+ 'forms.c',
+ 'main.c',
+ 'msg.c',
+ 'notification.c',
+ 'option.c',
+ 'password.c',
+ 'progress.c',
+ 'scale.c',
+ 'text.c',
+ 'tree.c',
+ 'util.c'
+]
+
+zenity_deps = [
+ gtk_dep,
+ libnotify,
+ webkitgtk,
+ x11
+]
+
+zenity_c_args = [
+ '-DG_LOG_DOMAIN="Zenity"'
+]
+
+zenity = executable(
+ meson.project_name(),
+ zenity_sources,
+ include_directories: zenity_root_dir,
+ dependencies: zenity_deps,
+ c_args: zenity_c_args,
+ install: true
+)
+
+if perl.found()
+ configure_file(
+ input: 'gdialog.in',
+ output: 'gdialog',
+ configuration: zenity_conf,
+ install_dir: zenity_bindir,
+ install: true
+ )
+endif
+
+install_data('zenity.ui')
diff --git a/src/zenity.h b/src/zenity.h
index b86a264d..404eec77 100644
--- a/src/zenity.h
+++ b/src/zenity.h
@@ -5,7 +5,6 @@
G_BEGIN_DECLS
-#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext (GETTEXT_PACKAGE, String)
#ifdef gettext_noop
@@ -13,15 +12,6 @@ G_BEGIN_DECLS
#else
#define N_(String) (String)
#endif
-#else /* NLS is disabled */
-#define _(String) (String)
-#define N_(String) (String)
-#define textdomain(String) (String)
-#define gettext(String) (String)
-#define dgettext(Domain, String) (String)
-#define dcgettext(Domain, String, Type) (String)
-#define bindtextdomain(Domain, Directory) (Domain)
-#endif
typedef struct {
gchar *dialog_title;
bgstack15