Alsaplayer and CDDA

Hi, I am new on FreeBSD, I just installed it. As AlsaPlayer, which is my favorite audio player is not available, I installed it. But first, when searching if it was available, I was very surprised to find alsaplayer -- multiple vulnerabilities.

It is almost 7 years than these vulnerabilities are fixed.

To install AlsaPlayer, I first begun with the last release, but as I get in trouble during the compilation, I decided to try with the development version. It is several years I use it on gentoo without any problem, and the internal have been greatly improved by Erik De Castro Lopo, AKA mega-nerd, the main developer of libsndfile. For the users, the main difference is that re-sampling have now a terrific quality.

So I downloaded the GIT zip archive from here. To decompress it, just run

unzip alsaplayer.master.zip.

I get some troubles because the build system is not 100% compatible with FreeBSD. That resulted into the following patch

Code:
diff -ur alsaplayer-orig/app/Makefile.am alsaplayer-master/app/Makefile.am
--- alsaplayer-orig/app/Makefile.am     2013-12-11 19:56:09.000000000 +0100
+++ alsaplayer-master/app/Makefile.am   2014-01-15 06:14:03.000000000 +0100
@@ -15,7 +15,7 @@
 
 endif
 
-LIBS = -lpthread -ldl $(SUN_LIBS)
+LIBS = -lpthread $(SUN_LIBS)
 
 COMMON_FLAGS = @DFLAGS@ -D_REENTRANT -DADDON_DIR=\"$(ADDON_DIR)\"
 
diff -ur alsaplayer-orig/configure.ac alsaplayer-master/configure.ac
--- alsaplayer-orig/configure.ac        2013-12-11 19:56:09.000000000 +0100
+++ alsaplayer-master/configure.ac      2014-01-15 06:16:12.000000000 +0100
@@ -363,7 +363,7 @@
 #endif
 ],
 have_alsa=yes
-ALSA_LIB="-lasound"
+ALSA_LIB="-L/usr/local/lib -lasound"
 AC_MSG_RESULT([found latest])
 )
 
diff -ur alsaplayer-orig/input/sndfile/sndfile_engine.c alsaplayer-master/input/sndfile/sndfile_engine.c
--- alsaplayer-orig/input/sndfile/sndfile_engine.c      2013-12-11 19:56:09.000000000 +0100
+++ alsaplayer-master/input/sndfile/sndfile_engine.c    2014-01-15 06:14:34.000000000 +0100
@@ -19,7 +19,6 @@
  */
 
 #include <stdio.h>
-#include <alloca.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <string.h>

You can save it as alsaplayer.freebsd.patch into the main folder of the sources. To apply it, run

patch -p1 <alsaplayer.freebsd.patch

You must have the autotools package, and to generate the configure script, run

./bootstrap

To configure the software

LIBS='-L/usr/local/lib' ./configure

and to build it

make

The required dependencies are glib and pkgconfig. The optional dependencies are alsa-lib, jack-audio-connection-kit, mad, flac, mikmod, nas, vorbis, libsndfile, gtk+, doyzgen, xosd, and nls.

The only thing I didn't succeed succeed to compile is the ccda input plugin. From configure, I get

Code:
checking linux/cdrom.h usability... no
checking linux/cdrom.h presence... no
checking for linux/cdrom.h... no

Do you know what can provide cdrom.h?

EDIT: the title
 
The commands and definitions for accessing the CD drive can be found in the /usr/include/linux/cdrom.h header, but it's specific from Linux.

In FreeBSD, you should take a look to the /usr/include/sys/cdio.h header.
 
Thank you.

It is other differences, and according to the errors I get, it look like this issue need patching at the code level. And I don't know do that.

Anyway, it work fine without CDROM support.
 
Back
Top