talkatu/talkatu

Merged in default (pull request #49)

2020-06-08, Gary Kramlich
f0fda4aace2d
Merged in default (pull request #49)

Add support for building a vapi module

Approved-by: Elliott Sales de Andrade
--- a/meson.build Thu May 21 22:22:16 2020 -0500
+++ b/meson.build Mon Jun 08 05:47:27 2020 +0000
@@ -104,6 +104,7 @@
subdir('po')
subdir('demo')
subdir('packaging')
+subdir('vapi')
###############################################################################
# Install stuff
--- a/meson_options.txt Thu May 21 22:22:16 2020 -0500
+++ b/meson_options.txt Mon Jun 08 05:47:27 2020 +0000
@@ -30,3 +30,10 @@
type : 'boolean', value : true,
description : 'run unit tests'
)
+
+option(
+ 'vapi',
+ type : 'boolean', value : true,
+ description : 'Whether or not to build vapi files for gplugin'
+)
+
--- a/packaging/debian/control Thu May 21 22:22:16 2020 -0500
+++ b/packaging/debian/control Mon Jun 08 05:47:27 2020 +0000
@@ -7,7 +7,8 @@
gettext, help2man, xvfb,
gobject-introspection,
libgspell-1-dev, libgladeui-dev,
- libgumbo-dev, libcmark-dev
+ libgumbo-dev, libcmark-dev,
+ valac
Homepage: https://bitbucket.org/pidgin/talkatu
Vcs-Browser: https://bitbucket.org/pidgin/talkatu/src
Vcs-Hg: https://bitbucket.org/pidgin/talkatu
--- a/packaging/debian/libtalkatu-dev.install Thu May 21 22:22:16 2020 -0500
+++ b/packaging/debian/libtalkatu-dev.install Mon Jun 08 05:47:27 2020 +0000
@@ -2,3 +2,5 @@
usr/lib/*/libtalkatu.so
usr/lib/*/pkgconfig/*.pc
usr/share/gir-1.0/
+debian/tmp/usr/share/vala/vapi/talkatu.deps
+debian/tmp/usr/share/vala/vapi/talkatu.vapi
--- a/packaging/mingw-cross/PKGBUILD Thu May 21 22:22:16 2020 -0500
+++ b/packaging/mingw-cross/PKGBUILD Mon Jun 08 05:47:27 2020 +0000
@@ -17,7 +17,8 @@
"${MINGW_PACKAGE_PREFIX}-glade"
"${MINGW_PACKAGE_PREFIX}-gspell"
"${MINGW_PACKAGE_PREFIX}-gtk3"
- "${MINGW_PACKAGE_PREFIX}-gumbo-parser")
+ "${MINGW_PACKAGE_PREFIX}-gumbo-parser"
+ "${MINGW_PACKAGE_PREFIX}-vala")
options=(!libtool strip staticlibs)
pkgver() {
@@ -31,6 +32,7 @@
--cross-file=${MINGW_PACKAGE_PREFIX}.txt \
-Ddoc=false \
-Dgobject-introspection=false \
+ -Dvapi=false \
-Dhelp2man=false \
..
--- a/packaging/talkatu.spec.in Thu May 21 22:22:16 2020 -0500
+++ b/packaging/talkatu.spec.in Mon Jun 08 05:47:27 2020 +0000
@@ -21,6 +21,7 @@
BuildRequires: gumbo-parser-devel
BuildRequires: gspell-devel
BuildRequires: gtk-doc
+BuildRequires: vala
%if 0%{?suse_version} > 0
# avoid "directories not owned by a package" error
@@ -34,6 +35,11 @@
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+%package vala
+Summary: A collection of Gtk+ widgets for Instant Messaging clients
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
%description
Talkatu is a collection of Gtk+ widgets for rendering plain text, HTML and
Markdown inside of Gtk+.
@@ -46,6 +52,12 @@
This package includes the files used for development against libtalkatu.
+%description vala
+Talkatu provides support for parsing and rendering plain text, HTML and
+Markdown inside of Gtk+.
+
+This package contains the vapi bindings allowing Talkatu to be used from vala.
+
%build
CFLAGS="%{optflags}" meson \
--prefix=%{_prefix} \
@@ -53,7 +65,6 @@
ninja %{?_smp_mflags} -C build
-
%install
DESTDIR=%{buildroot} ninja -C build install
%find_lang %{name}
@@ -93,7 +104,19 @@
%{_datadir}/gtk-doc/html/talkatu/
%{_datadir}/glade/catalogs/talkatu.xml
+%files vala
+%defattr(-,root,root)
+%doc README.md HACKING logo.png
+%if %{notownedhack} == 0
+%license COPYING
+%endif
+%{_datadir}/vala/vapi/talkatu.vapi
+%{_datadir}/vala/vapi/talkatu.deps
+
%changelog
+* Thu May 21 2020 Gary Kramlich <grim@reaperworld.com>
+- Added Vala package
+
* Tue Jul 31 2018 Gary Kramlich <grim@reaperworld.com>
- Initial revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vapi/meson.build Mon Jun 08 05:47:27 2020 +0000
@@ -0,0 +1,14 @@
+if get_option('vapi')
+ if not get_option('gobject-introspection')
+ error('Vala generation requires GObject Introspection.')
+ endif
+
+ add_languages('vala')
+
+ talkatuu_vapi = gnome.generate_vapi('talkatu',
+ sources : talkatu_gir[0],
+ packages : [ 'gtk+-3.0' ],
+ install : true,
+ gir_dirs : meson.current_build_dir() / '..' / 'talkatu',
+ )
+endif # vala