Skip to contentSkip to conversation

Ogg and Vorbis patch

Buildroot Rod Boyce 3 participants 7 messages May 28, 2007 – Jun 1, 2007

lore
Share & tools
lore

Rod Boyce

author
#0 lore raw

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg-vorbis.patch
Type: text/x-patch
Size: 9401 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070528/ed6dedb1/attachment.bin

#1 lore raw
Quoted 49 lines · Rod Boyce

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 +0 -0
@@ -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 +8 -0
@@ -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 line 10

Quoted 10 lines
package/libogg/libogg.mk +10 -0
@@ -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 ?

package/libogg/libogg.mk line 17

Quoted 7 lines
package/libogg/libogg.mk +7 -0
+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.

package/libogg/libogg.mk line 18

Quoted 1 line
package/libogg/libogg.mk +1 -0
+	touch $(LIBOGG_DIR)/.unpacked

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

Quoted 8 lines
package/libogg/libogg.mk +8 -0
+
+$(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) \

package/libogg/libogg.mk line 36

Quoted 10 lines
package/libogg/libogg.mk +10 -0
+		--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).

package/libogg/libogg.mk line 43

Quoted 7 lines
package/libogg/libogg.mk +7 -0
+
+$(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.

package/libogg/libogg.mk line 44

Quoted 1 line
package/libogg/libogg.mk +1 -0
+	@mkdir -p $(STAGING_DIR)/lib

This sounds more appropriate for usr/lib

package/libogg/libogg.mk line 52

Quoted 8 lines
package/libogg/libogg.mk +8 -0
+	@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.

package/libogg/libogg.mk line 59

Quoted 7 lines
package/libogg/libogg.mk +7 -0
+
+
+$(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.

package/libogg/libogg.mk line 68

Quoted 9 lines
package/libogg/libogg.mk +9 -0
+
+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]

author
#2 lore raw

[Buildroot] Ogg and Vorbis patch part 2

Quoted 7 lines

just

	-$(MAKE) -C $(LIBOGG_WORKDIR) clean

and drop the if.
[snip]

All,

Attached is a new improved patch to add libvorbis and libogg to build root. I have only tested on 386 hopefully others can test on other platforms. I have a floating point unit so I do not need to use an integer only version.

Regards,
Rod Boyce

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libogg-libvorbis.patch
Type: text/x-patch
Size: 13686 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070531/87718c09/attachment-0001.bin

#3 lore raw

[Buildroot] Ogg and Vorbis patch part 2

Quoted 8 lines · Rod Boyce
Quoted 7 lines

just

	-$(MAKE) -C $(LIBOGG_WORKDIR) clean

and drop the if.
[snip]

Quoted 6 lines

All,

Attached is a new improved patch to add libvorbis and libogg to build root. I have only tested on 386 hopefully others can test on other platforms. I have a floating point unit so I do not need to use an integer only version.

Thanks for the update, but please see below..

libogg/libogg.mk

Quoted 9 lines

Regards,
Rod Boyce

diff -uN --recursive ../trunk/package/libogg/libogg.mk package/libogg/libogg.mk

libogg/libogg.mk renamed from trunk/package/libogg/libogg.mk +0 -0
@@ -0,0 +1,64 @@

+$(LIBVORBIS_DIR)/.unpacked: $(DL_DIR)/$(LIBVORBIS_SOURCE)
+ $(LIBVORBIS_CAT) $(DL_DIR)/$(LIBVORBIS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@

missing CONFIG_UPDATE

[snip]

libogg/libogg.mk line 5

Quoted 5 lines
libogg/libogg.mk renamed from trunk/package/libogg/libogg.mk +5 -0
+
+libogg-clean:
+	@if [ -d $(LIBOGG_DIR)/Makefile ] ; then \
+		$(MAKE) -C $(LIBOGG_DIR) clean ; \
+	fi;

just

	-$(MAKE) -C $(LIBOGG_DIR) clean

and drop the if.

libogg/libogg.mk~

Quoted 3 lines

diff -uN --recursive ../trunk/package/libogg/libogg.mk~ package/libogg/libogg.mk~

libogg/libogg.mk~ renamed from trunk/package/libogg/libogg.mk~ +0 -0

you want --exclude='*~'
Alternatively, a simple "svn diff > ~/mypatch.diff" should do the right thing.

[snip]

libogg/libogg.mk~

Quoted 5 lines
libogg/libogg.mk~ renamed from trunk/package/libogg/libogg.mk~ +5 -0
+
+libogg-clean:
+	@if [ -d $(LIBOGG_DIR)/Makefile ] ; then \
+		$(MAKE) -C $(LIBOGG_DIR) clean ; \
+	fi;

just

	-$(MAKE) -C $(LIBOGG_DIR) clean

and drop the if.

libvorbis/libvorbis.mk

Quoted 16 lines
libogg/libogg.mk~ renamed from trunk/package/libogg/libogg.mk~ +11 -0
+
+libogg-dirclean:
+	rm -rf $(LIBOGG_DIR) $(LIBOGG_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBOGG)),y)
+TARGETS+=libogg
+endif

