All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Fischer <rep.dot.nop@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Ogg and Vorbis patch
Date: Tue, 29 May 2007 22:25:07 +0200	[thread overview]
Message-ID: <20070529202507.GC30684@aon.at> (raw)
In-Reply-To: <465AD791.2040108@teamboyce.co.uk>

On Mon, May 28, 2007 at 02:22:25PM +0100, Rod Boyce wrote:
>All,
>
>So attached is my libogg and libvorbis patch.  I have had a lot of 
>trouble with the libvorbis code and I have included a patch to the 
>install script to solve the problem of locating the library under 
>/usr/lib or /usr/loca/lib also when compiling libvorbisfile I had lots 
>of problems figuring out exactly the right combination of configure 
>parameters and changes for library paths when compiling.  I believe I 
>have got it correct now I am not a configure expert so I might have 
>missed something obvious and I'll always ope to suggestions so here is 
>the patch hopefully for inclusion into the build-root system.
>
>Regards,
>Rod Boyce

>diff ./package/Config.in ./package/Config.in
>--- ./package/Config.in	2007-05-25 17:08:32.583594165 +0100
>+++ ./package/Config.in	2007-05-25 15:22:03.475398547 +0100
>@@ -239,12 +239,14 @@
> 	  Support for audio libraries and applications
> 
> if BR2_AUDIO_SUPPORT
> source "package/asterisk/Config.in"
> source "package/libid3tag/Config.in"
> source "package/libmad/Config.in"
>+source "package/libogg/Config.in"
> source "package/libsndfile/Config.in"
> source "package/madplay/Config.in"
> source "package/mpg123/Config.in"
>+source "package/libvorbis/Config.in"
> endif
> 
> menuconfig BR2_GRAPHIC_SUPPORT
>diff ./package/libogg/Config.in ./package/libogg/Config.in
>--- ./package/libogg/Config.in	1970-01-01 01:00:00.000000000 +0100
>+++ ./package/libogg/Config.in	2007-05-28 09:48:44.482856755 +0100
>@@ -0,0 +1,8 @@
>+config BR2_PACKAGE_LIBOGG
>+	bool "libogg"
>+	default n
>+	help
>+	  Open source container format for Vorbis audio format files
>+
>+	  http://xiph.org/ogg/
>+
>diff ./package/libogg/libogg.mk ./package/libogg/libogg.mk
>--- ./package/libogg/libogg.mk	1970-01-01 01:00:00.000000000 +0100
>+++ ./package/libogg/libogg.mk	2007-05-28 09:51:15.461670563 +0100
>@@ -0,0 +1,80 @@
>+#############################################################
>+#
>+# libogg
>+#
>+#############################################################
>+LIBOGG_VERSION=1.1.3
>+LIBOGG_LIBVER=0.5.3
>+LIBOGG_SOURCE=libogg-$(LIBOGG_VERSION).tar.gz
>+LIBOGG_SITE=http://downloads.xiph.org/releases/ogg/
>+LIBOGG_DIR=$(BUILD_DIR)/${shell basename $(LIBOGG_SOURCE) .tar.gz}

No. This is something like
$(BUILD_DIR)/libogg-$(LIBOGG_VERSION)

->+LIBOGG_WORKDIR=$(BUILD_DIR)/libogg-$(LIBOGG_VERSION)

What's the deal with WORKDIR ?

