All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] libamcodec: New Package
@ 2016-06-09  7:46 Dagg Stompler
  2016-06-09  7:46 ` [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation Dagg Stompler
  2016-06-09  8:18 ` [Buildroot] [PATCH 1/2] libamcodec: New Package Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Dagg Stompler @ 2016-06-09  7:46 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
 package/Config.in                                  |  1 +
 .../libamcodec/0001-fix_flags_in_makefile.patch    | 70 ++++++++++++++++++++++
 package/libamcodec/Config.in                       | 13 ++++
 package/libamcodec/libamcodec.hash                 |  2 +
 package/libamcodec/libamcodec.mk                   | 33 ++++++++++
 5 files changed, 119 insertions(+)
 create mode 100644 package/libamcodec/0001-fix_flags_in_makefile.patch
 create mode 100644 package/libamcodec/Config.in
 create mode 100644 package/libamcodec/libamcodec.hash
 create mode 100644 package/libamcodec/libamcodec.mk

diff --git a/package/Config.in b/package/Config.in
index de9573e..1af5d6e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1087,6 +1087,7 @@ endmenu
 
 menu "Multimedia"
 	source "package/bitstream/Config.in"
+	source "package/libamcodec/Config.in"
 	source "package/libass/Config.in"
 	source "package/libbluray/Config.in"
 	source "package/libdcadec/Config.in"
