aboutsummaryrefslogtreecommitdiff
path: root/devel/fhist/Makefile
blob: 8a55061b189ab1f8fa640a755a3d8751627d31be (plain) (blame)
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
# Created by: <jkoshy@FreeBSD.org>
# $FreeBSD$

PORTNAME=	fhist
PORTVERSION=	1.21
DISTVERSIONSUFFIX=	.D001
PORTREVISION=	2
CATEGORIES=	devel
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Utilities to maintain file history, do file comparisons, and merges

LICENSE=	GPLv3

LIB_DEPENDS=	explain:${PORTSDIR}/devel/libexplain

OPTIONS_DEFINE=	NLS

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

USE_CSTD=	gnu89
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-nlsdir=${PREFIX}/share/locale/en/LC_MESSAGES
ALL_TARGET=	all-bin
MAKE_JOBS_UNSAFE=yes

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

MAN1=		fcomp.1 fhist.1 fmerge.1
PLIST_FILES=	bin/fcomp bin/fhist bin/fmerge

NO_STAGE=	yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=		gettext
.for file in fcomp fhist fmerge
PLIST_FILES+=	share/locale/en/LC_MESSAGES/${file}.mo
.endfor
.else
CONFIGURE_ENV+=	ac_cv_lib_intl_main=no
.endif

post-build:
.for file in fcomp fhist fmerge
.if ${PORT_OPTIONS:MNLS}
	@(cd ${WRKSRC}/lib/en/LC_MESSAGES && ${LOCALBASE}/bin/msgfmt -o \
		${file}.mo ${file}.po)
.endif
.endfor

do-install:
.for file in fcomp fhist fmerge
	${INSTALL_PROGRAM} ${WRKSRC}/bin/${file} ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/lib/en/man1/${file}.1 ${MANPREFIX}/man/man1
.if ${PORT_OPTIONS:MNLS}
	@${MKDIR} ${PREFIX}/share/locale/en/LC_MESSAGES
	${INSTALL_DATA} ${WRKSRC}/lib/en/LC_MESSAGES/${file}.mo \
		${PREFIX}/share/locale/en/LC_MESSAGES
.endif
.endfor

.include <bsd.port.mk>