From owner-freebsd-multimedia@FreeBSD.ORG Fri Dec 7 11:03:47 2012 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8AC5DE9 for ; Fri, 7 Dec 2012 11:03:47 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 2972E8FC0C for ; Fri, 7 Dec 2012 11:03:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TgviT-0007du-Ff; Fri, 07 Dec 2012 14:03:38 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=txItWx0QqnHd6myuO4XF7Tc6Mszl/Mz+/eF6yfpNnms=; b=CtwWyXWpYwPEM1qqI/r8jLkzx1BkOaiJHtdQFXjsCDb5ZyTXuySTeoe24T2RxZ/UJ5sCGaeFFXcXKnDXpsYEGqQ/319Etcr1ilGyc7ZuJxgf9jBV+8cY+Z8V/KW0Y3NIGGIFA1BPCve0pY3kbpbNbhQNsB22YmS+YNL1Z4v6Cos=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1Tgvfs-000Kdu-Vy; Fri, 07 Dec 2012 11:01:08 +0000 From: Jan Beich To: Boris Samorodov Subject: Re: svn commit: r308098 - head/audio/linux-f10-alsa-lib In-Reply-To: <50C1A2DC.6040700@passap.ru> (Boris Samorodov's message of "Fri, 07 Dec 2012 12:03:40 +0400") Date: Fri, 07 Dec 2012 04:59:01 -0600 References: <201212021128.qB2BSesC054251@svn.freebsd.org> <20121206225517.GA12093@triton8.kn-bremen.de> <50C1A2DC.6040700@passap.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-TorMail-User: jbeich Message-Id: <1Tgvfs-000Kdu-Vy@internal.tormail.org> Cc: freebsd-multimedia@FreeBSD.org, Juan =?utf-8?Q?Ram=C3=B3n?= Molina Menor , Juergen Lock X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 11:03:48 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Boris Samorodov writes: > (moving the discussion to the multimedia list; or should it be > freebsd-emulation?) > > 07.12.2012 02:55, Juergen Lock =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> On Sun, Dec 02, 2012 at 11:28:40AM +0000, Boris Samorodov wrote: >>> Author: bsam >>> Date: Sun Dec 2 11:28:40 2012 >>> New Revision: 308098 >>> URL: http://svnweb.freebsd.org/changeset/ports/308098 >>> >>> Log: >>> . create a link from native asound configuration file at LINUXBASE/et= c; [1] [...] >>> +# We will use some other configuration file, so delete a linux one >>> +post-extract: >>> + @${RM} -r ${WRKSRC}/etc >>> + >>> +post-install: >>> + @${LN} -s ${LOCALBASE}/etc/asound.conf ${PREFIX}/etc/asound.conf >>> + >>> .include >>=20 >> This breaks at least installation of audio/linux-f10-alsa-plugins-oss >> when audio/alsa-lib isn't installed (because the former tries to >> write into asound.conf that then fails with ENOENT), and I guess >> it will fail at runtime then too. >>=20 >> The obvious idea for a fix is to add audio/alsa-lib as a dependency, >> but probably the resulting config file mess when linux-f10-alsa-plugins-= oss >> is installed should be untangled too (and the fix tested with things >> like skype that often needs an extra oss device for the mic.) > > Thanks, Juergen. > > 2All: > > Can someone come up with an appropriate patch/solution? Why not just remove pkg-{,de}install scripts? linux-firefox fails to use OSS plugin with the auto-generated asound.conf. Also, other ports may have similar issue. net/linux-f10-openldap x11-fonts/linux-f10-fontconfig For one, linux-f10-fontconfig doesn't work inside jail without native fontconfig installed. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=linux-alsa.diff Index: audio/linux-f10-alsa-lib/Makefile =================================================================== --- audio/linux-f10-alsa-lib/Makefile (revision 308395) +++ audio/linux-f10-alsa-lib/Makefile (working copy) @@ -12,6 +12,8 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-${RPMVERSION} MAINTAINER= emulation@FreeBSD.org COMMENT= Advanced Linux Sound Architecture libraries (Linux Fedora 10) +RUN_DEPENDS= ${LOCALBASE}/etc/asound.conf:${PORTSDIR}/audio/alsa-lib + CONFLICTS= linux-alsa-lib-[0-9]* linux-f8-alsa-lib-[0-9]* ONLY_FOR_ARCHS= i386 amd64 @@ -21,11 +23,11 @@ RPMVERSION= 2.fc10 BRANDELF_FILES= usr/bin/aserver USE_LDCONFIG= yes -# We will use some other configuration file, so delete a linux one +# We will use native configuration file, so delete a linux one post-extract: @${RM} -r ${WRKSRC}/etc post-install: - @${LN} -s ${LOCALBASE}/etc/asound.conf ${PREFIX}/etc/asound.conf + @${LN} -s ${LOCALBASE}/etc/asound.conf ${PREFIX}/etc .include Index: audio/linux-f10-alsa-plugins-oss/Makefile =================================================================== --- audio/linux-f10-alsa-plugins-oss/Makefile (revision 308395) +++ audio/linux-f10-alsa-plugins-oss/Makefile (working copy) @@ -23,16 +23,8 @@ RPMVERSION= 3.fc10 SRC_DISTFILES= ${PORTNAME:S/-oss//}-${PORTVERSION}-${RPMVERSION}${SRC_SUFX} USE_LDCONFIG= yes -CONF_FILE= etc/alsa/pcm/pcm-oss.conf +# We will use native configuration file, so delete a linux one +post-extract: + @${RM} -r ${WRKSRC}/etc -post-patch: - @${RM} ${WRKSRC}/${CONF_FILE}.orig - @${MV} ${WRKSRC}/${CONF_FILE} ${WRKSRC}/${CONF_FILE}-dist - -post-install: - @if [ ! -f ${PREFIX}/${CONF_FILE} ]; then \ - ${CP} -p ${PREFIX}/${CONF_FILE}-dist ${PREFIX}/${CONF_FILE} ; \ - fi - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - .include Index: audio/linux-f10-alsa-plugins-oss/files/patch-pcm-oss.conf =================================================================== --- audio/linux-f10-alsa-plugins-oss/files/patch-pcm-oss.conf (revision 308395) +++ audio/linux-f10-alsa-plugins-oss/files/patch-pcm-oss.conf (working copy) @@ -1,14 +0,0 @@ ---- etc/alsa/pcm/pcm-oss.conf.orig 2010-03-23 10:56:41.000000000 +0900 -+++ etc/alsa/pcm/pcm-oss.conf 2010-03-23 10:57:30.000000000 +0900 -@@ -7,3 +7,11 @@ - description "Open Sound System" - } - } -+ -+ctl.oss { -+ type oss -+ device /dev/mixer -+ hint { -+ description "Open Sound System" -+ } -+} Index: audio/linux-f10-alsa-plugins-oss/pkg-deinstall =================================================================== --- audio/linux-f10-alsa-plugins-oss/pkg-deinstall (revision 308395) +++ audio/linux-f10-alsa-plugins-oss/pkg-deinstall (working copy) @@ -1,16 +0,0 @@ -#!/bin/sh - -case "$2" in - POST-DEINSTALL) - conf=${PKG_PREFIX}/etc/asound.conf - if [ ! -f "$conf" ]; then - exit 1 - fi - grep -v '/etc/alsa/pcm/pcm-oss\.conf' <$conf >/tmp/asound.conf.new - ;; - *) - exit 0 - ;; -esac - -exit 0 Index: audio/linux-f10-alsa-plugins-oss/pkg-install =================================================================== --- audio/linux-f10-alsa-plugins-oss/pkg-install (revision 308395) +++ audio/linux-f10-alsa-plugins-oss/pkg-install (working copy) @@ -1,18 +0,0 @@ -#!/bin/sh - -case "$2" in - POST-INSTALL) - conf=${PKG_PREFIX}/etc/asound.conf - if [ ! -f "$conf" ]; then - exit 1 - fi - awk '{print $0}; /files/ { print "\t\t\t\"/etc/alsa/pcm/pcm-oss.conf\""}' <$conf >/tmp/asound.conf.new - mv /tmp/asound.conf.new $conf - exit 0 - ;; - *) - exit 0 - ;; -esac - -exit 0 Index: audio/linux-f10-alsa-plugins-oss/pkg-plist =================================================================== --- audio/linux-f10-alsa-plugins-oss/pkg-plist (revision 308395) +++ audio/linux-f10-alsa-plugins-oss/pkg-plist (working copy) @@ -1,13 +1,7 @@ -@unexec if cmp -s %D/etc/alsa/pcm/pcm-oss.conf-dist %D/etc/alsa/pcm/pcm-oss.conf; then rm -f %D/etc/alsa/pcm/pcm-oss.conf; fi -etc/alsa/pcm/pcm-oss.conf-dist -@exec if [ ! -f %D/etc/alsa/pcm/pcm-oss.conf ] ; then cp -p %D/%F %B/pcm-oss.conf; fi usr/lib/alsa-lib/libasound_module_ctl_oss.so usr/lib/alsa-lib/libasound_module_pcm_oss.so usr/share/doc/alsa-plugins-oss-1.0.21/COPYING usr/share/doc/alsa-plugins-oss-1.0.21/COPYING.GPL usr/share/doc/alsa-plugins-oss-1.0.21/README-pcm-oss @dirrm usr/share/doc/alsa-plugins-oss-1.0.21 -@dirrmtry etc/alsa/pcm -@dirrmtry etc/alsa @dirrmtry usr/lib/alsa-lib -@unexec if [ -f %D/etc/asound.conf ]; then fgrep -v '/etc/alsa/pcm/pcm-oss.conf' <%D/etc/asound.conf >/tmp/asound.conf.new; mv /tmp/asound.conf.new %D/etc/asound.conf; fi --=-=-=--