aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/qstardict/Makefile
blob: 1dc4d2188f2e753013d302f4707ae9c1ea72d997 (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
# Created by: Yinghong.Liu <relaxbsd@gmail.com>
# $FreeBSD$

PORTNAME=   qstardict
PORTVERSION=    1.0.1
CATEGORIES= textproc
MASTER_SITES=   http://qstardict.ylsoftware.com/files/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Qt 4 based dictionary program (stardict clone)

USES=       dos2unix pkgconfig qmake tar:bzip2
USE_QT4=    gui network xml uic_build moc_build rcc_build
DOS2UNIX_FILES= qstardict.pri

# Path to dictionaries installed by stardict-* ports
DICPATH=    ${LOCALBASE}/share/stardict/dic

OPTIONS_DEFINE= DBUS DOCS NLS
OPTIONS_DEFAULT:=   ${OPTIONS_DEFINE}
OPTIONS_SUB=    yes

DBUS_USE=   QT4=dbus
DBUS_QMAKE_OFF= NO_DBUS=1

NLS_QMAKE_OFF=  NO_TRANSLATIONS=1

post-patch:
    @${REINPLACE_CMD} -e "s|/usr|${PREFIX}|g" \
        ${WRKSRC}/qstardict.pri
    @${REINPLACE_CMD} -e "s|/usr/share/stardict/dic|${DICPATH}|g" \
        -e "s|glib.*\.h|glib.h|g" \
        ${WRKSRC}/plugins/stardict/stardict.cpp

post-patch-DOCS-off:
    ${REINPLACE_CMD} -e "/^INSTALLS/s|docs||g" \
        ${WRKSRC}/qstardict.pro

.include <bsd.port.mk>