summaryrefslogtreecommitdiff
path: root/print/pdf-tools/Makefile
blob: ba1bf041c24db3d2e681604d3fad948e0df7d55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PORTNAME=	pdf-tools
DISTVERSIONPREFIX=	v
DISTVERSION=	0.91-63
DISTVERSIONSUFFIX=	-gaec8ecd
PORTREVISION=	4
CATEGORIES=	print elisp
PKGNAMESUFFIX=	${EMACS_PKGNAMESUFFIX}

MAINTAINER=	jrm@FreeBSD.org
COMMENT=	Emacs support library for PDF files
WWW=		https://github.com/vedang/pdf-tools

LICENSE=	GPLv3+
LICENSE_FILE=	${WRKSRC}/COPYING

BROKEN_FreeBSD_12_powerpc64=	fails to configure on powerpc64 elfv1: cannot find necessary poppler-private header (see README.org)

BUILD_DEPENDS=	cask${EMACS_PKGNAMESUFFIX}>0:devel/cask@${EMACS_FLAVOR} \
		tablist${EMACS_PKGNAMESUFFIX}>=0.70.4:devel/tablist@${EMACS_FLAVOR}
LIB_DEPENDS=	libpng.so:graphics/png \
		libpoppler-glib.so:graphics/poppler-glib \
		libpoppler.so:graphics/poppler
RUN_DEPENDS=	tablist${EMACS_PKGNAMESUFFIX}>=0.70:devel/tablist@${EMACS_FLAVOR}

USES=		autoreconf:build emacs gettext-runtime gmake gnome magick:7
USE_GITHUB=	yes
GH_ACCOUNT=	vedang
USE_GNOME=	cairo glib20

EMACS_FLAVORS_EXCLUDE=	devel_nox nox

CONFLICTS_INSTALL=	pdf-tools pdf-tools-emacs_* # bin/epdfinfo

do-build:
	cd ${WRKSRC}/server && ./autogen.sh && ./configure -q && make
	${EMACS_CMD} -q --batch -L ${WRKSRC}/lisp -f batch-byte-compile \
		${WRKSRC}/lisp/*.el
.if ${FLAVOR:U} == devel_full
	 ${EMACS_CMD} -q --batch -f loaddefs-generate-batch \
		${WRKSRC}/lisp/${PORTNAME}-loaddefs.el ${WRKSRC}/lisp
.else
	${EMACS_CMD} -q --batch \
	--eval "(setq generated-autoload-file \
		\"${WRKSRC}/lisp/${PORTNAME}-loaddefs.el\" \
		backup-inhibited t)" \
	-f batch-update-autoloads ${WRKSRC}/lisp
.endif

do-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}/${PORTNAME}
	${INSTALL_PROGRAM} ${WRKSRC}/server/epdfinfo ${STAGEDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/lisp/* ${FILESDIR}/${PORTNAME}-init.el \
		${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}/${PORTNAME}

.include <bsd.port.mk>