summaryrefslogtreecommitdiff
path: root/app-text/crm114
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-text/crm114
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-text/crm114')
-rw-r--r--app-text/crm114/Manifest4
-rw-r--r--app-text/crm114/crm114-20100106-r1.ebuild80
-rw-r--r--app-text/crm114/files/crm114-20100106-fix-makefile.patch60
-rw-r--r--app-text/crm114/metadata.xml19
4 files changed, 163 insertions, 0 deletions
diff --git a/app-text/crm114/Manifest b/app-text/crm114/Manifest
new file mode 100644
index 000000000000..8381364c7342
--- /dev/null
+++ b/app-text/crm114/Manifest
@@ -0,0 +1,4 @@
+AUX crm114-20100106-fix-makefile.patch 1796 BLAKE2B 370bc77608f77960be4c4ecb88e3729eb62fb9e46e15fcca673ae8f4e4efcaf4425f30cd6beada25d8eb9fdf741dfa449c4e2a5c3ca9d06eab9ea25524e38136 SHA512 3011a85116510fce131bd3c13b5ec1e4faeefdb1eebf114782d417fb9ce8050ce15cae05f8b651728335233641be1e870fe48702fa620b542a8f1c963853b81c
+DIST crm114-20100106-BlameMichelson.src.tar.gz 724672 BLAKE2B ce5c3078030f2c4e78833edfb107d78e134a02c339d28411f2f60d4a67c333904d2ed0cf32a087997a72d961cbc5dabef46fb6c692d99fb509abd4161bd0094b SHA512 bb95fa50d6feef1a127e39e4005c4964b0096c3c7059f63bbf2293042351cf5ceeb7590fd1bedc64291ba556dfba96856dba8554f2f52a6cbaa3ad65012809c6
+EBUILD crm114-20100106-r1.ebuild 1962 BLAKE2B 09f24d7ed7fea796905f0c2bfe554864788c65a05685f9c6a7e690dad98669b3d49df6d55c00a2254f927cf3c99803e0315a4dc827bc387aaee57abda04c8570 SHA512 29a09f44a2f9ca1011e15d36060a57603e1fffe9c22fc7a61bf82f3b77ff4e747a96133724f5f8168bfb341626a1d7f5556ac562e94666f8e544c09cfc9a535c
+MISC metadata.xml 707 BLAKE2B f66efbf9497eb73a927c0cbbd87fa3da5617adae4102940135f983ebbf6ce18d3e2f2a3aa8721aa4395d54977fd0d3ff44387610906bcadcde869e46869ba932 SHA512 9009a38eaab5b49e3ec537785dc2e45601afd2ef0bd1c2f7a0ab7f8f24c80feb7bd99c2e47e6835d8bc4fffeeb8d6628df02c260ff5198905b209c6606c2352e
diff --git a/app-text/crm114/crm114-20100106-r1.ebuild b/app-text/crm114/crm114-20100106-r1.ebuild
new file mode 100644
index 000000000000..6c22e69d7c12
--- /dev/null
+++ b/app-text/crm114/crm114-20100106-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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}."
+}
diff --git a/app-text/crm114/files/crm114-20100106-fix-makefile.patch b/app-text/crm114/files/crm114-20100106-fix-makefile.patch
new file mode 100644
index 000000000000..12ad4052002d
--- /dev/null
+++ b/app-text/crm114/files/crm114-20100106-fix-makefile.patch
@@ -0,0 +1,60 @@
+* Remove hardcoded variable
+* Respect user variables
+
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,6 @@
+ VER_SUFFIX ?=
+
+ #
+-# The following forces the compiler to be GCC. If you have trouble
+-# with your default compiler, and you want to force GCC, uncomment it.
+-CC=gcc
+-#
+ # What version is this software (PLEASE don't change this just
+ # to mess with my brain. - wsy)
+ #
+@@ -82,7 +78,7 @@
+ #
+ # Build our basic CFLAGS chunk
+ #
+-CFLAGS += -DVERSION='"$(VERSION)"'
++MY_CPPFLAGS += -DVERSION='"$(VERSION)"'
+ #
+ # Known Neighbord On, only for debugging
+ # CFLAGS += -DKNN_ON
+@@ -104,7 +100,7 @@
+ # certain functions to be inline (I added that to force gcc to inline functions
+ # under high optimization but not under low so that debugging is possible -
+ # that's why DO_INLINES is defined at O3 but not O0 - JB):
+-CFLAGS += -O3 -Wall -DDO_INLINES
++MY_CPPFLAGS += -DDO_INLINES
+ # turn this one on for no optimization, but debugging
+ #CFLAGS += -g -O0 -Wall
+ #
+@@ -119,7 +115,6 @@
+ # BSD users - do NOT use -static-libgcc!!!
+ # Also note that this keeps valgrind from running correctly so comment
+ # it out for debugging.
+-LDFLAGS += -static -static-libgcc
+ # use this one if you want program profiling.
+ #LDFLAGS += -static -static-libgcc -pg
+ #LDFLAGS += -pg
+@@ -306,7 +301,7 @@
+ # of with your mods built in.
+
+ crm114: $(OFILES)
+- $(CC) $(LDFLAGS) $(LIBS) $(OFILES) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) $(OFILES) \
+ -ltre -lm \
+ -o crm114
+ #
+@@ -315,7 +310,7 @@
+
+ *.o: $(HFILES)
+ .c.o:
+- $(CC) $(CFLAGS) -c $*.c
++ $(CC) $(CFLAGS) $(MY_CPPFLAGS) $(CPPFLAGS) -c $*.c
+
+ cssutil: cssutil.o crm_css_maintenance.o crm_util_errorhandlers.o crm_str_funcs.o $(HFILES)
+ $(CC) $(CFLAGS) $(LDFLAGS) cssutil.o \
diff --git a/app-text/crm114/metadata.xml b/app-text/crm114/metadata.xml
new file mode 100644
index 000000000000..e7411c45f7bb
--- /dev/null
+++ b/app-text/crm114/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+ <use>
+ <flag name="mew">Add support for using the mewdecode mime decoder
+ (<pkg>app-emacs/mew</pkg>)</flag>
+ <flag name="mimencode">Add support for using the mimencode mime
+ (<pkg>net-mail/metamail</pkg>)</flag>
+ <flag name="normalizemime">Add support for using the normalizemime
+ (<pkg>mail-filter/normalizemime</pkg>)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">crm114</remote-id>
+ </upstream>
+</pkgmetadata>