diff --git a/package/libamcodec/0001-fix_flags_in_makefile.patch b/package/libamcodec/0001-fix_flags_in_makefile.patch
new file mode 100644
index 0000000..e64c4d7
--- /dev/null
+++ b/package/libamcodec/0001-fix_flags_in_makefile.patch
@@ -0,0 +1,70 @@
+--- a/amcodec/Makefile	2016-06-02 12:06:53.000000000 +0300
++++ b/amcodec/Makefile	2016-06-02 12:07:34.000000000 +0300
+@@ -27,12 +27,12 @@ TARGET?=libamcodec.so
+ 
+ DIRS=audio_ctl/ codec/
+ 
+-LDFLAGS=  -O2  -L$(LIB_DIR)  -lm -lc  -shared -Wl,--shared -Wl,-soname,$(TARGET)$(LIB_VERSION)
++override LDFLAGS+=  -O2  -L$(LIB_DIR)  -lm -lc  -shared -Wl,--shared -Wl,-soname,$(TARGET)$(LIB_VERSION)
+ 
+ #INCLUDE=$(DIRS:%/=-I$(SRC)/%/include)
+ INCLUDE=${SRCTREE}/include/ 
+ #CFLAGS=-O0  -gdwarf-2  -g
+-CFLAGS=-O2 -g  -I$(SRC)/include  -I${SRCTREE}/audio_ctl -I${SRCTREE}/codec -I${SRCTREE}/../amadec/include -fPIC
++override CFLAGS+=-O2 -g  -I$(SRC)/include  -I${SRCTREE}/audio_ctl -I${SRCTREE}/codec -I${SRCTREE}/../amadec/include -fPIC
+ 
+ 
+ 
+--- a/amavutils/Makefile	2016-06-02 11:48:11.000000000 +0300
++++ b/amavutils/Makefile	2016-06-02 11:46:14.000000000 +0300
+@@ -8,13 +8,13 @@ TARGET=libamavutils.so
+ 
+ INSTALL_DIR=${LIB_DIR}/aml_libs
+ 
+-LDFLAGS += -shared -lpthread -lm -lrt
++override LDFLAGS += -shared -lpthread -lm -lrt
+ 
+ TOPDIR=$(shell pwd)
+ SRC?=$(TOPDIR)
+ 
+-CFLAGS+=-O2 -fPIC -g
+-CFLAGS+=-I$(SRC) -I$(SRC)/include -I$(SRC)/../amcodec/include -L${LIB_DIR} -I$(HEADERS_DIR)
++override CFLAGS+=-O2 -fPIC -g
++override CFLAGS+=-I$(SRC) -I$(SRC)/include -I$(SRC)/../amcodec/include -L${LIB_DIR} -I$(HEADERS_DIR)
+ 
+ 
+ 
+--- a/amadec/Makefile	2016-06-02 12:03:48.000000000 +0300
++++ b/amadec/Makefile	2016-06-02 12:04:11.000000000 +0300
+@@ -10,14 +10,14 @@ TARGET=libamadec.so
+ 
+ INSTALL_DIR=$(LIB_DIR)/aml_libs
+ 
+-LDFLAGS += -shared -lpthread -lm -lasound -lrt
++override LDFLAGS += -shared -lpthread -lm -lasound -lrt
+ 
+ TOPDIR=$(shell pwd)
+ SRC?=$(TOPDIR)
+ 
+-CFLAGS+=-O2 -fPIC -g
+-CFLAGS+=-I$(SRC) -I$(SRC)/include -I$(SRC)/../amavutils/include -I$(SRC)/../amplayer/player/include -I${HEADERS_DIR} -L${LIB_DIR}
+-CFLAGS+=-DALSA_OUT
++override CFLAGS+=-O2 -fPIC -g
++override CFLAGS+=-I$(SRC) -I$(SRC)/include -I$(SRC)/../amavutils/include -I$(SRC)/../amplayer/player/include -I${HEADERS_DIR} -L${LIB_DIR}
++override CFLAGS+=-DALSA_OUT
+ 
+ ifdef DOLBY_UDC
+     CFLAGS+=-DDOLBY_USE_ARMDEC
+--- a/amcodec/rules.mk	2016-06-04 15:49:31.000000000 +0300
++++ b/amcodec/rules.mk	2016-06-04 15:49:41.000000000 +0300
+@@ -2,8 +2,8 @@
+ 
+ 
+ dir_mk=$(Q)echo "MAKE $(1)";\
+-	$(MAKE) -C ${1} -f ${SRCTREE}/depends.mk;\
+-	$(MAKE) -C ${1} -f ${SRCTREE}/dir.mk
++	$(MAKE) -C ${1} -f ${SRCTREE}/depends.mk CFLAGS="$(CFLAGS)";\
++	$(MAKE) -C ${1} -f ${SRCTREE}/dir.mk CFLAGS="$(CFLAGS)"
+ 
+ c_mk=$(Q)echo "CC  $(1)";\
+ 		$(CC) $(CFLAGS)  $(EXT_CFLAGS) -c  $(1) 
diff --git a/package/libamcodec/Config.in b/package/libamcodec/Config.in
new file mode 100644
index 0000000..52778ba
--- /dev/null
+++ b/package/libamcodec/Config.in
@@ -0,0 +1,13 @@
+comment "libamcodec needs a toolchain w/ threads"
+	depends on BR2_arm || BR2_aarch64
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBAMCODEC
+	bool "libamcodec"
+	depends on BR2_arm || BR2_aarch64
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
+	select BR2_PACKAGE_ALSA_LIB
+	help
+	    Interface library for Amlogic media codecs
+
+	    https://github.com/mdrjr/c2_aml_libs.git
diff --git a/package/libamcodec/libamcodec.hash b/package/libamcodec/libamcodec.hash
new file mode 100644
index 0000000..3a0055f
--- /dev/null
+++ b/package/libamcodec/libamcodec.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 44580255c63bde1544b1376bc8d33f73ef0c634afda5065455a01b77f6e2729b  libamcodec-ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d.tar.gz
diff --git a/package/libamcodec/libamcodec.mk b/package/libamcodec/libamcodec.mk
new file mode 100644
index 0000000..1e0bcb6
--- /dev/null
+++ b/package/libamcodec/libamcodec.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# libamcodec
+#
+################################################################################
+
+LIBAMCODEC_VERSION = ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d
+LIBAMCODEC_SITE = $(call github,mdrjr,c2_aml_libs,$(LIBAMCODEC_VERSION))
+LIBAMCODEC_DEPENDENCIES = alsa-lib
+
+# This package uses the M_PREFIX variable to construct the header and
+# # library paths used when compiling
+define LIBAMCODEC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amavutils M_PREFIX="$(STAGING_DIR)/usr"
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amadec M_PREFIX="$(STAGING_DIR)/usr"
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amcodec PREFIX="$(STAGING_DIR)"
+endef
+
+define LIBAMCODEC_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/amavutils/libamavutils.so $(STAGING_DIR)/usr/lib/libamavutils.so
+	$(INSTALL) -D -m 0555 $(@D)/amadec/libamadec.so $(STAGING_DIR)/usr/lib/libamadec.so
+	$(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(STAGING_DIR)/usr/lib/libamcodec.so
+	mkdir -p $(STAGING_DIR)/usr/include/amcodec
+	cp -rf $(@D)/amcodec/include/* $(STAGING_DIR)/usr/include/amcodec
+endef
+
+define LIBAMCODEC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/amavutils/libamavutils.so $(TARGET_DIR)/usr/lib/libamavutils.so
+	$(INSTALL) -D -m 0555 $(@D)/amadec/libamadec.so $(TARGET_DIR)/usr/lib/libamadec.so
+	$(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(TARGET_DIR)/usr/lib/libamcodec.so
+endef
+									    
+$(eval $(generic-package))
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation.
  2016-06-09  7:46 [Buildroot] [PATCH 1/2] libamcodec: New Package Dagg Stompler
@ 2016-06-09  7:46 ` Dagg Stompler
  2016-06-09  8:19   ` Thomas Petazzoni
  2016-06-09  8:18 ` [Buildroot] [PATCH 1/2] libamcodec: New Package Thomas Petazzoni
  1 sibling, 1 reply; 7+ messages in thread
From: Dagg Stompler @ 2016-06-09  7:46 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
 package/kodi/kodi.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index e163c24..d0b2c22 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -56,6 +56,9 @@ endif
 ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y)
 KODI_DEPENDENCIES += libfslvpuwrap
 KODI_CONF_OPTS += --enable-codec=imxvpu
+else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
+KODI_DEPENDENCIES += libamcodec
+KODI_CONF_OPTS += --enable-codec=amcodec
 endif
 
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/2] libamcodec: New Package
  2016-06-09  7:46 [Buildroot] [PATCH 1/2] libamcodec: New Package Dagg Stompler
  2016-06-09  7:46 ` [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation Dagg Stompler
@ 2016-06-09  8:18 ` Thomas Petazzoni
  2016-06-09  8:38   ` daggs
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-06-09  8:18 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  9 Jun 2016 10:46:43 +0300, Dagg Stompler wrote:

> diff --git a/package/libamcodec/0001-fix_flags_in_makefile.patch b/package/libamcodec/0001-fix_flags_in_makefile.patch
> new file mode 100644
> index 0000000..e64c4d7
> --- /dev/null
> +++ b/package/libamcodec/0001-fix_flags_in_makefile.patch

Patches need a description + Signed-off-by. Since the package is
fetched from Git, please make it a Git formatted patch (i.e make a Git
commit, and run "git format-patch HEAD^").

> diff --git a/package/libamcodec/libamcodec.mk b/package/libamcodec/libamcodec.mk
> new file mode 100644
> index 0000000..1e0bcb6
> --- /dev/null
> +++ b/package/libamcodec/libamcodec.mk
> @@ -0,0 +1,33 @@
> +################################################################################
> +#
> +# libamcodec
> +#
> +################################################################################
> +
> +LIBAMCODEC_VERSION = ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d
> +LIBAMCODEC_SITE = $(call github,mdrjr,c2_aml_libs,$(LIBAMCODEC_VERSION))
> +LIBAMCODEC_DEPENDENCIES = alsa-lib

Has the license situation been resolved? I know you contacted upstream
about his. Any feedback?

> +
> +# This package uses the M_PREFIX variable to construct the header and

M_PREFIX or PREFIX

(you use PREFIX when building in the amcodec subdirectory)

> +# # library paths used when compiling

duplicate # sign.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation.
  2016-06-09  7:46 ` [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation Dagg Stompler
@ 2016-06-09  8:19   ` Thomas Petazzoni
  2016-06-09  8:39     ` daggs
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-06-09  8:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  9 Jun 2016 10:46:44 +0300, Dagg Stompler wrote:
> Signed-off-by: Dagg Stompler <daggs@gmx.com>

The commit log should rather look like:

	kodi: enable optional dependency on libamcodec

	This is based on what LibreELEC is doing.

Indeed, the commit title should always have the form:

	<package>: <description>.

Thanks!

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/2] libamcodec: New Package
  2016-06-09  8:18 ` [Buildroot] [PATCH 1/2] libamcodec: New Package Thomas Petazzoni
@ 2016-06-09  8:38   ` daggs
  2016-06-09  8:47     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: daggs @ 2016-06-09  8:38 UTC (permalink / raw)
  To: buildroot

Greetings,
> 
> On Thu,  9 Jun 2016 10:46:43 +0300, Dagg Stompler wrote:
> 
> > diff --git a/package/libamcodec/0001-fix_flags_in_makefile.patch b/package/libamcodec/0001-fix_flags_in_makefile.patch
> > new file mode 100644
> > index 0000000..e64c4d7
> > --- /dev/null
> > +++ b/package/libamcodec/0001-fix_flags_in_makefile.patch
> 
> Patches need a description + Signed-off-by. Since the package is
> fetched from Git, please make it a Git formatted patch (i.e make a Git
> commit, and run "git format-patch HEAD^").
> 
ok, I'll do that.

> > diff --git a/package/libamcodec/libamcodec.mk b/package/libamcodec/libamcodec.mk
> > new file mode 100644
> > index 0000000..1e0bcb6
> > --- /dev/null
> > +++ b/package/libamcodec/libamcodec.mk
> > @@ -0,0 +1,33 @@
> > +################################################################################
> > +#
> > +# libamcodec
> > +#
> > +################################################################################
> > +
> > +LIBAMCODEC_VERSION = ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d
> > +LIBAMCODEC_SITE = $(call github,mdrjr,c2_aml_libs,$(LIBAMCODEC_VERSION))
> > +LIBAMCODEC_DEPENDENCIES = alsa-lib
> 
> Has the license situation been resolved? I know you contacted upstream
> about his. Any feedback?
> 
not yet, I can try to contact the dev in charge again.

> > +
> > +# This package uses the M_PREFIX variable to construct the header and
> 
> M_PREFIX or PREFIX
> 
> (you use PREFIX when building in the amcodec subdirectory)
> 
update the comment you mean?

> > +# # library paths used when compiling
> 
> duplicate # sign.
> 
will fix.

Dagg.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation.
  2016-06-09  8:19   ` Thomas Petazzoni
@ 2016-06-09  8:39     ` daggs
  0 siblings, 0 replies; 7+ messages in thread
From: daggs @ 2016-06-09  8:39 UTC (permalink / raw)
  To: buildroot

Greetings,
> 
> On Thu,  9 Jun 2016 10:46:44 +0300, Dagg Stompler wrote:
> > Signed-off-by: Dagg Stompler <daggs@gmx.com>
> 
> The commit log should rather look like:
> 
> 	kodi: enable optional dependency on libamcodec
> 
> 	This is based on what LibreELEC is doing.
> 
> Indeed, the commit title should always have the form:
> 
> 	<package>: <description>.
> 
> Thanks!
> 

will resend.

Dagg.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/2] libamcodec: New Package
  2016-06-09  8:38   ` daggs
@ 2016-06-09  8:47     ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-06-09  8:47 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 9 Jun 2016 10:38:03 +0200, daggs wrote:

> > Has the license situation been resolved? I know you contacted upstream
> > about his. Any feedback?
> >   
> not yet, I can try to contact the dev in charge again.

Maybe add a:

LIBAMCODEC_LICENSE = Unclear

for the moment ?

> > > +# This package uses the M_PREFIX variable to construct the header and  
> > 
> > M_PREFIX or PREFIX
> > 
> > (you use PREFIX when building in the amcodec subdirectory)
> >   
> update the comment you mean?

Yes.

Thanks,

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-09  8:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09  7:46 [Buildroot] [PATCH 1/2] libamcodec: New Package Dagg Stompler
2016-06-09  7:46 ` [Buildroot] [PATCH 2/2] enable amcodec if it is set in the config. based on the libreelec implementation Dagg Stompler
2016-06-09  8:19   ` Thomas Petazzoni
2016-06-09  8:39     ` daggs
2016-06-09  8:18 ` [Buildroot] [PATCH 1/2] libamcodec: New Package Thomas Petazzoni
2016-06-09  8:38   ` daggs
2016-06-09  8:47     ` Thomas Petazzoni

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.