summaryrefslogtreecommitdiffstats
path: root/editors/biew/Makefile
blob: a1e504b45b8050523a6bb579cdac87ec60cf50d8 (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
# New ports collection makefile for:	biew
# Date created:		04 February 2000
# Whom:			Michael Vasilenko <acid@stu.cn.ua>
#
# $FreeBSD$
#

PORTNAME=	biew
PORTVERSION=	5.2.0
CATEGORIES=	editors
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	${PORTNAME}-${PORTVERSION:S/.//g}

MAINTAINER=	ports@FreeBSD.org

USE_BZIP2=	yes
USE_GMAKE=	yes

PORTDOCS=	biew_en.txt biew_ru.txt develop.en develop.ru file_ini.en \
		file_ini.ru licence.en licence.ru release.txt unix.txt

.include <bsd.port.pre.mk>

HOST_CFLAGS=	${CFLAGS} -DLIBDIR="\'\"${PREFIX}/share\"\'"
MAKEFILE=	makefile

.if ${OSVERSION} < 400010
LIB_DEPENDS=    ncurses.4:${PORTSDIR}/devel/ncurses
HOST_CFLAGS+=   -D__FreeBSD_version=${OSVERSION} -I${LOCALBASE}/include
HOST_LD+=       -L${LOCALBASE}/lib
.endif

MAKE_ARGS+=	HOST_CFLAGS="${HOST_CFLAGS}" CC="${CC}" LD="${CC}" \
		TARGET_OS=unix TARGET_SCREEN_LIB=curses \
		USE_MOUSE=y

post-build:
	@ ${LN} -sf ../../biewlib ${WRKSRC}/tools/biewhlp/biewlib
	cd ${WRKSRC}/tools/biewhlp; ${GMAKE} ${MAKE_ARGS}
	@ ${LN} -sf ../../biewlib ${WRKSRC}/tools/lzss/biewlib
	cd ${WRKSRC}/tools/lzss; ${GMAKE} ${MAKE_ARGS}
	@ (cd ${WRKSRC}/hlp;${LN} -sf ../tools/biewhlp/biewhlp ./;\
	${LN} -sf ../tools/lzss/lzss ./;./biewhlp biewhlp.prj)

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/biew ${PREFIX}/bin
	@ ${MKDIR} ${PREFIX}/share/biew
.for file in bin_rc/assembly.skn bin_rc/standard.skn hlp/biew.hlp
	${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/biew
.endfor
.if !defined(NOPORTDOCS)
	@ ${MKDIR} ${PREFIX}/share/doc/biew
.for file in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/biew
.endfor
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud