1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
... | ... | |
7 |
7 |
|
8 |
8 |
MY_PN=imap
|
9 |
9 |
MY_P="${MY_PN}-${PV}"
|
10 |
|
S=${WORKDIR}/${MY_P}
|
11 |
10 |
|
12 |
|
CHAPPA_PL=115
|
13 |
11 |
DESCRIPTION="UW IMAP c-client library"
|
14 |
12 |
HOMEPAGE="http://www.washington.edu/imap/"
|
15 |
|
SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z
|
16 |
|
chappa? ( mirror://gentoo/${P}-chappa-${CHAPPA_PL}-all.patch.gz )"
|
|
13 |
SRC_URI="
|
|
14 |
ftp://ftp.cac.washington.edu/imap/${MY_PN}-$(ver_cut 1-2).tar.Z
|
|
15 |
mirror://debian/pool/main/u/uw-${MY_PN}/uw-${MY_PN}_${PV/_p/"~dfsg-"}.debian.tar.xz
|
|
16 |
"
|
|
17 |
S="${WORKDIR}"/${MY_PN}-$(ver_cut 1-2)
|
17 |
18 |
|
18 |
19 |
LICENSE="Apache-2.0"
|
19 |
20 |
SLOT="0"
|
20 |
21 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
21 |
|
IUSE="doc +ipv6 kerberos pam ssl static-libs topal chappa"
|
|
22 |
IUSE="doc +ipv6 kerberos pam ssl static-libs topal"
|
22 |
23 |
|
23 |
24 |
RDEPEND="
|
24 |
25 |
ssl? (
|
25 |
|
dev-libs/openssl:0=
|
|
26 |
dev-libs/openssl:=
|
26 |
27 |
)
|
27 |
28 |
kernel_linux? (
|
28 |
29 |
pam? ( >=sys-libs/pam-0.72 )
|
... | ... | |
33 |
34 |
DEPEND="${RDEPEND}"
|
34 |
35 |
|
35 |
36 |
PATCHES=(
|
|
37 |
"${WORKDIR}"/debian/patches
|
|
38 |
|
36 |
39 |
# Apply a patch to only build the stuff we need for c-client
|
37 |
40 |
"${FILESDIR}/${PN}-2006k_GENTOO_Makefile.patch"
|
38 |
41 |
|
39 |
42 |
# Apply patch to add the compilation of a .so for PHP
|
40 |
43 |
# This was previously conditional, but is more widely useful.
|
41 |
|
"${FILESDIR}/${PN}-2006k_GENTOO_amd64-so-fix.patch"
|
|
44 |
"${FILESDIR}/${PN}-2007f_GENTOO_amd64-so-fix.patch"
|
42 |
45 |
|
43 |
46 |
# Respect LDFLAGS
|
44 |
|
"${FILESDIR}/${PN}-2007f-ldflags.patch"
|
45 |
|
|
46 |
|
# openssl-1.1 build fix #647616
|
47 |
|
"${FILESDIR}/${PN}-2007f-openssl-1.1.patch"
|
|
47 |
"${FILESDIR}/${PN}-2007f_p7-ldflags.patch"
|
48 |
48 |
|
49 |
49 |
# build fix for -Werror=implicit-function-declaration and
|
50 |
50 |
# incompatible function pointer types, bug #870478
|
51 |
|
"${FILESDIR}/${PN}-2007f-implicit-declaration-fix.patch"
|
52 |
51 |
"${FILESDIR}/${PN}-2007f-scandir-callback-types.patch"
|
|
52 |
"${FILESDIR}/${PN}-2007f_p7-implicit-declaration-fix.patch"
|
53 |
53 |
)
|
54 |
54 |
|
55 |
55 |
src_prepare() {
|
56 |
|
use topal && PATCHES+=( "${FILESDIR}/${P}-topal.patch" )
|
|
56 |
use topal && PATCHES+=( "${FILESDIR}/${PN}-2007f-topal.patch" )
|
57 |
57 |
|
58 |
58 |
default
|
59 |
59 |
|
60 |
|
use chappa && eapply -p2 "${WORKDIR}/${P}-chappa-${CHAPPA_PL}-all.patch"
|
61 |
|
|
62 |
60 |
# Tarball packed with bad file perms
|
63 |
61 |
chmod -R u+rwX,go-w . || die "failed to fix permissions"
|
64 |
62 |
|
65 |
|
# lots of things need -fPIC, including various platforms, and this library
|
|
63 |
# Lots of things need -fPIC, including various platforms, and this library
|
66 |
64 |
# generally should be built with it anyway.
|
67 |
65 |
append-flags -fPIC
|
68 |
66 |
|
... | ... | |
96 |
94 |
-i src/osdep/unix/Makefile \
|
97 |
95 |
|| die "failed to fix build flags support in the Makefile"
|
98 |
96 |
|
|
97 |
sed -i -e "s:krb5-config.mit:krb5-config:" src/osdep/unix/Makefile.gss || die
|
|
98 |
|
99 |
99 |
elibtoolize
|
100 |
100 |
}
|
101 |
101 |
|
102 |
102 |
src_compile() {
|
103 |
|
local mymake ipver ssltype target passwdtype
|
104 |
|
ipver='IP=4'
|
|
103 |
local mymake target passwdtype
|
|
104 |
|
|
105 |
local ipver='IP=4'
|
105 |
106 |
if use ipv6 ; then
|
106 |
107 |
ipver="IP=6"
|
107 |
108 |
touch ip6 || die "failed to create ip6 file"
|
108 |
109 |
fi
|
109 |
|
use ssl && ssltype="unix" || ssltype="none"
|
|
110 |
|
|
111 |
local ssltype="none"
|
|
112 |
if use ssl ; then
|
|
113 |
ssltype="unix"
|
|
114 |
fi
|
|
115 |
|
110 |
116 |
if use kernel_linux ; then
|
111 |
117 |
# Fall back to "slx" when USE=pam is not set. This ensures that
|
112 |
118 |
# we link in libcrypt to get the crypt() routine (bug #456928).
|
113 |
|
use pam && target=lnp passwdtype=pam || target=slx passwdtype=std
|
|
119 |
use pam && target=lnps passwdtype=pam || target=slx passwdtype=std
|
114 |
120 |
fi
|
115 |
|
use kerberos \
|
116 |
|
&& mymake="EXTRAAUTHENTICATORS=gss" \
|
117 |
|
&& EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
|
118 |
|
# no parallel builds supported!
|
119 |
|
emake -j1 SSLTYPE=${ssltype} $target \
|
|
121 |
|
|
122 |
if use kerberos ; then
|
|
123 |
mymake="EXTRAAUTHENTICATORS=gss"
|
|
124 |
EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
|
|
125 |
fi
|
|
126 |
|
|
127 |
emake -j1 \
|
|
128 |
SSLTYPE=${ssltype} ${target} \
|
120 |
129 |
PASSWDTYPE=${passwdtype} ${ipver} ${mymake} \
|
121 |
130 |
EXTRACFLAGS="${CFLAGS}" \
|
122 |
131 |
EXTRALDFLAGS="${LDFLAGS}" \
|