From erik@smluc.org  Wed Jul  5 17:12:20 2006
Return-Path: <erik@smluc.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 47EE016A4E7
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Jul 2006 17:12:20 +0000 (UTC)
	(envelope-from erik@smluc.org)
Received: from phoenix.smluc.org (phoenix.smluc.org [12.28.48.23])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9415C43D7F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Jul 2006 17:12:15 +0000 (GMT)
	(envelope-from erik@smluc.org)
Received: by phoenix.smluc.org (Postfix, from userid 1000)
	id 542281CEBA; Wed,  5 Jul 2006 12:15:18 -0500 (CDT)
Message-Id: <20060705171518.542281CEBA@phoenix.smluc.org>
Date: Wed,  5 Jul 2006 12:15:18 -0500 (CDT)
From: Erik Greenwald <erik@smluc.org>
Reply-To: Erik Greenwald <erik@smluc.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: erik@math.missouristate.edu
Subject: audio/openal - patch to fix build error for x86/CPUTYPE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         99809
>Category:       ports
>Synopsis:       audio/openal - patch to fix build error for x86/CPUTYPE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 05 17:20:17 GMT 2006
>Closed-Date:    Wed Jul 05 17:54:45 GMT 2006
>Last-Modified:  Wed Jul 05 17:54:45 GMT 2006
>Originator:     Erik Greenwald
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD fenris 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat May 13 14:38:02 EDT 2006 root@fenris:/usr/obj/usr/src/sys/FENRIS i386

>Description:

When the CPUTYPE is set on an x86 box, and nasm happens to be 
installed, audio/openal tries to use nasm and causes "bad objects" 
in archive files (as the "-f elf" flag is not set), causing the 
build to fail. The reason is because the 'type' flag is only set for
linux... This patch changes that *linux*) to *bsd*) allowing the 
build to succeed (with the optimized asm version being used). 

This has been tested on p4-xeon, amd32-athlon, and amd64-opteron, both
with CPUTYPE unset and set.

I seem to have forgotten my password to the creative repo (or users
weren't migrated when they changed from CVS to SVN), so I have not
committed my fix there, but will as soon as I get access.

Thanks!

>How-To-Repeat:
>Fix:

--- audio_openal.patch begins here ---
Index: audio/openal/Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/openal/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- audio/openal/Makefile	1 Jul 2006 23:47:49 -0000	1.38
+++ audio/openal/Makefile	5 Jul 2006 16:01:21 -0000
@@ -78,7 +78,7 @@
 post-patch:
 	@${REINPLACE_CMD} -e 's/-pthread/${PTHREAD_LIBS}/; \
 		s/x86_64\*/amd64\* | \*ia64\*/g; \
-		/CPPFLAGS=/ d' ${WRKSRC}/configure
+		/CPPFLAGS=/ d; s/ \*linux\*)/ \*bsd\*)/' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e '/#include/ s|SDL/||' \
 		${WRKSRC}/src/extensions/al_ext_mp3.c
 	@${REINPLACE_CMD} -e 's|"mixaudio16_mmx_prk.h"|"arch/i386/mixaudio16_mmx_prk.h"|' \
--- audio_openal.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Wed Jul 5 17:54:27 UTC 2006 
State-Changed-Why:  
Committed. Thanks. 

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