diff -uN --recursive ../trunk/package/libvorbis/libvorbis.mk package/libvorbis/libvorbis.mk

libvorbis/libvorbis.mk renamed from trunk/package/libvorbis/libvorbis.mk +0 -0
@@ -0,0 +1,78 @@

[]

libvorbis/libvorbis.mk line 5

Quoted 5 lines
libvorbis/libvorbis.mk renamed from trunk/package/libvorbis/libvorbis.mk +5 -0
+$(DL_DIR)/$(LIBVORBIS_SOURCE):
+	$(WGET) -P $(DL_DIR) $(LIBVORBIS_SITE)/$(LIBVORBIS_SOURCE)
+
+$(LIBVORBIS_DIR)/.unpacked: $(DL_DIR)/$(LIBVORBIS_SOURCE)
+	$(LIBVORBIS_CAT) $(DL_DIR)/$(LIBVORBIS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -

missing CONFIG_UPDATE

libvorbis/libvorbis.mk

Quoted 7 lines
libvorbis/libvorbis.mk renamed from trunk/package/libvorbis/libvorbis.mk +6 -0
+	touch $@
+
 
+libvorbis-clean:
+	@if [ -d $(LIBVORBIS_DIR)/Makefile ] ; then \
+		$(MAKE) -C $(LIBVORBIS_DIR) clean ; \
+	fi;

just

	-$(MAKE) -C $(LIBVORBIS_DIR) clean

and drop the if.

libvorbis/libvorbis.mk~

Quoted 16 lines
libvorbis/libvorbis.mk renamed from trunk/package/libvorbis/libvorbis.mk +13 -0
+
+libvorbis-dirclean:
+	rm -rf $(LIBVORBIS_DIR) $(LIBVORBIS_DIR)
+
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBVORBIS)),y)
+TARGETS+=libvorbis
+endif

diff -uN --recursive ../trunk/package/libvorbis/libvorbis.mk~ package/libvorbis/libvorbis.mk~

libvorbis/libvorbis.mk~ renamed from trunk/package/libvorbis/libvorbis.mk~ +0 -0

you want --exclude='*~'
Alternatively, a simple "svn diff > ~/mypatch.diff" should do the right thing.

author
#4 lore raw

[Buildroot] Ogg and Vorbis patch part 2.1

Quoted 8 lines · Bernhard Fischer

Thanks for the update, but please see below..

Quoted 4 lines

Regards,
Rod Boyce

Quoted 5 lines

you want --exclude='*~'
Alternatively, a simple "svn diff > ~/mypatch.diff" should do the right thing.

Bernhard,

If you know a way to get svn diff to work the same way as diff -uN does then I am listening. I have tried passing -N to svn diff but without success so that is why I am using just diff. I have even tried 'svn diff --diff-cmd which diff -x "-uN --recursive"' but it still does not show new files in the diff output. As for me when I just do svn diff I only get changes to files that are on SVN I don't get my new changes.

Attached are all the other suggested changes as these mostly obvious. But gnuconfig needs updating and it is gettign in the way of my diffs now and I have to exclude yet another directory.

Regards,
Rod Boyce

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libogg-libvorbis.patch
Type: text/x-patch
Size: 7979 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070601/7894b917/attachment.bin

#5 lore raw

[Buildroot] Ogg and Vorbis patch part 2.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"RB" == Rod Boyce <[email protected]> writes:

Hi,

RB> If you know a way to get svn diff to work the same way as diff -uN RB> does then I am listening. I have tried passing -N to svn diff but RB> without success so that is why I am using just diff. I have even RB> tried 'svn diff --diff-cmd which diff -x "-uN --recursive"' but RB> it still does not show new files in the diff output. As for me RB> when I just do svn diff I only get changes to files that are on RB> SVN I don't get my new changes.

Just svn add them before diffing.

Signature · 1 line
Bye, Peter Korsgaard
author
#6 lore raw

[Buildroot] SVN diff was Ogg and Vorbis patch part 2.1

Quoted 11 lines · Peter Korsgaard

Hi,

RB> If you know a way to get svn diff to work the same way as diff -uN RB> does then I am listening. I have tried passing -N to svn diff but RB> without success so that is why I am using just diff. I have even RB> tried 'svn diff --diff-cmd which diff -x "-uN --recursive"' but RB> it still does not show new files in the diff output. As for me RB> when I just do svn diff I only get changes to files that are on RB> SVN I don't get my new changes.

Just svn add them before diffing

Peter,

Thank you for this tip I was looking at svn diff as a waste of space.

Regards,
Rod Boyce