All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5] kodi: allow enablement of libamcodec as codec if selected
Date: Sat, 5 Nov 2016 13:16:16 +0100	[thread overview]
Message-ID: <20161105131616.554ec4b0@free-electrons.com> (raw)
In-Reply-To: <20161104154727.19939-1-daggs@gmx.com>

Hello,

On Fri,  4 Nov 2016 17:47:27 +0200, Dagg Stompler wrote:
> allow usage of amcodec if kodi is built and libamcodec is selected
> 
> Signed-off-by: Dagg Stompler <daggs@gmx.com>

Thanks for the new iteration. However, I believe there's a
better/simpler way to achieve this.

> diff --git a/package/kodi/0012-support_libamcodec_cross_compile.patch b/package/kodi/0012-support_libamcodec_cross_compile.patch
> new file mode 100644
> index 0000000..97feb8c
> --- /dev/null
> +++ b/package/kodi/0012-support_libamcodec_cross_compile.patch
> @@ -0,0 +1,24 @@
> +kodi: fix amcodec includes for cross compilation.
> +
> +when building kodi over buildroot with amcodec set, the include paths differs from
> +native installation. this occurs because the prefix is not set.
> +so by supplying the LIBAMCODEC_INCLUDE_PATH upon compilation, this issue is resolved.
> +
> +Signed-off-by: Dagg Stompler <daggs@gmx.com>
> +
> +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in	2016-11-04 11:46:19.000000000 +0200
> ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in	2016-11-04 11:47:13.000000000 +0200
> +@@ -26,8 +26,11 @@ endif
> + ifeq (@USE_LIBAMCODEC@,1)
> + SRCS += AMLCodec.cpp
> + SRCS += DVDVideoCodecAmlogic.cpp
> +-INCLUDES += -I$(prefix)/include/amcodec
> +-INCLUDES += -I$(prefix)/include/amplayer
> ++ifeq (${LIBAMCODEC_INCLUDE_PATH},)
> ++LIBAMCODEC_INCLUDE_PATH=$(prefix)
> ++endif
> ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amcodec
> ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amplayer
> + endif

Just have a patch that deletes those two lines:

> +-INCLUDES += -I$(prefix)/include/amcodec
> +-INCLUDES += -I$(prefix)/include/amplayer

> +else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
> +KODI_DEPENDENCIES += libamcodec
> +KODI_CONF_OPTS += --enable-codec=amcodec
> +KODI_MAKE_OPTS += LIBAMCODEC_INCLUDE_PATH=${STAGING_DIR}/usr

And, then, something like this (it includes reworking existing RPi
related code):

ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
KODI_DEPENDENCIES += rpi-userland
KODI_CONF_OPTS += --with-platform=raspberry-pi --enable-player=omxplayer
KODI_INCLUDES += \
	-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \
	-I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux
KODI_LIBS += -lvcos -lvchostif
endif

...
else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
KODI_DEPENDENCIES += libamcodec
KODI_CONF_OPTS += --enable-codec=amcodec
KODI_INCLUDES += \
	$(STAGING_DIR)/usr/include/amcodec \
	$(STAGING_DIR)/usr/include/amplayer
endif

KODI_CONF_ENV += \
	INCLUDES="$(KODI_INCLUDES)" \
	LIBS="$(KODI_LIBS)"

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-11-05 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 15:47 [Buildroot] [PATCH v5] kodi: allow enablement of libamcodec as codec if selected Dagg Stompler
2016-11-05 12:16 ` Thomas Petazzoni [this message]
2016-11-05 14:32   ` daggs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161105131616.554ec4b0@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.