Amarok is again building on Arch. However, the
build
did uncover what are probably several bugs in the amarok/amarok/src/mediadevice
code. I was able to build amarok with the following enabled. All options turned
OFF appear to be bugs in the code or in the CMake files that control the
build for the individual options:
CXXFLAGS="${CXXFLAGS} -I/usr/include/ruby-1.9.1
-fpermissive" \
cmake ${srcdir}/${pkgname#*-} \
-DCMAKE_INSTALL_PREFIX=${TDEDIR} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_LIBVISUAL=ON \
-DWITH_KONQSIDEBAR=ON \
-DWITH_XINE=ON \
-DWITH_YAUAP=OFF \
-DWITH_IPOD=ON \
-DWITH_IFP=ON \
-DWITH_NJB=ON \
-DWITH_MTP=OFF \
-DWITH_RIOKARMA=OFF \
-DWITH_DAAP=OFF \
-DBUILD_ALL=ON
I don't know what limitations this imposes on Amarok,
but 'yauap', 'mtp', 'riokarma' and 'daap' all failed with
errors similar to:
/build/src/amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c
/build/src/amarok/amarok/src/mediadevice/daap/mongrel/http11/http11.c:5:18:
fatal error: ruby.h: No such file or directory
That's with the -I/usr/include/ruby-1.9.1 set....
But, it's working. Do we want a bug on the remaining
mediadevice issues?
This took a while but I am able to build amarok against both ruby 1.9.x and ruby 1.8.x.
One patch updates ConfigureChecks.cmake to determine the ruby version and return the
correct location of ruby.h for each version. This patch is mandatory.
The second patch updates http11.c only when the ruby version is greater than 1.8.x.
Note: I perform the same conditional patching with tdebindings. Refer to bug report 597
for the tdebindings patch.
Here is the link to the mandatory ConfigureChecks.cmake patch:
http://humanreadable.nfshost.com/trinity/patches/amarok/amarok-ruby19-cmake…
Here is the link to the conditional ruby 1.9.x patch:
http://humanreadable.nfshost.com/trinity/patches/amarok/amarok-ruby19.diff
Here is how I run the patches in my amarok build script:
cat $CWD/amarok-ruby19-cmake.diff | patch -p1 --verbose --no-backup-if-mismatch || exit 1
RUBY_VERSION="`ruby --version | awk '{print $2}'`"
RUBY_VERSION_SHORT="`ruby --version | awk '{print $2}' | awk -F '.'
'{print $1$2}'`"
if [ "$RUBY_VERSION_SHORT" -gt "18" ]; then
echo "==========================================================="
echo "Ruby version=$RUBY_VERSION: Patching for ruby > 1.8.x."
echo "==========================================================="
echo
cat $CWD/amarok-ruby19.diff | patch -p1 --verbose --no-backup-if-mismatch || exit 1
else
echo "==========================================================="
echo "Ruby version=$RUBY_VERSION: Not patching for ruby > 1.8.x."
echo "==========================================================="
echo
fi
I run the same test for tdebindings, albeit with different patches.
At this point I have successfully built amarok with all options except RIOKARMA.
After somebody tests the patches, I will push the mandatory cmake patch. I can't push
the conditional patch because many people still use ruby 1.8. I don't know how to
merge such a conditional patch anyway.
Darrell