>+LIBOGG_CAT:=$(ZCAT)
>+
>+$(DL_DIR)/$(LIBOGG_SOURCE):
>+	$(WGET) -P $(DL_DIR) $(LIBOGG_SITE)/$(LIBOGG_SOURCE)
>+
>+$(LIBOGG_DIR)/.unpacked: $(DL_DIR)/$(LIBOGG_SOURCE)
>+	$(LIBOGG_CAT) $(DL_DIR)/$(LIBOGG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -

You forgot a CONFIG_UPDATE here.

>+	touch $(LIBOGG_DIR)/.unpacked

Please touch $@ since i find this easier to read (and it is less error
prone).
>+
>+$(LIBOGG_DIR)/.configured: $(LIBOGG_DIR)/.unpacked
>+	(cd $(LIBOGG_DIR); rm -rf config.cache; \
>+		$(TARGET_CONFIGURE_OPTS) \
>+		./configure \
>+		--target=$(GNU_TARGET_NAME) \
>+		--host=$(GNU_TARGET_NAME) \
>+		--build=$(GNU_HOST_NAME) \
>+		--disable-docs \
>+		--prefix=/usr \
>+		--sysconfdir=/etc \
>+		$(DISABLE_NLS) \
>+		--exec-prefix=$(STAGING_DIR)/usr/bin \
>+		--libdir=$(STAGING_DIR)/lib \
>+		--includedir=$(STAGING_DIR)/include \
>+		--datadir=$(STAGING_DIR)/usr/share \
>+	);
>+	touch $(LIBOGG_DIR)/.configured

Please touch $@ since i find this easier to read (and it is less error
prone).

>+
>+$(LIBOGG_WORKDIR)/libogg.la: $(LIBOGG_DIR)/.configured
>+	rm -f $@
>+	$(MAKE) CC=$(TARGET_CC) -C $(LIBOGG_WORKDIR)
>+
>+$(STAGING_DIR)/lib/libogg.so.$(LIBOGG_LIBVER): $(LIBOGG_WORKDIR)/libogg.la
>+	@mkdir -p $(STAGING_DIR)/include/ogg

using $(STAGING_DIR)/include is deprecated. Rather use
$(STAGING_DIR)/usr/include.

>+	@mkdir -p $(STAGING_DIR)/lib

This sounds more appropriate for usr/lib

>+	@cp -dpf $(LIBOGG_DIR)/include/ogg/config_types.h $(STAGING_DIR)/include/ogg/
>+	@cp -dpf $(LIBOGG_DIR)/include/ogg/ogg.h $(STAGING_DIR)/include/ogg/
>+	@cp -dpf $(LIBOGG_DIR)/include/ogg/os_types.h $(STAGING_DIR)/include/ogg/
>+	@cp -dpf $(LIBOGG_DIR)/src/.libs/libogg.a $(STAGING_DIR)/lib/
>+	@cp -dpf $(LIBOGG_DIR)/src/.libs/libogg.la $(STAGING_DIR)/lib/
>+	@cp -dpf $(LIBOGG_DIR)/src/.libs/libogg.so.$(LIBOGG_LIBVER) $(STAGING_DIR)/lib/
>+	@ln -sf $(STAGING_DIR)/lib/libogg.so.$(LIBOGG_LIBVER) $(STAGING_DIR)/lib/libogg.so.0
>+	@ln -sf $(STAGING_DIR)/lib/libogg.so.$(LIBOGG_LIBVER) $(STAGING_DIR)/lib/libogg.so

No need to hide those away. Please remove.
>+
>+
>+$(TARGET_DIR)/lib/libogg.so.$(LIBOGG_LIBVER): $(STAGING_DIR)/lib/libogg.so.$(LIBOGG_LIBVER)
>+	cp -dpf $(STAGING_DIR)/lib/libogg.so* $(TARGET_DIR)/lib;
>+	-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libogg.so*
>+	@rm -rf $(TARGET_DIR)/usr/share/doc/libogg-$(LIBOGG_VERSION)
>+	touch -c $(TARGET_DIR)/lib/libogg.so.$(LIBOGG_LIBVER)

I'm pretty sure that strip updates the time-stamp, so rm first, then
strip and remove the touch.

>+
>+libogg:	uclibc $(TARGET_DIR)/lib/libogg.so.$(LIBOGG_LIBVER)
>+
>+libogg-source: $(DL_DIR)/$(LIBOGG_SOURCE)
>+
>+libogg-clean:
>+	@if [ -d $(LIBOGG_WORKDIR)/Makefile ] ; then \
>+		$(MAKE) -C $(LIBOGG_WORKDIR) clean ; \
>+	fi;

just
	-$(MAKE) -C $(LIBOGG_WORKDIR) clean
and drop the if.
[snip]

  reply	other threads:[~2007-05-29 20:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28 13:22 [Buildroot] Ogg and Vorbis patch Rod Boyce
2007-05-29 20:25 ` Bernhard Fischer [this message]
2007-05-31 18:54   ` [Buildroot] Ogg and Vorbis patch part 2 Rod Boyce
2007-05-31 21:46     ` Bernhard Fischer
2007-06-01 10:28       ` [Buildroot] Ogg and Vorbis patch part 2.1 Rod Boyce
2007-06-01 11:33         ` Peter Korsgaard
2007-06-01 17:49           ` [Buildroot] SVN diff was " Rod Boyce

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=20070529202507.GC30684@aon.at \
    --to=rep.dot.nop@gmail.com \
    --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.