aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/sdcv/Makefile
blob: 1477c7832b7bd38c6636d6da37b08db1a2b00a66 (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
# Created by: chinsan <chinsan.tw@gmail.com>
# $FreeBSD$

PORTNAME=   sdcv
PORTVERSION=    0.4.2
PORTREVISION=   2
CATEGORIES= textproc
MASTER_SITES=   SF

MAINTAINER= ports@FreeBSD.org
COMMENT=    Text-based utility for work with dictionaries in StarDict's format

LICENSE=    GPLv2 # (or later)

USE_BZIP2=  yes
USES=       gettext pkgconfig readline
USE_GNOME=  glib20
USE_AUTOTOOLS=  libtoolize aclocal automake autoconf
LIBTOOLIZE_ARGS=--copy --force
ACLOCAL_ARGS=   --automake-acdir=${ACLOCAL_DIR} -I m4
AUTOMAKE_ARGS=  --add-missing --copy

SUB_FILES=  pkg-message

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

post-patch:
.for i in doc/sdcv.1 src/sdcv.cpp
    @${REINPLACE_CMD} -e \
        's|/usr/share|${PREFIX}/share|' ${WRKSRC}/${i}
.endfor
    @${REINPLACE_CMD} -e \
        's|@mandir@/uk|@mandir@|' ${WRKSRC}/doc/uk/Makefile.am
    @${REINPLACE_CMD} -e \
        's|getopt1.c getopt.h||' ${WRKSRC}/src/Makefile.am

pre-configure:
    @${RM} -f ${WRKSRC}/m4/gettext.m4
    @${RM} -f ${WRKSRC}/src/getopt.h

.include <bsd.port.mk>