aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/dctc-gui-qt/Makefile
blob: 1bace60fd4ef08cea006ba612dc81833734110c2 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
# New ports collection makefile for:    dctc qt gui
# Date created:     Sun Jul 28 7:00:43 UTC 2002
# Whom:         Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   dctc
PORTVERSION=    0.1.2
CATEGORIES= net
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dc-qt
PKGNAMESUFFIX=  -gui-qt
DISTNAME=   dc-qt-${PORTVERSION}

MAINTAINER= lioux@FreeBSD.org
COMMENT=    A Qt GUI for the Direct Connect (TM) dctc text client

RUN_DEPENDS=    dctc:${PORTSDIR}/net/dctc

USE_QT_VER= 3
USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
PLIST_FILES=    bin/dc_qt

OPTIONS=    XINE "Enable support for video preview using libxine" off

XINE_CONFIG?=   ${X11BASE}/bin/xine-config

.ifndef(NOPORTDOCS)
DOCSDIR=    ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}

PORTDOCS=   \
        about.html \
        advanced.html \
        basic.html \
        config.html \
        connect.html \
        index.html \
        logo.png \
        mainwindow.png \
        searchdl.html
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
BROKEN=     "Does not compile on FreeBSD 4.x"
.endif

# with xine preview support
.ifdef(WITH_XINE)
LIB_DEPENDS+=       xine:${PORTSDIR}/multimedia/libxine
CONFIGURE_ENV+=     XINE_CONFIG=${XINE_CONFIG}
.else
CONFIGURE_ARGS+=    --disable-preview
.endif

post-patch:
    @${REINPLACE_CMD} -E \
        -e 's|(HUBLIST[[:space:]]*=[[:space:]]*")hublist"|\1dc_hublist"|' \
        ${WRKSRC}/src/dc_hub.cc
.ifdef(NOPORTDOCS)
    @${REINPLACE_CMD} -E \
        -e 's|^(SUBDIRS).+$$|\1=|' \
        ${WRKSRC}/src/Makefile.in
.else
    @${REINPLACE_CMD} -E \
        -e 's|^(pkgdatadir).+$$|\1=${DOCSDIR}|' \
        ${WRKSRC}/src/doc/Makefile.in
.endif

post-configure:
# uphold CC/CXX/CFLAGS
    @${REINPLACE_CMD} -E \
        -e 's|^(CXXFLAGS.+)$$|\1 ${CXXFLAGS}|' \
        ${WRKSRC}/Makefile \
        ${WRKSRC}/src/Makefile

.include <bsd.port.post.mk>