summaryrefslogtreecommitdiff
path: root/editors/abiword/Makefile
blob: 68a36c71e0d924fa9da9f33272d95b3245d7d43e (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
56
57
58
59
60
61
62
63
# $NetBSD: Makefile,v 1.107 2006/11/14 14:26:46 joerg Exp $

PKG_DESTDIR_SUPPORT=	user-destdir

.include "Makefile.common"

COMMENT=	Open Source cross-platform word processor

# GTK1 version and previous name of the GTK2 version
CONFLICTS=	abiword-personal-[0-9]* abiword2-[0-9]*

WRKSRC=		${WRKDIR}/${DISTNAME}/abi
USE_TOOLS+=	perl

REPLACE_PERL+=	user/wp/scripts/abw2html.pl

PKG_OPTIONS_VAR=	PKG_OPTIONS.abiword
PKG_SUPPORTED_OPTIONS=	gucharmap

.include "../../mk/bsd.options.mk"
.include "../../mk/bsd.prefs.mk"

.if empty(PKG_OPTIONS:Mgucharmap)
CONFIGURE_ARGS+=	--disable-gucharmap
.endif
CONFIGURE_ARGS+=	--with-sys-wv
.if ${OPSYS} == "Darwin"
# hardcode relative install path in libwv (MacOS X only)
CONFIGURE_ARGS+=	--without-epath
# Use X11 instead of Cocoa API
CONFIGURE_ARGS+=	--disable-Cocoa
.endif
CONFIGURE_ARGS+=	--enable-threads
CONFIGURE_ARGS+=	--with-libjpeg-prefix=${BUILDLINK_PREFIX.jpeg}
CONFIGURE_ARGS+=	--with-libxml2
CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}

USE_GNU_ICONV=		yes

INSTALLATION_DIRS+=	${PKGMANDIR}/man1
INSTALLATION_DIRS+=	share/AbiSuite-2.4/AbiWord

post-build:
	cd ${WRKDIR}/${DISTNAME}/abiword-docs/ && env \
		ABI_DOC_DEST=${WRKDIR} \
		ABI_DOC_PROG=${WRKSRC}/src/wp/main/unix/AbiWord-2.4 \
		./make-html.sh
	find ${WRKDIR}/help -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}
	find ${WRKDIR}/help \( -name "*.abw.orig" -or -name "*.abw"	\
		-or -name "*.info" -or -name "*.xhtml" \) -print | ${XARGS} ${RM} -f

post-install:
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/abiword-docs/man/abiword.1 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/abiword.1
	cp -R ${WRKDIR}/help ${DESTDIR}${PREFIX}/share/AbiSuite-2.4/AbiWord/

.if !empty(PKG_OPTIONS:Mgucharmap)
.include "../../fonts/gucharmap/buildlink3.mk"
.endif

.include "../../textproc/enchant/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"