Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura-pdf-poppler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura-pdf-poppler
Commits
ecf8bf6c
Commit
ecf8bf6c
authored
Feb 16, 2018
by
Sebastian Ramacher
Committed by
Sebastian Ramacher
Feb 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add meson build system
parent
faccb408
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
192 deletions
+65
-192
Makefile
Makefile
+0
-115
common.mk
common.mk
+0
-9
config.mk
config.mk
+0
-68
meson.build
meson.build
+65
-0
No files found.
Makefile
deleted
100644 → 0
View file @
faccb408
# See LICENSE file for license and copyright information
include
config.mk
include
common.mk
PROJECT
=
zathura-pdf-poppler
PLUGIN
=
pdf
SOURCE
=
$(
sort
$(
wildcard
*
.c
))
HEADER
=
$(
wildcard
*
.h
)
OBJECTS
=
${SOURCE:.c=.o}
DOBJECTS
=
${SOURCE:.c=.do}
ifeq
($(UNAME), Darwin)
SOFILE
=
${PLUGIN}
.dylib
SODEBUGFILE
=
${PLUGIN}
-debug
.dylib
ZATHURAFILE
=
${PREFIX}
/bin/zathura
PLATFORMFLAGS
=
-Wl
,-dylib_install_name,
${DESTDIR}${PLUGINDIR}
/pdf.dylib
-Wl
,-bundle_loader,
${ZATHURAFILE}
-bundle
else
SOFILE
=
${PLUGIN}
.so
SODEBUGFILE
=
${PLUGIN}
-debug
.so
PLATFORMFLAGS
=
-shared
endif
CPPFLAGS
+=
"-DVERSION_MAJOR=
${VERSION_MAJOR}
"
CPPFLAGS
+=
"-DVERSION_MINOR=
${VERSION_MINOR}
"
CPPFLAGS
+=
"-DVERSION_REV=
${VERSION_REV}
"
all
:
options ${SOFILE}
# pkg-config based version checks
.version-checks/%
:
config.mk
$(QUIET)
test
$
(
$
(
*
)
_VERSION_CHECK
)
-eq
0
||
\
${PKG_CONFIG}
--atleast-version
$
(
$
(
*
)
_MIN_VERSION
)
$
(
$
(
*
)
_PKG_CONFIG_NAME
)
||
(
\
echo
"The minimum required version of
$
(*) is
$
(
$
(*)_MIN_VERSION)"
&&
\
false
\
)
@
mkdir
-p
.version-checks
$(QUIET)
touch
$@
options
:
$(ECHO)
${PLUGIN}
build options:
$(ECHO)
"CFLAGS =
${CFLAGS}
"
$(ECHO)
"LDFLAGS =
${LDFLAGS}
"
$(ECHO)
"DFLAGS =
${DFLAGS}
"
$(ECHO)
"CC =
${CC}
"
$(ECHO)
"PKG_CONFIG =
${PKG_CONFIG}
"
%.o
:
%.c
$(ECHO)
CC
$<
@
mkdir
-p
.depend
$(QUIET)${CC}
-c
${CPPFLAGS}
${CFLAGS}
-o
$@
$<
-MMD
-MF
.depend/
$@
.dep
%.do
:
%.c
$(ECHO)
CC
$<
@
mkdir
-p
.depend
$(QUIET)${CC}
-c
${CPPFLAGS}
${CFLAGS}
${DFLAGS}
-o
$@
$<
-MMD
-MF
.depend/
$@
.dep
${OBJECTS}
:
config.mk
\
.version-checks/ZATHURA
\
.version-checks/POPPLER
${DOBJECTS}
:
config.mk
\
.version-checks/ZATHURA
\
.version-checks/POPPLER
${SOFILE}
:
${OBJECTS}
$(ECHO)
LD
$@
$(QUIET)${CC}
${PLATFORMFLAGS}
${LDFLAGS}
-o
$@
${OBJECTS}
${LIBS}
${SODEBUGFILE}
:
${DOBJECTS}
$(ECHO)
LD
$@
$(QUIET)${CC}
${PLATFORMFLAGS}
${LDFLAGS}
-o
$@
${OBJECTS}
${LIBS}
clean
:
$(QUIET)
rm
-rf
${OBJECTS}
${DOBJECTS}
${SOFILE}
${SODEBUGFILE}
\
doc .depend
${PROJECT}
-
${VERSION}
.tar.gz zathura-version-check
debug
:
options ${SODEBUGFILE}
dist
:
clean
$(QUIET)
mkdir
-p
${PROJECT}
-
${VERSION}
$(QUIET)
cp
-R
LICENSE Makefile config.mk common.mk Doxyfile
\
${HEADER}
${SOURCE}
AUTHORS
${PROJECT}
.desktop
\
${PROJECT}
.metainfo.xml
\
${PROJECT}
-
${VERSION}
$(QUIET)
tar
-cf
${PROJECT}
-
${VERSION}
.tar
${PROJECT}
-
${VERSION}
$(QUIET)
gzip
${PROJECT}
-
${VERSION}
.tar
$(QUIET)
rm
-rf
${PROJECT}
-
${VERSION}
doc
:
clean
$(QUIET)
doxygen Doxyfile
install
:
all
$(ECHO)
installing
${PLUGIN}
plugin
$(QUIET)
mkdir
-p
${DESTDIR}${PLUGINDIR}
$(QUIET)
cp
-f
${SOFILE}
${DESTDIR}${PLUGINDIR}
$(QUIET)
mkdir
-m
755
-p
${DESTDIR}${DESKTOPPREFIX}
$(ECHO)
installing desktop file
$(QUIET)
install
-m
644
${PROJECT}
.desktop
${DESTDIR}${DESKTOPPREFIX}
$(ECHO)
installing AppData file
$(QUIET)
mkdir
-m
755
-p
$(DESTDIR)$(APPDATAPREFIX)
$(QUIET)
install
-m
644
$(PROJECT)
.metainfo.xml
$(DESTDIR)$(APPDATAPREFIX)
uninstall
:
$(ECHO)
uninstalling
${PLUGIN}
plugin
$(QUIET)
rm
-f
${DESTDIR}${PLUGINDIR}
/
${SOFILE}
$(QUIET)
find
${DESTDIR}${PLUGINDIR}
-type
d
-empty
-delete
2> /dev/null
$(ECHO)
removing desktop file
$(QUIET)
rm
-f
${DESTDIR}${DESKTOPPREFIX}
/
${PROJECT}
.desktop
$(QUIET)
find
${DESTDIR}${DESKTOPPREFIX}
-type
d
-empty
-delete
2> /dev/null
$(ECHO)
removing AppData file
$(QUIET)
rm
-f
$(DESTDIR)$(APPDATAPREFIX)
/
$(PROJECT)
.metainfo.xml
-include
$(wildcard .depend/*.dep)
.PHONY
:
all options clean debug doc dist install uninstall
common.mk
deleted
100644 → 0
View file @
faccb408
# See LICENSE file for license and copyright information
ifeq
"$(VERBOSE)" "0"
ECHO
=
@echo
QUIET
=
@
else
ECHO
=
@
\#
QUIET
=
endif
config.mk
deleted
100644 → 0
View file @
faccb408
# See LICENSE file for license and copyright information
VERSION_MAJOR
=
0
VERSION_MINOR
=
2
VERSION_REV
=
8
VERSION
=
${VERSION_MAJOR}
.
${VERSION_MINOR}
.
${VERSION_REV}
PKG_CONFIG
?=
pkg-config
# version checks
# If you want to disable any of the checks, set *_VERSION_CHECK to 0.
# zathura
ZATHURA_VERSION_CHECK
?=
1
ZATHURA_MIN_VERSION
=
0.3.8
ZATHURA_PKG_CONFIG_NAME
=
zathura
# poppler
POPPLER_VERSION_CHECK
?=
1
POPPLER_MIN_VERSION
=
0.18
POPPLER_PKG_CONFIG_NAME
=
poppler-glib
# paths
PREFIX
?=
/usr
LIBDIR
?=
${PREFIX}
/lib
DESKTOPPREFIX
?=
${PREFIX}
/share/applications
APPDATAPREFIX
?=
${PREFIX}
/share/metainfo
# libs
CAIRO_INC
?=
$(
shell
$(PKG_CONFIG)
--cflags
cairo
)
CAIRO_LIB
?=
$(
shell
$(PKG_CONFIG)
--libs
cairo
)
PDF_INC
?=
$(
shell
$(PKG_CONFIG)
--cflags
poppler-glib
)
PDF_LIB
?=
$(
shell
$(PKG_CONFIG)
--libs
poppler-glib
)
GIRARA_INC
?=
$(
shell
$(PKG_CONFIG)
--cflags
girara-gtk3
)
GIRARA_LIB
?=
$(
shell
$(PKG_CONFIG)
--libs
girara-gtk3
)
ZATHURA_INC
?=
$(
shell
$(PKG_CONFIG)
--cflags
zathura
)
PLUGINDIR
?=
$(
shell
$(PKG_CONFIG)
--variable
=
plugindir zathura
)
ifeq
(,${PLUGINDIR})
PLUGINDIR
=
${LIBDIR}
/zathura
endif
INCS
=
${CAIRO_INC}
${PDF_INC}
${ZATHURA_INC}
${GIRARA_INC}
LIBS
=
${GIRARA_LIB}
${CAIRO_LIB}
${PDF_LIB}
# uname
UNAME
:=
$(
shell
uname
-s
)
# compiler flags
CFLAGS
+=
-std
=
c11
-fPIC
-pedantic
-Wall
-Wno-format-zero-length
$(INCS)
# linker flags
LDFLAGS
+=
-fPIC
ifeq
($(UNAME), Darwin)
LDFLAGS
+=
-fno-common
endif
# debug
DFLAGS
?=
-g
# compiler
CC
?=
gcc
LD
?=
ld
# set to something != 0 if you want verbose build output
VERBOSE
?=
0
meson.build
0 → 100644
View file @
ecf8bf6c
project('zathura-pdf-poppler', 'c',
version: '0.2.8',
meson_version: '>=0.43',
default_options: 'c_std=c11'
)
version = meson.project_version()
version_array = version.split('.')
cc = meson.get_compiler('c')
prefix = get_option('prefix')
datadir = get_option('datadir')
metainfodir = join_paths(datadir, 'metainfo')
desktopdir = join_paths(datadir, 'applications')
# required dependencies
zathura = dependency('zathura', version: '>=0.3.8')
poppler = dependency('poppler-glib', version: '>=0.18')
build_dependencies = [zathura, poppler]
# defines
defines = [
'-DVERSION_MAJOR=@0@'.format(version_array[0]),
'-DVERSION_MINOR=@0@'.format(version_array[1]),
'-DVERSION_REV=@0@'.format(version_array[2]),
'-D_DEFAULT_SOURCE',
]
# compile flags
flags = [
'-Wall',
'-Wextra',
'-pedantic',
'-Werror=implicit-function-declaration'
]
flags = cc.get_supported_arguments(flags)
sources = files(
'attachments.c',
'document.c',
'forms.c',
'image.c',
'index.c',
'links.c',
'meta.c',
'page.c',
'plugin.c',
'render.c',
'search.c',
'select.c',
'utils.c'
)
pdf = shared_module('pdf',
sources,
dependencies: build_dependencies,
c_args: defines + flags,
install: true,
install_dir: zathura.get_pkgconfig_variable('plugindir')
)
install_data('zathura-pdf-poppler.metainfo.xml', install_dir: metainfodir)
install_data('zathura-pdf-poppler.desktop', install_dir: desktopdir)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment