summaryrefslogtreecommitdiff
path: root/devel/ncurses/Makefile.common
blob: 21af2c09b5cc492ea8e17018ffaa389950dfc15c (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
# $NetBSD: Makefile.common,v 1.8 2008/04/12 22:43:00 jlam Exp $

DISTNAME=	ncurses-${NC_VERS}
NC_VERS=	5.6
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_GNU:=ncurses/} \
		ftp://dickey.his.com/ncurses/ \
		ftp://dickey.his.com/ncurses/${NC_VERS}/

PATCH_SITES=		${MASTER_SITES:M*${NC_VERS}*}
PATCHFILES=		${DISTNAME}-coverity.patch.gz
PATCH_DIST_STRIP=	-p1

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://dickey.his.com/ncurses/ncurses.html

PKG_INSTALLATION_TYPES=	overwrite pkgviews
PKG_DESTDIR_SUPPORT=	user-destdir

USE_LANGUAGES=		c c++
USE_LIBTOOL=		yes
USE_TOOLS+=		tbl
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-libtool
CONFIGURE_ARGS+=	--enable-bsdpad
CONFIGURE_ARGS+=	--enable-overwrite
CONFIGURE_ARGS+=	--with-cxx-binding
CONFIGURE_ARGS+=	--without-ada
CONFIGURE_ARGS+=	--without-curses-h
CONFIGURE_ARGS+=	--without-gpm
CONFIGURE_ARGS+=	--with-manpage-format=normal
CONFIGURE_ARGS+=	--with-manpage-tbl
CONFIGURE_ARGS+=	--with-default-terminfo-dir=${PREFIX}/${TERMINFODIR}
CONFIGURE_ARGS+=	--with-terminfo-dirs=${PREFIX}/${TERMINFODIR}
MAKE_JOBS_SAFE=		no

.include "../../mk/bsd.prefs.mk"
.if !defined(TOOLS_TBL)
# This means that groff needs to be built to get tbl(1).
# We can only build groff if there is a builtin implementation of curses,
# otherwise we get a circular dependency problem.
# Additionally, Interix is special, see ../../mk/curses.buildlink3.mk
. if !(exists(/usr/include/curses.h) || exists(/usr/include/ncurses.h)) || \
	${OPSYS} == "Interix"
# None was available, so disable use of tbl(1)
USE_TOOLS:=		${USE_TOOLS:Ntbl}
CONFIGURE_ARGS+=	--without-manpage-tbl
. endif
.endif

PLIST_VARS+=	not-sunos

.if ${OPSYS} == "SunOS"
TERMINFO_SRC=	${WRKSRC}/misc/terminfo.src
TERMINFODIR=	share/lib/terminfo
.else
PLIST.not-sunos=yes
TERMINFODIR=	share/terminfo
.endif

# This prevents tic from writing into ~/.terminfo
INSTALLATION_DIRS+=	${TERMINFODIR}

PLIST_SUBST+=	TERMINFODIR=${TERMINFODIR:Q}