summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2021-06-29 03:31:56 +0000
committerLogan Rathbone <poprocks@gmail.com>2021-06-29 03:31:56 +0000
commitdc76b407e517bafb62f0a8c2cb5dc2df5723c4c6 (patch)
tree20e5f1389ffed3b6d643daab199d9877700c119a
parentUpdate Russian translation (diff)
parentUpdate Russian translation (diff)
downloadzenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.tar.gz
zenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.tar.bz2
zenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.zip
Merge branch 'meson' into 'master'
Port build system to meson See merge request GNOME/zenity!14
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--COPYING216
-rw-r--r--MAINTAINERS7
-rw-r--r--Makefile.am32
-rwxr-xr-xautogen.sh38
-rw-r--r--configure.ac140
-rw-r--r--data/Makefile.am23
-rw-r--r--data/meson.build22
-rw-r--r--help/LINGUAS1
-rw-r--r--help/Makefile.am45
-rw-r--r--help/meson.build48
-rw-r--r--meson.build113
-rw-r--r--meson_options.txt5
-rw-r--r--meson_post_install.py15
-rw-r--r--po/Makevars78
-rw-r--r--po/POTFILES.skip2
-rw-r--r--po/meson.build4
-rw-r--r--src/Makefile.am57
-rw-r--r--src/main.c2
-rw-r--r--src/meson.build51
-rw-r--r--src/text.c2
-rw-r--r--src/zenity.h10
22 files changed, 383 insertions, 534 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 50990ec4..7437fd7a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
variables:
- DEPENDENCIES: gettext gettext-devel gcc redhat-rpm-config automake libtool autoconf autoconf-archive git
+ DEPENDENCIES: gettext gettext-devel gcc redhat-rpm-config meson libtool git
gtk3-devel yelp-tools
build_fedora_33:
@@ -7,5 +7,5 @@ build_fedora_33:
before_script:
- dnf install -y --nogpgcheck $DEPENDENCIES
script:
- - ./autogen.sh
- - make -j
+ - meson --buildtype=debug build
+ - ninja -v -C build
diff --git a/COPYING b/COPYING
index bf50f20d..4362b491 100644
--- a/COPYING
+++ b/COPYING
@@ -1,112 +1,125 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
- GNU LIBRARY GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
@@ -133,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -255,7 +268,7 @@ distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
- 6. As an exception to the Sections above, you may also compile or
+ 6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
@@ -282,23 +295,31 @@ of these things:
Library will not necessarily be able to recompile the application
to use the modified definitions.)
- b) Accompany the work with a written offer, valid for at
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
- c) If distribution of the work is made by offering access to copy
+ d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
- d) Verify that the user has already received a copy of these
+ e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
@@ -347,7 +368,7 @@ Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
@@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
+versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
@@ -411,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -434,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
@@ -453,19 +474,18 @@ convey the exclusion of warranty; and each file should have at least the
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307 USA.
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
diff --git a/MAINTAINERS b/MAINTAINERS
deleted file mode 100644
index b33bb87f..00000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-Luis Medinas
-E-mail: lmedinas@src.gnome.org
-Userid: lmedinas
-
-Arx Cruz
-E-mail: arxcruz@src.gnome.org
-Userid: arxcruz
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 81ae6a7d..00000000
--- a/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-AM_CPPFLAGS = src
-
-SUBDIRS = \
- src \
- po \
- data \
- help
-
-EXTRA_DIST = \
- autogen.sh \
- config.rpath \
- COPYING \
- HACKING \
- ChangeLog \
- NEWS \
- README \
- AUTHORS
-
-dist-hook:
- @if test -d "$(srcdir)/.git"; \
- then \
- echo Creating ChangeLog && \
- ( cd "$(top_srcdir)" && \
- echo '# Generated by Makefile. Do not edit.'; echo; \
- $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
- && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
- || ( rm -f ChangeLog.tmp ; \
- echo Failed to generate ChangeLog >&2 ); \
- else \
- echo A git clone is required to generate a ChangeLog >&2; \
- fi
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index d9d12ecf..00000000
--- a/autogen.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-test -n "$srcdir" || srcdir=$(dirname "$0")
-test -n "$srcdir" || srcdir=.
-
-olddir=$(pwd)
-
-cd $srcdir
-
-(test -f configure.ac) || {
- echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
- exit 1
-}
-
-# shellcheck disable=SC2016
-PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
-
-if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
- echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
- echo "*** If you wish to pass any to it, please specify them on the" >&2
- echo "*** '$0' command line." >&2
- echo "" >&2
-fi
-
-autoreconf --verbose --force --install || exit 1
-
-cd "$olddir"
-if [ "$NOCONFIGURE" = "" ]; then
- $srcdir/configure "$@" || exit 1
-
- if [ "$1" = "--help" ]; then
- exit 0
- else
- echo "Now type 'make' to compile $PKG_NAME" || exit 1
- fi
-else
- echo "Skipping configure process."
-fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 5dccdb07..00000000
--- a/configure.ac
+++ /dev/null
@@ -1,140 +0,0 @@
-AC_INIT([Zenity],[3.32.0],[https://bugzilla.gnome.org/enter_bug.cgi?product=zenity],[zenity])
-
-AC_PREREQ([2.69])
-
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_SRCDIR([src])
-AC_CONFIG_MACRO_DIR([m4])
-
-AM_INIT_AUTOMAKE([1.10 foreign no-dist-gzip dist-xz])
-AM_MAINTAINER_MODE([enable])
-
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-# *******************************
-# Debug
-# *******************************
-
-AX_CHECK_ENABLE_DEBUG([yes],[GNOME_ENABLE_DEBUG])
-
-# Check for programs
-AC_PROG_CC
-
-GTK_REQUIRED=3.0.0
-
-PKG_CHECK_MODULES([ZENITY],[gtk+-3.0 >= $GTK_REQUIRED glib-2.0])
-AC_SUBST([ZENITY_CFLAGS])
-AC_SUBST([ZENITY_LIBS])
-
-dnl *************************
-dnl Check for the GTK+ backend, if it's X11, we -lX11
-dnl *************************
-
-zenity_save_cflags="$CFLAGS"
-# pull in the CFLAGS to locate gdkconfig.h
-CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <gdk/gdk.h>
-
-int main(void) {
-#ifndef GDK_WINDOWING_X11
-#error GDK_WINDOWING_X11 not defined
-#endif
- return 0;
-}
-])],
- GDK_BACKEND_X11=yes,
- GDK_BACKEND_X11=no)
-
-CFLAGS="$zenity_save_cflags"
-
-if test "x$GDK_BACKEND_X11" = "xyes"; then
- PKG_CHECK_MODULES(X, x11)
- ZENITY_CFLAGS="$ZENITY_CFLAGS $X_CFLAGS"
- ZENITY_LIBS="$ZENITY_LIBS $X_LIBS"
-fi
-
-# *******************************
-# perl check
-# *******************************
-
-AC_PATH_PROG([PERL],[perl],)
-
-# *******************************
-# libnotify check
-# *******************************
-
-LIBNOTIFY_REQUIRED=0.6.1
-
-AC_ARG_ENABLE([libnotify],
- [AS_HELP_STRING([--enable-libnotify],
- [Enable libnotify support])],
- [],
- [enable_libnotify=yes])
-
-if test x$enable_libnotify = xyes; then
- PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= $LIBNOTIFY_REQUIRED],
- [HAVE_LIBNOTIFY="yes"],[HAVE_LIBNOTIFY="no"])
- AC_SUBST([LIBNOTIFY_CFLAGS])
- AC_SUBST([LIBNOTIFY_LIBS])
- if test "x$HAVE_LIBNOTIFY" = "xyes"; then
- AC_DEFINE([HAVE_LIBNOTIFY], [1], [libnotify is available on this machine])
- fi
-fi
-
-# *******************************
-# webkit check
-# *******************************
-
-WEBKITGTK_REQUIRED=2.8.1
-
-AC_ARG_ENABLE([webkitgtk],
- [AS_HELP_STRING([--enable-webkitgtk],
- [Enable webkit support])],
- [],
- [enable_webkitgtk=yes])
-
-if test x$enable_webkitgtk = xyes; then
- PKG_CHECK_MODULES([WEBKIT], [webkit2gtk-4.0 >= $WEBKITGTK_REQUIRED],
- [HAVE_WEBKITGTK="yes"],[HAVE_WEBKITGTK="no"])
- AC_SUBST([WEBKIT_CFLAGS])
- AC_SUBST([WEBKIT_LIBS])
- if test "x$HAVE_WEBKITGTK" = "xyes"; then
- AC_DEFINE([HAVE_WEBKITGTK], [1], [webkitgtk is available on this machine])
- fi
-fi
-
-
-# *******************************
-# Internationalization
-# *******************************
-AM_GNU_GETTEXT_VERSION([0.19.4])
-AM_GNU_GETTEXT([external])
-
-GETTEXT_PACKAGE=zenity
-AC_SUBST([GETTEXT_PACKAGE])
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext domain])
-
-# *******************************
-# User manual
-# *******************************
-YELP_HELP_INIT
-
-# *******************************
-
-AC_SUBST([AM_CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
-AC_SUBST([AM_LDFLAGS])
-
-# *******************************
-
-AC_CONFIG_FILES([
-Makefile
-po/Makefile.in
-src/Makefile
-src/gdialog
-data/Makefile
-help/Makefile
-])
-
-AC_OUTPUT
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index cc185118..00000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-clothesdir = $(datadir)/zenity/clothes
-clothes_DATA = \
- monk.png \
- gnome-tshirt.png \
- sunglasses.png \
- surfboard.png \
- hawaii-shirt.png
-
-imagesdir = $(datadir)/zenity
-images_DATA = \
- zenity.png \
- zenity-calendar.png \
- zenity-list.png \
- zenity-file.png \
- zenity-progress.png \
- zenity-text.png \
- zenity-scale.png \
- zenity-entry.png \
- zenity-notification.png
-
-man_MANS = zenity.1
-
-EXTRA_DIST = $(images_DATA) $(clothes_DATA) $(man_MANS)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..373efcf4
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,22 @@
+install_man('zenity.1')
+
+install_data(
+ ['zenity.png',
+ 'zenity-calendar.png',
+ 'zenity-list.png',
+ 'zenity-file.png',
+ 'zenity-progress.png',
+ 'zenity-text.png',
+ 'zenity-scale.png',
+ 'zenity-entry.png',
+ 'zenity-notification.png']
+ )
+
+install_data(
+ ['monk.png',
+ 'gnome-tshirt.png',
+ 'sunglasses.png',
+ 'surfboard.png',
+ 'hawaii-shirt.png'],
+ install_dir: join_paths(zenity_datadir, 'clothes')
+ )
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 00000000..9940fa36
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1 @@
+bg ca cs da de el en_GB es eu fi fr gl hu ja oc pl pt_BR ru sl sv uk zh_CN
diff --git a/help/Makefile.am b/help/Makefile.am
deleted file mode 100644
index d7904727..00000000
--- a/help/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-@YELP_HELP_RULES@
-
-HELP_ID = zenity
-
-HELP_MEDIA = \
- figures/zenity-calendar-screenshot.png \
- figures/zenity-colorselection-screenshot.png \
- figures/zenity-entry-screenshot.png \
- figures/zenity-error-screenshot.png \
- figures/zenity-fileselection-screenshot.png \
- figures/zenity-forms-screenshot.png \
- figures/zenity-information-screenshot.png \
- figures/zenity-list-screenshot.png \
- figures/zenity-notification-listen-screenshot.png \
- figures/zenity-notification-screenshot.png \
- figures/zenity-password-screenshot.png \
- figures/zenity-progress-screenshot.png \
- figures/zenity-question-screenshot.png \
- figures/zenity-scale-screenshot.png \
- figures/zenity-text-screenshot.png \
- figures/zenity-warning-screenshot.png
-
-HELP_FILES = \
- legal.xml \
- calendar.page \
- color-selection.page \
- entry.page \
- error.page \
- file-selection.page \
- forms.page \
- index.page \
- info.page \
- intro.page \
- list.page \
- message.page \
- notification.page \
- password.page \
- progress.page \
- question.page \
- scale.page \
- text.page \
- usage.page \
- warning.page
-
-HELP_LINGUAS = bg ca cs da de el en_GB es eu fi fr gl hu ja oc pl pt_BR ru sl sv uk zh_CN
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 00000000..cd09412b
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,48 @@
+help_pages = [
+ 'legal.xml',
+ 'calendar.page',
+ 'color-selection.page',
+ 'entry.page',
+ 'error.page',
+ 'file-selection.page',
+ 'forms.page',
+ 'index.page',
+ 'info.page',
+ 'intro.page',
+ 'list.page',
+ 'message.page',
+ 'notification.page',
+ 'password.page',
+ 'progress.page',
+ 'question.page',
+ 'scale.page',
+ 'text.page',
+ 'usage.page',
+ 'warning.page'
+]
+
+help_media = [
+ 'figures/zenity-calendar-screenshot.png',
+ 'figures/zenity-colorselection-screenshot.png',
+ 'figures/zenity-entry-screenshot.png',
+ 'figures/zenity-error-screenshot.png',
+ 'figures/zenity-fileselection-screenshot.png',
+ 'figures/zenity-forms-screenshot.png',
+ 'figures/zenity-information-screenshot.png',
+ 'figures/zenity-list-screenshot.png',
+ 'figures/zenity-notification-listen-screenshot.png',
+ 'figures/zenity-notification-screenshot.png',
+ 'figures/zenity-password-screenshot.png',
+ 'figures/zenity-progress-screenshot.png',
+ 'figures/zenity-question-screenshot.png',
+ 'figures/zenity-scale-screenshot.png',
+ 'figures/zenity-text-screenshot.png',
+ 'figures/zenity-warning-screenshot.png'
+]
+
+gnome.yelp(
+ meson.project_name(),
+ sources: help_pages,
+ media: help_media,
+ symlink_media: false
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..20ce5082
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,113 @@
+project('zenity', 'c',
+ version: '3.34.0',
+ meson_version: '>=0.53.0',
+ license: 'LGPL-2.1-or-later'
+)
+
+version_arr = meson.project_version().split('.')
+zenity_version_major = version_arr[0].to_int()
+zenity_version_minor = version_arr[1]
+zenity_version_micro = version_arr[2].to_int()
+
+zenity_prefix = get_option('prefix')
+zenity_bindir = join_paths(zenity_prefix, get_option('bindir'))
+zenity_libdir = join_paths(zenity_prefix, get_option('libdir'))
+zenity_datadir = join_paths(zenity_prefix, get_option('datadir'), 'zenity')
+zenity_localedir = join_paths(zenity_prefix, get_option('localedir'))
+
+zenity_root_dir = include_directories('.')
+zenity_po_dir = join_paths(meson.source_root(), 'po')
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+cc = meson.get_compiler('c')
+
+zenity_conf = configuration_data()
+zenity_conf.set_quoted('ZENITY_NAME', meson.project_name())
+zenity_conf.set_quoted('ZENITY_VERSION', meson.project_version())
+zenity_conf.set_quoted('ZENITY_STRING',
+ '@0@ @1@'.format(meson.project_name(), meson.project_version()))
+zenity_conf.set_quoted('ZENITY_DATADIR', zenity_datadir)
+zenity_conf.set_quoted('ZENITY_LIBDIR', zenity_libdir)
+zenity_conf.set_quoted('ZENITY_LOCALE_DIR', zenity_localedir)
+
+zenity_conf.set('VERSION', 'ZENITY_VERSION')
+zenity_conf.set('GETTEXT_PACKAGE', 'ZENITY_NAME')
+zenity_conf.set('LOCALEDIR', 'ZENITY_LOCALE_DIR')
+
+zenity_conf.set('DEBUG', get_option('debug'))
+
+check_headers = [
+ 'sys/types.h',
+ 'unistd.h',
+ 'langinfo.h',
+ 'locale.h'
+]
+
+foreach h : check_headers
+ cc.has_header(h, required: true)
+endforeach
+
+gtk_dep = dependency('gtk+-3.0', version: '>= 3.16.0')
+
+# this is the minimum required glib according to the above-mentioned version of gtk
+# it's really just being documented here for ease of reference.
+glib_dep = dependency('glib-2.0', version: '>= 2.43.4')
+
+# Optional dependencies
+
+opt_missing_str = '''
+Requested optional @0@ support but library not found.
+Please ensure you have any required development libraries installed.'''
+
+libnotify = dependency('libnotify', version: '>= 0.6.1', required: false)
+if get_option('libnotify')
+ if libnotify.found()
+ zenity_conf.set('HAVE_LIBNOTIFY', true)
+ else
+ error(opt_missing_str.format('libnotify'))
+ endif
+endif
+
+webkitgtk = dependency('webkit2gtk-4.0', version: '>= 2.8.1', required: false)
+if get_option('webkitgtk')
+ if webkitgtk.found()
+ zenity_conf.set('HAVE_WEBKITGTK', true)
+ else
+ error(opt_missing_str.format('webkitgtk'))
+ endif
+endif
+
+# link Xlib if we have it. This will likely be removed after gtk4 migration.
+x11 = dependency('x11', required: false)
+
+perl = find_program('perl', required: false)
+if perl.found()
+ zenity_conf.set('PERL', perl.path())
+endif
+
+configure_file(
+ output: 'config.h',
+ configuration: zenity_conf
+)
+
+# Print a summary of options at the end.
+
+summary({'prefix': zenity_prefix,
+ 'libdir': zenity_libdir,
+ 'datadir': zenity_datadir,
+ 'localedir': zenity_localedir,
+ }, section: 'Directories')
+
+summary({'libnotify': get_option('libnotify'),
+ 'webkitgtk': get_option('webkitgtk'),
+ 'gdialog script': perl.found(),
+ }, section: 'Configuration')
+
+subdir('src')
+subdir('data')
+subdir('po')
+subdir('help')
+
+meson.add_install_script('meson_post_install.py')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..7dd5b5a9
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,5 @@
+option('libnotify', type : 'boolean', value : false,
+ description : 'enable libnotify for desktop notification support')
+
+option('webkitgtk', type : 'boolean', value : false,
+ description : 'enable webkitgtk support')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..2654e49d
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
+datadir = os.path.join(prefix, 'share')
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Updating icon cache...')
+ icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
+ if not os.path.exists(icon_cache_dir):
+ os.makedirs(icon_cache_dir)
+ subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
diff --git a/po/Makevars b/po/Makevars
deleted file mode 100644
index ac406bb9..00000000
--- a/po/Makevars
+++ /dev/null
@@ -1,78 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
-# package. (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.) Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright. The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Zenity authors
-
-# This tells whether or not to prepend "GNU " prefix to the package
-# name that gets inserted into the header of the $(DOMAIN).pot file.
-# Possible values are "yes", "no", or empty. If it is empty, try to
-# detect it automatically by scanning the files in $(top_srcdir) for
-# "GNU packagename" string.
-PACKAGE_GNU = no
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-# in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-# understood.
-# - Strings which make invalid assumptions about notation of date, time or
-# money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS = https://gitlab.gnome.org/GNOME/zenity/issues
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
-
-# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
-# context. Possible values are "yes" and "no". Set this to yes if the
-# package uses functions taking also a message context, like pgettext(), or
-# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
-USE_MSGCTXT = yes
-
-# These options get passed to msgmerge.
-# Useful options are in particular:
-# --previous to keep previous msgids of translated messages,
-# --quiet to reduce the verbosity.
-MSGMERGE_OPTIONS =
-
-# These options get passed to msginit.
-# If you want to disable line wrapping when writing PO files, add
-# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
-# MSGINIT_OPTIONS.
-MSGINIT_OPTIONS =
-
-# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
-# has changed. Possible values are "yes" and "no". Set this to no if
-# the POT file is checked in the repository and the version control
-# program ignores timestamps.
-PO_DEPENDS_ON_POT = no
-
-# This tells whether or not to forcibly update $(DOMAIN).pot and
-# regenerate PO files on "make dist". Possible values are "yes" and
-# "no". Set this to no if the POT file and PO files are maintained
-# externally.
-DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
deleted file mode 100644
index 0fb3682e..00000000
--- a/po/POTFILES.skip
+++ /dev/null
@@ -1,2 +0,0 @@
-# List of source files that should *not* be translated.
-# Please keep this file sorted alphabetically.
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 00000000..66362aa5
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,4 @@
+i18n.gettext(
+ meson.project_name(),
+ preset: 'glib'
+)
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/text.c b/src/text.c
index ffe7b35e..bbfa4212 100644
--- a/src/text.c
+++ b/src/text.c
@@ -289,11 +289,13 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) {
if (text_data->no_wrap)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_NONE);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (text_data->font) {
PangoFontDescription *fontDesc =
pango_font_description_from_string (text_data->font);
gtk_widget_override_font (GTK_WIDGET (text_view), fontDesc);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
if (text_data->uri)
zenity_util_fill_file_buffer (text_buffer, text_data->uri);
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