svn commit: r400720 - in head/devel: . libdistance libdistance/files
Jonathan Anderson
jonathan at FreeBSD.org
Tue Nov 3 21:57:37 UTC 2015
Author: jonathan (src committer)
Date: Tue Nov 3 21:57:35 2015
New Revision: 400720
URL: https://svnweb.freebsd.org/changeset/ports/400720
Log:
Add new port: devel/libdistance.
This is a library for calculating the edit distance between strings or data
using various metrics (Levenshtein, Damerau, Needleman-Wunsch, Hamming...).
Note: r400363 used the above commit message but, due to user error, was
actually devel/myrepos (see https://reviews.freebsd.org/D3730).
Reviewed by: garga
Approved by: brooks
Differential Revision: https://reviews.freebsd.org/D4015
Added:
head/devel/libdistance/
head/devel/libdistance/Makefile (contents, props changed)
head/devel/libdistance/distinfo (contents, props changed)
head/devel/libdistance/files/
head/devel/libdistance/files/patch-Makefile (contents, props changed)
head/devel/libdistance/files/patch-swig_tcl_Makefile (contents, props changed)
head/devel/libdistance/files/patch-test_Makefile (contents, props changed)
head/devel/libdistance/pkg-descr (contents, props changed)
head/devel/libdistance/pkg-plist (contents, props changed)
Modified:
head/devel/Makefile
Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile Tue Nov 3 21:18:24 2015 (r400719)
+++ head/devel/Makefile Tue Nov 3 21:57:35 2015 (r400720)
@@ -1142,6 +1142,7 @@
SUBDIR += libdisasm
SUBDIR += libdisorder
SUBDIR += libdispatch
+ SUBDIR += libdistance
SUBDIR += libdlmalloc
SUBDIR += libdlna
SUBDIR += libdnsres
Added: head/devel/libdistance/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/Makefile Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= libdistance
+PORTVERSION= 0.2.2
+CATEGORIES= devel
+MASTER_SITES= http://monkey.org/~jose/software/libdistance/
+
+MAINTAINER= jonathan at FreeBSD.org
+COMMENT= Compute the distance between two pieces of data
+
+LICENSE= BSD3CLAUSE
+
+BUILD_DEPENDS= swig2.0:${PORTSDIR}/devel/swig20
+
+USES+= fakeroot pkgconfig tcl
+USE_LDCONFIG= yes
+
+MAKE_ARGS+= INCLUDEDIR=${PREFIX}/include LIBDIR=${PREFIX}/lib
+MAKE_ARGS+= MANDIR=${PREFIX}/man/man SWIG=swig2.0
+CFLAGS+= -fPIC
+
+pre-build:
+ mkdir -p ${STAGEDIR}/usr/local/tests/${PORTNAME}
+
+.include <bsd.port.mk>
Added: head/devel/libdistance/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/distinfo Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,2 @@
+SHA256 (libdistance-0.2.2.tar.gz) = 65364e07c9fe78ef34fc0e563aff2317ab0aba7549da07adea929426a708e6ad
+SIZE (libdistance-0.2.2.tar.gz) = 31629
Added: head/devel/libdistance/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/files/patch-Makefile Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,10 @@
+--- Makefile.orig 2014-10-10 13:11:38 UTC
++++ Makefile
+@@ -3,6 +3,7 @@
+ LIB= distance
+ SRCS= levenshtein.c hamming.c bloom.c needleman_wunsch.c jaccard.c
+ SRCS+= minkowski.c damerau.c
++INCS= distance.h
+ MAN= distance.3
+ CFLAGS+= -g -Wall -Wunused
+ LDADD+= -g
Added: head/devel/libdistance/files/patch-swig_tcl_Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/files/patch-swig_tcl_Makefile Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,29 @@
+--- swig/tcl/Makefile.orig 2014-10-10 13:11:38 UTC
++++ swig/tcl/Makefile
+@@ -1,15 +1,16 @@
+ # $Id: Makefile,v 1.2 2004/11/30 00:26:59 jose Exp $
+
+-all: distance.so
++LIB= distance
++SHLIB_MAJOR= 1
+
+-distance_wrap.o: ../distance.i
+- swig -tcl -namespace -module distance -o distance_wrap.c \
+- -v ../distance.i
+- gcc -c -I../.. -I/usr/local/include/tcl8.4 -fpic distance_wrap.c
++SRCS= distance_wrap.c # swig-generated source file
++CLEANFILES+= $(SRCS)
+
+-distance.so: distance_wrap.o
+- gcc -shared distance_wrap.o ../../libdistance.a \
+- -o distance.so
++CFLAGS= -I ../.. `pkg-config --cflags tcl` -fPIC
++SWIG?= swig
+
+-clean:
+- rm -f *.o distance_wrap.c *.so *.core *_wrap.c distance.py
++distance_wrap.c: ../distance.i
++ ${SWIG} -tcl -namespace -module distance -o distance_wrap.c \
++ -v ../distance.i
++
++.include <bsd.lib.mk>
Added: head/devel/libdistance/files/patch-test_Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/files/patch-test_Makefile Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,14 @@
+--- test/Makefile.orig 2014-10-10 13:11:38 UTC
++++ test/Makefile
+@@ -3,8 +3,10 @@
+ PROG= test
+ CFLAGS+= -I.. -g
+ LDADD= -L.. -ldistance -lm
+-NOMAN= Yes
++MAN=
+
+ CLEANFILES+= test
+
++BINDIR= ${PREFIX}/tests/libdistance
++
+ .include <bsd.prog.mk>
Added: head/devel/libdistance/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/pkg-descr Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,7 @@
+The distance library is used to compare pieces of data for similarity.
+Specifically, it contains a number of methods to find the "edit distance"
+between inputs, or the number of differences between them. These differences
+are calculated using various mechanisms. The inputs to these functions can be
+character strings or arbitrary data.
+
+WWW: http://monkey.org/~jose/software/libdistance
Added: head/devel/libdistance/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/libdistance/pkg-plist Tue Nov 3 21:57:35 2015 (r400720)
@@ -0,0 +1,7 @@
+include/distance.h
+lib/libdistance.a
+lib/libdistance.so
+lib/libdistance.so.1
+lib/libdistance_p.a
+man/man3/distance.3.gz
+tests/libdistance/test
More information about the svn-ports-head
mailing list