RE: [PATCH] libgencec: Add userspace library for the generic CEC kernel interface

2015-05-06 Thread Kamil Debski
Hi Emil,

From: Emil Velikov [mailto:emil.l.veli...@gmail.com]
Sent: Tuesday, May 05, 2015 5:03 PM
 
 Hi Kamil,
 
 It seems that you've only incorporated the libgencec.pc suggestion.
 Did you change your mind about the others, found out something funny
 with them (if so can you let me know what) or simply forgot about them ?

I have to admit that I was sending the patchset in a hurry and I forgot to 
merge all the changes in the lib. I am sorry. I have prepared an updated 
version just now and I am going to send it soon.

 
 On 30 April 2015 at 11:25, Kamil Debski k.deb...@samsung.com wrote:
  Hi Emil,
 
  From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
  ow...@vger.kernel.org] On Behalf Of Emil Velikov
  Sent: Wednesday, April 29, 2015 5:00 PM
 
  Hi Kamil,
 
  Allow me to put a few suggestions:
 
  On 29 April 2015 at 11:02, Kamil Debski k.deb...@samsung.com wrote:
 
   diff --git a/m4/.gitkeep b/m4/.gitkeep new file mode 100644 index
   000..e69de29
  Haven't seen any projects doing this. Curious what the benefits of
  keeping and empty folder might be ?
 
  When I run autoreconf -i it complained about missing m4 folder, hence
  I added this filler file such that the folder is created. Any
  suggestion on how to do this better?
 
 Ahh yes - that lovely message. It turns out that older versions of
 automake will even error out [1], rather than just printing out a
 warning. A handy workaround would be to add a .gitignore (and a second
 one in the top folder) list. Plus it will slim down the untracked files
 list and let you clearly see when git add was missed :-)

Adding .gitignore files is a good suggestion. Will do.

 
 Cheers
 Emil
 
 [1] https://bugzilla.redhat.com/show_bug.cgi?id=901333

Best wishes,
-- 
Kamil Debski
Samsung RD Institute Poland

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] libgencec: Add userspace library for the generic CEC kernel interface

2015-05-05 Thread Emil Velikov
Hi Kamil,

It seems that you've only incorporated the libgencec.pc suggestion.
Did you change your mind about the others, found out something funny
with them (if so can you let me know what) or simply forgot about them
?

On 30 April 2015 at 11:25, Kamil Debski k.deb...@samsung.com wrote:
 Hi Emil,

 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 ow...@vger.kernel.org] On Behalf Of Emil Velikov
 Sent: Wednesday, April 29, 2015 5:00 PM

 Hi Kamil,

 Allow me to put a few suggestions:

 On 29 April 2015 at 11:02, Kamil Debski k.deb...@samsung.com wrote:

  diff --git a/m4/.gitkeep b/m4/.gitkeep new file mode 100644 index
  000..e69de29
 Haven't seen any projects doing this. Curious what the benefits of
 keeping and empty folder might be ?

 When I run autoreconf -i it complained about missing m4 folder, hence I added
 this filler file such that the folder is created. Any suggestion on how to do
 this better?

Ahh yes - that lovely message. It turns out that older versions of
automake will even error out [1], rather than just printing out a
warning. A handy workaround would be to add a .gitignore (and a second
one in the top folder) list. Plus it will slim down the untracked
files list and let you clearly see when git add was missed :-)

Cheers
Emil

[1] https://bugzilla.redhat.com/show_bug.cgi?id=901333
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] libgencec: Add userspace library for the generic CEC kernel interface

2015-04-30 Thread Kamil Debski
Hi Emil,

