ports/60680: Fix for comms/vpb2
Samy Al Bahra
samy at kerneled.com
Mon Dec 29 06:31:05 UTC 2003
>Number: 60680
>Category: ports
>Synopsis: Fix for comms/vpb2
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 28 22:30:16 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Samy Al Bahra
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
Kerneled
>Environment:
System: FreeBSD beastie.freebsd.local 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Aug 20 18:35:24 AST 2003 samy at beastie.freebsd.local:/usr/src/sys/i386/compile/KERNELED i386
>Description:
The comms/vpb2 port does not build
on many systems due to conflicting and
missing headers in certain files. It also
blindly assumes the default prefix for
the etc directory is /etc. The following
patch fixes these many issues as well
as makes the port portlint happy.
>How-To-Repeat:
Build on any FreeBSD system.
>Fix:
--- vpb2.patch begins here ---
diff -ruN vpb2/Makefile /home/samy/tmp/vpb2/Makefile
--- vpb2/Makefile Sat Nov 15 19:58:26 2003
+++ /home/samy/tmp/vpb2/Makefile Sun Dec 28 12:00:45 2003
@@ -1,4 +1,3 @@
-# Generated automatically from Makefile.in by configure.
# New ports collection makefile for: vpb2
# Date created: 07 Sept 2000
# Whom: David Sugar <dyfet at gnu.org>
@@ -14,18 +13,20 @@
MAINTAINER= dyfet at gnu.org
COMMENT= User mode API for Voicetronix 4 port analog DSP telephony cards
-BROKEN= "Installs file into /etc"
-
USE_GMAKE= yes
USE_LIBTOOL= yes
USE_AUTOCONF= yes
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
-CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
+CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib \
+ LDFLAGS=${PTHREAD_LIBS}
post-extract:
@${FIND} ${WRKSRC} -name "Makefile.in" | \
${XARGS} ${REINPLACE_CMD} -e 's|-release \$$\(LT_RELEASE\)||g'
+
+post-patch:
+ ${REINPLACE_CMD} -e "s|PREFIX|${PREFIX}|" ${WRKSRC}/vpbreg.cpp
.include <bsd.port.mk>
diff -ruN vpb2/files/patch-Makefile.in /home/samy/tmp/vpb2/files/patch-Makefile.in
--- vpb2/files/patch-Makefile.in Thu Jan 1 03:00:00 1970
+++ /home/samy/tmp/vpb2/files/patch-Makefile.in Sun Dec 28 11:51:58 2003
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Sun Dec 28 11:51:29 2003
++++ Makefile.in Sun Dec 28 11:51:38 2003
+@@ -119,7 +119,7 @@
+ mtisa_SOURCES = mtisa.cpp
+ mtisa_LDADD = libvpb2.la
+
+-etc_prefix = /
++etc_prefix = $(prefix)
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+ CONFIG_HEADER = config.h
diff -ruN vpb2/files/patch-configure.in /home/samy/tmp/vpb2/files/patch-configure.in
--- vpb2/files/patch-configure.in Thu Jan 1 03:00:00 1970
+++ /home/samy/tmp/vpb2/files/patch-configure.in Sun Dec 28 11:56:07 2003
@@ -0,0 +1,27 @@
+--- configure.in.orig Sun Dec 28 11:55:40 2003
++++ configure.in Sun Dec 28 11:55:52 2003
+@@ -23,24 +23,6 @@
+ OST_MAINTAINER_MODE
+ OST_CXX_PROGRAMMING
+
+-AC_CACHE_CHECK(whether ${CC-cc} accepts -pthread,
+- ost_cv_prog_cc_pthread,
+- [echo 'void f(){}' >conftest.c
+- if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then
+- ost_cv_prog_cc_pthread=yes
+- else
+- ost_cv_prog_cc_pthread=no
+- fi
+- rm -f conftest*
+- ])
+-if test $ost_cv_prog_cc_pthread = yes ; then
+- LIBS="$LIBS -pthread"
+-else
+- AC_CHECK_LIB(c_r, pthread_self,
+- LIBS="$LIBS -lc_r",
+- AC_CHECK_LIB(pthread, pthread_self,
+- LIBS="$LIBS -lpthread"))
+-fi
+
+ AC_SUBST(LT_RELEASE)
+ AC_OUTPUT(Makefile vpb2.spec freebsd/Makefile)
diff -ruN vpb2/files/patch-genericfreebsd.cpp /home/samy/tmp/vpb2/files/patch-genericfreebsd.cpp
--- vpb2/files/patch-genericfreebsd.cpp Thu Jan 1 03:00:00 1970
+++ /home/samy/tmp/vpb2/files/patch-genericfreebsd.cpp Sun Dec 28 10:55:20 2003
@@ -0,0 +1,10 @@
+--- genericfreebsd.cpp.orig Sun Dec 28 10:54:45 2003
++++ genericfreebsd.cpp Sun Dec 28 10:55:01 2003
+@@ -28,6 +28,7 @@
+ \*---------------------------------------------------------------------------*/
+
+ #include "config.h"
++#include "contypes.h"
+
+ #include <assert.h>
+ #include <pthread.h>
diff -ruN vpb2/files/patch-playrec.cpp /home/samy/tmp/vpb2/files/patch-playrec.cpp
--- vpb2/files/patch-playrec.cpp Thu Jan 1 03:00:00 1970
+++ /home/samy/tmp/vpb2/files/patch-playrec.cpp Sun Dec 28 10:54:19 2003
@@ -0,0 +1,10 @@
+--- playrec.cpp.orig Sun Dec 28 10:53:19 2003
++++ playrec.cpp Sun Dec 28 10:53:25 2003
+@@ -41,7 +41,6 @@
+ #include "generic.h"
+
+ #include <assert.h>
+-#include <memory>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <fcntl.h>
diff -ruN vpb2/files/patch-vpbreg.cpp /home/samy/tmp/vpb2/files/patch-vpbreg.cpp
--- vpb2/files/patch-vpbreg.cpp Thu Jan 1 03:00:00 1970
+++ /home/samy/tmp/vpb2/files/patch-vpbreg.cpp Sun Dec 28 11:08:51 2003
@@ -0,0 +1,11 @@
+--- vpbreg.cpp.orig Sun Dec 28 11:07:43 2003
++++ vpbreg.cpp Sun Dec 28 11:08:25 2003
+@@ -57,7 +57,7 @@
+
+ #define NUM_CARDS 1 // number of VPBs in PC
+ #define BASE 0x300 // ISA card base address
+-#define FIRMWARE_FILE "/etc/vpbmain.out"
++#define FIRMWARE_FILE "PREFIX/etc/vpbmain.out"
+
+ /*-------------------------------------------------------------------------*\
+
diff -ruN vpb2/pkg-plist /home/samy/tmp/vpb2/pkg-plist
--- vpb2/pkg-plist Wed Nov 1 16:06:23 2000
+++ /home/samy/tmp/vpb2/pkg-plist Sun Dec 28 12:01:27 2003
@@ -1,8 +1,8 @@
+bin/mtisa
+bin/tload
+bin/tvpb
+etc/vpbmain.out
include/vpbapi.h
lib/libvpb2.a
lib/libvpb2.so
lib/libvpb2.so.0
-bin/tvpb
-bin/tload
-bin/mtisa
-
--- vpb2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list