ports/169296: New port: textproc/libcrm114 CRM114 C-callable Library

Martin Schuette info at mschuette.name
Thu Jun 21 16:00:22 UTC 2012


>Number:         169296
>Category:       ports
>Synopsis:       New port: textproc/libcrm114 CRM114 C-callable Library
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 21 16:00:22 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Martin Schuette
>Release:        FreeBSD 8.3-RELEASE i386
>Organization:
>Environment:
>Description:
This is a text classification library to be used e.g. in spam filters. It is more or less a C re-implementation of port mail/crm114.

I guess this port has a low priority because afaik no applications use the library; but it is useful to compile existing libcrm114-modules for Erlang, PHP, Python, or Perl.

(The port is also online at https://redports.org/log/mschuett/textproc/libcrm114)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	libcrm114
#	libcrm114/distinfo
#	libcrm114/pkg-descr
#	libcrm114/files
#	libcrm114/files/patch-Makefile
#	libcrm114/Makefile
#
echo c - libcrm114
mkdir -p libcrm114 > /dev/null 2>&1
echo x - libcrm114/distinfo
sed 's/^X//' >libcrm114/distinfo << 'a679f4e29abfdf176a891e8cd0f87b0b'
XSHA256 (libcrm114-20100726.tar.gz) = e37e74e61b960dee031b9a396d2d6a3b46ddc9a45d88eca1512d7de33eb03cc6
XSIZE (libcrm114-20100726.tar.gz) = 1573807
a679f4e29abfdf176a891e8cd0f87b0b
echo x - libcrm114/pkg-descr
sed 's/^X//' >libcrm114/pkg-descr << 'c1d2646323d08ddfe0cfd4a1bc228af1'
XThis is the callable library version of CRM114. It has most of the classifiers
Xas the standalone language. This version is LGPLed (Library GPL) so you can
Xlink it with your own code, whether open-source or proprietary.
XYou still need TRE. Note that with improvements come costs:
Xlibcrm114 classifiers are NOT compatible with standalone CRM114 class files.
X
XWWW: http://crm114.sourceforge.net/
c1d2646323d08ddfe0cfd4a1bc228af1
echo c - libcrm114/files
mkdir -p libcrm114/files > /dev/null 2>&1
echo x - libcrm114/files/patch-Makefile
sed 's/^X//' >libcrm114/files/patch-Makefile << '23aa8ff455cb98c9597a8467d64a41d3'
X--- Makefile.orig	2010-05-06 20:14:55.000000000 +0200
X+++ Makefile	2012-05-19 21:10:00.000000000 +0200
X@@ -31,7 +31,7 @@
X #CFLAGS += -O3 -DDO_INLINES
X #
X #GCC flags for debugging, no optimization
X-CFLAGS += -g
X+#CFLAGS += -g
X #
X #GCC and LD flags for debugging, no optimization, and profile for speed
X #CFLAGS += -g -pg
X@@ -45,6 +45,8 @@
X CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wpointer-arith -Wstrict-prototypes
X #well, pretty carefully
X CFLAGS += -Wno-sign-compare -Wno-overlength-strings
X+# to build shared library
X+CFLAGS += -fPIC
X 
X #These are optional.
X 
X@@ -97,8 +99,8 @@
X crm114_util.o					\
X crm114_regex_tre.o
X 
X-
X-all: test simple_demo
X+# .tar.gz includes linux object files -- so clean first
X+all: clean libcrm114.so test simple_demo
X 
X test: test.o libcrm114.a
X 	$(CC) -o test $(LDFLAGS) -Wl,-M -Wl,--cref test.o libcrm114.a -ltre -lm >test.map
X@@ -115,6 +117,24 @@
X libcrm114.a: $(LIBOBJS) Makefile
X 	ar rc libcrm114.a $(LIBOBJS)
X 
X+# added for FreeBSD port patch
X+libcrm114.so.0: $(LIBOBJS) Makefile
X+	$(CC) -o libcrm114.so.0 -shared $(LIBOBJS)
X+
X+libcrm114.so: libcrm114.so.0
X+	ln -fs libcrm114.so.0 libcrm114.so
X+
X+install: libcrm114.so.0
X+	$(INSTALL_LIB) libcrm114.so.0 $(PREFIX)/lib
X+	ln -fs libcrm114.so.0 $(PREFIX)/lib/libcrm114.so
X+	$(INSTALL_DATA) crm114_config.h $(PREFIX)/include
X+	$(INSTALL_DATA) crm114_lib.h $(PREFIX)/include
X+	$(INSTALL_DATA) crm114_structs.h $(PREFIX)/include
X+	$(INSTALL_DATA) crm114_sysincludes.h $(PREFIX)/include
X+	$(INSTALL_DATA) -d $(PREFIX)/share/doc/libcrm114
X+	$(INSTALL_DATA) HOWTO.txt $(PREFIX)/share/doc/libcrm114
X+	$(INSTALL_DATA) simple_demo.c $(PREFIX)/share/doc/libcrm114
X+
X $(LIBOBJS): $(LIBHDRS)
X 
X clean: clean_test clean_simple_demo clean_lib clean_profiling
X@@ -126,7 +146,7 @@
X 	rm -f simple_demo simple_demo.map simple_demo.o simple_demo_datablock.txt
X 
X clean_lib:
X-	rm -f libcrm114.a $(LIBOBJS)
X+	rm -f libcrm114.a libcrm114.so $(LIBOBJS)
X 
X clean_profiling:
X 	rm -f gmon.out *.gcov *.gcno *.gcda
23aa8ff455cb98c9597a8467d64a41d3
echo x - libcrm114/Makefile
sed 's/^X//' >libcrm114/Makefile << 'fc51c502ed2162fc1783416375b9216a'
X# New ports collection makefile for: libcrm114
X# Date created:                18 May 2012
X# Whom:                        Martin Schuette <info at mschuette.name>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	libcrm114
XPORTVERSION=	20100726
XCATEGORIES=		textproc
XMASTER_SITES=	http://crm114.sourceforge.net/tarballs/
X
XMAINTAINER=	info at mschuette.name
XCOMMENT=	CRM114 C-callable Library
X
XLIB_DEPENDS=	tre.5:${PORTSDIR}/textproc/libtre
X
XLICENCE=	LGPL3
XLICENSE_FILE=	${WRKSRC}/LGPL
XUSE_GMAKE=	yes
XUSE_LDCONFIG=	yes
X
X# pass stuff to gmake
XCFLAGS+=	-I${LOCALBASE}/include
XCFLAGS+=	-DNO_LOGL -DDO_INLINES
XLDFLAGS+=	-L${LOCALBASE}/lib
XMAKE_ARGS=	CC="${CC}" LIBS="-lcrm114 -ltre -lm" PREFIX="${PREFIX}" \
X			INSTALL_LIB="${INSTALL_LIB}" INSTALL_DATA="${INSTALL_DATA}"
X
XPLIST_FILES=	lib/libcrm114.so \
X				lib/libcrm114.so.0 \
X				include/crm114_config.h \
X				include/crm114_lib.h \
X				include/crm114_structs.h \
X				include/crm114_sysincludes.h \
X				share/doc/libcrm114/HOWTO.txt \
X				share/doc/libcrm114/simple_demo.c
XPLIST_DIRS=	share/doc/libcrm114
X
X.include <bsd.port.mk>
fc51c502ed2162fc1783416375b9216a
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list