aboutsummaryrefslogtreecommitdiffstats
path: root/mail/sylpheed-claws/Makefile
blob: ca539546d0f238d2eaf840b5ddfb786d984d0b6f (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# New ports collection makefile for:    sylpheed-claws
# Date created:     3 January 2002
# Whom:         Simon 'corecode' Schubert <corecode@corecode.ath.cx>
#
# $FreeBSD$
#

PORTNAME=   sylpheed-claws
PORTVERSION=    0.7.2
CATEGORIES= mail news ipv6
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sylpheed-claws
DISTNAME=   sylpheed-${PORTVERSION}claws

MAINTAINER= corecode@corecode.ath.cx

USE_GMAKE=  yes
USE_X_PREFIX=   yes
USE_LIBTOOL=    yes
USE_GTK=    yes

CONFIGURE_ARGS= --program-suffix="-claws" --with-included-gettext \
        --enable-ipv6

CONFIGURE_ENV=  CFLAGS="${CFLAGS}" CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${X11BASE}/lib -L${LOCALBASE}/lib"

.if defined(WITH_PIXBUF) || defined(WITH_ALL)
LIB_DEPENDS+=       gdk_pixbuf.2:${PORTSDIR}/graphics/gdk-pixbuf
CONFIGURE_ARGS+=    --disable-imlib
.else
USE_IMLIB=      yes
CONFIGURE_ARGS+=    --disable-gdk-pixbuf
.endif
.if defined(WITH_GPGME) || defined(WITH_ALL)
LIB_DEPENDS+=       gpgme.5:${PORTSDIR}/security/gpgme
RUN_DEPENDS+=       gpg:${PORTSDIR}/security/gnupg
CONFIGURE_ARGS+=    --enable-gpgme
.endif
.if defined(WITH_COMPFACE) || defined(WITH_ALL)
LIB_DEPENDS+=       compface.1:${PORTSDIR}/mail/faces
.else
CONFIGURE_ARGS+=    --disable-compface
.endif
.if defined(WITH_JCONV) || defined(WITH_ALL)
LIB_DEPENDS+=       jconv.0:${PORTSDIR}/japanese/libjconv
.else
CONFIGURE_ARGS+=    --disable-jconv
.endif
.if defined(WITH_PSPELL) || defined(WITH_ALL)
LIB_DEPENDS+=       pspell.4:${PORTSDIR}/textproc/pspell
CONFIGURE_ARGS+=    --enable-pspell
.endif
.if defined(WITH_JPILOT) || defined(WITH_ALL)
LIB_DEPENDS+=       pisock.4:${PORTSDIR}/palm/pilot-link
RUN_DEPENDS+=       jpilot:${PORTSDIR}/palm/jpilot
CONFIGURE_ARGS+=    --enable-jpilot
.endif
.if defined(WITH_LDAP) || defined(WITH_ALL)
LIB_DEPENDS+=       ldap.2:${PORTSDIR}/net/openldap2
CONFIGURE_ARGS+=    --enable-ldap
CONFIGURE_ENV+=     PTHREAD_LIBS=${PTHREAD_LIBS:S/"//g}
.endif
.if !defined(WITHOUT_SSL)
USE_OPENSSL=        yes
CONFIGURE_ARGS+=    --enable-ssl
.endif

pre-everything::
    @${ECHO} ""
    @${ECHO} "You may define the following build options:"
    @${ECHO} ""
    @${ECHO} "      WITH_ALL       Enable all options below"
    @${ECHO} ""
    @${ECHO} "      WITH_PIXBUF    Enable GDK Pixbuf support"
    @${ECHO} "      WITH_GPGME     Enable GnuPG support using GPGME"
    @${ECHO} "      WITH_COMPFACE  Enable compface (X-Face) support"
    @${ECHO} "      WITH_JCONV     Enable enhanced charset conversion"
    @${ECHO} "      WITH_PSPELL    Enable spell-checking support"
    @${ECHO} "      WITH_JPILOT    Enable JPilot support"
    @${ECHO} "      WITH_LDAP      Enable LDAP access support"
    @${ECHO} ""
    @${ECHO} "      WITHOUT_SSL    Disable OpenSSL support"
    @${ECHO} ""

post-patch:
    @${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" \
        ${WRKSRC}/tools/README.sylprint ${WRKSRC}/tools/sylprint.pl
.if defined(NOPORTDOCS)
    @${PERL} -pi -e 's|^(SUBDIRS = .*)manual (.*)|\1\2|' ${WRKSRC}/Makefile.in
.endif

pre-build:
    @${LN} -sf ${LOCALBASE}/bin/${LIBTOOL} ${WRKSRC}/libtool

post-install:
.if !defined(NOPORTDOCS)
.for i in README README.jp README.claws RELEASE_NOTES.claws TODO TODO.jp tools/README.sylprint
    @${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
    @${INSTALL_MAN} ${WRKSRC}/tools/README ${DOCSDIR}/README.tools
.endif
    @${MKDIR} ${DATADIR}
.for i in eud2gc.py filter_conv.pl gif2xface.pl ldif-to-xml.py newscache_clean.pl
    @${INSTALL_SCRIPT} ${WRKSRC}/tools/${i} ${DATADIR}
.endfor
    @for d in `${FIND} ${WRKSRC}/themes`; do \
        if ${TEST} -d $${d}; then ${MKDIR} ${DATADIR}/$${d#${WRKSRC}/}; else \
        ${INSTALL_DATA} $${d} ${DATADIR}/$${d#${WRKSRC}}; fi; \
    done
    @${INSTALL_SCRIPT} ${WRKSRC}/tools/sylpheed-switcher ${PREFIX}/bin
    @${INSTALL_SCRIPT} ${WRKSRC}/tools/sylprint.pl ${PREFIX}/bin
    @${INSTALL_DATA} ${WRKSRC}/tools/sylprint.rc ${PREFIX}/etc/sylprint.rc.example
    @${MKDIR} ${PREFIX}/share/pixmaps
    @${INSTALL_DATA} ${WRKSRC}/sylpheed.png ${PREFIX}/share/pixmaps/sylpheed-claws.png

.include <bsd.port.mk>