summaryrefslogtreecommitdiff
path: root/editors/ted/Makefile
blob: bc0a52127d23d062127ffb006cd5b0317def6e74 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# $NetBSD: Makefile,v 1.56 2013/01/26 21:37:29 adam Exp $

DISTNAME=	ted-2.21.src
PKGNAME=	${DISTNAME:S/.src//}
PKGREVISION=	7
CATEGORIES=	editors
MASTER_SITES=	ftp://ftp.nluug.nl/pub/editors/ted/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.nllgg.nl/Ted/
COMMENT=	X11 based WordPad-like word processor
LICENSE=	gnu-gpl-v2

PKG_INSTALLATION_TYPES=	overwrite pkgviews

USE_LANGUAGES=	c c++
USE_TOOLS+=	bsdtar
MAKE_JOBS_SAFE=	no

WRKSRC=		${WRKDIR}/Ted-2.21

AFMDIR=		${PREFIX}/share/Ted/afm
INDDIR=		${PREFIX}/share/Ted/ind
INFODIR=	${PREFIX}/share/doc/Ted

CONFIGURE_ENV+=	ac_jpeg_includes="${JPEGBASE}/include"
CONFIGURE_ENV+=	ac_jpeg_libraries="${JPEGBASE}/lib"
CONFIGURE_ENV+=	ac_png_includes="${BUILDLINK_PREFIX.png}/include"
CONFIGURE_ENV+=	ac_png_libraries="${BUILDLINK_PREFIX.png}/lib"
CONFIGURE_ENV+=	ac_tiff_includes="${BUILDLINK_PREFIX.tiff}/include"
CONFIGURE_ENV+=	ac_tiff_libraries="${BUILDLINK_PREFIX.tiff}/lib"
CONFIGURE_ENV+=	ac_xm_includes="${BUILDLINK_PREFIX.openmotif}/include"
CONFIGURE_ENV+=	ac_xm_libraries="${BUILDLINK_PREFIX.openmotif}/lib"
CONFIGURE_ENV+=	ac_xpm_includes="${BUILDLINK_PREFIX.libXpm}/include"
CONFIGURE_ENV+=	ac_xpm_libraries="${BUILDLINK_PREFIX.libXpm}/lib"
CONFIGURE_ENV+=	ac_zlib_includes="${BUILDLINK_PREFIX.zlib}/include"
CONFIGURE_ENV+=	ac_zlib_libraries="${BUILDLINK_PREFIX.zlib}/lib"

LDFLAGS.SunOS+=	-liconv
LDFLAGS+=	-lXft
LDFLAGS+=	-lfontconfig

MAKE_FLAGS+=	CONFIGURE_OPTIONS=--x-libraries=${X11BASE}/lib\ --with-MOTIF

MAKE_ENV+=	${CONFIGURE_ENV}
MAKE_ENV+=	DEF_PKGDIR='-DPKGDIR=\"${PREFIX}\"' \
		DEF_AFMDIR='-DAFMDIR=\"${AFMDIR}\"' \
		DEF_INDDIR='-DINDDIR=\"${INDDIR}\"' \
		DEF_INFODIR='-DDOCUMENT_DIR=\"${INFODIR}\"'

BUILD_TARGET=	compile.shared
INSTALL_TARGET=	install.shared

INSTALLATION_DIRS=	bin lib/X11/app-defaults ${AFMDIR} ${INDDIR} ${INFODIR}

post-extract:
	@cd ${WRKSRC} ; ${TOOLS_PATH.bsdtar} xf tedPackage/TedBindist.tar

post-patch:
	@cd ${WRKSRC}/Ted ; \
	${SED}	-e "s!Ted.afmDirectory:.*!Ted.afmDirectory:${AFMDIR}!g" \
		-e "s!Ted.spellToolSystemDicts:.*!Ted.spellToolSystemDicts:${INDDIR}!g" \
		-e "s!Ted.documentFileName:.*!Ted.documentFileName:${INFODIR}/TedDocument-en_US.rtf!g" \
		Ted.ad.sample > Ted.ad

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/Ted/Ted ${DESTDIR}${PREFIX}/bin/Ted
	${INSTALL_DATA} ${WRKSRC}/Ted/afm/*.afm ${DESTDIR}${AFMDIR}
	${INSTALL_DATA} ${FILESDIR}/README.ind ${DESTDIR}${INDDIR}
	${INSTALL_DATA} ${WRKSRC}/Ted/TedDocument-en_US.rtf ${DESTDIR}${INFODIR}
	${INSTALL_DATA}	${WRKSRC}/Ted/Ted.ad \
		${DESTDIR}${PREFIX}/lib/X11/app-defaults/Ted

.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../x11/libXft/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
.include "../../mk/motif.buildlink3.mk"

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