aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/jigdo/Makefile
blob: 30bf8f9f75c2f0b5757f98851af441e7c76fde72 (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
# Created by: Attila Nagy <bra@fsn.hu>
# $FreeBSD$

PORTNAME=   jigdo
PORTVERSION=    0.7.3
PORTREVISION=   7
CATEGORIES= net-p2p
MASTER_SITES=   http://atterer.org/sites/atterer/files/2009-08/${PORTNAME}/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Utility used to retrieve very large files over the Internet

RUN_DEPENDS=    ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget

MAN1=       jigdo-file.1 jigdo-lite.1 jigdo-mirror.1

USE_BZIP2=  yes
USE_SUBMAKE=    yes
GNU_CONFIGURE=  yes
USE_GMAKE=  yes
WITH_BDB_VER?=  43

CPPFLAGS+=  -I${LOCALBASE}/include

OPTIONS_DEFINE=     GUI BDB NLS
OPTIONS_DEFAULT=    BDB NLS

GUI_DESC=       Build the gtk2 gui
BDB_DESC=       Build with Berkeley DB support (for jigdo-file cache)

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

.if ${PORT_OPTIONS:MGUI}
CONFIGURE_ARGS+=    --with-gui
LIB_DEPENDS+=   gtk-x11-2.0:${PORTSDIR}/x11-toolkits/gtk20 \
        curl:${PORTSDIR}/ftp/curl
MAN1+=      jigdo.1
PLIST_SUB+= GUI=""
.else
CONFIGURE_ARGS+=--without-gui
PLIST_SUB+= GUI="@comment "
.endif

.if ${PORT_OPTIONS:MBDB}
CONFIGURE_ENV+= LIBS=-L${BDB_LIB_DIR}
CPPFLAGS+=  -I${BDB_INCLUDE_DIR}
CONFIGURE_ARGS+=--with-libdb=-l${BDB_LIB_CXX_NAME}
USE_BDB=    ${WITH_BDB_VER}
.else
CONFIGURE_ARGS+=--without-libdb
.endif

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
CONFIGURE_ARGS+=--enable-nls
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

post-install:
    @${STRIP_CMD} ${PREFIX}/bin/jigdo-file

.include <bsd.port.mk>