diff options
author | 2016-12-13 18:54:45 +0100 | |
---|---|---|
committer | 2016-12-13 20:07:04 +0100 | |
commit | 3c67e80b9017a0bd89d5eec08eb0b03b0202e45e (patch) | |
tree | c7a66c3a245d9fdc8149262e756e8dd11f2c8869 /app-text/crm114/crm114-20100106-r1.ebuild | |
parent | media-radio/fldigi: Maintenance release (diff) | |
download | gentoo-3c67e80b9017a0bd89d5eec08eb0b03b0202e45e.tar.gz gentoo-3c67e80b9017a0bd89d5eec08eb0b03b0202e45e.tar.bz2 gentoo-3c67e80b9017a0bd89d5eec08eb0b03b0202e45e.zip |
app-text/crm114: Fix building with GCC 5
Gentoo-bug: 571062
* EAPI=6
* Respect user CPPFLAGS
* Introduce USE=examples
Package-Manager: portage-2.3.3
Diffstat (limited to 'app-text/crm114/crm114-20100106-r1.ebuild')
-rw-r--r-- | app-text/crm114/crm114-20100106-r1.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/app-text/crm114/crm114-20100106-r1.ebuild b/app-text/crm114/crm114-20100106-r1.ebuild new file mode 100644 index 000000000000..4094f9d9fd37 --- /dev/null +++ b/app-text/crm114/crm114-20100106-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +MY_P="${P}-BlameMichelson.src" + +DESCRIPTION="A powerful text processing tool, mainly used for spam filtering" +HOMEPAGE="http://crm114.sourceforge.net/" +SRC_URI="http://crm114.sourceforge.net/tarballs/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +IUSE="examples mew mimencode nls normalizemime static test" + +RDEPEND=" + static? ( dev-libs/tre[static-libs] ) + !static? ( dev-libs/tre ) + mew? ( app-emacs/mew ) + mimencode? ( net-mail/metamail ) + normalizemime? ( mail-filter/normalizemime )" +DEPEND="${RDEPEND} + test? ( sys-apps/miscfiles )" + +S="${WORKDIR}"/${MY_P} + +PATCHES=( "${FILESDIR}"/${P}-fix-makefile.patch ) + +src_prepare() { + default + + if use mimencode; then + sed \ + -e 's%#:mime_decoder: /mimencode -u/%:mime_decoder: /mimencode -u/%' \ + -e 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \ + -i mailfilter.cf || die + elif use normalizemime; then + sed \ + -e 's%#:mime_decoder: /normalizemime/%:mime_decoder: /normalizemime/%' \ + -e 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \ + -i mailfilter.cf || die + fi +} + +src_compile() { + # Restore GNU89 inline semantics to + # emit external symbols, bug 571062 + append-cflags -std=gnu89 + + use static && append-ldflags -static -static-libgcc + + emake CC="$(tc-getCC)" +} + +src_test() { + emake megatest +} + +src_install() { + dobin crm114 cssdiff cssmerge cssutil osbf-util + + insinto /usr/share/${PN} + doins *.crm *.cf *.mfp + + dodoc COLOPHON.txt CRM114_Mailfilter_HOWTO.txt FAQ.txt INTRO.txt QUICKREF.txt \ + CLASSIFY_DETAILS.txt inoc_passwd.txt KNOWNBUGS.txt THINGS_TO_DO.txt README + + if use examples; then + docinto examples + dodoc *.example + docompress -x /usr/share/doc/${PF}/examples + fi +} + +pkg_postinst() { + elog "The spam-filter CRM files are installed in ${EROOT%/}/usr/share/${PN}." +} |