aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/sdcv/Makefile
blob: d42d08eb4f1c815bf8c6749909ac46a49d891341 (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
66
67
68
# Ports collection makefile for:    sdcv
# Date created:         2005/07/07
# Whom:             chinsan <chinsan.tw@gmail.com>
# $FreeBSD$
#

PORTNAME=   sdcv
PORTVERSION=    0.4.2
CATEGORIES= textproc
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= chinsan@FreeBSD.org
COMMENT=    A text-based utility for work with dictionaries in StarDict's format

USE_BZIP2=  yes
USE_ICONV=  yes
GNU_CONFIGURE=  yes
USE_AUTOTOOLS=  libtool:15
USE_GNOME=  glib20
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
SUB_FILES=  pkg-message

.if !defined(WITHOUT_NLS)
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

MAN1=       sdcv.1

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
BROKEN= Doesn't build on FreeBSD 4.x
.endif

.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
BROKEN=     Doesn't build on 64-bit platforms
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
        ${WRKSRC}/doc/sdcv.1
    @${REINPLACE_CMD} -e '1425 s, install-data,,' \
        ${WRKSRC}/po/Makefile.in.in
    @${REINPLACE_CMD} -e 's, getopt.h,,g' ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} -e '146 s|()|(int, char * const [], const char *)|g' \
        ${WRKSRC}/src/getopt.h
    @${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
        ${WRKSRC}/src/sdcv.cpp
    @${REINPLACE_CMD} -e 's,@mandir@/uk,@mandir@,' \
        ${WRKSRC}/doc/uk/Makefile.in
.if !defined(WITHOUT_NLS)
    @${REINPLACE_CMD} -e 's,@USE_NLS@,yes,g' ${WRKSRC}/po/Makefile.in.in
    @${REINPLACE_CMD} -e 's, getopt.h,,g; s,@USE_NLS@,yes,g' \
        ${WRKSRC}/src/Makefile.in
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>