aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-06-29 16:00:29 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-06-29 16:00:29 +0000
commit87f7e53b8caa46058994c67efe20589f9928e151 (patch)
tree028bee582b625c95588177273d1d7de0c391c6b9 /math
parentda9f7f90147dda802f02bee04b1b0b7da2fd93a9 (diff)
downloadports-87f7e53b8caa46058994c67efe20589f9928e151.tar.gz
ports-87f7e53b8caa46058994c67efe20589f9928e151.zip
Notes
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/simd-viterbi/Makefile44
-rw-r--r--math/simd-viterbi/distinfo2
-rw-r--r--math/simd-viterbi/files/patch-makefile.in38
-rw-r--r--math/simd-viterbi/files/patch-viterbi27.c11
-rw-r--r--math/simd-viterbi/files/patch-viterbi29.c11
-rw-r--r--math/simd-viterbi/pkg-descr7
7 files changed, 114 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 2d3fd64aa0d5..879a49610fd2 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -240,6 +240,7 @@
SUBDIR += sdpa
SUBDIR += sdpara
SUBDIR += ses
+ SUBDIR += simd-viterbi
SUBDIR += slsc
SUBDIR += snns
SUBDIR += solitaire
diff --git a/math/simd-viterbi/Makefile b/math/simd-viterbi/Makefile
new file mode 100644
index 000000000000..03fde9765ec8
--- /dev/null
+++ b/math/simd-viterbi/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: simd-viterbi
+# Date created: 29 Jun 2005
+# Whom: Thomas Sandford <freebsduser@paradisegreen.co.uk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= simd-viterbi
+PORTVERSION= 2.0.3
+CATEGORIES= math
+MASTER_SITES= http://www.ka9q.net/code/fec/
+
+MAINTAINER= freebsduser@paradisegreen.co.uk
+COMMENT= A fast Viterbi CODEC library
+
+USE_REINPLACE= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+INSTALLS_SHLIB= yes
+MAKEFILE= makefile
+
+MAN3= simd-viterbi.3
+
+PLIST_FILES= include/parity.h include/viterbi27.h include/viterbi29.h \
+ lib/libviterbi.a lib/libviterbi.so lib/libviterbi.so.2.0.1
+PLIST= ${WRKDIR}/pkg-plist
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} != i386 || defined(PACKAGE_BUILDING)
+CONFIGURE_ARGS+= --enable-port
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/makefile.in
+
+pre-install:
+.for simd in sse2 sse mmx port
+ @if [ -f ${WRKSRC}/libviterbi_${simd}.a ]; then \
+ ${ECHO_CMD} 'lib/libviterbi_${simd}.a' >> ${PLIST}; \
+ fi
+.endfor
+
+.include <bsd.port.post.mk>
diff --git a/math/simd-viterbi/distinfo b/math/simd-viterbi/distinfo
new file mode 100644
index 000000000000..07dbf14d907a
--- /dev/null
+++ b/math/simd-viterbi/distinfo
@@ -0,0 +1,2 @@
+MD5 (simd-viterbi-2.0.3.tar.gz) = 42d1d27736e045e1c97f43a8420b3e1f
+SIZE (simd-viterbi-2.0.3.tar.gz) = 49638
diff --git a/math/simd-viterbi/files/patch-makefile.in b/math/simd-viterbi/files/patch-makefile.in
new file mode 100644
index 000000000000..b4d09949ae31
--- /dev/null
+++ b/math/simd-viterbi/files/patch-makefile.in
@@ -0,0 +1,38 @@
+--- makefile.in.orig Wed Jun 29 17:35:03 2005
++++ makefile.in Wed Jun 29 17:36:53 2005
+@@ -5,7 +5,7 @@
+ VPATH = @srcdir@
+ CC=@CC@
+
+-CFLAGS=@CFLAGS@ -I. -Wall @ARCH_OPTION@
++CFLAGS=@CFLAGS@ -I. -Wall -fPIC
+
+ SHARED_LIB=libviterbi.so.@VERSION@
+ STATIC_LIB=@STATIC_LIB@
+@@ -22,13 +22,12 @@
+ ./vtest29
+
+ install: all
+- install -m 644 -p $(SHARED_LIB) $(STATIC_LIB) @libdir@
++ $(BSD_INSTALL_DATA) $(STATIC_LIB) @libdir@
++ $(BSD_INSTALL_PROGRAM) $(SHARED_LIB) @libdir@
+ (cd @libdir@;ln -f -s $(SHARED_LIB) libviterbi.so)
+ (cd @libdir@;ln -f -s $(STATIC_LIB) libviterbi.a)
+- ldconfig
+- install -m 644 -p parity.h viterbi27.h viterbi29.h @includedir@
+- mkdir -m 0755 -p @mandir@/man3
+- install -m 644 -p simd-viterbi.3 @mandir@/man3
++ $(BSD_INSTALL_DATA) parity.h viterbi27.h viterbi29.h @includedir@
++ $(BSD_INSTALL_MAN) simd-viterbi.3 @mandir@/man3
+
+ vtest27: vtest27.o $(STATIC_LIB)
+ gcc -g -o $@ $^
+@@ -53,7 +52,7 @@
+ ar rv $@ $^
+
+ $(SHARED_LIB): $(STATIC_LIB)
+- gcc -shared -Xlinker -soname=libviterbi.so.@SO_NAME@ -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive -lc
++ gcc -shared -fPIC -Xlinker -soname=libviterbi.so.@SO_NAME@ -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive -lc
+
+ viterbi27port.o: viterbi27.c viterbi27.h parity.h
+ gcc -c $(CFLAGS) -o $@ $<
diff --git a/math/simd-viterbi/files/patch-viterbi27.c b/math/simd-viterbi/files/patch-viterbi27.c
new file mode 100644
index 000000000000..1ca8e0028878
--- /dev/null
+++ b/math/simd-viterbi/files/patch-viterbi27.c
@@ -0,0 +1,11 @@
+--- viterbi27.c.orig Wed Dec 5 10:01:45 2001
++++ viterbi27.c Wed Jun 29 17:33:44 2005
+@@ -164,8 +164,6 @@
+ struct v27 *vp = p;
+
+ if(vp != NULL){
+- free(vp->metrics1);
+- free(vp->metrics2);
+ free(vp->decisions);
+ free(vp->alloc_blk);
+ }
diff --git a/math/simd-viterbi/files/patch-viterbi29.c b/math/simd-viterbi/files/patch-viterbi29.c
new file mode 100644
index 000000000000..4092212b6da5
--- /dev/null
+++ b/math/simd-viterbi/files/patch-viterbi29.c
@@ -0,0 +1,11 @@
+--- viterbi29.c.orig Wed Dec 5 10:01:45 2001
++++ viterbi29.c Wed Jun 29 17:33:44 2005
+@@ -162,8 +162,6 @@
+ struct v29 *vp = p;
+
+ if(vp != NULL){
+- free(vp->metrics1);
+- free(vp->metrics2);
+ free(vp->decisions);
+ free(vp->alloc_blk);
+ }
diff --git a/math/simd-viterbi/pkg-descr b/math/simd-viterbi/pkg-descr
new file mode 100644
index 000000000000..f257a1408c47
--- /dev/null
+++ b/math/simd-viterbi/pkg-descr
@@ -0,0 +1,7 @@
+This is a port of Phil Karn's SIMD assisted Viterbi CODEC library. This
+package may be useful to programmers working on data communications software.
+
+WWW: http://www.ka9q.net/code/fec/
+
+- Thomas Sandford
+freebsduser@paradisegreen.co.uk