--- /dev/null
+diff -Nur spamprobe~/src/parser/GifParser.cc spamprobe/src/parser/GifParser.cc
+--- spamprobe~/src/parser/GifParser.cc
++++ spamprobe/src/parser/GifParser.cc
+@@ -81,7 +81,11 @@
+ GifParser::~GifParser()
+ {
+ if (m_gif) {
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ DGifCloseFile(m_gif, NULL);
++#else
+ DGifCloseFile(m_gif);
++#endif
+ }
+ }
+
+@@ -99,7 +103,11 @@
+ void GifParser::openImage()
+ {
+ m_nextByteIndex = 0;
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ m_gif = DGifOpen(this, readFromBuffer, NULL);
++#else
+ m_gif = DGifOpen(this, readFromBuffer);
++#endif
+ if (!m_gif) {
+ throw runtime_error("open gif failed");
+ }
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=2
-inherit eutils
+EAPI=6
DESCRIPTION="Fast, intelligent, automatic spam detector using Bayesian analysis"
HOMEPAGE="http://spamprobe.sourceforge.net/"
KEYWORDS="amd64 ~ppc x86"
IUSE="berkdb gif jpeg png"
-DEPEND="berkdb? ( >=sys-libs/db-3.2 )
- gif? ( media-libs/giflib )
+RDEPEND="
+ berkdb? ( >=sys-libs/db-3.2:* )
+ gif? ( media-libs/giflib:= )
jpeg? ( virtual/jpeg )
- png? ( media-libs/libpng )"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.4b-gcc43.patch \
- "${FILESDIR}"/${P}-libpng14.patch \
- "${FILESDIR}"/${P}+db-5.0.patch \
- "${FILESDIR}"/${P}-gcc47.patch
-}
+ png? ( media-libs/libpng:0= )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4b-gcc43.patch
+ "${FILESDIR}"/${P}-libpng14.patch
+ "${FILESDIR}"/${P}+db-5.0.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-giflib5.patch
+)
src_configure() {
econf \
}
src_install() {
- emake DESTDIR="${D}" install || die
- dodoc ChangeLog README.txt
-
+ default
insinto /usr/share/${PN}/contrib
- doins contrib/* || die
+ doins contrib/*
}