From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
ow...@vger.kernel.org] On Behalf Of Emil Velikov
Sent: Wednesday, April 29, 2015 5:00 PM
 
 Hi Kamil,
 
 Allow me to put a few suggestions:
 
 On 29 April 2015 at 11:02, Kamil Debski k.deb...@samsung.com wrote:
  This is the first version of the libGenCEC library. It was designed
 to
  act as an interface between the generic CEC kernel API and userspace
  applications. It provides a simple interface for applications and an
  example application that can be used to test the CEC functionality.
 
  signed-off-by: Kamil Debski k.deb...@samsung.com
  ---
   AUTHORS  |1 +
   INSTALL  |9 +
   LICENSE  |  202 
   Makefile.am  |4 +
   README   |   22 ++
   configure.ac |   24 ++
   doc/index.html   |  345 +++
   examples/Makefile.am |4 +
   examples/cectest.c   |  631
 ++
   include/gencec.h |  255 
   src/Makefile.am  |4 +
   src/gencec.c |  445 +++
   12 files changed, 1946 insertions(+)
   create mode 100644 AUTHORS
   create mode 100644 INSTALL
   create mode 100644 LICENSE
   create mode 100644 Makefile.am
   create mode 100644 README
   create mode 100644 configure.ac
   create mode 100644 doc/index.html
   create mode 100644 examples/Makefile.am  create mode 100644
  examples/cectest.c  create mode 100644 include/gencec.h  create mode
  100644 m4/.gitkeep  create mode 100644 src/Makefile.am  create mode
  100644 src/gencec.c
 
  diff --git a/AUTHORS b/AUTHORS
  new file mode 100644
  index 000..e4b7117
  --- /dev/null
  +++ b/AUTHORS
  @@ -0,0 +1 @@
  +Kamil Debski k.deb...@samsung.com
  diff --git a/INSTALL b/INSTALL
  new file mode 100644
  index 000..aac6101
  --- /dev/null
  +++ b/INSTALL
  @@ -0,0 +1,9 @@
  +To install libgencec run following commands:
  +
  +autoreconf -i
 You might want add --force in here, otherwise the files will stay as-is
 if you update libtool and friends mid-flight.
 Many projects include autogen.sh like the following. Feel free to add
 it to libgencec.

Thanks, I'll include this in the next version.
 
 $cat autogen.sh
 #! /bin/sh
 
 srcdir=`dirname $0`
 test -z $srcdir  srcdir=.
 
 ORIGDIR=`pwd`
 cd $srcdir
 
 autoreconf --force --verbose --install || exit 1 cd $ORIGDIR || exit
 $?
 
 if test -z $NOCONFIGURE; then
 $srcdir/configure $@
 fi
 
 
 
  --- /dev/null
  +++ b/configure.ac
  @@ -0,0 +1,24 @@
 
 You can save yourself some headaches if you restrict old and/or buggy
 autoconf versions which don't work with the project.
 If I have to guess 2.60 should be ok.
 AC_PREREQ([XXX])

Good suggestion, thanks.

 
  +AC_INIT([libgencec], [0.1], [k.deb...@samsung.com])
  +AM_INIT_AUTOMAKE([-Wall -Werror foreign])
  +
  +AC_PROG_CC
  +AM_PROG_AR
  +AC_CONFIG_MACRO_DIR([m4])
  +AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
  +
 
 Same for libtool - 2.2 perhaps ?
 LT_PREREQ([XXX])

I agree.

 
  +LT_INIT
  +
  +# Checks for typedefs, structures, and compiler characteristics.
  +AC_C_INLINE
  +AC_TYPE_SIZE_T
  +AC_TYPE_UINT16_T
  +AC_TYPE_UINT32_T
  +AC_TYPE_UINT8_T
  +
  +#AC_CHECK_LIB([c], [malloc])
  +# Checks for library functions.
  +#AC_FUNC_MALLOC
  +l
  +AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile])
 Would be nice if the library provides libgencec.pc file. This way any
 users can avoid the explicit header/library check, amongst other useful
 bits.

Thanks for the suggestion, I'll look into this.
 
  --- /dev/null
  +++ b/examples/Makefile.am
  @@ -0,0 +1,4 @@
  +bin_PROGRAMS = cectest
  +cectest_SOURCES = cectest.c
  +AM_CPPFLAGS=-I$(top_srcdir)/include/
  +AM_LDFLAGS=-L../src/ -lgencec
 The following seems more common (in the projects I've seen at least)
 cectest_LDADD = $(top_builddir)/src/libgencec.la
 
  diff --git a/m4/.gitkeep b/m4/.gitkeep new file mode 100644 index
  000..e69de29
 Haven't seen any projects doing this. Curious what the benefits of
 keeping and empty folder might be ?

When I run autoreconf -i it complained about missing m4 folder, hence I added
this filler file such that the folder is created. Any suggestion on how to do
this better?

 
  diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644
  index 000..cb024f0
  --- /dev/null
  +++ b/src/Makefile.am
  @@ -0,0 +1,4 @@
  +lib_LTLIBRARIES = libgencec.la
  +libgencec_la_SOURCES = gencec.c
  +libgencec_la_LDFLAGS = -version-info 0:1:0
 You might want to add -no-undefined in order to prevent having a
 library with unresolved symbols.
 
 Hope you find the above useful :-)

Thank you so much for your review. It is my first real approach at autotools,
so your comments are very much appreciated :)

 
 Cheers
 Emil
 --

Best wishes,
-- 
Kamil Debski
Samsung RD Institute Poland

--
To unsubscribe from this list: send the line unsubscribe linux-media in

Re: [PATCH] libgencec: Add userspace library for the generic CEC kernel interface

2015-04-29 Thread Emil Velikov
Hi Kamil,

Allow me to put a few suggestions:

