Index: devel/libdistance/Makefile =================================================================== --- /dev/null +++ devel/libdistance/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +PORTNAME= libdistance +PORTVERSION= 0.2.2 +CATEGORIES= devel +MASTER_SITES= http://monkey.org/~jose/software/libdistance/ +EXTRACT_SUFX= .tar.gz + +MAINTAINER= jonathan@FreeBSD.org +COMMENT= compute the distance between two pieces of data + +MAKE_JOBS_UNSAFE= yes + +LICENSE= BSD3CLAUSE + +USES+= fakeroot pkgconfig + +CFLAGS+= -fPIC + +BUILD_DEPENDS= swig2.0:${PORTSDIR}/devel/swig20 \ + tclsh8.4:${PORTSDIR}/lang/tcl84 +MAKE_ENV= SWIG=swig2.0 + +.include Index: devel/libdistance/distinfo =================================================================== --- /dev/null +++ devel/libdistance/distinfo @@ -0,0 +1,2 @@ +SHA256 (libdistance-0.2.2.tar.gz) = 65364e07c9fe78ef34fc0e563aff2317ab0aba7549da07adea929426a708e6ad +SIZE (libdistance-0.2.2.tar.gz) = 31629 Index: devel/libdistance/files/patch-Makefile =================================================================== --- /dev/null +++ devel/libdistance/files/patch-Makefile @@ -0,0 +1,14 @@ +--- Makefile.orig 2014-10-10 13:11:38 UTC ++++ Makefile +@@ -7,6 +7,11 @@ MAN= distance.3 + CFLAGS+= -g -Wall -Wunused + LDADD+= -g + ++PREFIX?= /usr/local ++LIBDIR= ${PREFIX}/lib ++INCLUDEDIR= ${PREFIX}/include ++MANDIR= ${PREFIX}/man/man ++ + SUBDIR+= test swig + + CLEANFILES+= distance.cat3 Index: devel/libdistance/files/patch-swig_tcl_Makefile =================================================================== --- /dev/null +++ devel/libdistance/files/patch-swig_tcl_Makefile @@ -0,0 +1,32 @@ +--- swig/tcl/Makefile.orig 2014-10-10 13:11:38 UTC ++++ swig/tcl/Makefile +@@ -1,15 +1,19 @@ + # $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 ++PREFIX?= /usr/local ++LIBDIR= ${PREFIX}/lib ++ ++distance_wrap.c: ../distance.i ++ ${SWIG} -tcl -namespace -module distance -o distance_wrap.c \ ++ -v ../distance.i ++ ++.include Index: devel/libdistance/files/patch-test_Makefile =================================================================== --- /dev/null +++ devel/libdistance/files/patch-test_Makefile @@ -0,0 +1,19 @@ +--- test/Makefile.orig 2014-10-10 13:11:38 UTC ++++ test/Makefile +@@ -1,10 +1,14 @@ + # $Id: Makefile,v 1.3 2004/05/20 21:52:01 jose Exp $ + +-PROG= test ++PROG= test-libdistance ++SRCS= test.c + CFLAGS+= -I.. -g + LDADD= -L.. -ldistance -lm +-NOMAN= Yes ++MAN= + + CLEANFILES+= test + ++PREFIX?= /usr/local ++BINDIR= ${PREFIX}/tests ++ + .include Index: devel/libdistance/pkg-descr =================================================================== --- /dev/null +++ devel/libdistance/pkg-descr @@ -0,0 +1 @@ +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. Index: devel/libdistance/pkg-plist =================================================================== --- /dev/null +++ devel/libdistance/pkg-plist @@ -0,0 +1,6 @@ +lib/libdistance.a +lib/libdistance.so +lib/libdistance.so.1 +lib/libdistance_p.a +man/man3/distance.3.gz +tests/test-libdistance