From patchwork Wed Jul 23 04:40:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 372806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id E28E314019B for ; Wed, 23 Jul 2014 14:41:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 370488B7A3; Wed, 23 Jul 2014 04:41:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w5e65s41M-DV; Wed, 23 Jul 2014 04:40:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 627DC8B6F3; Wed, 23 Jul 2014 04:40:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0E8FB1C214E for ; Wed, 23 Jul 2014 04:40:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 099698B767 for ; Wed, 23 Jul 2014 04:40:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id puJkg5VKjBH6 for ; Wed, 23 Jul 2014 04:40:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9EFEF8B6F3 for ; Wed, 23 Jul 2014 04:40:32 +0000 (UTC) Received: from fwd28.aul.t-online.de (fwd28.aul.t-online.de [172.20.26.133]) by mailout08.t-online.de (Postfix) with SMTP id AC63140F856 for ; Wed, 23 Jul 2014 06:40:30 +0200 (CEST) Received: from fli4l.lan.fli4l (TWaMxkZbQh0Dbo8yB6PQtZtPT2Ym9vZuDk0DXbHxXtMWkv0Rm6ccCozz7Psl3paQPT@[79.247.188.144]) by fwd28.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1X9oLu-1FJDVI0; Wed, 23 Jul 2014 06:40:30 +0200 Received: from fli4lbuild64.lan.fli4l ([192.168.1.51]:51879) by fli4l.lan.fli4l with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80.1) (envelope-from ) id 1X9oLt-0003i6-JV; Wed, 23 Jul 2014 06:40:30 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Wed, 23 Jul 2014 06:40:23 +0200 Message-Id: <1406090425-5925-8-git-send-email-bernd.kuhls@t-online.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1406090425-5925-1-git-send-email-bernd.kuhls@t-online.de> References: <1406090425-5925-1-git-send-email-bernd.kuhls@t-online.de> X-ID: TWaMxkZbQh0Dbo8yB6PQtZtPT2Ym9vZuDk0DXbHxXtMWkv0Rm6ccCozz7Psl3paQPT X-TOI-MSGID: db2a1649-6589-42a5-8ebb-3da1f3443350 Cc: Bernd Kuhls Subject: [Buildroot] [PATCH v15 7/9] xbmc: Add X.org/OpenGL support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net - on ARM xbmc only supports EGL/GLES https://github.com/xbmc/xbmc/blob/Gotham/configure.in#L695 - rsxs depends on OpenGL https://github.com/xbmc/xbmc/blob/Gotham/configure.in#L1469 so include a compile fix, courtesy of https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/xbmc/package.mk#L109 Signed-off-by: Bernd Kuhls --- package/xbmc/Config.in | 31 ++++++++++++++++++++++++++++--- package/xbmc/xbmc.mk | 32 ++++++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/package/xbmc/Config.in b/package/xbmc/Config.in index d71a15e..08b0a0f 100644 --- a/package/xbmc/Config.in +++ b/package/xbmc/Config.in @@ -2,9 +2,26 @@ comment "xbmc needs a toolchain w/ C++, IPv6, largefile, threads, wchar" depends on BR2_arm || BR2_i386 || BR2_x86_64 depends on !BR2_INET_IPV6 || !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR +config BR2_PACKAGE_XBMC_EGL_GLES + bool + default y + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGLES + depends on !BR2_PACKAGE_XBMC_GL # prefer GL if available + +config BR2_PACKAGE_XBMC_GL + bool + default y + depends on BR2_PACKAGE_HAS_LIBGL + depends on !BR2_arm # xbmc needs egl/gles on arm + +comment "xbmc needs an OpenGL or an openGL ES and EGL backend" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_XBMC_GL && !BR2_PACKAGE_XBMC_EGL_GLES + comment "xbmc requires an OpenGL ES and EGL backend" - depends on BR2_arm || BR2_i386 || BR2_x86_64 - depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES + depends on BR2_arm + depends on !BR2_PACKAGE_XBMC_EGL_GLES menuconfig BR2_PACKAGE_XBMC bool "xbmc" @@ -22,6 +39,8 @@ menuconfig BR2_PACKAGE_XBMC select BR2_PACKAGE_LIBCDIO select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBFRIBIDI + select BR2_PACKAGE_LIBGLEW if BR2_PACKAGE_XBMC_GL + select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_XBMC_GL select BR2_PACKAGE_LIBGCRYPT select BR2_PACKAGE_LIBID3TAG select BR2_PACKAGE_LIBMAD @@ -51,17 +70,23 @@ menuconfig BR2_PACKAGE_XBMC select BR2_PACKAGE_PYTHON_UNICODEDATA select BR2_PACKAGE_PYTHON_ZLIB select BR2_PACKAGE_READLINE + select BR2_PACKAGE_SDL if BR2_PACKAGE_XBMC_GL + select BR2_PACKAGE_SDL_X11 if BR2_PACKAGE_XBMC_GL + select BR2_PACKAGE_SDL_IMAGE if BR2_PACKAGE_XBMC_GL select BR2_PACKAGE_SQLITE select BR2_PACKAGE_TAGLIB select BR2_PACKAGE_TIFF select BR2_PACKAGE_TINYXML + select BR2_PACKAGE_XLIB_XMU if BR2_PACKAGE_XBMC_GL # needed by rsxs screensaver + select BR2_PACKAGE_XLIB_XRANDR if BR2_PACKAGE_XBMC_GL + select BR2_PACKAGE_XLIB_XT if BR2_PACKAGE_XBMC_GL # needed by rsxs screensaver select BR2_PACKAGE_YAJL select BR2_PACKAGE_ZLIB depends on BR2_INET_IPV6 depends on BR2_INSTALL_LIBSTDCPP depends on BR2_LARGEFILE depends on BR2_TOOLCHAIN_HAS_THREADS - depends on BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_XBMC_EGL_GLES || BR2_PACKAGE_XBMC_GL depends on BR2_USE_MMU # python depends on BR2_USE_WCHAR depends on BR2_arm || BR2_i386 || BR2_x86_64 diff --git a/package/xbmc/xbmc.mk b/package/xbmc/xbmc.mk index 7cba29a..82158ae 100644 --- a/package/xbmc/xbmc.mk +++ b/package/xbmc/xbmc.mk @@ -15,7 +15,7 @@ XBMC_LICENSE_FILES = LICENSE.GPL # http://wiki.xbmc.org/index.php?title=TexturePacker XBMC_DEPENDENCIES = host-gawk host-gettext host-gperf host-infozip host-lzo host-sdl_image host-swig XBMC_DEPENDENCIES += boost bzip2 expat flac fontconfig freetype jasper jpeg \ - libass libcdio libcurl libegl libfribidi libgcrypt libgles libmad libmodplug libmpeg2 \ + libass libcdio libcurl libfribidi libgcrypt libmad libmodplug libmpeg2 \ libogg libplist libpng libsamplerate libungif libvorbis libxml2 libxslt lzo ncurses \ openssl pcre python readline sqlite taglib tiff tinyxml yajl zlib @@ -44,7 +44,6 @@ XBMC_CONF_OPT += \ --disable-crystalhd \ --disable-debug \ --disable-dvdcss \ - --disable-gl \ --disable-hal \ --disable-joystick \ --disable-mysql \ @@ -52,14 +51,10 @@ XBMC_CONF_OPT += \ --disable-optical-drive \ --disable-projectm \ --disable-pulse \ - --disable-sdl \ --disable-ssh \ --disable-vaapi \ --disable-vdpau \ --disable-vtbdecoder \ - --disable-x11 \ - --disable-xrandr \ - --enable-gles \ --enable-optimizations ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) @@ -88,9 +83,34 @@ else XBMC_CONF_OPT += --disable-libmp3lame endif +# quote from xbmc/configure.in: "GLES overwrites GL if both set to yes." +# we choose the opposite because opengl offers more features, like libva support +ifeq ($(BR2_PACKAGE_XBMC_GL),y) +XBMC_DEPENDENCIES += libglew libglu libgl sdl_image xlib_libX11 xlib_libXext \ + xlib_libXmu xlib_libXrandr xlib_libXt +XBMC_CONF_OPT += --enable-gl --enable-sdl --enable-x11 --enable-xrandr--disable-gles +# fix rsxs compile +# make sure target libpng-config is used, options taken from rsxs-0.9/acinclude.m4 +XBMC_CONF_ENV += \ + jm_cv_func_gettimeofday_clobber=no \ + mac_cv_pkg_png=$(STAGING_DIR)/usr/bin/libpng-config \ + mac_cv_pkg_cppflags="`$(STAGING_DIR)/usr/bin/libpng-config --I_opts --cppflags`" \ + mac_cv_pkg_cxxflags="`$(STAGING_DIR)/usr/bin/libpng-config --ccopts`" \ + mac_cv_pkg_ldflags="`$(STAGING_DIR)/usr/bin/libpng-config --L_opts --R_opts`" \ + mac_cv_pkg_libs="`$(STAGING_DIR)/usr/bin/libpng-config --libs`" +XBMC_CONF_OPT += --enable-rsxs +else +XBMC_CONF_OPT += --disable-gl --disable-rsxs --disable-sdl --disable-x11 --disable-xrandr +ifeq ($(BR2_PACKAGE_XBMC_EGL_GLES),y) +XBMC_DEPENDENCIES += libegl libgles +XBMC_CONF_OPT += --enable-gles XBMC_CONF_ENV += \ CFLAGS="$(TARGET_CFLAGS) $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)" \ CXXFLAGS="$(TARGET_CXXFLAGS) $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)" +else +XBMC_CONF_OPT += --disable-gles +endif +endif ifeq ($(BR2_PACKAGE_XBMC_LIBUSB),y) XBMC_DEPENDENCIES += libusb-compat