NetBSD Problem Report #46269
From www@NetBSD.org Tue Mar 27 19:33:03 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id A667763C4B1
for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Mar 2012 19:33:03 +0000 (UTC)
Message-Id: <20120327193302.C1D7163BBEC@www.NetBSD.org>
Date: Tue, 27 Mar 2012 19:33:02 +0000 (UTC)
From: ano@bestmx.ru
Reply-To: ano@bestmx.ru
To: gnats-bugs@NetBSD.org
Subject: audio/sox: add compilation options
X-Send-Pr-Version: www-1.0
>Number: 46269
>Category: pkg
>Synopsis: audio/sox: add compilation options
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 27 19:35:00 +0000 2012
>Last-Modified: Thu Apr 26 12:20:02 +0000 2012
>Originator: Andrey N. Oktyabrski
>Release: OpenIndiana 151a2
>Organization:
>Environment:
$ uname -a
SunOS thinkpot 5.11 oi_151a2 i86pc i386 i86pc Solaris
>Description:
Why not to add some options? I have tested it - works perfectly for me.
(of course, it's not for the 2012Q1)
>How-To-Repeat:
$ grep sox /usr/pkg/etc/mk.conf
PKG_OPTIONS.sox = lame oss ffmpeg wavpack
$ cd /usr/pkgsrc/audio/sox
$ bmake
>Fix:
23:22 ano@thinkpot:/usr/pkgsrc/audio:$ diff -uwpr sox sox.ano
diff -uwpr sox/Makefile sox.ano/Makefile
--- sox/Makefile 2012-01-20 16:31:25.000000000 +0400
+++ sox.ano/Makefile 2012-03-27 14:58:54.712136468 +0400
@@ -33,6 +33,7 @@ post-install:
.include "options.mk"
+.include "../../converters/libiconv/buildlink3.mk"
.include "../../audio/flac/buildlink3.mk"
.include "../../audio/gsm/buildlink3.mk"
.include "../../audio/libmad/buildlink3.mk"
diff -uwpr sox/options.mk sox.ano/options.mk
--- sox/options.mk 2010-10-30 19:07:42.000000000 +0400
+++ sox.ano/options.mk 2012-03-27 14:48:41.434005847 +0400
@@ -1,7 +1,7 @@
# $NetBSD: options.mk,v 1.5 2010/10/30 15:07:42 drochner Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.sox
-PKG_SUPPORTED_OPTIONS= lame oss
+PKG_SUPPORTED_OPTIONS= lame oss ffmpeg wavpack
# lame has LICENSE= issues and thus should not be SUGGESTED.
PKG_SUGGESTED_OPTIONS=
.include "../../mk/bsd.options.mk"
@@ -16,3 +16,13 @@ PKG_SUGGESTED_OPTIONS=
.else
CONFIGURE_ARGS+= --without-oss
.endif
+
+.if !empty(PKG_OPTIONS:Mffmpeg)
+.include "../../multimedia/ffmpeg/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ffmpeg
+.endif
+
+.if !empty(PKG_OPTIONS:Mwavpack)
+.include "../../audio/wavpack/buildlink3.mk"
+CONFIGURE_ARGS+= --with-wavpack
+.endif
>Audit-Trail:
From: "Andrey N. Oktyabrski" <ano@bestmx.ru>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/46269: audio/sox: add compilation options
Date: Wed, 28 Mar 2012 10:09:23 +0400
I think, here is some additional work needed:
- who want -liconv
- why ldd sox shows libasound.so - must we add an alsa-lib dependency?
Try to investigate...
From: "Andrey N. Oktyabrski" <ano@bestmx.ru>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/46269: audio/sox: add compilation options
Date: Wed, 28 Mar 2012 18:30:49 +0400
This is a multi-part message in MIME format.
--------------080908040705090401050601
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit
Here is a new patch. It contains more options:
oss sun alsa libao lame ffmpeg wavpack opencore-amr id3tag
I have tested compilation with these all options. It happens
successfully without errors. This is a good news.
The bad news is: WITHOUT any options sox compiles WITH as many
extensions as it can find. For example, it use alsa-lib (installed from
OpenIndiana IPS repository or from pkgsrc), ffmpeg, opencore-amr and so
on. Really, I can not disable any extension, I can uninstall correspond
package - then sox's "configure" script do not compile it in.
Original audio/sox (without my patch) has exactly the same issue.
Is it sox' own problem, or it is autotools disaster? I can't understand.
--------------080908040705090401050601
Content-Type: text/plain; charset=UTF-8;
name="sox_pkgsrc.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sox_pkgsrc.patch"
diff -uwpr sox/options.mk sox.ano/options.mk
--- sox/options.mk 2010-10-30 19:07:42.000000000 +0400
+++ sox.ano/options.mk 2012-03-28 18:01:09.522664897 +0400
@@ -1,18 +1,74 @@
# $NetBSD: options.mk,v 1.5 2010/10/30 15:07:42 drochner Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.sox
-PKG_SUPPORTED_OPTIONS= lame oss
+PKG_SUPPORTED_OPTIONS= oss sun alsa libao lame ffmpeg wavpack opencore-amr id3tag
# lame has LICENSE= issues and thus should not be SUGGESTED.
PKG_SUGGESTED_OPTIONS=
.include "../../mk/bsd.options.mk"
+### Audio driver options ###
+.if !empty(PKG_OPTIONS:Moss)
+.include "../../mk/oss.buildlink3.mk"
+CONFIGURE_ARGS+= --with-oss
+.else
+CONFIGURE_ARGS+= --without-oss
+.endif
+
+.if !empty(PKG_OPTIONS:Msun)
+CONFIGURE_ARGS+= --with-sunaudio
+.else
+CONFIGURE_ARGS+= --without-sunaudio
+.endif
+
+.if !empty(PKG_OPTIONS:Malsa)
+.include "../../audio/alsa-lib/buildlink3.mk"
+CONFIGURE_ARGS+= --with-alsa
+.else
+CONFIGURE_ARGS+= --without-alsa
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibao)
+.include "../../audio/libao/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ao
+.else
+CONFIGURE_ARGS+= --without-ao
+.endif
+
+### Codec options ###
.if !empty(PKG_OPTIONS:Mlame)
# This is an option due to LICENSE= issues.
.include "../../audio/lame/buildlink3.mk"
+CONFIGURE_ARGS+= --with-lame
+.else
+CONFIGURE_ARGS+= --without-lame
.endif
-.if !empty(PKG_OPTIONS:Moss)
-.include "../../mk/oss.buildlink3.mk"
+.if !empty(PKG_OPTIONS:Mffmpeg)
+.include "../../multimedia/ffmpeg/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ffmpeg
.else
-CONFIGURE_ARGS+= --without-oss
+CONFIGURE_ARGS+= --without-ffmpeg
+.endif
+
+.if !empty(PKG_OPTIONS:Mwavpack)
+.include "../../audio/wavpack/buildlink3.mk"
+.include "../../converters/libiconv/buildlink3.mk"
+CONFIGURE_ARGS+= --with-wavpack
+.else
+CONFIGURE_ARGS+= --without-wavpack
.endif
+
+.if !empty(PKG_OPTIONS:Mopencore-amr)
+.include "../../audio/opencore-amr/buildlink3.mk"
+CONFIGURE_ARGS+= --with-amrnb --with-amrwb
+.else
+CONFIGURE_ARGS+= --without-amrnb --without-amrwb
+.endif
+
+.if !empty(PKG_OPTIONS:Mid3tag)
+.include "../../audio/libid3tag/buildlink3.mk"
+CONFIGURE_ARGS+= --with-libid3tag
+.else
+CONFIGURE_ARGS+= --without-libid3tag
+.endif
+
--------------080908040705090401050601--
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/46269: audio/sox: add compilation options
Date: Thu, 26 Apr 2012 21:04:34 +0900
Why audo/sox package has followngs?
CONFIGURE_ARGS+= --without-libltdl
It seems that --with-libltdl & --with-dyn-default are more easy way to
support optional formats.
--
OBATA Akio / obache@NetBSD.org
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/46269: audio/sox: add compilation options
Date: Thu, 26 Apr 2012 14:18:05 +0200
On Thu, Apr 26, 2012 at 12:05:03PM +0000, OBATA Akio wrote:
> Why audo/sox package has followngs?
> CONFIGURE_ARGS+= --without-libltdl
>
> It seems that --with-libltdl & --with-dyn-default are more easy way to
> support optional formats.
No idea. Change it and wait for complaints :)
(I think it should be fine to change it.)
Thomas
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.