| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
inherit autotools flag-o-matic multilib-minimal
|
|
6 |
inherit autotools systemd tmpfiles toolchain-funcs
|
| 7 |
7 |
|
| 8 |
|
DESCRIPTION="Complete ODBC driver manager"
|
| 9 |
|
HOMEPAGE="https://www.unixodbc.org/"
|
| 10 |
|
SRC_URI="https://www.unixodbc.org/unixODBC-${PV}.tar.gz"
|
|
8 |
DESCRIPTION="the legendary remote-mail retrieval and forwarding utility"
|
|
9 |
HOMEPAGE="https://www.fetchmail.info/"
|
|
10 |
SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz"
|
|
11 |
S=${WORKDIR}/${P/_/.}
|
| 11 |
12 |
|
| 12 |
|
LICENSE="GPL-2 LGPL-2.1"
|
|
13 |
LICENSE="GPL-2 public-domain"
|
| 13 |
14 |
SLOT="0"
|
| 14 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
| 15 |
|
IUSE="+minimal odbcmanual static-libs unicode"
|
|
15 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
|
|
16 |
IUSE="ssl nls kerberos tk selinux socks"
|
| 16 |
17 |
|
| 17 |
|
RDEPEND="
|
| 18 |
|
dev-libs/libltdl:0[${MULTILIB_USEDEP}]
|
| 19 |
|
>=sys-libs/readline-6.2_p5-r1:=[${MULTILIB_USEDEP}]
|
| 20 |
|
>=sys-libs/ncurses-5.9-r3:=[${MULTILIB_USEDEP}]
|
| 21 |
|
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
|
| 22 |
|
"
|
| 23 |
|
DEPEND="
|
| 24 |
|
${RDEPEND}
|
| 25 |
|
sys-devel/bison
|
| 26 |
|
sys-devel/flex
|
| 27 |
|
"
|
|
18 |
RDEPEND="acct-user/fetchmail
|
|
19 |
ssl? ( >=dev-libs/openssl-3.0.9:= )
|
|
20 |
kerberos? ( virtual/krb5 )
|
|
21 |
nls? ( virtual/libintl )
|
|
22 |
!elibc_glibc? ( sys-fs/e2fsprogs )
|
|
23 |
socks? ( net-proxy/dante )"
|
|
24 |
DEPEND="${RDEPEND}
|
|
25 |
app-arch/xz-utils
|
|
26 |
app-alternatives/lex
|
|
27 |
nls? ( sys-devel/gettext )"
|
|
28 |
RDEPEND+=" selinux? ( sec-policy/selinux-fetchmail )"
|
| 28 |
29 |
|
|
30 |
REQUIRED_USE="kerberos? ( ssl )"
|
|
31 |
|
|
32 |
DOCS="FAQ FEATURES NEWS NOTES README README.NTLM README.SSL* TODO"
|
|
33 |
HTML_DOCS="*.html"
|
| 29 |
34 |
PATCHES=(
|
| 30 |
|
"${FILESDIR}"/${P}-bug-936060.patch
|
|
35 |
"${FILESDIR}"/${PN}-6.3.26-python-optional.patch
|
| 31 |
36 |
)
|
| 32 |
37 |
|
| 33 |
|
MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
|
| 34 |
|
MULTILIB_WRAPPED_HEADERS=( /usr/include/unixODBC/unixodbc_conf.h /usr/include/unixodbc.h )
|
| 35 |
|
|
| 36 |
38 |
src_prepare() {
|
| 37 |
39 |
default
|
| 38 |
|
|
| 39 |
|
# Only needed for config.h install patch
|
| 40 |
40 |
eautoreconf
|
| 41 |
41 |
}
|
| 42 |
42 |
|
| 43 |
|
multilib_src_configure() {
|
| 44 |
|
# Needs flex, bison
|
| 45 |
|
export LEX=flex
|
| 46 |
|
unset YACC
|
| 47 |
|
|
| 48 |
|
# bug #947922
|
| 49 |
|
append-cflags -std=gnu17
|
| 50 |
|
|
| 51 |
|
# --enable-driver-conf is --enable-driverc as per configure.in
|
| 52 |
|
local myeconfargs=(
|
| 53 |
|
--cache-file="${BUILD_DIR}"/config.cache
|
| 54 |
|
--sysconfdir="${EPREFIX}"/etc/${PN}
|
| 55 |
|
--disable-editline
|
| 56 |
|
--disable-static
|
| 57 |
|
--enable-iconv
|
| 58 |
|
--enable-shared
|
| 59 |
|
$(use_enable static-libs static)
|
| 60 |
|
$(use_enable !minimal drivers)
|
| 61 |
|
$(use_enable !minimal driverc)
|
| 62 |
|
$(use_with unicode iconv-char-enc UTF8)
|
| 63 |
|
$(use_with unicode iconv-ucode-enc UTF16LE)
|
| 64 |
|
)
|
| 65 |
|
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
|
43 |
src_configure() {
|
|
44 |
export PYTHON=:
|
|
45 |
|
|
46 |
econf \
|
|
47 |
--enable-RPA \
|
|
48 |
--enable-NTLM \
|
|
49 |
--enable-SDPS \
|
|
50 |
$(use_enable nls) \
|
|
51 |
$(use_with ssl ssl "${EPREFIX}/usr") \
|
|
52 |
$(use_with kerberos gssapi) \
|
|
53 |
$(use_with kerberos kerberos5) \
|
|
54 |
--without-hesiod \
|
|
55 |
$(use_with socks)
|
| 66 |
56 |
}
|
| 67 |
57 |
|
| 68 |
|
multilib_src_install_all() {
|
| 69 |
|
einstalldocs
|
|
58 |
src_compile() {
|
|
59 |
emake AR="$(tc-getAR)"
|
|
60 |
}
|
| 70 |
61 |
|
| 71 |
|
if use odbcmanual ; then
|
| 72 |
|
# We could simply run "make install-html" if we'd not had
|
| 73 |
|
# out-of-source builds here.
|
| 74 |
|
docinto html
|
| 75 |
|
dodoc -r doc/.
|
| 76 |
|
find "${ED}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
|
| 77 |
|
fi
|
|
62 |
src_install() {
|
|
63 |
default
|
|
64 |
|
|
65 |
newinitd "${FILESDIR}"/fetchmail.initd fetchmail
|
|
66 |
newconfd "${FILESDIR}"/fetchmail.confd fetchmail
|
|
67 |
|
|
68 |
systemd_dounit "${FILESDIR}"/${PN}.service
|
|
69 |
systemd_newunit "${FILESDIR}"/${PN}_at.service "${PN}@.service"
|
|
70 |
dotmpfiles "${FILESDIR}"/${PN}.conf
|
|
71 |
|
|
72 |
docinto contrib
|
|
73 |
local f
|
|
74 |
for f in contrib/* ; do
|
|
75 |
[ -f "${f}" ] && dodoc "${f}"
|
|
76 |
done
|
|
77 |
}
|
|
78 |
|
|
79 |
pkg_postinst() {
|
|
80 |
tmpfiles_process ${PN}.conf
|
| 78 |
81 |
|
| 79 |
|
use prefix && dodoc README*
|
| 80 |
|
find "${ED}" -type f -name '*.la' -delete || die
|
|
82 |
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
|
83 |
elog "Please see /etc/conf.d/fetchmail if you want to adjust"
|
|
84 |
elog "the polling delay used by the fetchmail init script."
|
|
85 |
fi
|
| 81 |
86 |
}
|