From nobody@FreeBSD.org  Wed Oct 24 10:35:37 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4439E6F5
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Oct 2012 10:35:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D3428FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Oct 2012 10:35:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9OAZb2E062799
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Oct 2012 10:35:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9OAZaPG062786;
	Wed, 24 Oct 2012 10:35:36 GMT
	(envelope-from nobody)
Message-Id: <201210241035.q9OAZaPG062786@red.freebsd.org>
Date: Wed, 24 Oct 2012 10:35:36 GMT
From: Sergei <nbspjr@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: audio/openal-soft version in ports don't recognize OSS playback devices
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173019
>Category:       ports
>Synopsis:       audio/openal-soft version in ports don't recognize OSS playback devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mva
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 24 10:40:00 UTC 2012
>Closed-Date:    Wed Oct 24 18:11:03 UTC 2012
>Last-Modified:  Wed Oct 24 18:11:03 UTC 2012
>Originator:     Sergei
>Release:        FreeBSD 9.1-RC1 amd64
>Organization:
>Environment:
FreeBSD lair 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The current version of openal-soft in portstree contains a bug preventing it from finding playback devices if OSS is used. Here is openal-info output:

$ openal-info
Available playback devices:
    !!! none !!!
Available capture devices:
    OSS Default
Default playback device: 
Default capture device: OSS Default
ALC version: 1.1
.. skipped ...
>How-To-Repeat:
1. Install audio/openal-soft
2. Make sure there is no ALSA installed
3. Open the terminal and call "openal-info" utility.


>Fix:
One of openal-soft developers told me it has been fixed. Here is repository diff related to this problem: http://repo.or.cz/w/openal-soft.git/blobdiff/29f77003c03578546a8a723e68b19951b4555843..648464a2da25277c4b90dac8484053ce98581a9b:/Alc/backends/oss.c

To fix this you can simply put attached file to audio/openal-soft/files directory and then rebuild the port.

Here is the patched openal-info output:
$ openal-info
Available playback devices:
    OSS Default
Available capture devices:
    OSS Default
Default playback device: OSS Default
Default capture device: OSS Default
ALC version: 1.1


Patch attached with submission follows:

--- Alc/backends/oss.c.orig
+++ Alc/backends/oss.c
@@ -511,7 +511,7 @@ void alc_oss_probe(enum DevProbe type)
         {
 #ifdef HAVE_STAT
             struct stat buf;
-            if(stat(oss_device, &buf) == 0)
+            if(stat(oss_driver, &buf) == 0)
 #endif
                 AppendAllDeviceList(oss_device);
         }


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: edwin 
Class-Changed-When: Wed Oct 24 10:40:07 UTC 2012 
Class-Changed-Why:  
Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173019 
Responsible-Changed-From-To: freebsd-ports-bugs->mva 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Oct 24 10:40:09 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173019 
State-Changed-From-To: open->closed 
State-Changed-By: mva 
State-Changed-When: Wed Oct 24 18:11:02 UTC 2012 
State-Changed-Why:  
Fun fact: I originally submitted that patch to the upstream and had it 
around in my local ports for months. Thanks for pointing it out! 

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