Commit 5d7ec30c authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'release/0.4.2'

parents 2c2bec63 c1c3c162
......@@ -7,33 +7,33 @@ girara user interface library and several document libraries.
Requirements
------------
meson (>= 0.45)
meson (>= 0.47)
gtk3 (>= 3.22)
glib (>= 2.50)
girara (>= 0.2.8)
sqlite3 (optional, >= 3.5.9)
check (optional, for tests)
intltool
check (optional build dependency, for tests)
libmagic from file(1) (optional, for mime-type detection)
libsynctex from TeXLive (optional, for SyncTeX support)
libseccomp (optional, for sandbox support)
Sphinx (optional, for manpages and HTML documentation)
doxygen (optional, for HTML documentation)
breathe (optional, for HTML documentation)
sphinx_rtd_theme (optional, for HTML documentation)
librvsg-bin (optional build dependency, for icons)
Sphinx (optional build dependency, for manpages and HTML documentation)
doxygen (optional build dependency, for HTML documentation)
breathe (optional build dependency, for HTML documentation)
sphinx_rtd_theme (optional build dependency, for HTML documentation)
Note that Sphinx is needed to build the manpages. If it is not installed, the
man pages won't be built. For the HTML documentation, doxygen, breathe and
sphinx_rtd_theme are needed in addition to Sphinx.
man pages won't be built. For building the HTML documentation, doxygen, breathe
and sphinx_rtd_theme are needed in addition to Sphinx.
If you don't want to build with support for sqlite databases, you can configure
the build system with -Denable-sqlite=false and sqlite support won't be available.
the build system with -Dsqlite=disabled and sqlite support won't be available.
The use of magic to detect mime types is optional and can be disabled by
configuring the build system with -Denable-magic=false.
configuring the build system with -Dmagic=disabled.
The use of seccomp to create a sandboxed environment is optional and can be
disabled by configure the build system with -Denable-seccomp=false. The sandbox
disabled by configure the build system with -Dseccomp=disabled. The sandbox
will by default be set to "normal" mode, which should not interfere with the
normal operation of zathura. For strict sandbox mode set "sandbox strict" in
zathurarc. Strict sandbox mode will reduce the available functionality of
......@@ -55,5 +55,4 @@ refer to the meson documentation for platform specific dependencies.
Bugs
----
Please report bugs at http://bugs.pwmt.org or contact us on our mailing list at
zathura@lists.pwmt.org.
Please report bugs at http://git.pwmt.org/pwmt/zathura.
custom_target('org.pwmt.zathura_128.png',
input: '../org.pwmt.zathura.svg',
output: 'org.pwmt.zathura.png',
command: [
rsvg_convert,
'-w', '128', '-h', '128',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: true,
install_dir: join_paths(datadir, 'icons', 'hicolor', '128x128', 'apps')
)
custom_target('org.pwmt.zathura_16.png',
input: '../org.pwmt.zathura.svg',
output: 'org.pwmt.zathura.png',
command: [
rsvg_convert,
'-w', '16', '-h', '16',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: true,
install_dir: join_paths(datadir, 'icons', 'hicolor', '16x16', 'apps')
)
custom_target('org.pwmt.zathura_256.png',
input: '../org.pwmt.zathura.svg',
output: 'org.pwmt.zathura.png',
command: [
rsvg_convert,
'-w', '256', '-h', '256',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: true,
install_dir: join_paths(datadir, 'icons', 'hicolor', '256x256', 'apps')
)
custom_target('org.pwmt.zathura_32.png',
input: '../org.pwmt.zathura.svg',
output: 'org.pwmt.zathura.png',
command: [
rsvg_convert,
'-w', '32', '-h', '32',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: true,
install_dir: join_paths(datadir, 'icons', 'hicolor', '32x32', 'apps')
)
custom_target('org.pwmt.zathura_64.png',
input: '../org.pwmt.zathura.svg',
output: 'org.pwmt.zathura.png',
command: [
rsvg_convert,
'-w', '64', '-h', '64',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: true,
install_dir: join_paths(datadir, 'icons', 'hicolor', '64x64', 'apps')
)
......@@ -7,7 +7,14 @@ zathura_resources = gnome.compile_resources(
)
install_data('org.pwmt.zathura.xml', install_dir: dbusinterfacesdir)
install_data('org.pwmt.zathura.png', install_dir: join_paths(datadir, 'icons', 'hicolor', '128x128', 'apps'))
install_data('org.pwmt.zathura.svg', install_dir: join_paths(datadir, 'icons', 'scalable', 'apps'))
rsvg_convert = find_program('rsvg-convert', required: get_option('convert-icon'), native: true)
if rsvg_convert.found()
foreach width : [16, 32, 64, 128, 256]
subdir('icon-@0@'.format(width))
endforeach
endif
i18n = import('i18n')
podir = join_paths(meson.source_root(), 'po')
......@@ -29,7 +36,7 @@ appdata = i18n.merge_file('appdata',
po_dir: podir,
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
desktop_file_validate = find_program('desktop-file-validate', required: get_option('tests'), native: true)
if desktop_file_validate.found()
test('validate-desktop',
desktop_file_validate,
......@@ -37,11 +44,11 @@ if desktop_file_validate.found()
)
endif
appstream_util = find_program('appstream-util', required: false)
appstream_util = find_program('appstream-util', required: get_option('tests'), native: true)
if appstream_util.found()
test('validate-appdata',
appstream_util,
args: ['validate-relax', appdata.full_path()]
args: ['validate-relax', '--nonet', appdata.full_path()]
)
endif
......
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="128.000000pt" height="128.000000pt" viewBox="0 0 128.000000 128.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,128.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M763 1057 c-19 -27 -23 -47 -23 -109 0 -42 -4 -88 -10 -103 -10 -25
-11 -26 -92 -23 l-83 3 -5 60 c-8 101 -60 144 -109 91 -18 -19 -22 -33 -20
-81 3 -61 -12 -85 -52 -85 -24 0 -86 -37 -93 -56 -7 -19 10 -64 26 -65 7 -1
35 -1 61 1 31 1 57 -4 73 -15 23 -14 25 -22 22 -73 l-3 -57 -110 -5 c-145 -7
-185 -28 -164 -89 6 -17 12 -32 12 -32 1 -1 60 -5 132 -8 l130 -6 8 -84 c8
-88 24 -121 57 -121 25 0 30 20 30 113 0 132 1 133 101 144 81 8 89 0 89 -97
0 -63 4 -82 21 -104 27 -34 45 -33 64 5 14 27 15 40 4 100 -16 90 -9 99 78 99
75 0 143 28 143 60 0 23 -32 43 -54 34 -9 -4 -41 -3 -70 0 -74 10 -106 39
-106 99 0 61 17 106 43 112 12 3 60 9 106 15 89 10 111 21 111 51 0 18 -9 19
-115 19 -109 0 -115 1 -130 24 -13 19 -14 35 -6 90 16 114 -19 163 -66 93z
m-29 -343 c8 -20 8 -128 0 -148 -5 -12 -21 -16 -73 -16 -85 0 -102 12 -108 77
-5 46 -3 51 27 76 26 23 41 27 90 27 44 0 59 -4 64 -16z"/>
</g>
</svg>
" See LICENSE file for license and copyright information
" SPDX-License-Identifier: Zlib
" This is a sample plugin that can be used for synctex forward synchronization.
" It currently uses latexsuite to obtain the file name of the document. If you
......
# See LICENSE file for license and copyright information
# SPDX-License-Identifier: Zlib
# General information
PROJECT_NAME = zathura
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# See LICENSE file for license and copyright information
# SPDX-License-Identifier: Zlib
import sphinx_rtd_theme
......
# -*- coding: utf-8 -*-
#
# See LICENSE file for license and copyright information
# SPDX-License-Identifier: Zlib
import os.path
import glob
......
sphinx = find_program('sphinx-build')
custom_target('man pages',
command: [
sphinx,
'-b', 'man',
'-D', 'version=' + version,
'-D', 'release=' + version,
join_paths(meson.current_source_dir(), 'man'),
meson.current_build_dir()],
output: ['zathura.1', 'zathurarc.5'],
input: [
'man/conf.py',
'man/_bindings.txt',
'man/_commands.txt',
'man/_options.txt',
'man/_synopsis.txt',
'man/zathurarc.5.rst',
'man/_bugs.txt',
'man/_configuration.txt',
'man/_description.txt',
'man/_synctex.txt',
'man/zathura.1.rst'
],
build_by_default: true,
install: true,
install_dir: [
join_paths(get_option('mandir'), 'man1'),
join_paths(get_option('mandir'), 'man5')
]
)
sphinx = find_program('sphinx-build', required: get_option('manpages'))
if sphinx.found()
custom_target('man pages',
command: [
sphinx,
'-b', 'man',
'-D', 'version=' + version,
'-D', 'release=' + version,
join_paths(meson.current_source_dir(), 'man'),
meson.current_build_dir()],
output: ['zathura.1', 'zathurarc.5'],
input: [
'man/conf.py',
'man/_bindings.txt',
'man/_commands.txt',
'man/_options.txt',
'man/_synopsis.txt',
'man/zathurarc.5.rst',
'man/_bugs.txt',
'man/_configuration.txt',
'man/_description.txt',
'man/_synctex.txt',
'man/zathura.1.rst'
],
build_by_default: true,
install: true,
install_dir: [
join_paths(get_option('mandir'), 'man1'),
join_paths(get_option('mandir'), 'man5')
]
)
endif
project('zathura', 'c',
version: '0.4.1',
meson_version: '>=0.45',
version: '0.4.2',
meson_version: '>=0.47',
default_options: 'c_std=c11',
)
......@@ -36,7 +36,7 @@ dbusinterfacesdir = join_paths(datadir, 'dbus-1', 'interfaces')
plugindir = join_paths(get_option('libdir'), 'zathura')
# required dependencies
libm = cc.find_library('libm', required: false)
libm = cc.find_library('m', required: false)
girara = dependency('girara-gtk3', version: '>=0.2.9')
glib = dependency('glib-2.0', version: '>=2.50')
gio = dependency('gio-unix-2.0', required: host_machine.system() != 'windows')
......@@ -68,18 +68,18 @@ flags = cc.get_supported_arguments(flags)
# optional dependencies
additional_sources = []
sqlite = dependency('sqlite3', version: '>=3.5.9', required: false)
synctex = dependency('synctex', required: false)
magic = cc.find_library('magic', required: false)
seccomp = dependency('libseccomp', required: false)
sqlite = dependency('sqlite3', version: '>=3.5.9', required: get_option('sqlite'))
synctex = dependency('synctex', required: get_option('synctex'))
magic = cc.find_library('magic', required: get_option('magic'))
seccomp = dependency('libseccomp', required: get_option('seccomp'))
if get_option('enable-sqlite') and sqlite.found()
if sqlite.found()
build_dependencies += sqlite
defines += '-DWITH_SQLITE'
additional_sources += files('zathura/database-sqlite.c')
endif
if get_option('enable-synctex') and synctex.found()
if synctex.found()
build_dependencies += synctex
defines += '-DWITH_SYNCTEX'
if synctex.version() < '2.0.0'
......@@ -91,12 +91,12 @@ if get_option('enable-synctex') and synctex.found()
endif
endif
if get_option('enable-magic') and magic.found()
if magic.found()
build_dependencies += magic
defines += '-DWITH_MAGIC'
endif
if get_option('enable-seccomp') and seccomp.found()
if seccomp.found()
build_dependencies += seccomp
defines += '-DWITH_SECCOMP'
additional_sources += files('zathura/seccomp-filters.c')
......
option('enable-sqlite',
type: 'boolean',
value: true,
description: 'Enable sqlite support if available.'
option('sqlite',
type: 'feature',
value: 'auto',
description: 'SQLite database backend'
)
option('enable-synctex',
type: 'boolean',
value: true,
description: 'Enable synctex support if available.'
option('synctex',
type: 'feature',
value: 'auto',
description: 'SyncTeX integration'
)
option('enable-magic',
type: 'boolean',
value: true,
description: 'Enable magic support if available.'
option('magic',
type: 'feature',
value: 'auto',
description: 'magic-based MIME type detection'
)
option('enable-seccomp',
type: 'boolean',
value: true,
description: 'Enable experimental seccomp support if available.'
option('seccomp',
type: 'feature',
value: 'auto',
description: 'seccomp-based sandbox'
)
option('manpages',
type: 'feature',
value: 'auto',
description: 'manual pages'
)
option('tests',
type: 'feature',
value: 'auto',
description: 'run tests'
)
option('convert-icon',
type: 'feature',
value: 'auto',
description: 'convert icon to PNG'
)
......@@ -17,6 +17,7 @@ no
pl
pt_BR
ru
sv
ta_IN
tr
uk_UA
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
check = dependency('check', required: false)
check = dependency('check', required: get_option('tests'))
if check.found()
test_dependencies = [
declare_dependency(link_with: libzathura),
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <check.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <check.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <check.h>
#include <limits.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <check.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <gtk/gtk.h>
#include <stdlib.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_TESTS_H
#define ZATHURA_TESTS_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "adjustment.h"
#include "utils.h"
#include <math.h>
#include <math.h>
double
page_calc_height_width(zathura_document_t* document, double height,
......@@ -158,11 +158,11 @@ page_is_visible(zathura_document_t *document, unsigned int page_number)
void
zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value)
{
gtk_adjustment_set_value(adjustment,
MAX(gtk_adjustment_get_lower(adjustment),
MIN(gtk_adjustment_get_upper(adjustment) -
gtk_adjustment_get_page_size(adjustment),
value)));
const gdouble lower = gtk_adjustment_get_lower(adjustment);
const gdouble upper_m_size = gtk_adjustment_get_upper(adjustment) -
gtk_adjustment_get_page_size(adjustment);
gtk_adjustment_set_value(adjustment, MAX(lower, MIN(upper_m_size, value)));
}
gdouble
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_ADJUSTMENT_H
#define ZATHURA_ADJUSTMENT_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <string.h>
#include "bookmarks.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef BOOKMARKS_H
#define BOOKMARKS_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <girara/statusbar.h>
#include <girara/session.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef CALLBACKS_H
#define CALLBACKS_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "checked-integer-arithmetic.h"
#include <stdint.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_CHECKED_INTEGER_ARITHMETIC_H
#define ZATHURA_CHECKED_INTEGER_ARITHMETIC_H
#include "macros.h"
#include <stdbool.h>
#if __GNUC__ >= 5
#if __GNUC__ >= 5 || __has_builtin(__builtin_add_overflow)
#define HAVE_BUILTIN
#elif defined(__clang__)
#if __has_builtin(__builtin_add_overflow)
#define HAVE_BUILTIN
#endif
#endif
#ifdef __cplusplus
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <string.h>
#include <stdlib.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef COMMANDS_H
#define COMMANDS_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <stdio.h>
#include <string.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef COMPLETION_H
#define COMPLETION_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "config.h"
#include "commands.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef CONFIG_H
#define CONFIG_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "content-type.h"
#include "macros.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_CONTENT_TYPE_H
#define ZATHURA_CONTENT_TYPE_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#define _POSIX_SOURCE
#define _XOPEN_SOURCE 500
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_DATABASE_PLAIN_H
#define ZATHURA_DATABASE_PLAIN_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <sqlite3.h>
#include <girara/utils.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef ZATHURA_DATABASE_SQLITE_H
#define ZATHURA_DATABASE_SQLITE_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "database.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DATABASE_H
#define DATABASE_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "dbus-interface.h"
#include "synctex.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DBUS_INTERFACE_H
#define DBUS_INTERFACE_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <stdlib.h>
#include <string.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DOCUMENT_H
#define DOCUMENT_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "file-monitor-glib.h"
#include "macros.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef FILEMONITOR_GLIB_H
#define FILEMONITOR_GLIB_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "file-monitor-noop.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef FILEMONITOR_NOOP_H
#define FILEMONITOR_NOOP_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "file-monitor-signal.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef FILEMONITOR_SIGNAL_H
#define FILEMONITOR_SIGNAL_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "file-monitor.h"
#include "file-monitor-glib.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef FILEMONITOR_H
#define FILEMONITOR_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef INTERNAL_H
#define INTERNAL_H
......