These are my steps installing 'ejurgensen/forked-daapd' on my FreeBSD 10.1 amd64 using user root and editor joe. Feedback would be great!
export WORKDIR=/usr/local/src/forked-daapd
mkdir -p $WORKDIR
cd $WORKDIR
# maybe 'pkg install automake' ?
pkg install gmake libantlr3c autoconf libtool gettext gperf glib libconfuse libevent2 mxml libgcrypt taglib libunistring libplist openjdk8-jre libiconv avahi-app avahi sqlite3 yasm pkgconf
This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and procfs(5) mounted on /proc.
If you have not done it yet, please do the following:
mount -t fdescfs fdesc /dev/fd
mount -t procfs proc /proc
To make it permanent, you need the following lines in /etc/fstab:
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
mkdir -p /usr/local/lib/oss/include/sys/
ln -sf /usr/include/sys/soundcard.h /usr/local/lib/oss/include/sys/
cd $WORKDIR
curl -O http://www.debian.co.il/debian/pool/main/liba/libavl/libavl_0.3.5.orig.tar.gz
tar xzvf libavl_0.3.5.orig.tar.gz
cd avl-0.3.5
There might be an error in the 'GNUmakefile' of AVL while installing with make. Here is the fix:
Change all
joe GNUmakefile
gmake CC=clang CFLAGS=-fPIC
gmake install
cd $WORKDIR
mkdir antlr3
cd antlr3
curl -O https://raw.githubusercontent.com/antlr/website-antlr3/gh-pages/download/antlr-3.4-complete.jar
mv antlr-3.4-complete.jar /usr/local/share/java/antlr-3.4-complete.jar
cd $WORKDIR
cd antlr3
echo '#!/bin/sh' > antlr3
echo 'export CLASSPATH' >> antlr3
echo 'CLASSPATH=$CLASSPATH:/usr/local/share/java/antlr-3.4-complete.jar:/usr/share/java /usr/local/openjdk8/bin/java org.antlr.Tool $*' >> antlr3
#echo exec /usr/local/bin/java -cp /usr/local/share/java/antlr-3.3-complete.jar org.antlr.Tool \"\$@\" >> antlr3
chmod u+x antlr3
mv antlr3 /usr/local/bin/antlr3
cd $WORKDIR
#curl -O http://www.antlr3.org/download/C/libantlr3c-3.2.tar.gz
curl -O https://raw.githubusercontent.com/antlr/website-antlr3/gh-pages/download/C/libantlr3c-3.4.tar.gz
tar xzvf libantlr3c-3.4.tar.gz
cd libantlr3c-3.4
./configure --enable-64bit
gmake
gmake install
If you might want aac support. Grab a cup of coffee - this might take a while.
# maybe 'pkg remove automake' ?
cd /usr/ports/multimedia/ffmpeg
make config
make install clean
cd /usr/ports/multimedia/libav
make config
make install clean
cd $WORKDIR
git clone https://github.com/ejurgensen/forked-daapd.git
cd forked-daapd
autoreconf -iv -Wno-portability
CFLAGS="-march=native -O2 -pipe" LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include ./configure --localstatedir=/var --with-oss4=/usr/local/lib/oss/include/sys --enable-itunes --enable-lastfm
gmake
gmake install
cp /usr/local/etc/forked-daapd.conf /usr/local/etc/forked-daapd.conf.sample
joe /usr/local/etc/forked-daapd.conf
useradd daapd
chown daapd:daapd /var/cache/forked-daapd
joe /etc/rc.conf
dbus_enable="YES"
avahi_daemon_enable="YES"
forked_daapd_enable="YES"
joe /usr/local/etc/rc.d/forked-daapd
chmod u+x /usr/local/etc/rc.d/forked-daapd
thanks for the manual. however I'm stuck at installing/compiling ejurgensen/forked-daapd.
I get an error:
checking for ZLIB... no
configure: error: Package requirements ( zlib ) were not met:
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing 'zlib.pc'
to the PKG_CONFIG_PATH environment variable
Package 'zlib', required by 'world', not found
zlib.pc is clearly not installed on FreeBSD 9.3 (
locate
cannot find it) and I find no package/port that provides it. Any hint on this? Is this provided as standard on FreeBSD 10?OK, after some searching I found this solution:
changing the line for configure to this resulted in a successful configure run:
CFLAGS="-march=native -O2 -pipe" ZLIB_CFLAGS="-I/usr/include" ZLIB_LIBS="-L/usr/lib -lz" LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include ./configure --localstatedir=/var --with-oss4=/usr/local/lib/oss/include/sys --enable-itunes --enable-lastfm
Relevant part is:
ZLIB_CFLAGS="-I/usr/include" ZLIB_LIBS="-L/usr/lib -lz"
after that gmake crashed with this message:
obviosly openjdk8 was installed in
openjdk8-jre
ln -s openjdk8-jre/ openjdk8
in/usr/local/
resolved that problem…But after receiving:
I'm out of my league. Giving up for now… :-/