Add simd-viterbi.

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/

PR:		ports/82757
Submitted by:	Thomas Sandford <freebsduser@paradisegreen.co.uk>
This commit is contained in:
Jean-Yves Lefort 2005-06-29 16:00:29 +00:00
parent da9f7f9014
commit 87f7e53b8c
7 changed files with 114 additions and 0 deletions

View File

@ -240,6 +240,7 @@
SUBDIR += sdpa
SUBDIR += sdpara
SUBDIR += ses
SUBDIR += simd-viterbi
SUBDIR += slsc
SUBDIR += snns
SUBDIR += solitaire

View File

@ -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>

View File

@ -0,0 +1,2 @@
MD5 (simd-viterbi-2.0.3.tar.gz) = 42d1d27736e045e1c97f43a8420b3e1f
SIZE (simd-viterbi-2.0.3.tar.gz) = 49638

View File

@ -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 $@ $<

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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