[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#808611: Build of JUCE without vendored dependencies.



Hi Iohannes,

I tried to build libopenshot-audio with the vendored JUCE version but disabling its respective vendored dependencies, which you list in the TODO.Debian in the JUCE packaging repository.

This is how far I went, and hope it will be useful. FYI, I believe the version of JUCE embedded in OpenShot is partial, so I did not have to deal with all the dependencies you listed.

These are the dependencies that were successfully substituted with the system ones, with their corresponding CFLAGS and LDFLAGS:

flac:
FLAC_CFLAGS = -DJUCE_INCLUDE_FLAC_CODE=0 $(shell pkg-config --cflags flac)
FLAC_LDFLAGS = $(shell pkg-config --libs flac)

libjpeg:
JPEG_CFLAGS = -DJUCE_INCLUDE_JPEGLIB_CODE=0 $(shell pkg-config --cflags libjpeg)
JPEG_LDFLAGS = $(shell pkg-config --libs libjpeg)

libpng:
PNG_CFLAGS = -DJUCE_INCLUDE_PNGLIB_CODE=0 -DPNG_SKIP_SETJMP_CHECK $(shell pkg-config --cflags libpng)
PNG_LDFLAGS = $(shell pkg-config --libs libpng)

vorbis:
VORBIS_CFLAGS = -DJUCE_INCLUDE_OGGVORBIS_CODE=0 $(shell pkg-config --cflags vorbis)
VORBIS_LDFLAGS = $(shell pkg-config --libs vorbis)

zlib:
ZLIB_CFLAGS = -DJUCE_INCLUDE_ZLIB_CODE=0 $(shell pkg-config --cflags zlib)
ZLIB_LDFLAGS = $(shell pkg-config --libs zlib)

+ patch (provided) to replace the z-prefixed zlib types with non z-prefixed ones, because the symbols aren't defined apparently in the system zlib which Debian provides. The patch might be to be adapted for your source layout.

Good luck.

Cheers,
Ghis
From: Ghislain Antony Vaillant <ghisvail@gmail.com>
Date: Tue, 19 Jan 2016 16:31:57 +0000
Subject: Use non z-prefixed zlib types.

---
 .../modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp       | 4 ++--
 .../modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp      | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/JuceLibraryCode/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp b/JuceLibraryCode/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
index f1db2b4..ee4afcf 100644
--- a/JuceLibraryCode/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
+++ b/JuceLibraryCode/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
@@ -87,8 +87,8 @@ private:
         {
             stream.next_in   = const_cast <uint8*> (data);
             stream.next_out  = buffer;
-            stream.avail_in  = (z_uInt) dataSize;
-            stream.avail_out = (z_uInt) sizeof (buffer);
+            stream.avail_in  = (uInt) dataSize;
+            stream.avail_out = (uInt) sizeof (buffer);
 
             const int result = isFirstDeflate ? deflateParams (&stream, compLevel, strategy)
                                               : deflate (&stream, flushMode);
diff --git a/JuceLibraryCode/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/JuceLibraryCode/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
index 88d49a3..b929580 100644
--- a/JuceLibraryCode/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
+++ b/JuceLibraryCode/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
@@ -126,8 +126,8 @@ public:
         {
             stream.next_in  = data;
             stream.next_out = dest;
-            stream.avail_in  = (z_uInt) dataSize;
-            stream.avail_out = (z_uInt) destSize;
+            stream.avail_in  = (uInt) dataSize;
+            stream.avail_out = (uInt) destSize;
 
             switch (inflate (&stream, Z_PARTIAL_FLUSH))
             {
@@ -136,7 +136,7 @@ public:
                 // deliberate fall-through
             case Z_OK:
                 data += dataSize - stream.avail_in;
-                dataSize = (z_uInt) stream.avail_in;
+                dataSize = (uInt) stream.avail_in;
                 return (int) (destSize - stream.avail_out);
 
             case Z_NEED_DICT:

Reply to: