Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meson support #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.65)
AC_INIT([Gummi], [0.8.2], [alexander@localhost], [gummi], [https://gummi.app])
AC_INIT([Gummi], [0.8.3], [alexander@localhost], [gummi], [https://gummi.app])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])

GETTEXT_PACKAGE=gummi
Expand Down
4 changes: 4 additions & 0 deletions data/icons/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

install_data(['gummi.png',], install_dir: join_paths(icondir,'512x512/apps/'))
install_data(['icon.png',], install_dir: join_paths(gummidir,'icons/'))

6 changes: 6 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

subdir('icons')
subdir('misc')
subdir('snippets')
subdir('ui')

2 changes: 1 addition & 1 deletion data/misc/default.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\documentclass[11pt]{article}
\title{\textbf{Gummi 0.8.2}}
\title{\textbf{Gummi 0.8.3}}
\author{Alexander van der Meij}
\date{}

Expand Down
5 changes: 5 additions & 0 deletions data/misc/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

configure_file(input: 'gummi.desktop.in', output: 'gummi.desktop', install_dir: appdir, install: true, configuration: conf_data)
install_data(['default.tex',], install_dir: join_paths(gummidir,'misc/'))
install_man('gummi.1')

3 changes: 3 additions & 0 deletions data/snippets/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

install_data(['snippets.cfg',], install_dir: join_paths(gummidir, 'snippets'))
install_data(['snippets.lang',], install_dir: join_paths(gummidir, 'snippets'))
6 changes: 6 additions & 0 deletions data/ui/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

install_data(['gummi.glade',], install_dir: join_paths(gummidir, 'ui'))
install_data(['prefs.glade',], install_dir: join_paths(gummidir, 'ui'))
install_data(['snippets.glade',], install_dir: join_paths(gummidir, 'ui'))


3 changes: 3 additions & 0 deletions lib/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

install_data(['latex_dvi.sh',], install_dir: join_paths(libdir,'gummi'))

19 changes: 19 additions & 0 deletions meson-post-install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3

import os
import subprocess

prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/')
datadir = os.path.join(prefix, 'share')

# Packaging tools define DESTDIR and this isn't needed for them
if not 'DESTDIR' in os.environ:
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])

print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')])

print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', os.path.join(datadir, 'applications')])

64 changes: 64 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
project(
'gummi',
'c',
version: '0.8.3',
license: 'MIT',
meson_version: '>=0.50.0'
)

i18n = import('i18n')


#dependency('setconf')

prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
libdir = get_option('libdir')
localesdir = get_option('localedir')
appdir = join_paths(datadir, 'applications')
policydir = join_paths(datadir, 'polkit-1/actions')
icondir = join_paths(datadir, 'icons/hicolor/')
schemadir = join_paths(datadir, 'glib-2.0/schemas')
mandir = join_paths(datadir, 'man/man1/')
gummidir = join_paths(datadir, meson.project_name())

project_dependencies = [
dependency('gtk+-3.0'),
dependency('glib-2.0'),
dependency('gtksourceview-3.0'),
dependency('gtkspell3-3.0'),
dependency('poppler-glib'),
dependency('synctex'),
]

build_args = [
'-Wl,--export-dynamic',
'-DGUMMI_DATA=' + '"' + join_paths(prefix, gummidir) + '"',
'-DGUMMI_LIBS=' + '"' + join_paths(prefix, libdir, meson.project_name()) + '"',
'-DGUMMI_LOCALES=' + '"' + join_paths(prefix, localesdir) + '"',
]

add_project_arguments([
'-DGETTEXT_PACKAGE=\"@0@\"'.format(meson.project_name())
],
language: 'c',
)

i18n = import('i18n')

conf_data = configuration_data()
conf_data.set('PACKAGE_NAME', 'Gummi')
conf_data.set('PACKAGE', meson.project_name())
conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf_data.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))

install_data(['COPYING',], install_dir: join_paths(datadir,'licences/gummi/'))

subdir('src')
subdir('data')
subdir('lib')
subdir('po')

meson.add_install_script('meson-post-install.py')

1 change: 1 addition & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ar ca cs da de el es fr hu ie it nl pl pt pt_BR ro ru sv zh_CN zh_TW
Loading