From MAILER-DAEMON  Sun Dec 28 22:21:47 2003
Return-Path: <>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A49A216A546
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Dec 2003 22:21:47 -0800 (PST)
Received: from pimout5-ext.prodigy.net (pimout5-ext.prodigy.net [207.115.63.73])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 558B343D45
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Dec 2003 22:21:45 -0800 (PST)
	(envelope-from "")
Received: from sentinel.erased.us (adsl-68-76-187-158.dsl.akrnoh.ameritech.net [68.76.187.158])
	by pimout5-ext.prodigy.net (8.12.10/8.12.10) with ESMTP id hBT6Li6R340524
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Dec 2003 01:21:44 -0500
Received: from dial163-48.awalnet.net ([213.184.163.48] helo=beastie.freebsd.local)
	by sentinel.erased.us with esmtp (Exim 3.36 #1 (Debian))
	id 1Aaqnj-0001bf-00
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Dec 2003 01:22:51 -0500
Message-Id: <1072678938@beastie.freebsd.local>
Date: Mon, 29 Dec 2003 09:22:21 +0300
From: "Samy Al Bahra" <samy@kerneled.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Fix for comms/vpb2
X-Send-Pr-Version: gtk-send-pr 0.3 
X-GNATS-Notify:

>Number:         60680
>Category:       ports
>Synopsis:       Fix for comms/vpb2
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 28 22:30:16 PST 2003
>Closed-Date:    Sun Dec 28 23:59:12 PST 2003
>Last-Modified:  Sun Dec 28 23:59:12 PST 2003
>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@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@gnu.org>
@@ -14,18 +13,20 @@
 MAINTAINER=	dyfet@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:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Dec 28 23:58:53 PST 2003 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60680 
>Unformatted:
