aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gwenhywfar/Makefile
blob: d0faf55f7f69c670992a4ead0b8f4f374c6c151c (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# $FreeBSD$

PORTNAME=   gwenhywfar
PORTVERSION=    4.3.3
PORTREVISION?=  3
CATEGORIES= devel net security
MASTER_SITES=   http://www.aquamaniac.de/sites/download/download.php?package=01&release=67&file=01&dummy=/

MAINTAINER?=    jhale@FreeBSD.org
COMMENT?=   Multi-platform helper library for networking and security applications

LICENSE=    LGPL21

LIB_DEPENDS=    gcrypt:${PORTSDIR}/security/libgcrypt \
        gnutls:${PORTSDIR}/security/gnutls

.if !defined(SLAVEPORT)
OPTIONS_DEFINE= DOXYGEN MEMDEBUG

MEMDEBUG_DESC=  Enable memory debugger statistic
.endif

USE_GMAKE=  yes
USE_GETTEXT=    yes
USE_OPENSSL=    yes
USE_PKGCONFIG=  build
USE_AUTOTOOLS=  libtool
USE_GNOME=  gnomehack

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-release="yes" \
        --with-guis="${SLAVEPORT}"
CPPFLAGS+=  -DGCRYPT_NO_DEPRECATED
MAKE_JOBS_SAFE= yes

PLIST_SUB=  GWEN_SHLIB_VER="${GWEN_SHLIB_VER}"
USE_LDCONFIG=   yes

GWEN_SHLIB_VER= 60

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOXYGEN}
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen \
        dot:${PORTSDIR}/graphics/graphviz
CONFIGURE_ARGS+=--enable-full-doc
.endif

.if ${PORT_OPTIONS:MMEMDEBUG}
CONFIGURE_ARGS+=--enable-memtrace
.endif

.if defined(SLAVEPORT)
LIB_DEPENDS+=   gwenhywfar:${PORTSDIR}/devel/gwenhywfar
BUILD_WRKSRC=   ${WRKSRC}/gui
INSTALL_WRKSRC= ${WRKSRC}/gui/${SLAVEPORT}

.if ${SLAVEPORT}=="fox16"
LIB_DEPENDS+=   FOX-1.6:${PORTSDIR}/x11-toolkits/fox16
CPPFLAGS+=  -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+=   -L${LOCALBASE}/lib ${PTHREAD_LIBS}
.endif

.if ${SLAVEPORT}=="gtk2"
USE_GNOME+= gtk20
.endif

.if ${SLAVEPORT}=="qt4"
USE_QT4=    gui moc_build uic_build
QT_NONSTANDARD= yes
.endif
.endif

post-patch:
.if defined(SLAVEPORT)
    @${FIND} ${BUILD_WRKSRC} -name "Makefile.in" -type f | ${XARGS} \
    ${REINPLACE_CMD} -e 's|[$$][(]top_builddir[)]/src/[$$][(]gwenhywfar_internal_libname[)]|$$(gwenhywfar_libs)|g'
.endif

post-build:
.if ${PORT_OPTIONS:MDOXYGEN}
    @cd ${WRKSRC} && ${GMAKE} srcdoc
.endif

post-install:
.if ${PORT_OPTIONS:MDOXYGEN}
    ${MKDIR} ${DOCSDIR}/apidoc
    cd ${WRKSRC}/apidoc && \
        ${COPYTREE_SHARE} \* ${DOCSDIR}/apidoc
    @${FIND} -P ${DOCSDIR} -type f 2>/dev/null | \
        ${SED} -ne 's,^${PREFIX}/,,p' >> ${TMPPLIST}
    @${FIND} -P -d ${DOCSDIR} -type d 2>/dev/null | \
        ${SED} -ne 's,^${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
.endif

.include <bsd.port.mk>