ports/106542: [PATCH] comms/libfec: update to 3.0
Thomas Sandford
freebsduser at paradisegreen.co.uk
Sat Dec 9 22:30:09 UTC 2006
>Number: 106542
>Category: ports
>Synopsis: [PATCH] comms/libfec: update to 3.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sat Dec 09 22:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Thomas Sandford
>Release: FreeBSD 5.4-RELEASE i386
>Organization:
Paradise Green Technical Services
>Environment:
System: FreeBSD almaz.paradisegreen.co.uk 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 15 12:31:08 BST 2005
>Description:
- Update to 3.0
- Allow port to function on FreeBSD < 7.0
the port needs posix_memalign - a patch has been added for fec.c
which creates a version of this function if FreeBSD < 7.0 (which
already has the library function)
- Add math to the list of port categories, to tie in with other Phil Karn
fec libraries already in ports tree (simd-viterbi, reed-solomon).
- change to using USE_LDCONFIG instead of INSTALL_SHLIB
Added file(s):
- files/patch-fec.c
Port maintainer (db at db.net) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- libfec-3.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/comms/libfec-orig/Makefile /usr/ports/comms/libfec/Makefile
--- /usr/ports/comms/libfec-orig/Makefile Sat Jul 8 22:30:18 2006
+++ /usr/ports/comms/libfec/Makefile Sat Dec 9 22:14:33 2006
@@ -5,8 +5,8 @@
# $FreeBSD: ports/comms/libfec/Makefile,v 1.1 2006/07/08 21:30:18 itetcu Exp $
PORTNAME= libfec
-PORTVERSION= 2.1.1
-CATEGORIES= comms astro hamradio
+PORTVERSION= 3.0
+CATEGORIES= comms astro hamradio math
MASTER_SITES= http://www.ka9q.net/code/fec/
DISTNAME= fec-${PORTVERSION}
@@ -19,7 +19,7 @@
USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
-INSTALLS_SHLIB= yes
+USE_LDCONFIG= yes
ONLY_FOR_ARCHS= i386
post-patch:
diff -ruN --exclude=CVS /usr/ports/comms/libfec-orig/distinfo /usr/ports/comms/libfec/distinfo
--- /usr/ports/comms/libfec-orig/distinfo Sat Jul 8 22:30:18 2006
+++ /usr/ports/comms/libfec/distinfo Sat Dec 9 21:07:05 2006
@@ -1,3 +1,3 @@
-MD5 (fec-2.1.1.tar.bz2) = 3dca8111b8ce46809a7ea51b9d9df746
-SHA256 (fec-2.1.1.tar.bz2) = 4984ff33ed7609189c50f216e0a20eef1c72b72b031cdc0afbed80066073e99e
-SIZE (fec-2.1.1.tar.bz2) = 85871
+MD5 (fec-3.0.tar.bz2) = cdc0ee233dda7678a3627543180b24a6
+SHA256 (fec-3.0.tar.bz2) = 5b9ee31465798f109f2100acd7a6ed83eaa1431a6833f155fa30952eb42d2cdd
+SIZE (fec-3.0.tar.bz2) = 99980
diff -ruN --exclude=CVS /usr/ports/comms/libfec-orig/files/patch-fec.c /usr/ports/comms/libfec/files/patch-fec.c
--- /usr/ports/comms/libfec-orig/files/patch-fec.c Thu Jan 1 01:00:00 1970
+++ /usr/ports/comms/libfec/files/patch-fec.c Sat Dec 9 22:08:48 2006
@@ -0,0 +1,44 @@
+--- fec.c.orig Sat Dec 9 22:04:49 2006
++++ fec.c Sat Dec 9 22:01:43 2006
+@@ -3,6 +3,10 @@
+ */
+
+ #include <stdio.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <sys/param.h>
++
+ #include "fec.h"
+
+ unsigned char Partab[256];
+@@ -64,3 +68,30 @@
+ 5, 6, 6, 7, 6, 7, 7, 8,
+ };
+
++#if __FreeBSD_version <700000
++
++int
++posix_memalign(void **memptr, size_t alignment, size_t size)
++{
++ int err;
++ void *result;
++
++ /* Make sure that alignment is a large enough power of 2. */
++ if (((alignment - 1) & alignment) != 0 || alignment < sizeof(void *))
++ return (EINVAL);
++
++ /*
++ * (size | alignment) is enough to assure the requested alignment, since
++ * the allocator always allocates power-of-two blocks.
++ */
++ err = errno; /* Protect errno against changes in pubrealloc(). */
++ result = malloc(size | alignment);
++ errno = err;
++
++ if (result == NULL)
++ return (ENOMEM);
++
++ *memptr = result;
++ return (0);
++}
++#endif
--- libfec-3.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list