summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Mori2019-09-03 12:06:17 +0200
committerNicola Mori2019-09-03 12:06:53 +0200
commit4241dbe58aa0d6889304f543e6157c4fbbe4e44c (patch)
tree6b663a15a2478e7e8931539eedaaf623c6e0ad37
downloadaur-4241dbe58aa0d6889304f543e6157c4fbbe4e44c.tar.gz
Initial commit
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD58
-rw-r--r--amarok_mariadb.patch22
-rw-r--r--amarok_restoreqtbindingsload.patch30
4 files changed, 156 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..28d36d6535f6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+pkgbase = amarok-scripting
+ pkgdesc = The powerful music player for KDE (with Qt bindings for scripting)
+ pkgver = 2.9.0.r369.854844c1dc
+ pkgrel = 1
+ url = http://amarok.kde.org/
+ arch = x86_64
+ license = FDL
+ license = GPL2
+ license = LGPL2.1
+ makedepends = extra-cmake-modules
+ makedepends = gdk-pixbuf2
+ makedepends = git
+ makedepends = knotifyconfig
+ makedepends = libgpod
+ makedepends = libmtp
+ makedepends = libmygpo-qt5
+ makedepends = loudmouth
+ depends = kcmutils
+ depends = kdnssd
+ depends = kirigami2
+ depends = knewstuff
+ depends = ktexteditor
+ depends = libgpod
+ depends = liblastfm-qt5
+ depends = libmtp
+ depends = libmygpo-qt5
+ depends = libofa
+ depends = mariadb
+ depends = phonon-qt5
+ depends = qt5-webengine
+ depends = taglib-extras
+ depends = threadweaver
+ depends = qtscriptbindings
+ optdepends = ifuse: support for Apple iPod Touch and iPhone
+ optdepends = loudmouth: backend needed by mp3tunes for syncing
+ conflicts = amarok
+ conflicts = amarok-git
+ source = amarok-2.9.0.r369.854844c1dc.tar.gz::https://github.com/KDE/amarok/archive/854844c1dc2c5eedf1d9b1a383536e9d9f2e539e.tar.gz
+ source = amarok_mariadb.patch
+ source = amarok_restoreqtbindingsload.patch
+ sha256sums = d670e97d712a710b74a20a46d7d8ba26b5b404d3c2de6a8f2ec49cfa43499c22
+ sha256sums = 029937d925993fa0b3cbe460f6d0c8f9fd624fc8dffff22acbbd3da600720dab
+ sha256sums = 25f3281e3a1bf0d254c5bf40d6416cc8af5755fe6d53ab85d23599c62efcee0f
+
+pkgname = amarok-scripting
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c798b76035b3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Nicola Mori <nicolamori (at) aol (dot) com>
+# Contributor: Fredy GarcĂ­a <frealgagu at gmail dot com>
+# Contributor: Ronald van Haren <ronald@archlinux.org>
+# Contributor: Antonio Rojas <arojas@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=amarok-scripting
+pkgver=2.9.0.r369.854844c1dc
+pkgrel=1
+pkgdesc="The powerful music player for KDE (with Qt bindings for scripting)"
+arch=("x86_64")
+url="http://amarok.kde.org/"
+license=("FDL" "GPL2" "LGPL2.1")
+depends=("kcmutils" "kdnssd" "kirigami2" "knewstuff" "ktexteditor" "libgpod" "liblastfm-qt5" "libmtp" "libmygpo-qt5" "libofa" "mariadb" "phonon-qt5" "qt5-webengine" "taglib-extras" "threadweaver" "qtscriptbindings")
+makedepends=("extra-cmake-modules" "gdk-pixbuf2" "git" "knotifyconfig" "libgpod" "libmtp" "libmygpo-qt5" "loudmouth")
+optdepends=(
+ "ifuse: support for Apple iPod Touch and iPhone"
+ "loudmouth: backend needed by mp3tunes for syncing"
+)
+conflicts=("amarok" "amarok-git")
+_commit="854844c1dc2c5eedf1d9b1a383536e9d9f2e539e"
+source=(
+ "amarok-${pkgver}.tar.gz::https://github.com/KDE/amarok/archive/${_commit}.tar.gz"
+ "amarok_mariadb.patch"
+ "amarok_restoreqtbindingsload.patch"
+)
+sha256sums=(
+ "d670e97d712a710b74a20a46d7d8ba26b5b404d3c2de6a8f2ec49cfa43499c22"
+ "029937d925993fa0b3cbe460f6d0c8f9fd624fc8dffff22acbbd3da600720dab"
+ "25f3281e3a1bf0d254c5bf40d6416cc8af5755fe6d53ab85d23599c62efcee0f"
+)
+
+#git describe --long --tags 2> /dev/null | sed "s/^[A-Za-z\.\-]*//;s/\([^-]*-\)g/r\1/;s/-/./g"
+#source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"{,.sig})
+#validpgpkeys=("D81C0CB38EB725EF6691C385BB463350D6EF31EF") # Heiko Becker <heirecka@exherbo.org>
+
+prepare() {
+ cd "${srcdir}/amarok-${_commit}"
+ patch -Np1 -i "${srcdir}/amarok_mariadb.patch"
+ patch -Np0 -i "${srcdir}/amarok_restoreqtbindingsload.patch"
+
+ mkdir -p "${srcdir}/amarok-${_commit}/build"
+}
+
+build() {
+ cd "${srcdir}/amarok-${_commit}/build"
+ cmake "${srcdir}/amarok-${_commit}" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_TESTING=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}/amarok-${_commit}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/amarok_mariadb.patch b/amarok_mariadb.patch
new file mode 100644
index 000000000000..1789d17c1de0
--- /dev/null
+++ b/amarok_mariadb.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
+index 7aab8ab..a6a59dc 100644
+--- a/cmake/modules/FindMySQL.cmake
++++ b/cmake/modules/FindMySQL.cmake
+@@ -42,7 +42,16 @@ if(MYSQLCONFIG_EXECUTABLE)
+ # At least on OpenSUSE --libmysql-libs doesn't exist, so we just use
+ # MYSQL_LIBRARIES for that. We'll see if that's enough when testing
+ # below.
+- set(MYSQL_EMBEDDED_LIBRARIES ${MYSQL_LIBRARIES})
++ # mysql-config removed --libmysql-libs, but amarok need libmysqld other
++ # than libmysqlclient to run mysql embedded server.
++ find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld libmysqld
++ PATHS
++ $ENV{MYSQL_DIR}/libmysql_r/.libs
++ $ENV{MYSQL_DIR}/lib
++ $ENV{MYSQL_DIR}/lib/mysql
++ PATH_SUFFIXES
++ mysql
++ )
+ else()
+ set(MYSQL_EMBEDDED_LIBRARIES ${MC_MYSQL_EMBEDDED_LIBRARIES})
+ endif()
diff --git a/amarok_restoreqtbindingsload.patch b/amarok_restoreqtbindingsload.patch
new file mode 100644
index 000000000000..da9af9be3eda
--- /dev/null
+++ b/amarok_restoreqtbindingsload.patch
@@ -0,0 +1,30 @@
+--- src/scripting/scriptengine/ScriptImporter.cpp 2019-07-08 04:56:00.000000000 +0200
++++ src/scripting/scriptengine/ScriptImporter.cpp 2019-09-03 11:00:24.337219815 +0200
+@@ -52,9 +52,25 @@
+ bool
+ ScriptImporter::loadQtBinding( const QString& binding )
+ {
+- Q_UNUSED( binding )
++ QStringList availableBindings = m_scriptEngine->availableExtensions();
++ if( availableBindings.contains( binding ) )
++ {
++ if( !m_importedBindings.contains( binding ) )
++ {
++ if( m_scriptEngine->importExtension( binding ).isUndefined() )
++ { // undefined indicates success
++ m_importedBindings << binding;
++ return true;
++ }
++ //else fall through and return false
++ }
++ else
++ return true;
++ }
++ else
++ warning() << __PRETTY_FUNCTION__ << "Binding \"" << binding << "\" could not be found!";
++
+
+- error() << __PRETTY_FUNCTION__ << "Loading Qt bindings in scripts not available in Qt5!";
+ return false;
+ }
+