On 29 April 2015 at 11:02, Kamil Debski k.deb...@samsung.com wrote:
 This is the first version of the libGenCEC library. It was designed to
 act as an interface between the generic CEC kernel API and userspace
 applications. It provides a simple interface for applications and an
 example application that can be used to test the CEC functionality.

 signed-off-by: Kamil Debski k.deb...@samsung.com
 ---
  AUTHORS  |1 +
  INSTALL  |9 +
  LICENSE  |  202 
  Makefile.am  |4 +
  README   |   22 ++
  configure.ac |   24 ++
  doc/index.html   |  345 +++
  examples/Makefile.am |4 +
  examples/cectest.c   |  631 
 ++
  include/gencec.h |  255 
  src/Makefile.am  |4 +
  src/gencec.c |  445 +++
  12 files changed, 1946 insertions(+)
  create mode 100644 AUTHORS
  create mode 100644 INSTALL
  create mode 100644 LICENSE
  create mode 100644 Makefile.am
  create mode 100644 README
  create mode 100644 configure.ac
  create mode 100644 doc/index.html
  create mode 100644 examples/Makefile.am
  create mode 100644 examples/cectest.c
  create mode 100644 include/gencec.h
  create mode 100644 m4/.gitkeep
  create mode 100644 src/Makefile.am
  create mode 100644 src/gencec.c

 diff --git a/AUTHORS b/AUTHORS
 new file mode 100644
 index 000..e4b7117
 --- /dev/null
 +++ b/AUTHORS
 @@ -0,0 +1 @@
 +Kamil Debski k.deb...@samsung.com
 diff --git a/INSTALL b/INSTALL
 new file mode 100644
 index 000..aac6101
 --- /dev/null
 +++ b/INSTALL
 @@ -0,0 +1,9 @@
 +To install libgencec run following commands:
 +
 +autoreconf -i
You might want add --force in here, otherwise the files will stay
as-is if you update libtool and friends mid-flight.
Many projects include autogen.sh like the following. Feel free to add
it to libgencec.

$cat autogen.sh
#! /bin/sh

srcdir=`dirname $0`
test -z $srcdir  srcdir=.

ORIGDIR=`pwd`
cd $srcdir

autoreconf --force --verbose --install || exit 1
cd $ORIGDIR || exit $?

if test -z $NOCONFIGURE; then
$srcdir/configure $@
fi



 --- /dev/null
 +++ b/configure.ac
 @@ -0,0 +1,24 @@

You can save yourself some headaches if you restrict old and/or buggy
autoconf versions which don't work with the project.
If I have to guess 2.60 should be ok.
AC_PREREQ([XXX])

 +AC_INIT([libgencec], [0.1], [k.deb...@samsung.com])
 +AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 +
 +AC_PROG_CC
 +AM_PROG_AR
 +AC_CONFIG_MACRO_DIR([m4])
 +AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
 +

Same for libtool - 2.2 perhaps ?
LT_PREREQ([XXX])

 +LT_INIT
 +
 +# Checks for typedefs, structures, and compiler characteristics.
 +AC_C_INLINE
 +AC_TYPE_SIZE_T
 +AC_TYPE_UINT16_T
 +AC_TYPE_UINT32_T
 +AC_TYPE_UINT8_T
 +
 +#AC_CHECK_LIB([c], [malloc])
 +# Checks for library functions.
 +#AC_FUNC_MALLOC
 +
 +AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile])
Would be nice if the library provides libgencec.pc file. This way any
users can avoid the explicit header/library check, amongst other
useful bits.

 --- /dev/null
 +++ b/examples/Makefile.am
 @@ -0,0 +1,4 @@
 +bin_PROGRAMS = cectest
 +cectest_SOURCES = cectest.c
 +AM_CPPFLAGS=-I$(top_srcdir)/include/
 +AM_LDFLAGS=-L../src/ -lgencec
The following seems more common (in the projects I've seen at least)
cectest_LDADD = $(top_builddir)/src/libgencec.la

 diff --git a/m4/.gitkeep b/m4/.gitkeep
 new file mode 100644
 index 000..e69de29
Haven't seen any projects doing this. Curious what the benefits of
keeping and empty folder might be ?

 diff --git a/src/Makefile.am b/src/Makefile.am
 new file mode 100644
 index 000..cb024f0
 --- /dev/null
 +++ b/src/Makefile.am
 @@ -0,0 +1,4 @@
 +lib_LTLIBRARIES = libgencec.la
 +libgencec_la_SOURCES = gencec.c
 +libgencec_la_LDFLAGS = -version-info 0:1:0
You might want to add -no-undefined in order to prevent having a
library with unresolved symbols.

Hope you find the above useful :-)

Cheers
Emil
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html