diff --git a/media-sound/cantata/additional-files/cantata.rdef b/media-sound/cantata/additional-files/cantata.rdef new file mode 100644 index 000000000..55f3f7d56 --- /dev/null +++ b/media-sound/cantata/additional-files/cantata.rdef @@ -0,0 +1,27 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + variety = B_APPV_FINAL, + internal = 0, + short_info = "Cantata", + long_info = "A Qt based client for Music Player Daemon" +}; + +resource app_signature "application/x-vnd.cantata"; + +resource vector_icon { + $"6E63696603056005FF0300438A030006CC4DBFAACC4DBFAACC56B8B1BFBDB2F6" + $"C6B720B8C2B2ECB309BF87B313B88DB309BF92B309BFAAB309BF9EB313C6A4BF" + $"BDCC3AB8C2CC45C6A8CC31CC4DBFAACC43C697CC4DBFAA0204B55EBFA6B55EB9" + $"FAB55EC551BFA6C9EDB9FAC9EDC551C9EDC9EDBFA6C9EDC551C9EDB9FABFA6B5" + $"5EC551B55EB9FAB55E020CC09FB7BDC09FB7BD41B8C6C035BB0FC068B9F7C035" + $"BB0FBFCAC06EBFCAC06EBD05BF31B965C34BB8D2C10EB99FC573C05CC52FBDE8" + $"C6A5C2A8C3BFC227BF98C1D9C173C227BF98C271BA90C271BA90C3A3BBAEC3D7" + $"BE9F4EBD42C2D0BF36C510C00BC3B9C09DC757BEDAC598BAEAC762BC53C443B9" + $"DCC142B7ECC2BAB8E6C113B7DBC09FB7BDC0DCB792C09FB7BD030A000100000A" + $"010101000A02010200" +}; diff --git a/media-sound/cantata/cantata-2.0.1.recipe b/media-sound/cantata/cantata-2.0.1.recipe new file mode 100644 index 000000000..8769ed98d --- /dev/null +++ b/media-sound/cantata/cantata-2.0.1.recipe @@ -0,0 +1,100 @@ +SUMMARY="A Qt based client for Music Player Daemon" +DESCRIPTION=" +Music Player Daemon (MPD) is a flexible, powerful, server-side application \ +for playing music. Through plugins and libraries it can play a variety \ +of sound files while being controlled by its network protocol. + +Cantata is a full featured Qt based client for Music Player Daemon." +HOMEPAGE="https://github.com/CDrummond/cantata" +COPYRIGHT="2010-2016 Craig Drummond" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/CDrummond/cantata/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="294fc96944dd2bb6056525a49ae9db1b1da1b7902ac63286ed6c01622b8e3b52" +PATCHES="cantata-$portVersion.patchset" +ADDITIONAL_FILES="cantata.rdef" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + cantata$secondaryArchSuffix = $portVersion + app:cantata$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libmpg123$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Svg$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5DBus$secondaryArchSuffix + lib:libQt5Multimedia$secondaryArchSuffix + lib:libQt5Sql$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Concurrent$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libtag$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libavcodec$secondaryArchSuffix + devel:libavformat$secondaryArchSuffix + devel:libavutil$secondaryArchSuffix + devel:libqt5$secondaryArchSuffix + devel:libmpg123$secondaryArchSuffix + devel:libtag$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc${secondaryArchSuffix} + cmd:ld${secondaryArchSuffix} + cmd:make + cmd:pkg_config${secondaryArchSuffix} + " + +BUILD() +{ + mkdir -p build + cd build + cmake .. \ + -Wno-dev \ + -DENABLE_LIBVLC=OFF \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DSHARE_INSTALL_PREFIX=$dataDir/cantata \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_QT5=ON + + make $jobArgs +} + +INSTALL() +{ + cd build + make install + + mkdir -p $appsDir + mv $prefix/bin/cantata $appsDir/Cantata + rmdir $prefix/bin + rm -r $prefix/share + + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + $portDir/additional-files/cantata.rdef > cantata.rdef + + addResourcesToBinaries cantata.rdef \ + $appsDir/Cantata + + addAppDeskbarSymlink $appsDir/Cantata +} diff --git a/media-sound/cantata/patches/cantata-2.0.1.patchset b/media-sound/cantata/patches/cantata-2.0.1.patchset new file mode 100644 index 000000000..3c694b832 --- /dev/null +++ b/media-sound/cantata/patches/cantata-2.0.1.patchset @@ -0,0 +1,45 @@ +From d4f2c2e04c5969fab48528ea1f1b2480ca2d8dca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 6 Nov 2016 19:30:40 +0100 +Subject: [PATCH] Haiku patches + +--- + db/mpdlibrarydb.cpp | 4 ++++ + gui/main.cpp | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/db/mpdlibrarydb.cpp b/db/mpdlibrarydb.cpp +index 07ff51b..696a786 100644 +--- a/db/mpdlibrarydb.cpp ++++ b/db/mpdlibrarydb.cpp +@@ -39,7 +39,11 @@ + #ifdef CANTATA_WEB + GLOBAL_STATIC(MpdLibraryDb, instance) + #else ++#ifndef __HAIKU__ + static const QLatin1String constDirName("library"); ++#else ++static const QLatin1String constDirName("/boot/home/config/settings/cantata/library"); ++#endif + static QString databaseName(const MPDConnectionDetails &details) + { + QString fileName=(!details.isLocal() ? details.hostname+'_'+QString::number(details.port) : details.hostname)+LibraryDb::constFileExt; +diff --git a/gui/main.cpp b/gui/main.cpp +index bfcd4b9..9065f35 100644 +--- a/gui/main.cpp ++++ b/gui/main.cpp +@@ -324,9 +324,11 @@ int main(int argc, char *argv[]) + QCoreApplication::setOrganizationName(ORGANIZATION_NAME); + + Application app(argc, argv); ++#ifndef __HAIKU__ + if (!app.start()) { + return 0; + } ++#endif + + // Set the permissions on the config file on Unix - it can contain passwords + // for internet services so it's important that other users can't read it. +-- +2.10.0 +