summaryrefslogtreecommitdiff
path: root/media-sound/sc2mpd
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/sc2mpd')
-rw-r--r--media-sound/sc2mpd/Manifest12
-rw-r--r--media-sound/sc2mpd/files/ohnet.makefile.patch35
-rw-r--r--media-sound/sc2mpd/files/ohnet.optionparser.patch12
-rw-r--r--media-sound/sc2mpd/files/ohnetgenerated.commonmk.patch24
-rw-r--r--media-sound/sc2mpd/files/ohnetgenerated.makefile.patch30
-rw-r--r--media-sound/sc2mpd/metadata.xml8
-rw-r--r--media-sound/sc2mpd/sc2mpd-1.1.4.ebuild113
7 files changed, 234 insertions, 0 deletions
diff --git a/media-sound/sc2mpd/Manifest b/media-sound/sc2mpd/Manifest
new file mode 100644
index 000000000000..d71c57294c93
--- /dev/null
+++ b/media-sound/sc2mpd/Manifest
@@ -0,0 +1,12 @@
+AUX ohnet.makefile.patch 1233 BLAKE2B 1a877c58ec3b37c96dd4ea3830159de8bc3c34cd99223881baf73792569301a3eb82ce5c51e2c943773a4b2a491affa9228994e05d358a674a313b6fe3f14d3f SHA512 d2b99fa95403139a2b79ac4eacd0a1a8581c1a72271a6ae15fa7c3a241ebe58cccdf6a85bba602ace9f572c217f5bf1f01b95a12ad4395b42d4738243dee1b89
+AUX ohnet.optionparser.patch 449 BLAKE2B 55133d193ebb7dc249f71ad8d249b22569c03456e0ad687e3af27e88ed0502e134b8e70128cae4fe1d92b503e52f94c8d567159fca9ff6133f99b25c791044f9 SHA512 fe723ee9f734b5ae3a5d1a2ee3c0cb22b887d154314cc776253d14adff20de86d51a8563ba1dfb2b0f37a9c77e24277d961c45941e23a644f2769a17d050d665
+AUX ohnetgenerated.commonmk.patch 1473 BLAKE2B 6d2d8497fcd7e4e9e0f2210fc24308eab4559f8974f3e6f2d6e39163a54fb7b848455d496b0191e7260c83dc27bdb96e0f1bcbaa124165b3de603b22e5adabea SHA512 a9b6b8e2d23ca661c7590fb55c34b02a248fb4b95b843e4d87fd11ec08b360fcc386d7738fd3a6433bec22cdaaa81932b81342c19d99ac5673dcfb6c29215c9f
+AUX ohnetgenerated.makefile.patch 1138 BLAKE2B a65ff04a64c64ad86625f635990615271a206cb4657fb7eef423a0b04d1718b113eaab0aa57b1b52f7235ec8a1f41dcd6a8f2e949ae45336dd1c55380a19f791 SHA512 4bcd0e5044fd89a51a9be29f2f445f59292a8b36a249f09a74aa9a7ff215b6359be8a526e1ddf9b1c7fab56f6e2453afe5841b543552fe3abf78ce5c84b25e9c
+DIST ohdevtools.d35861.tar.gz 1187475 BLAKE2B 82138d9b64f3172d540402e99b716e9b56bde2133b2565b442bfe6ae6b0e2235226027c4b43b17e3eb005b6f52a4d6a278e0895d267222a63f910ea556e4d76c SHA512 25188c3ae837db12e5c7f349ab01a315f8c68909e3eaa530dc9ba09fb2bcb3cd0a671676b3dd4902ef019b7e331d2acac0978649bce29df585e54d13158ff162
+DIST ohnet.1dd641.tar.gz 20831753 BLAKE2B 82724b7f2cd5cd0dcaa54786394a2560b965f5f16df7bb84037795f1334b8052a4cfeff8f5f39bdc5d7a0ccb2093190c38de987957463d10cac407d9694a6a92 SHA512 67ccdbee6d909df30acb7c89aeba75d3accdbb533dda5abc02c66f867e2fad9a360696d5e28dd1decdc575a1396d026824329450e85e3a3b3e4f7af2e144140a
+DIST ohnetgenerated.e3edb9.tar.gz 1887473 BLAKE2B 1b878dd743f0b45f69c3eb018ddbd64db60285ee8743bb039f9a794a9e0ecdb516e1138ac622fc7cde3462fe5c3cfc006d71d0b22048496c1bc190cc4f34a906 SHA512 9b48d0ff496acfa4313c1efc90e73f1050fee011b1ab301b9268ba4009fca9a47978cbe2f1f0a1d05d7c939f95b4a38560b9f63464305032c20d36af3ade8811
+DIST ohsongcast.3299ea.tar.gz 831313 BLAKE2B aaa5590af288bbf2b358bad613b983418f6648219bba046113a8c712f3a369fee2894c8aa42f96ead16582b96b982d1696b478950e0e3d0ef6c8e3325e5a3214 SHA512 ac1e81166e5b73a943f78c930ef89fc5b71447c7eb8c4cc509c50c686a360a25f75f1651061a653bf995c15377bee4cb98a97665bf27f04f947940a249e12661
+DIST ohtopology.cc09c0.tar.gz 118703 BLAKE2B ef5b560cb2a272586e8755117b5021d67562bda962b0c6240072ad42876ae71f21c81611521d31b01212d2175637244b8513332858aec3d7e713546587111ed0 SHA512 46f1e4ba6b7553b81c939c2ae691ab89e0bf9b565820e8c65b14b6534f3a9240580cb9fd69f46568c5f0c8d105da825b6f9abbf61a64289a4f553a47902b38d4
+DIST sc2mpd-1.1.4.tar.gz 218128 BLAKE2B 71ff5e95d868c40d5c9fc72d65161d97ccc1ed366e7465c038efb646bb4ab581d24dbab7280fb739029bbaec7ff8f5804006a4cdc8a61ad0395acb9da74db95c SHA512 eebd21198ec2a9b0e1122a9b3316eaefd38daa2e6b6aa4c480e8c1fef0a8600a68c386d1957b4cf9203a61bcc63b7842e145073092f30ec2e81cdf1010e9f1ad
+EBUILD sc2mpd-1.1.4.ebuild 4566 BLAKE2B 7bf45b49fbeb40a971898568a8a704605bce5c500997ce7d24d0fb22a5a299af9fedf271565e2ee20bd01fc8104f6404ee906ccf977cbec1704ce15f19757bad SHA512 a38646d513b604ea0237be131adf7992603090e1cdfa12e4f715b2239a73d7d06440a0ecbfe7622e8a6475eb0df3921dc7f227a977a265398d514bc401be5a6d
+MISC metadata.xml 313 BLAKE2B 81be81a3249c77371bf3c159e69a7151fd4763449f1b32cb02de42e774e4e050b45197e0a22dd294b3f9f116c680d18e18c03437bc571952b6739a01f5b04180 SHA512 993a3648e52c72afc8cceb7cf87a3bbf28658f106ca0b12c2e90f098e8d02b6d73f6e1ff728aef86715daae17533a17e6495d8110c59f91e116e84587ef5eddc
diff --git a/media-sound/sc2mpd/files/ohnet.makefile.patch b/media-sound/sc2mpd/files/ohnet.makefile.patch
new file mode 100644
index 000000000000..29a29bcc9bb5
--- /dev/null
+++ b/media-sound/sc2mpd/files/ohnet.makefile.patch
@@ -0,0 +1,35 @@
+diff --git a/Makefile b/Makefile
+index 29f2d6a..038b05e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,12 +82,19 @@ else
+ ifneq (,$(findstring arm,$(gcc_machine)))
+ ifneq (,$(findstring linux-gnueabihf,$(gcc_machine)))
+ detected_openhome_architecture = armhf
++ else ifneq (,$(findstring armv7hl,$(gcc_machine)))
++ # cubox: armv7hl-redhat-linux-gnueabi
++ detected_openhome_architecture = armhf
+ else ifeq (${detected_openhome_system},Qnap)
+ detected_openhome_architecture = x19
+ else
+ detected_openhome_architecture = armel
+ endif
+ endif
++ ifneq (,$(findstring aarch64,$(gcc_machine)))
++ # odroid64: aarch64-linux-gnu
++ detected_openhome_architecture = arm64
++ endif
+ ifneq (,$(findstring i686,$(gcc_machine)))
+ detected_openhome_architecture = x86
+ endif
+@@ -375,6 +382,10 @@ mkdir = mkdir -p
+ rmdir = rm -rf
+ uset4 = no
+
++# This avoids errors in Generated/Devices.mak (they apparently have no
++# consequences anyway because we use make native_only=yes)
++t4 = echo
++
+ ifeq ($(managed_only), yes)
+ build_targets_base = make_obj_dir ohNet.net.dll CpProxyDotNetAssemblies DvDeviceDotNetAssemblies
+ else
diff --git a/media-sound/sc2mpd/files/ohnet.optionparser.patch b/media-sound/sc2mpd/files/ohnet.optionparser.patch
new file mode 100644
index 000000000000..a31657684271
--- /dev/null
+++ b/media-sound/sc2mpd/files/ohnet.optionparser.patch
@@ -0,0 +1,12 @@
+diff --git a/OpenHome/TestFramework/OptionParser.cpp b/OpenHome/TestFramework/OptionParser.cpp
+index fe90233..644fc0b 100644
+--- a/OpenHome/TestFramework/OptionParser.cpp
++++ b/OpenHome/TestFramework/OptionParser.cpp
+@@ -282,6 +282,6 @@ void OptionParser::SetUsage(const TChar* aUsage)
+ {
+ delete iUsage;
+ iUsage = NULL;
+- iUsage = new TChar[strlen(iUsage)];
++ iUsage = new TChar[strlen(aUsage)];
+ (void)strcpy(iUsage, aUsage);
+ }
diff --git a/media-sound/sc2mpd/files/ohnetgenerated.commonmk.patch b/media-sound/sc2mpd/files/ohnetgenerated.commonmk.patch
new file mode 100644
index 000000000000..a4f28f9a7009
--- /dev/null
+++ b/media-sound/sc2mpd/files/ohnetgenerated.commonmk.patch
@@ -0,0 +1,24 @@
+diff -u ./Common.mak ../../openhome/ohNetGenerated/Common.mak
+--- ./Common.mak 2017-09-19 10:51:13.000000000 +0200
++++ ./Common.mak 2017-09-19 13:21:25.984071432 +0200
+@@ -17,20 +17,6 @@
+ $(objdir)ohnet-generated.jar : CpProxyJavaClasses DvDeviceJavaClasses
+ $(jar) $(jarflags) $(objdir)ohnet-generated.jar -C $(objdir) org
+
+-Generated$(dirsep)GenerateSourceFiles.mak : $(tt) OpenHome$(dirsep)Net$(dirsep)Service$(dirsep)Services.xml OpenHome/Net/T4/Templates/UpnpMakeT4.tt
+- $(mkdir) Generated
+- $(t4) -o Generated$(dirsep)GenerateSourceFiles.mak OpenHome/Net/T4/Templates/UpnpMakeT4.tt -a xml:OpenHome/Net/Service/Services.xml
+- @echo Attention: a makefile has been re-generated.
+-
+-Generated$(dirsep)Proxies.mak : $(tt) OpenHome$(dirsep)Net$(dirsep)Service$(dirsep)Services.xml OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt
+- $(mkdir) Generated
+- $(t4) -o Generated$(dirsep)Proxies.mak OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt -a xml:OpenHome/Net/Service/Services.xml
+- @echo Attention: a makefile has been re-generated.
+-
+-Generated$(dirsep)Devices.mak : $(tt) OpenHome$(dirsep)Net$(dirsep)Service$(dirsep)Services.xml OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt
+- $(mkdir) Generated
+- $(t4) -o Generated$(dirsep)Devices.mak OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt -a xml:OpenHome/Net/Service/Services.xml
+- @echo Attention: a makefile has been re-generated.
+
+ native_targets = make_obj_dir copy_build_includes proxies devices
+
diff --git a/media-sound/sc2mpd/files/ohnetgenerated.makefile.patch b/media-sound/sc2mpd/files/ohnetgenerated.makefile.patch
new file mode 100644
index 000000000000..d320cefbd473
--- /dev/null
+++ b/media-sound/sc2mpd/files/ohnetgenerated.makefile.patch
@@ -0,0 +1,30 @@
+diff --git a/Makefile b/Makefile
+index bf7a1ba..49bffaf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -70,14 +70,17 @@ else
+ else ifneq (,$(findstring linux,$(gcc_machine)))
+ detected_openhome_system = Linux
+ endif
+- ifeq ($(gcc_machine),arm-none-linux-gnueabi)
+- detected_openhome_architecture = armel
+- endif
+- ifeq ($(gcc_machine),arm-linux-gnueabi)
+- detected_openhome_architecture = armel
+- endif
+- ifeq ($(gcc_machine),arm-linux-gnueabihf)
+- detected_openhome_architecture = armhf
++ ifneq (,$(findstring arm,$(gcc_machine)))
++ ifneq (,$(findstring linux-gnueabihf,$(gcc_machine)))
++ detected_openhome_architecture = armhf
++ else ifneq (,$(findstring armv7hl,$(gcc_machine)))
++ # cubox: armv7hl-redhat-linux-gnueabi
++ detected_openhome_architecture = armhf
++ else ifeq (${detected_openhome_system},Qnap)
++ detected_openhome_architecture = x19
++ else
++ detected_openhome_architecture = armel
++ endif
+ endif
+ ifneq (,$(findstring i686,$(gcc_machine)))
+ detected_openhome_architecture = x86
diff --git a/media-sound/sc2mpd/metadata.xml b/media-sound/sc2mpd/metadata.xml
new file mode 100644
index 000000000000..6d9ed9356fb5
--- /dev/null
+++ b/media-sound/sc2mpd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>stasibear@gentoo.org</email>
+</maintainer>
+<longdescription>Implements the SongCast protocol for use by upmpdcli and mpd</longdescription>
+</pkgmetadata>
diff --git a/media-sound/sc2mpd/sc2mpd-1.1.4.ebuild b/media-sound/sc2mpd/sc2mpd-1.1.4.ebuild
new file mode 100644
index 000000000000..90ecdf9ac79c
--- /dev/null
+++ b/media-sound/sc2mpd/sc2mpd-1.1.4.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Implements the SongCast protocol for use by upmpdcli and mpd"
+HOMEPAGE="https://www.lesbonscomptes.com/upmpdcli/index.html"
+
+sha_net="1dd6411ffbe59fe09517162fb88e2405adb4990f"
+sha_netgenerated="e3edb912410d4c5a4d5323bb1e9c27660a42d78f"
+sha_topology="cc09c09da4be8d3d04adae5b8f0daaf8450906a3"
+sha_songcast="3299eaedfea34993b79e6d30444792d4fb12a110"
+sha_devtools="d3586187dfa5f0a8b0f3e35e3d1dc50d1c34943d"
+
+SRC_URI="
+ https://www.lesbonscomptes.com/upmpdcli/downloads/${P}.tar.gz
+ https://codeload.github.com/openhome/ohNet/tar.gz/${sha_net}
+ -> ohnet.${sha_net:0:6}.tar.gz
+ https://codeload.github.com/openhome/ohNetGenerated/tar.gz/${sha_netgenerated}
+ -> ohnetgenerated.${sha_netgenerated:0:6}.tar.gz
+ https://codeload.github.com/openhome/ohTopology/tar.gz/${sha_topology}
+ -> ohtopology.${sha_topology:0:6}.tar.gz
+ https://codeload.github.com/openhome/ohSongcast/tar.gz/${sha_songcast}
+ -> ohsongcast.${sha_songcast:0:6}.tar.gz
+ https://codeload.github.com/openhome/ohdevtools/tar.gz/${sha_devtools}
+ -> ohdevtools.${sha_devtools:0:6}.tar.gz
+"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ media-libs/alsa-lib
+ media-libs/libsamplerate
+ net-libs/libmicrohttpd
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd "${WORKDIR}" || die "Couldn't cd to WORKDIR"
+ mkdir openhome || die "Couldn't mkdir openhome"
+ mv ohNet-${sha_net} openhome/ohNet || die "Couldn't mv ohNet"
+ mv ohNetGenerated-${sha_netgenerated} openhome/ohNetGenerated || die "Couldn't mv ohNetGenerated"
+ mv ohdevtools-${sha_devtools} openhome/ohdevtools || die "Couldn't mv ohdevtools"
+ mv ohTopology-${sha_topology} openhome/ohTopology || die "Couldn't mv ohTopology"
+ mv ohSongcast-${sha_songcast} openhome/ohSongcast || die "Couldn't mv ohSongcast"
+
+ cd "${WORKDIR}/openhome/ohNet" || die "Couldn't cd to ohNet dir"
+ epatch "${FILESDIR}/ohnet.makefile.patch"
+ epatch "${FILESDIR}/ohnet.optionparser.patch"
+ sed -i -e 's/ bundle-after-build//' UserTargets.mak || die "Couldn't patch UserTargets.mak"
+
+ cd "${WORKDIR}/openhome/ohNetGenerated" || die "Couldn't cd to ohNetGenerated dir"
+ epatch "${FILESDIR}/ohnetgenerated.makefile.patch"
+ epatch "${FILESDIR}/ohnetgenerated.commonmk.patch"
+ sed -i -e 's/ bundle-after-build//' UserTargets.mak \
+ || die "Couldn't patch generated UserTargets.mak"
+
+ eapply_user
+}
+
+src_configure() {
+ econf "--with-openhome=${WORKDIR}/openhome"
+}
+
+src_compile() {
+ # Begin ohbuild.sh reverse engineer
+
+ cd "${WORKDIR}/openhome/ohNet" || die "Couldn't cd to ohNet dir"
+ make native_only=yes || die "ohnet make failed"
+
+ cd "${WORKDIR}/openhome/ohNetGenerated" || die "Couldn't cd to ohNetGenerated dir"
+ # TODO: get from environment/make target
+ deps="${WORKDIR}/openhome/ohNetGenerated/dependencies/Linux-x64/ohNet-Linux-x64-Release"
+ mkdir -p $deps/{include/ohnet,lib/{ohnet,t4,ui,PyOhNet}} || die "Couldn't mkdir deps"
+ cd $deps || die "Couldn't cd to deps dir"
+
+ ohnet="${WORKDIR}/openhome/ohNet"
+ find "$ohnet/Build" \( -name '*.a' -o -name '*.so' \) \
+ -exec cp '{}' lib ';' \
+ || die "Couldn't cp binary libs"
+
+ cd "$ohnet/Build/Include" || die "Couldn't cd to include"
+ cp -R * "${deps}/include/ohnet" || die "Couldn't cp include"
+ # cd "$ohnet/Build/Tools" || die "Couldn't cd to tools"
+ # cp -R * "${deps}/lib/t4" || die "Couldn't cp tools"
+ cd "$ohnet/OpenHome/Net/T4/Templates" || die "Couldn't cd to templates"
+ cp -R * "${deps}/lib/t4" || die "Couldn't cp templates"
+ cd "$ohnet/OpenHome/Net/Bindings/Js/ControlPoint" || die "Couldn't cd to ui"
+ cp -R * "${deps}/lib/ui" || die "Couldn't cp ui"
+ cd "$ohnet/OpenHome/Net/Bindings/Python/PyOhNet" || die "Couldn't cd to py"
+ cp -R * "${deps}/lib/PyOhNet" || die "Couldn't cp py"
+
+ cd "${WORKDIR}/openhome/ohNetGenerated" || die "Couldn't cd later to ohNetGenerated dir"
+ make native_only=yes || die "ohnetgenerated make failed"
+
+ cd "Build/Include" || die "Couldn't cd later to include"
+ cp -R * "$ohnet/Build/Include" || die "Couldn't cp generated includes"
+
+ cd "${WORKDIR}/openhome/ohTopology" || die "Couldn't cd to ohTopology dir"
+ mkdir -p build/Include/OpenHome/Av || die "Couldn't mkdir av"
+ cp -p OpenHome/Av/*.h build/Include/OpenHome/Av/ || die "Couldn't cp to av"
+
+ cd "${WORKDIR}/openhome/ohSongcast" || die "Couldn't cd to ohSongcast dir"
+ make release=1 Receiver WavSender || die "Failed to build ohSongcast"
+
+ # End ohbuild.sh reverse engineer
+
+ cd "${S}" || die "Failed to cd to source directory"
+ make || die "Failed to make sc2mpd"
+}