forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sope-2.3.2.ebuild
70 lines (60 loc) · 1.57 KB
/
sope-2.3.2.ebuild
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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils gnustep-2 vcs-snapshot
DESCRIPTION="A set of frameworks forming a complete Web application server environment"
HOMEPAGE="http://www.sogo.nu/"
SRC_URI="https://github.com/inverse-inc/sope/archive/SOPE-${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gnutls ldap libressl mysql postgres +ssl +xml"
RDEPEND="
sys-libs/zlib
ldap? ( net-nds/openldap )
gnutls? ( net-libs/gnutls:= )
!gnutls? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:= )
)
mysql? ( virtual/libmysqlclient:= )
postgres? ( dev-db/postgresql:= )
xml? ( dev-libs/libxml2:2 )
"
DEPEND="${RDEPEND}"
pkg_pretend() {
if use ssl && use gnutls && use libressl ; then
ewarn "You have enabled both gnutls and libressl, but only"
ewarn "one provider can be active. Using gnutls!"
fi
}
src_prepare() {
# https://github.com/inverse-inc/sope/pull/33
epatch "${FILESDIR}"/${P}-optional-deps.patch
epatch "${FILESDIR}"/${P}-mysql-preamble.patch
gnustep-base_src_prepare
}
src_configure() {
local ssl_provider
if use ssl ; then
if use gnutls ; then
ssl_provider=gnutls
else
ssl_provider=ssl
fi
else
ssl_provider=none
fi
egnustep_env
# Non-standard configure script
./configure \
--disable-strip \
$(use_enable debug) \
$(use_enable ldap openldap) \
$(use_enable mysql) \
$(use_enable postgres postgresql) \
$(use_enable xml) \
--with-ssl="${ssl_provider}" \
--with-gnustep || die "configure failed"
}