[Buildroot] [PATCH] install libvorbis via staging dir

Bernhard Fischer rep.dot.nop at gmail.com
Fri Jun 20 12:12:23 UTC 2008


On Fri, Jun 20, 2008 at 08:53:43PM +0900, Conrad Parker wrote:
>the attached patch updates package/libvorbis/libvorbis.mk to install
>via the staging dir,
>as is done for libogg.
>
>cheers,
>
>Conrad.

>From bd92b7e1aa5a27b75552e7497bc312ef4b1e34cb Mon Sep 17 00:00:00 2001
>From: Conrad Parker <conrad at metadecks.org>
>Date: Fri, 20 Jun 2008 20:46:47 +0900
>Subject: [PATCH] Install vorbis libraries via staging dir, similarly to libogg.
>
>This ensures the *.pc files are staged, for other packages
>to be built against libvorbis.
>---
> package/libvorbis/libvorbis.mk |   15 +++++++++++----
> 1 files changed, 11 insertions(+), 4 deletions(-)
>
>diff --git a/package/libvorbis/libvorbis.mk b/package/libvorbis/libvorbis.mk
>index 3e496d9..2049dee 100644
>--- a/package/libvorbis/libvorbis.mk
>+++ b/package/libvorbis/libvorbis.mk
>@@ -40,12 +40,19 @@ $(LIBVORBIS_DIR)/.configured: $(LIBVORBIS_DIR)/.source
> 	touch $@
> 
> $(LIBVORBIS_DIR)/.libs: $(LIBVORBIS_DIR)/.configured
>-	$(MAKE) CC=$(TARGET_CC) -C $(LIBVORBIS_DIR)
>+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBVORBIS_DIR)

iff the package uses autoconf then this indicates a wrong configuration.
For autoconf'ed packages it is _wrong_, very, very wrong  to du anything
but
	$(MAKE) -C $(@D)

> 	touch $@
> 
>-$(TARGET_DIR)/usr/lib/libvorbis.so: $(LIBVORBIS_DIR)/.libs
>-	$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBVORBIS_DIR) install
>-	touch $@
>+$(STAGING_DIR)/usr/lib/libvorbis.so: $(LIBVORBIS_DIR)/.libs
>+	mkdir -p $(STAGING_DIR)

The staging_dir is really already a prerequisite, so this mkdir is
superfluous and should have read $(INSTALL) -d $(@D) in the first place.

>+	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBVORBIS_DIR) install
>+	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libvorbis.la
>+	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libvorbisenc.la
>+	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libvorbisfile.la

This sed, if really needed, indicates either wrong configuration or
broken package which should be fixed upstream.

>+
>+$(TARGET_DIR)/usr/lib/libvorbis.so: $(STAGING_DIR)/usr/lib/libvorbis.so
>+	cp -dpf $(STAGING_DIR)/usr/lib/libvorbis*.so* $(TARGET_DIR)/usr/lib

s/cp -dpf/$(INSTALL) -D/

>+	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libvorbis*.so*
> 
> libvorbis: uclibc pkgconfig libogg $(TARGET_DIR)/usr/lib/libvorbis.so

please resend.



More information about the buildroot mailing list