Skip to contentSkip to conversation

miraclecast: new package

PATCH New Ryan Barnett 3 participants 4 messages Apr 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 miraclecast: new package

---

Miraclecast has a heavy dependancy on systemd. The only way that I could get systemd to install all the header files for miraclecast was to enable all features + kdbus (kdbus is called out in their documentation).

---
 package/Config.in                  |  1 +
 package/miraclecast/Config.in      | 22 ++++++++++++++++++++++
 package/miraclecast/miraclecast.mk | 14 ++++++++++++++
 package/systemd/systemd.mk         |  5 +++++
 4 files changed, 42 insertions(+)
 create mode 100644 package/miraclecast/Config.in
 create mode 100644 package/miraclecast/miraclecast.mk
package/Config.in +1 -0
index f00a18f..d2ae661 100644
@@ -20,6 +20,7 @@ menu "Audio and video applications"
 	source "package/lame/Config.in"
 	source "package/libvpx/Config.in"
 	source "package/madplay/Config.in"
+	source "package/miraclecast/Config.in"
 	source "package/mjpegtools/Config.in"
 	source "package/modplugtools/Config.in"
 	source "package/mpd/Config.in"
package/miraclecast/Config.in new file +22 -0
new file mode 100644
index 0000000..fbba349
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_MIRACLECAST
+	bool "miraclecast"
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_USE_WCHAR # glib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
+	depends on BR2_USE_MMU # glib2
+	select BR2_PACKAGE_GSTREAMER
+	select BR2_PACKAGE_READLINE
+	select BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
+	help
+	  The MiracleCast project provides software to connect external
+	  monitors to your system via Wifi. It is compatible to the
+	  Wifi-Display specification also known as Miracast. MiracleCast
+	  implements the Display-Source as well as Display-Sink side.
+
+	  https://github.com/albfan/miraclecast
+
+comment "miraclecast needs a glibc toolchain w/ threads, wchar and systemd"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
+		!BR2_PACKAGE_SYSTEMD || !BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_MMU
package/miraclecast/miraclecast.mk new file +14 -0
new file mode 100644
index 0000000..4f649a7
@@ -0,0 +1,14 @@
+################################################################################
+#
+# miraclecast
+#
+################################################################################
+
+MIRACLECAST_VERSION = 8b61f733da124ccbfd1b85e188581fad1c41c1e1
+MIRACLECAST_SITE = $(call github,albfan,miraclecast,$(MIRACLECAST_VERSION))
+MIRACLECAST_DEPENDENCIES = systemd gstreamer readline
+MIRACLECAST_LICENSE = LGPLv2.1+ GPLv2 (gdhcp) GPLv2.1 (htable)
+MIRACLECAST_LICENSE_FILES = COPYING LICENSE_gdhcp LICENSE_htable LICENSE_lgpl
+MIRACLECAST_AUTORECONF = YES
+
+$(eval $(autotools-package))
package/systemd/systemd.mk +5 -0
index 98bda02..a94ce04 100644
@@ -77,6 +77,11 @@ else
 SYSTEMD_CONF_OPTS += --disable-seccomp
 endif
 
+ifeq ($(BR2_PACKAGE_MIRACLECAST),y)
+# Must enable kdbus in order to get sd-events.h in staging
+SYSTEMD_CONF_OPTS += --enable-kdbus
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
 SYSTEMD_DEPENDENCIES += \
 	xz 		\
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 miraclecast: new package

Hi Ryan,

package/systemd/systemd.mk else · line 83

Quoted 12 lines · Ryan Barnett
package/systemd/systemd.mk +4 -0
index 98bda02..a94ce04 100644
@@ -77,6 +77,11 @@ else
 SYSTEMD_CONF_OPTS += --disable-seccomp
 endif
 
+ifeq ($(BR2_PACKAGE_MIRACLECAST),y)
+# Must enable kdbus in order to get sd-events.h in staging
+SYSTEMD_CONF_OPTS += --enable-kdbus
+endif

This looks somewhat unusual. And besides, kdbus should be a useful feature on its own right. So why not add a BR2_PACKAGE_SYSTEMD_KDBUS option, and have BR2_PACKAGE_MIRACLECAST select that? Setting the right kernel dependency for BR2_PACKAGE_SYSTEMD_KDBUS would be an interesting question, though.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 miraclecast: new package

Hi Baruch,

Quoted 11 lines · Baruch Siach

Hi Ryan,

Quoted 8 lines · Ryan Barnett
package/systemd/systemd.mk +0 -0
index 98bda02..a94ce04 100644
@@ -77,6 +77,11 @@ else
 SYSTEMD_CONF_OPTS += --disable-seccomp
 endif
 
Quoted 9 lines

package/systemd/systemd.mk else · line 83

Quoted 4 lines
package/systemd/systemd.mk +4 -0
+ifeq ($(BR2_PACKAGE_MIRACLECAST),y)
+# Must enable kdbus in order to get sd-events.h in staging
+SYSTEMD_CONF_OPTS += --enable-kdbus
+endif

