This port provides FreeBSD with a compatibility layer for software that depends on ALSA support. It is based entirely on ariff@'s work at http://people.freebsd.org/~ariff/libasound/, but has been updated for the latest version of ALSA. Chromium for FreeBSD is an immediate beneficiary of this library. Special thanks to sprewell@jaggeri.com for testing this.
Responsible Changed From-To: freebsd-ports-bugs->fluffy I'll take it.
respect PREFIX --- a.diff begins here --- --- audio/alsa-lib/Makefile~ +++ audio/alsa-lib/Makefile @@ -19,6 +19,9 @@ HAS_CONFIGURE= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --disable-aload --disable-python +post-patch: .SILENT + ${REINPLACE_CMD} 's|/etc|${PREFIX}&|g' ${WRKSRC}/src/conf/alsa.conf + post-install: ${INSTALL_DATA} ${FILESDIR}/asound.conf.sample ${PREFIX}/etc/asound.conf.sample @if [ ! -f ${PREFIX}/etc/asound.conf ]; then \ --- audio/alsa-lib/files/patch-alsa-lib~ +++ audio/alsa-lib/files/patch-alsa-lib @@ -583,14 +583,3 @@ if (fcntl(fd, F_SETOWN, (long)pid) < 0) { SYSERR("F_SETOWN failed"); return -errno; ---- src/conf/alsa.conf.orig 2009-09-15 04:25:00.000000000 +0800 -+++ src/conf/alsa.conf 2009-09-15 04:25:07.000000000 +0800 -@@ -8,7 +8,7 @@ - { - func load - files [ -- "/etc/asound.conf" -+ "/usr/local/etc/asound.conf" - "~/.asoundrc" - ] - errors false --- a.diff ends here ---
Do we need to link against librt? Works fine without it. Tested on audio/xmp and mplayer. --- a.diff begins here --- --- audio/alsa-lib/files/patch-alsa-lib~ +++ audio/alsa-lib/files/patch-alsa-lib @@ -54,6 +54,24 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 +@@ -21087,7 +21087,7 @@ if test "${ac_cv_lib_rt_clock_gettime+se + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" ++LIBS="$LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21163,7 +21163,7 @@ if test $ac_cv_lib_rt_clock_gettime = ye + fi + + if test "$HAVE_LIBRT" = "yes" ; then +- ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt" ++ ALSA_DEPLIBS="$ALSA_DEPLIBS" + + cat >>confdefs.h <<\_ACEOF + #define HAVE_LIBRT 1 --- include/asoundlib-head.h.orig 2009-09-09 20:34:54.000000000 +0800 +++ include/asoundlib-head.h 2009-09-15 00:35:55.000000000 +0800 @@ -34,7 +34,11 @@ --- a.diff ends here ---
PREFIX patch looks good. librt looks unnecessary so can be removed - our clock_gettime is in libc. Well spotted - thanks!
- use REINPLACE_CMD to patch pre generated files, avoid breaks on update - install *.pc files into libdata/pkgconfig - remove redundant HAS_CONFIGURE - split lines that are more than 80 col width (72 actually) --- a.diff begins here --- diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile index 4956dc9..00d1629 100644 --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -15,17 +15,25 @@ MAINTAINER= aragon@phat.za.net COMMENT= ALSA compatibility library USE_BZIP2= yes USE_LDCONFIG= yes -HAS_CONFIGURE= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --disable-aload --disable-python post-patch: .SILENT - ${REINPLACE_CMD} 's|/etc|${PREFIX}&|g' ${WRKSRC}/src/conf/alsa.conf + ${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \ + -e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure + ${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \ + ${WRKSRC}/modules/mixer/simple/Makefile.in + ${REINPLACE_CMD} 's|/etc|${PREFIX}&|g' \ + ${WRKSRC}/src/conf/alsa.conf + ${REINPLACE_CMD} \ + '/pkgconfigdir/s|$$(libdir)|$$(prefix)/libdata|g' \ + ${WRKSRC}/utils/Makefile.in post-install: - ${INSTALL_DATA} ${FILESDIR}/asound.conf.sample ${PREFIX}/etc/asound.conf.sample + ${INSTALL_DATA} ${FILESDIR}/asound.conf.sample ${PREFIX}/etc @if [ ! -f ${PREFIX}/etc/asound.conf ]; then \ - ${CP} -p ${PREFIX}/etc/asound.conf.sample ${PREFIX}/etc/asound.conf ; \ + ${CP} -p ${PREFIX}/etc/asound.conf.sample \ + ${PREFIX}/etc/asound.conf ; \ fi .include <bsd.port.mk> diff --git a/audio/alsa-lib/files/patch-alsa-lib b/audio/alsa-lib/files/patch-alsa-lib index f4b2fae..79a6c46 100644 --- a/audio/alsa-lib/files/patch-alsa-lib +++ b/audio/alsa-lib/files/patch-alsa-lib @@ -1,77 +1,3 @@ ---- configure.orig 2009-09-09 20:36:11.000000000 +0800 -+++ configure 2009-09-15 00:38:20.000000000 +0800 -@@ -9728,7 +9728,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -9800,7 +9800,7 @@ - { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } - if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="" - else - - lt_cv_dlopen="dyld" -@@ -10098,7 +10098,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -10170,7 +10170,7 @@ - { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } - if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="" - else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 - echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -@@ -20859,7 +20859,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -20935,7 +20935,7 @@ - fi - - if test "$HAVE_LIBDL" = "yes" ; then -- ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl" -+ ALSA_DEPLIBS="$ALSA_DEPLIBS" - - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBDL 1 -@@ -21087,7 +21087,7 @@ if test "${ac_cv_lib_rt_clock_gettime+se - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lrt $LIBS" -+LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -21163,7 +21163,7 @@ if test $ac_cv_lib_rt_clock_gettime = ye - fi - - if test "$HAVE_LIBRT" = "yes" ; then -- ALSA_DEPLIBS="$ALSA_DEPLIBS -lrt" -+ ALSA_DEPLIBS="$ALSA_DEPLIBS" - - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBRT 1 --- include/asoundlib-head.h.orig 2009-09-09 20:34:54.000000000 +0800 +++ include/asoundlib-head.h 2009-09-15 00:35:55.000000000 +0800 @@ -34,7 +34,11 @@ @@ -226,21 +152,6 @@ #if __BYTE_ORDER == __LITTLE_ENDIAN #define __cpu_to_le32(x) (x) #define __cpu_to_be32(x) bswap_32(x) ---- modules/mixer/simple/Makefile.in.orig 2009-09-09 20:36:09.000000000 +0800 -+++ modules/mixer/simple/Makefile.in 2009-09-15 00:37:19.000000000 +0800 -@@ -308,10 +308,10 @@ - smixer_sbase_la_LIBADD = ../../../src/libasound.la - smixer_ac97_la_SOURCES = ac97.c sbasedl.c - smixer_ac97_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED) --smixer_ac97_la_LIBADD = ../../../src/libasound.la -ldl -+smixer_ac97_la_LIBADD = ../../../src/libasound.la - smixer_hda_la_SOURCES = hda.c sbasedl.c - smixer_hda_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED) --smixer_hda_la_LIBADD = ../../../src/libasound.la -ldl -+smixer_hda_la_LIBADD = ../../../src/libasound.la - @BUILD_PYTHON_TRUE@smixer_python_la_SOURCES = python.c - @BUILD_PYTHON_TRUE@smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED) - @BUILD_PYTHON_TRUE@smixer_python_la_CFLAGS = $(PYTHON_INCLUDES) --- src/async.c.orig 2009-09-09 20:34:54.000000000 +0800 +++ src/async.c 2009-09-15 00:49:34.000000000 +0800 @@ -51,6 +51,7 @@ diff --git a/audio/alsa-lib/pkg-plist b/audio/alsa-lib/pkg-plist index 34376c0..1acf9a8 100644 --- a/audio/alsa-lib/pkg-plist +++ b/audio/alsa-lib/pkg-plist @@ -43,7 +43,7 @@ lib/alsa-lib/smixer/smixer-sbase.so lib/libasound.la lib/libasound.so lib/libasound.so.2 -lib/pkgconfig/alsa.pc +libdata/pkgconfig/alsa.pc share/aclocal/alsa.m4 share/alsa/alsa.conf share/alsa/cards/AACI.conf @@ -126,7 +126,6 @@ etc/asound.conf.sample @dirrm share/alsa/cards/SI7018 @dirrm share/alsa/cards @dirrm share/alsa -@dirrm lib/pkgconfig @dirrm lib/alsa-lib/smixer @dirrm lib/alsa-lib @dirrm include/sys --- a.diff ends here ---
This is a multi-part message in MIME format.
I've tested all of swell.k's patches above and they look good. Thank you for the fixes! Note to committer: apply all patches in the same order they were submitted.
Paul Shepel <pavlo.shepel@asterslaw.com> writes: > I've tested port, looks OK. > > P.S. In the attachment there is a port shar with the patches by swell.k You've failed to apply them correctly. Diffs against these files in files/patch-alsa-lib were replaced by REINPLACE_CMD by me: configure modules/mixer/simple/Makefile.in but they're still present in your shar. BTW, gnats doesn't like your message. It failed to recognize .shar in attachment and looks abominable in WWW interface. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145964
27.05.2010 00:29, Anonymous пиÑеÑ: > You've failed to apply them correctly. Diffs against these files in > files/patch-alsa-lib were replaced by REINPLACE_CMD by me: > > configure > modules/mixer/simple/Makefile.in > > but they're still present in your shar. > My fault. I hope this shar in attachment is correct > BTW, gnats doesn't like your message. It failed to recognize .shar in > attachment and looks abominable in WWW interface. > Sorry for this. That's because of signature of my corporate e-mail I mistakenly send mail from.
fluffy 2010-06-05 12:43:25 UTC FreeBSD ports repository Added files: audio/alsa-lib Makefile distinfo pkg-descr pkg-plist audio/alsa-lib/files asound.conf.sample patch-alsa-lib Log: - New port: audio/alsa-lib Compatibility layer for ALSA support PR: 145964 Submitted by: Aragon Gouveia <aragon AT phat.za.net> Revision Changes Path 1.1 +41 -0 ports/audio/alsa-lib/Makefile (new) 1.1 +3 -0 ports/audio/alsa-lib/distinfo (new) 1.1 +51 -0 ports/audio/alsa-lib/files/asound.conf.sample (new) 1.1 +514 -0 ports/audio/alsa-lib/files/patch-alsa-lib (new) 1.1 +3 -0 ports/audio/alsa-lib/pkg-descr (new) 1.1 +133 -0 ports/audio/alsa-lib/pkg-plist (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed New port added. Thanks!