Patchwork [2/3] libdvdnav: Fix dvdnav-config

login
register
mail settings
Submitter Valentine Barshak
Date Sept. 26, 2012, 7:33 p.m.
Message ID <20120926193351.GA3971@gmail.com>
Download mbox | patch
Permalink /patch/187184/
State Accepted
Commit fc2f47e9ae46fcd6385baa5eabae747696127e54
Headers show

Comments

Valentine Barshak - Sept. 26, 2012, 7:33 p.m.
This fixes path prefix in the staging dvdnav-config
and removes dvdnav-config from the target filesystem
if BR2_HAVE_DEVFILES is not set.

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
---
 package/libdvdnav/libdvdnav.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Thomas Petazzoni - Sept. 26, 2012, 8:46 p.m.
Dear Valentine Barshak,

On Wed, 26 Sep 2012 23:33:51 +0400, Valentine Barshak wrote:

> +ifneq ($(BR2_HAVE_DEVFILES),y)
> +LIBDVDNAV_POST_INSTALL_TARGET_HOOKS += LIBDVDNAV_TARGET_CLEANUP
> +endif

We generally prefer positive logic:

ifeq ($(BR2_HAVE_DEVFILES),)
...
endif

Thomas
Valentine Barshak - Sept. 26, 2012, 9:05 p.m.
On 09/27/2012 12:46 AM, Thomas Petazzoni wrote:
> Dear Valentine Barshak,
>
> On Wed, 26 Sep 2012 23:33:51 +0400, Valentine Barshak wrote:
>
>> +ifneq ($(BR2_HAVE_DEVFILES),y)
>> +LIBDVDNAV_POST_INSTALL_TARGET_HOOKS += LIBDVDNAV_TARGET_CLEANUP
>> +endif
>
> We generally prefer positive logic:
>
> ifeq ($(BR2_HAVE_DEVFILES),)
> ...
> endif

The ifneq(($BR2_HAVE_DEVFILES),y) was copy-pasted from other .mk file 
and it seems to be used much more often than ifeq($(BR2_HAVE_DEVFILES),).

Thanks,
Val.

>
> Thomas
>

Patch

diff --git a/package/libdvdnav/libdvdnav.mk b/package/libdvdnav/libdvdnav.mk
index e2d42f3..2fefe43 100644
--- a/package/libdvdnav/libdvdnav.mk
+++ b/package/libdvdnav/libdvdnav.mk
@@ -16,4 +16,18 @@  LIBDVDNAV_DEPENDENCIES = libdvdread host-pkg-config
 # of cross compilation, we prefer using pkg-config.
 LIBDVDNAV_CONF_OPT = --with-dvdread-config="$(PKG_CONFIG_HOST_BINARY) dvdread"
 
+define LIBDVDNAV_TARGET_CLEANUP
+	$(RM) -f $(TARGET_DIR)/usr/bin/dvdnav-config
+endef
+
+ifneq ($(BR2_HAVE_DEVFILES),y)
+LIBDVDNAV_POST_INSTALL_TARGET_HOOKS += LIBDVDNAV_TARGET_CLEANUP
+endif
+
+define LIBDVDNAV_STAGING_FIXUP_DVDNAV_CONFIG
+	$(SED) "s,prefix=/usr,prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/bin/dvdnav-config
+endef
+
+LIBDVDNAV_POST_INSTALL_STAGING_HOOKS += LIBDVDNAV_STAGING_FIXUP_DVDNAV_CONFIG
+
 $(eval $(autotools-package))