This looks somewhat unusual. And besides, kdbus should be a useful feature on its own right. So why not add a BR2_PACKAGE_SYSTEMD_KDBUS option, and have BR2_PACKAGE_MIRACLECAST select that? Setting the right kernel dependency for BR2_PACKAGE_SYSTEMD_KDBUS would be an interesting question, though.

I had this same idea an hour or so after submitting this patch. I wasn't really happy with what I sent but I blanking at the time. The miraclecast package is interesting because if I just pass the --enable-kdbus when I build systemd, it doesn't install that sd-events.h file. Here is what they say in miraclecast's documentation:

systemd: A system management daemon. It is used for device-management (udev), dbus management (sd-bus) and service management. Systemd must be compiled with --enable-kdbus, even though kdbus isn't used, but only the independent, experimental sd-libraries. required:

Quoted 1 line

=systemd-213

I will work on a v2 of this tonight but thanks for the feedback and the suggestion.

Thanks,
-Ryan

#3 lore raw

PATCH 1/1 miraclecast: new package

In reply to Ryan Barnett

Ryan, All,

Miraclecast... Mmmm! Cookie! :-)

On 2015-04-02 22:10 -0500, Ryan Barnett spake thusly:

Quoted 1 line

[--SNIP--]

package/miraclecast/Config.in line 7

Quoted 13 lines
package/miraclecast/Config.in new file +7 -0
new file mode 100644
index 0000000..fbba349
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_MIRACLECAST
+	bool "miraclecast"
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_USE_WCHAR # glib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
+	depends on BR2_USE_MMU # glib2

You forgot to select glib2. Even if gstreamer needs it, miraclecast needs glib for itself, too, so you need to select it.

package/miraclecast/Config.in line 8

Quoted 1 line
package/miraclecast/Config.in new file +1 -0
+	select BR2_PACKAGE_GSTREAMER

Don't you also need at least some codecs?

Looking at res/test_viewer.sh, it seems you need at least those:
udpsrc rtpjitterbuffer rtpmp2tdepay tsdemux h264parse avdec_h264 autovideosink

Quoted 4 lines
package/miraclecast/Config.in new file +4 -0
+	select BR2_PACKAGE_READLINE
+	select BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
+	help
+	  The MiracleCast project provides software to connect external

package/miraclecast/Config.in line 22

Quoted 10 lines
package/miraclecast/Config.in new file +10 -0
+	  monitors to your system via Wifi. It is compatible to the
+	  Wifi-Display specification also known as Miracast. MiracleCast
+	  implements the Display-Source as well as Display-Sink side.
+
+	  https://github.com/albfan/miraclecast
+
+comment "miraclecast needs a glibc toolchain w/ threads, wchar and systemd"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || \
+		!BR2_PACKAGE_SYSTEMD || !BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_MMU

comment "miraclecast needs systemd and a glibc toolchain w/ threads, wchar"

        depends on BR2_USE_MMU
        depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_USE_WCHAR \
                || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_SYSTEMD
Quoted 8 lines
package/miraclecast/miraclecast.mk new file +2 -0
new file mode 100644
index 0000000..4f649a7
@@ -0,0 +1,14 @@
+################################################################################
+#

package/miraclecast/miraclecast.mk line 12

Quoted 10 lines
package/miraclecast/miraclecast.mk new file +10 -0
+# miraclecast
+#
+################################################################################
+
+MIRACLECAST_VERSION = 8b61f733da124ccbfd1b85e188581fad1c41c1e1
+MIRACLECAST_SITE = $(call github,albfan,miraclecast,$(MIRACLECAST_VERSION))
+MIRACLECAST_DEPENDENCIES = systemd gstreamer readline
+MIRACLECAST_LICENSE = LGPLv2.1+ GPLv2 (gdhcp) GPLv2.1 (htable)
+MIRACLECAST_LICENSE_FILES = COPYING LICENSE_gdhcp LICENSE_htable LICENSE_lgpl
+MIRACLECAST_AUTORECONF = YES

Please comment on why this is needed, like:

# Straight out of the repository, no ./configure MIRACLECAST_AUTORECONF = YES

package/systemd/systemd.mk else · line 83

Quoted 13 lines
package/miraclecast/miraclecast.mk new file +1 -0
+$(eval $(autotools-package))
package/systemd/systemd.mk +4 -0
index 98bda02..a94ce04 100644
@@ -77,6 +77,11 @@ else
 SYSTEMD_CONF_OPTS += --disable-seccomp
 endif
 
+ifeq ($(BR2_PACKAGE_MIRACLECAST),y)
+# Must enable kdbus in order to get sd-events.h in staging
+SYSTEMD_CONF_OPTS += --enable-kdbus
+endif

I won't repeat what's already been said by Baruch, since I agree with what he said.

/me is looking forward to seeing that integrated! :-)

Regards,
Yann E. MORIN.

Quoted 10 lines
package/systemd/systemd.mk +0 -0
 ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
 SYSTEMD_DEPENDENCIES += \
 	xz 		\
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'