All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 01/38] package/libdvdcss: add Kodi-specific patches
Date: Sun, 5 Feb 2017 00:08:21 +0100	[thread overview]
Message-ID: <20170204230821.GA3805@free.fr> (raw)
In-Reply-To: <20170204114451.20935-2-bernd.kuhls@t-online.de>

Bernd, All,

On 2017-02-04 12:44 +0100, Bernd Kuhls spake thusly:
> The Kodi build system needs .a files to create
> usr/lib/kodi/system/players/VideoPlayer/libdvdcss-i486-linux.so

This is really nasty.

What happens if one does not have the .a library, but just the .so one
instead? Does the build really fail?

I've had a quick look at cmake/modules/FindLibDvd.cmake and it only
requires the .a files in the case that it compiles its own version.
Otherwise, it uses the standard find_library() :

    18       find_library(DVDCSS_LIBRARY NAMES dvdcss libdvdcss PATHS ${PC_DVD_libdvdcss_LIBDIR})

which to me does not require that the library be a static one.

So, could you double check if it really does not work with a shared
version?

Ditto for libdvdnav and libdvdread.

Regards,
Yann E. MORIN.

> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  ...css-better-handle-partial-read-in-libc_re.patch | 49 ++++++++++++++++++++++
>  ...opy-value-psz_cache-to-dvdcss-psz_cachefi.patch | 33 +++++++++++++++
>  package/libdvdcss/libdvdcss.mk                     |  5 +++
>  3 files changed, 87 insertions(+)
>  create mode 100644 package/libdvdcss/0001-xbmc-libdvdcss-better-handle-partial-read-in-libc_re.patch
>  create mode 100644 package/libdvdcss/0002-libdvdcss-Copy-value-psz_cache-to-dvdcss-psz_cachefi.patch
> 
> diff --git a/package/libdvdcss/0001-xbmc-libdvdcss-better-handle-partial-read-in-libc_re.patch b/package/libdvdcss/0001-xbmc-libdvdcss-better-handle-partial-read-in-libc_re.patch
> new file mode 100644
> index 000000000..4d9820642
> --- /dev/null
> +++ b/package/libdvdcss/0001-xbmc-libdvdcss-better-handle-partial-read-in-libc_re.patch
> @@ -0,0 +1,49 @@
> +From d113ac14b45961f958f4aa927c66b3c367f4637c Mon Sep 17 00:00:00 2001
> +From: Voyager1 <voyager@xbmc.org>
> +Date: Sat, 13 Feb 2016 20:44:21 +0100
> +Subject: [PATCH 1/2] [xbmc] [libdvdcss] better handle partial read in
> + libc_read
> +
> +Downloaded from
> +https://github.com/xbmc/libdvdcss/commit/d113ac14b45961f958f4aa927c66b3c367f4637c
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + src/device.c | 20 ++++++++++++++------
> + 1 file changed, 14 insertions(+), 6 deletions(-)
> +
> +diff --git a/src/device.c b/src/device.c
> +index af735e0..1936b44 100644
> +--- a/src/device.c
> ++++ b/src/device.c
> +@@ -608,13 +608,21 @@ static int libc_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
> +     off_t i_size, i_ret, i_ret_blocks;
> + 
> +     i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
> +-    i_ret = read( dvdcss->i_fd, p_buffer, i_size );
> +-
> +-    if( i_ret < 0 )
> +-    {
> +-        print_error( dvdcss, "read error" );
> ++    i_ret = 0;
> ++    while (i_ret < i_size)
> ++    {
> ++      off_t i_r;
> ++      i_r = read(dvdcss->i_fd, ((char*)p_buffer) + i_ret, i_size - i_ret);
> ++      if (i_r < 0)
> ++      {
> ++        print_error(dvdcss, "read error");
> +         dvdcss->i_pos = -1;
> +-        return i_ret;
> ++        return i_r;
> ++      }
> ++      if (i_r == 0)
> ++        break;
> ++
> ++      i_ret += i_r;
> +     }
> + 
> +     i_ret_blocks = i_ret / DVDCSS_BLOCK_SIZE;
> +-- 
> +2.8.1
> +
> diff --git a/package/libdvdcss/0002-libdvdcss-Copy-value-psz_cache-to-dvdcss-psz_cachefi.patch b/package/libdvdcss/0002-libdvdcss-Copy-value-psz_cache-to-dvdcss-psz_cachefi.patch
> new file mode 100644
> index 000000000..4251eaf46
> --- /dev/null
> +++ b/package/libdvdcss/0002-libdvdcss-Copy-value-psz_cache-to-dvdcss-psz_cachefi.patch
> @@ -0,0 +1,33 @@
> +From 2f12236bc1c92f73c21e973363f79eb300de603f Mon Sep 17 00:00:00 2001
> +From: Anton Fedchin <anightik@gmail.com>
> +Date: Mon, 15 Feb 2016 16:09:35 +0300
> +Subject: [PATCH 2/2] [libdvdcss] Copy value psz_cache to dvdcss->psz_cachefile
> + if it exists.
> +
> +Downloaded from
> +https://github.com/xbmc/libdvdcss/commit/2f12236bc1c92f73c21e973363f79eb300de603f
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + src/libdvdcss.c | 5 +++++
> + 1 file changed, 5 insertions(+)
> +
> +diff --git a/src/libdvdcss.c b/src/libdvdcss.c
> +index 2f78b78..d09d2b3 100644
> +--- a/src/libdvdcss.c
> ++++ b/src/libdvdcss.c
> +@@ -274,6 +274,11 @@ static int set_cache_directory( dvdcss_t dvdcss )
> +         }
> + #endif /* ! defined( _WIN32 ) */
> +     }
> ++    else
> ++    {
> ++      snprintf( dvdcss->psz_cachefile, PATH_MAX, "%s", psz_cache );
> ++      dvdcss->psz_cachefile[PATH_MAX - 1] = '\0';
> ++    }
> + 
> +     /* Check that there is enough space for the cache directory path and the
> +      * block filename. The +1s are path separators. */
> +-- 
> +2.8.1
> +
> diff --git a/package/libdvdcss/libdvdcss.mk b/package/libdvdcss/libdvdcss.mk
> index 8e1c92995..6b13f3f58 100644
> --- a/package/libdvdcss/libdvdcss.mk
> +++ b/package/libdvdcss/libdvdcss.mk
> @@ -11,4 +11,9 @@ LIBDVDCSS_INSTALL_STAGING = YES
>  LIBDVDCSS_LICENSE = GPLv2+
>  LIBDVDCSS_LICENSE_FILES = COPYING
>  
> +ifeq ($(BR2_PACKAGE_KODI),y)
> +LIBDVDCSS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -fPIC"
> +LIBDVDCSS_CONF_OPTS = --enable-static
> +endif
> +
>  $(eval $(autotools-package))
> -- 
> 2.11.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-02-04 23:08 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-04 11:44 [Buildroot] [PATCH v3 00/38] kodi: bump to version 17.0-Krypton Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 01/38] package/libdvdcss: add Kodi-specific patches Bernd Kuhls
2017-02-04 23:08   ` Yann E. MORIN [this message]
2017-02-05  7:59     ` Bernd Kuhls
2017-02-05 21:24       ` Yann E. MORIN
2017-02-06 19:25         ` Bernd Kuhls
2017-02-06 21:15           ` Bernd Kuhls
2017-02-09 22:29             ` Thomas Petazzoni
2017-02-11 16:03               ` Bernd Kuhls
2017-02-11 16:37                 ` Yann E. MORIN
2017-02-11 17:02                   ` Bernd Kuhls
2017-02-11 17:45                     ` Yann E. MORIN
2017-02-12 12:51                 ` Thomas Petazzoni
2017-02-17 18:38                   ` Bernd Kuhls
2017-02-17 18:54                     ` Yann E. MORIN
2017-02-17 19:03                       ` Bernd Kuhls
2017-02-17 21:52                         ` Yann E. MORIN
2017-02-19  8:43                           ` Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 02/38] package/libdvdread: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 03/38] package/libdvdnav: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 04/38] package/libplatform: bump version to 2.1.0 Bernd Kuhls
2017-02-05 22:40   ` Yann E. MORIN
2017-02-04 11:44 ` [Buildroot] [PATCH v3 05/38] package/kodi-platform: bump version Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 06/38] package/libcec: bump version to 4.0.2 Bernd Kuhls
2017-02-04 22:56   ` Thomas Petazzoni
2017-02-04 11:44 ` [Buildroot] [PATCH v3 07/38] package/xmlstarlet: add host variant Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 08/38] package/kodi: bump to version 17.0-Krypton Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 09/38] package/kodi: add patch to disable online check Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 10/38] package/kodi-inputstream-rtmp: new package Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 11/38] package/kodi: move rtmp support to new addon kodi-inputstream-rtmp Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 12/38] package/kodi: add aarch64 support Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 13/38] package/kodi: add powerpc64 support Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 14/38] package/kodi: add mips64el support Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 15/38] package/kodi: add optional support for bluez5 Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 16/38] package/kodi: libxslt is an optional package Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 17/38] package/kodi: add optional support for lcms2 Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 18/38] package/kodi: add optional support for pulseaudio Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 19/38] package/libsquish: remove deprecated package Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 20/38] package/kodi-pvr-*: mass version bump Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 21/38] package/kodi-pvr-mythtv: bump version to 4.12.12 Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 22/38] package/kodi-pvr-nextpvr: bump version to 2.4.11 Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 23/38] package/kodi-pvr-mediaportal-tvserver: needs locale support Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 24/38] package/kodi-adsp-basic: bump version Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 25/38] package/kodi-adsp-freesurround: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 26/38] package/kodi-audioencoder-*: mass version bump Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 27/38] package/kodi-audiodecoder-*: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 28/38] package/kodi-audiodecoder-timidity: bump version Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 29/38] package/kodi-screensaver-*: mass version bump Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 30/38] package/kodi-screensaver-rsxs: bump version Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 31/38] package/kodi-visualisation-*: mass version bump Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 32/38] package/kodi-visualisation-waveforhue: bump version Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 33/38] package/kodi-visualisation-shadertoy: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 34/38] package/kodi-inputstream-adaptive: new package Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 35/38] package/kodi-skin-confluence: " Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 36/38] package/kodi: add Kconfig options to remove default skins Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 37/38] package/kodi: add Kconfig option to make TexturePacker optional Bernd Kuhls
2017-02-04 11:44 ` [Buildroot] [PATCH v3 38/38] package/kodi.*: Add -DOVERRIDE_PATHS=1 to all binary addons Bernd Kuhls
2017-02-04 12:02 ` [Buildroot] [PATCH v3 00/38] kodi: bump to version 17.0-Krypton Bernd Kuhls

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=20170204230821.GA3805@free.fr \
    --to=yann.morin.1998@free.fr \
    --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.