summaryrefslogtreecommitdiff
path: root/editors/pico/Makefile
blob: c2dacf21dc994ece79b5b9e907993345bc9b26eb (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
# $NetBSD: Makefile,v 1.73 2008/03/05 19:02:13 jlam Exp $
#
# NOTE:
# When updating, it is necessary to change the shlib version, located in
# several files in patches/.  If you do not KNOW that the new version is
# backwards ABI compatible (usually not), bump the major version,
# and then bump the BUILDLINK_API_DEPENDS in buildlink3.mk.

DISTNAME=	pine4.64
PKGNAME=	pico-4.10
PKGREVISION=	2
CATEGORIES=	editors
MASTER_SITES=	ftp://ftp.cac.washington.edu/pine/ \
		ftp://ftp.fu-berlin.de/unix/mail/pine/
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	jwise@NetBSD.org
HOMEPAGE=	http://www.washington.edu/pine/
COMMENT=	Text editor (ships with Pine), and Pine's text editing lib

LICENSE=	pine-license

PKG_DESTDIR_SUPPORT=	user-destdir

USE_LIBTOOL=		yes

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

OPSYSVARS+=		BUILDNAME
BUILDNAME.Darwin=	osx
.if ${OPSYS} == "IRIX"
.  if ${OS_VERSION} >= 6.5
BUILDNAME.IRIX=		sg6
.  else
BUILDNAME.IRIX=		sgi
.  endif
.endif
BUILDNAME.Interix=	sfu
BUILDNAME.Linux=	lnx
BUILDNAME.SunOS=	so5
BUILDNAME.NetBSD=	neb
BUILDNAME.*=		neb

# Let termcap.buildlink3.mk handle using the right termcap library.
LIBS+=			${BUILDLINK_LDADD.termcap}

MAKE_ENV+=	_STRIPFLAG_INSTALL=	# debug...

INSTALLATION_DIRS=	bin lib ${PKGMANDIR}/man1

# Create the OS-dependent files for Interix from the Solaris ones.
post-extract:
	${CP} -f ${WRKSRC}/pico/osdep/os-sol.h ${WRKSRC}/pico/osdep/os-sfu.h
	${SED} -e 's,read.pol,read.sel,' \
		${WRKSRC}/pico/osdep/os-sv4.ic >${WRKSRC}/pico/osdep/os-sfu.ic
	${SED} -e 's,sv4,sfu,g' \
		${WRKSRC}/pico/makefile.sv4 >${WRKSRC}/pico/makefile.sfu

do-build:
	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build ${BUILDNAME} \
		CC="${LIBTOOL} ${CC}" \
		PREFIX=${PREFIX} OPTIMIZE="${CFLAGS}" \
		EXTRALDFLAGS="${LIBS}"

do-install:
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/pico/libpico.la ${DESTDIR}${PREFIX}/lib
	${LIBTOOL} --mode=install ${INSTALL_PROGRAM} \
		${WRKSRC}/pico/pico ${WRKSRC}/pico/pilot ${DESTDIR}${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/doc/pico.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${INSTALL_MAN} ${WRKSRC}/doc/pilot.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${INSTALL_DATA_DIR} ${PREFIX}/include/pico
	cd ${WRKSRC}/pico && ${INSTALL_DATA} *.h ${DESTDIR}${PREFIX}/include/pico

.include "../../mk/termcap.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"