[haiku-commits] haiku: hrev44725 - build/jam src/add-ons/translators/hpgs src/add-ons/translators/wonderbrush src/apps/packageinstaller src/libs/tiff

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 30 Oct 2012 22:12:29 +0100 (CET)

hrev44725 adds 2 changesets to branch 'master'
old head: e634025c06f97744c04a19bd4c1205464d8ef5ac
new head: 7be608abc4da7fa5912e4cd29d72c9b5434ce44f

----------------------------------------------------------------------------

a6a99fc: zlib: added an optional build package, integrated to the build
  
  * optional package for zlib 1.2.7
  * keep zlib in build for the bootloader tarfs

7be608a: HPGSTranslator: fix the build
  
  * add missing definition since libpng upgrades
  * don't treat warnings as errors

                                   [ JÃrÃme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

15 files changed, 90 insertions(+), 21 deletions(-)
build/jam/BuildSetup                             |  2 +-
build/jam/HaikuImage                             |  8 +++-
build/jam/OptionalBuildFeatures                  | 40 ++++++++++++++++++++
build/jam/OptionalPackages                       |  3 +-
src/add-ons/media/plugins/ffmpeg/Jamfile         |  2 +-
.../translators/exr/openexr/ilmimf/Jamfile       |  8 +++-
src/add-ons/translators/hpgs/Jamfile             |  7 +++-
src/add-ons/translators/hpgs/lib/hpgsimage.c     |  1 +
src/add-ons/translators/png/Jamfile              |  5 ++-
src/add-ons/translators/wonderbrush/Jamfile      |  9 +++--
src/apps/installedpackages/Jamfile               |  2 +-
src/apps/packageinstaller/Jamfile                |  8 +++-
src/kits/package/Jamfile                         |  7 +++-
src/libs/Jamfile                                 |  2 +-
src/libs/tiff/Jamfile                            |  7 +++-

############################################################################

Commit:      a6a99fce04641549d5d765199533d8651e890b74
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a6a99fc
Author:      JÃrÃme Duval <jerome.duval@xxxxxxxxx>
Date:        Tue Oct 30 20:18:36 2012 UTC

zlib: added an optional build package, integrated to the build

* optional package for zlib 1.2.7
* keep zlib in build for the bootloader tarfs

----------------------------------------------------------------------------

diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage
index 6c2037c..3e59b0e 100644
--- a/build/jam/HaikuImage
+++ b/build/jam/HaikuImage
@@ -94,7 +94,7 @@ SYSTEM_LIBS =
        <revisioned>libroot.so libroot-addon-icu.so
        libscreensaver.so
        libtextencoding.so libtiff.so libtracker.so libtranslation.so
-       libz.so
+       $(HAIKU_ZLIB_CURRENT_LIB)
        $(HAIKU_SHARED_LIBSTDC++) $(HAIKU_SHARED_LIBSUPC++)
        $(HAIKU_FREETYPE_CURRENT_LIB)
 ;
@@ -352,6 +352,12 @@ AddSymlinkToHaikuHybridImage system lib : 
$(HAIKU_JPEG_CURRENT_LIB:BS)
 AddSymlinkToHaikuHybridImage system lib : $(HAIKU_JPEG_CURRENT_LINK)
        : libjpeg.so : : true ;
 
+# zlib.so links to the current zlib
+AddSymlinkToHaikuHybridImage system lib : $(HAIKU_ZLIB_CURRENT_LIB:BS)
+       : $(HAIKU_ZLIB_CURRENT_LINK) : : true ;
+AddSymlinkToHaikuHybridImage system lib : $(HAIKU_ZLIB_CURRENT_LINK)
+       : libzlib.so : : true ;
+
 # servers
 AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
 
diff --git a/build/jam/OptionalBuildFeatures b/build/jam/OptionalBuildFeatures
index 6028a25..3122784 100644
--- a/build/jam/OptionalBuildFeatures
+++ b/build/jam/OptionalBuildFeatures
@@ -581,3 +581,43 @@ if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
 } else {
        Echo "jpeg support not available on $(TARGET_ARCH)" ;
 }
+
+# zlib
+local zlibBaseURL = $(baseURL)/lib ;
+if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
+       if $(TARGET_ARCH) = ppc {
+               HAIKU_ZLIB_FILE = zlib-1.2.7-ppc-gcc4-2012-10-30.zip ;
+       } else if $(HAIKU_GCC_VERSION[1]) >= 4 {
+               HAIKU_ZLIB_FILE = zlib-1.2.7-x86-gcc4-2012-10-30.zip ;
+       } else {
+               HAIKU_ZLIB_FILE = zlib-1.2.7-x86-gcc2-2012-10-30.zip ;
+       }
+
+       local zlibZipFile = [ DownloadFile $(HAIKU_ZLIB_FILE)
+               : $(zlibBaseURL)/$(HAIKU_ZLIB_FILE) ] ;
+
+       HAIKU_ZLIB_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
+               $(HAIKU_ZLIB_FILE:B) ] ;
+
+       HAIKU_ZLIB_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_ZLIB_DIR)
+               : common/include : $(zlibZipFile)
+               : extracted-zlib ] ;
+
+       HAIKU_ZLIB_LIB = [ ExtractArchive $(HAIKU_ZLIB_DIR)
+               :
+               common/lib/libz.so
+               : $(zlibZipFile)
+               : extracted-zlib ] ;
+       HAIKU_ZLIB_CURRENT_LIB = [ ExtractArchive $(HAIKU_ZLIB_DIR)
+               :
+               common/lib/libz.so.1.2.7
+               : $(zlibZipFile)
+               : extracted-zlib ] ;
+       Depends $(HAIKU_ZLIB_LIB) $(HAIKU_ZLIB_CURRENT_LIB) : 
$(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
+
+       HAIKU_ZLIB_CURRENT_LINK = libz.so.1 ;
+
+       HAIKU_ZLIB_HEADERS = [ FDirName $(HAIKU_ZLIB_DIR) common include ] ;
+} else {
+       Echo "zlib support not available on $(TARGET_ARCH)" ;
+}
diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 65f94a5..255d638 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -846,7 +846,6 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && 
$(TARGET_ARCH) = x86 {
        AddHeaderDirectoryToHaikuImage libs ncurses : 3rdparty ;
        AddHeaderDirectoryToHaikuImage libs termcap : 3rdparty ;
        AddHeaderDirectoryToHaikuImage libs tiff : 3rdparty ;
-       AddHeaderDirectoryToHaikuImage libs zlib : 3rdparty ;
 
        CopyDirectoryToHaikuImage develop headers :
                [ FDirName $(HAIKU_FREETYPE_DIR) develop headers 3rdparty ] ;
@@ -854,6 +853,8 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && 
$(TARGET_ARCH) = x86 {
                : 3rdparty ;
        CopyDirectoryToHaikuImage develop headers : $(HAIKU_LIBPNG_HEADERS)
                : 3rdparty ;
+       CopyDirectoryToHaikuImage develop headers : $(HAIKU_ZLIB_HEADERS)
+               : 3rdparty ;
 
        # cpp headers
        if $(HAIKU_GCC_VERSION[1]) = 2 {
diff --git a/src/add-ons/media/plugins/ffmpeg/Jamfile 
b/src/add-ons/media/plugins/ffmpeg/Jamfile
index 0ac7522..0d88d5b 100644
--- a/src/add-ons/media/plugins/ffmpeg/Jamfile
+++ b/src/add-ons/media/plugins/ffmpeg/Jamfile
@@ -56,7 +56,7 @@ Addon ffmpeg :
 
        be
        media
-       libz.a
+       $(HAIKU_ZLIB_LIB)
        $(TARGET_LIBSUPC++)
        $(TARGET_NETWORK_LIBS)
 ;
diff --git a/src/add-ons/translators/exr/openexr/ilmimf/Jamfile 
b/src/add-ons/translators/exr/openexr/ilmimf/Jamfile
index 3bbe147..7351941 100644
--- a/src/add-ons/translators/exr/openexr/ilmimf/Jamfile
+++ b/src/add-ons/translators/exr/openexr/ilmimf/Jamfile
@@ -11,7 +11,10 @@ if $(HAIKU_LIBSTDC++) = libstdc++.r4.so {
        SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
 }
 
-UseLibraryHeaders zlib ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
+
+Includes [ FGristFiles ImfPxr24Compressor.cpp ImfZipCompressor.cpp ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
 
 #StaticLibrary libilmimf.a :
 SharedLibrary libilmimf.so :
@@ -73,6 +76,7 @@ ImfVecAttribute.cpp
 ImfVersion.cpp
 ImfWav.cpp
 ImfZipCompressor.cpp
-: libhalf.a libiex.a libimath.a libilmthread.a $(TARGET_LIBSTDC++) z
+: libhalf.a libiex.a libimath.a libilmthread.a $(TARGET_LIBSTDC++)
+       $(HAIKU_ZLIB_LIB)
 ;
 
diff --git a/src/add-ons/translators/hpgs/Jamfile 
b/src/add-ons/translators/hpgs/Jamfile
index d485776..d42549c 100644
--- a/src/add-ons/translators/hpgs/Jamfile
+++ b/src/add-ons/translators/hpgs/Jamfile
@@ -2,7 +2,8 @@ SubDir HAIKU_TOP src add-ons translators hpgs ;
 
 SubDirSysHdrs [ FDirName $(SUBDIR) lib ] ;
 SubDirCcFlags -DHPGS_SHARED -std=c99 ;
-UseLibraryHeaders zlib ;
+UseLibraryHeaders iconv ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
 
@@ -42,13 +43,15 @@ hpgszostream.c
 
 Includes [ FGristFiles hpgsimage.c ]
        : $(HAIKU_LIBPNG_HEADERS_DEPENDENCY) ;
+Includes [ FGristFiles hpgszostream.c ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
 
 Translator HPGSTranslator :
        # HPGSTranslator classes
        ConfigView.cpp
        HPGSTranslator.cpp
        $(sources)
-       : be translation $(HAIKU_LIBPNG_LIB) libtextencoding.so libz.so
+       : be translation $(HAIKU_LIBPNG_LIB) libtextencoding.so 
$(HAIKU_ZLIB_LIB)
                libtranslatorsutils.a $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
        : true
 ;
diff --git a/src/add-ons/translators/png/Jamfile 
b/src/add-ons/translators/png/Jamfile
index ebaa98b..f1b7df6 100644
--- a/src/add-ons/translators/png/Jamfile
+++ b/src/add-ons/translators/png/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons translators png ;
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
 
-UseLibraryHeaders zlib ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
 
@@ -20,7 +20,8 @@ Translator PNGTranslator :
        PNGTranslator.cpp
        PNGView.cpp
 
-       : be translation $(HAIKU_LIBPNG_LIB) z libtranslatorsutils.a 
$(TARGET_LIBSUPC++)
+       : be translation $(HAIKU_LIBPNG_LIB) $(HAIKU_ZLIB_LIB)
+               $(TARGET_LIBSUPC++) libtranslatorsutils.a 
                $(HAIKU_LOCALE_LIBS)
        : true
 ;
diff --git a/src/add-ons/translators/wonderbrush/Jamfile 
b/src/add-ons/translators/wonderbrush/Jamfile
index 1396e4e..7d0e80a 100644
--- a/src/add-ons/translators/wonderbrush/Jamfile
+++ b/src/add-ons/translators/wonderbrush/Jamfile
@@ -5,11 +5,14 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
 # Include support sub folder
 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons translators wonderbrush 
support ] ;
 
-UseLibraryHeaders zlib ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
 
 AddResources WonderBrushTranslator : WonderBrushTranslator.rdef ;
 
+Includes [ FGristFiles bitmap_compression.cpp ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
+
 Translator WonderBrushTranslator :
        Canvas.cpp
        Layer.cpp
@@ -23,8 +26,8 @@ Translator WonderBrushTranslator :
        blending.cpp
        lab_convert.cpp
 
-       : be translation z libtranslatorsutils.a $(TARGET_LIBSUPC++)
-       $(HAIKU_LOCALE_LIBS)
+       : be translation $(HAIKU_ZLIB_LIB) libtranslatorsutils.a
+       $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
        : true
 ;
 
diff --git a/src/apps/installedpackages/Jamfile 
b/src/apps/installedpackages/Jamfile
index 415d23a..ba753e9 100644
--- a/src/apps/installedpackages/Jamfile
+++ b/src/apps/installedpackages/Jamfile
@@ -11,7 +11,7 @@ Application InstalledPackages :
        main.cpp
        UninstallWindow.cpp
        UninstallView.cpp
-       : be tracker translation z $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
+       : be tracker translation $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
 ;
 
 DoCatalogs InstalledPackages :
diff --git a/src/apps/packageinstaller/Jamfile 
b/src/apps/packageinstaller/Jamfile
index 4137070..6753cf1 100644
--- a/src/apps/packageinstaller/Jamfile
+++ b/src/apps/packageinstaller/Jamfile
@@ -1,10 +1,13 @@
 SubDir HAIKU_TOP src apps packageinstaller ;
 
 UsePrivateHeaders shared interface ;
-SubDirHdrs $(HAIKU_TOP) headers libs zlib ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 
 #SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits interface ] ;
 
+Includes [ FGristFiles PackageItem.cpp ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
+
 Application PackageInstaller :
        main.cpp
        PackageWindow.cpp
@@ -16,7 +19,8 @@ Application PackageInstaller :
        PackageTextViewer.cpp
        PackageImageViewer.cpp
        InstalledPackageInfo.cpp
-       : be $(HAIKU_LOCALE_LIBS) tracker translation z $(TARGET_LIBSUPC++)
+       : be $(HAIKU_LOCALE_LIBS) tracker translation $(HAIKU_ZLIB_LIB)
+               $(TARGET_LIBSUPC++)
        : PackageInstaller.rdef
 ;
 
diff --git a/src/kits/package/Jamfile b/src/kits/package/Jamfile
index a73037b..f62c275 100644
--- a/src/kits/package/Jamfile
+++ b/src/kits/package/Jamfile
@@ -1,6 +1,6 @@
 SubDir HAIKU_TOP src kits package ;
 
-UseLibraryHeaders zlib ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 
 UsePrivateHeaders
        kernel
@@ -8,6 +8,9 @@ UsePrivateHeaders
 
 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package hpkg ] ;
 
+Includes [ FGristFiles ZlibCompressionBase.cpp ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
+
 HPKG_SOURCES =
        AttributeDataReader.cpp
        BlockBufferCache.cpp
@@ -72,5 +75,5 @@ SharedLibrary libpackage.so
 
        $(HPKG_SOURCES)
        :
-       libshared.a be z $(TARGET_LIBSTDC++)
+       libshared.a be $(HAIKU_ZLIB_LIB) $(TARGET_LIBSTDC++)
 ;
diff --git a/src/libs/Jamfile b/src/libs/Jamfile
index 19c7a38..b8c745a 100644
--- a/src/libs/Jamfile
+++ b/src/libs/Jamfile
@@ -24,4 +24,4 @@ SubInclude HAIKU_TOP src libs termcap ;
 SubInclude HAIKU_TOP src libs tiff ;
 SubInclude HAIKU_TOP src libs udis86 ;
 SubInclude HAIKU_TOP src libs util ;
-SubInclude HAIKU_TOP src libs zlib ;
+
diff --git a/src/libs/tiff/Jamfile b/src/libs/tiff/Jamfile
index 64d5482..9402c31 100644
--- a/src/libs/tiff/Jamfile
+++ b/src/libs/tiff/Jamfile
@@ -1,7 +1,8 @@
 SubDir HAIKU_TOP src libs tiff ;
 
-UseLibraryHeaders tiff zlib ;
+UseLibraryHeaders tiff ;
 UseHeaders $(HAIKU_JPEG_HEADERS) : true ;
+UseHeaders $(HAIKU_ZLIB_HEADERS) : true ;
 
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
 
@@ -47,10 +48,12 @@ local shared_files =
 
 Includes [ FGristFiles tif_jpeg.c tif_ojpeg.c ]
        : $(HAIKU_JPEG_HEADERS_DEPENDENCY) ;
+Includes [ FGristFiles tif_pixarlog.c tif_zip.c ]
+       : $(HAIKU_ZLIB_HEADERS_DEPENDENCY) ;
 
 Objects $(shared_files) ;
 
 SharedLibrary libtiff.so : [ FGristFiles $(shared_files:S=.o) ]
-       : $(HAIKU_JPEG_LIB) z : 3.8 ;
+       : $(HAIKU_JPEG_LIB) $(HAIKU_ZLIB_LIB) : 3.8 ;
 
 StaticLibrary libtiff.a : [ FGristFiles $(shared_files:S=.o) ] ;

############################################################################

Revision:    hrev44725
Commit:      7be608abc4da7fa5912e4cd29d72c9b5434ce44f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7be608a
Author:      JÃrÃme Duval <jerome.duval@xxxxxxxxx>
Date:        Tue Oct 30 20:51:23 2012 UTC

HPGSTranslator: fix the build

* add missing definition since libpng upgrades
* don't treat warnings as errors

----------------------------------------------------------------------------

diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup
index ce2ed40..5864f70 100644
--- a/build/jam/BuildSetup
+++ b/build/jam/BuildSetup
@@ -1355,7 +1355,7 @@ if $(HAIKU_NO_WERROR) != 1 {
        EnableWerror src add-ons translators bmp ;
 #      EnableWerror src add-ons translators exr ;
        EnableWerror src add-ons translators gif ;
-       EnableWerror src add-ons translators hpgs ;
+#      EnableWerror src add-ons translators hpgs ;
        EnableWerror src add-ons translators hvif ;
        EnableWerror src add-ons translators ico ;
 #      EnableWerror src add-ons translators jpeg ; # gcc2
diff --git a/src/add-ons/translators/hpgs/lib/hpgsimage.c 
b/src/add-ons/translators/hpgs/lib/hpgsimage.c
index 813408d..da2d4aa 100644
--- a/src/add-ons/translators/hpgs/lib/hpgsimage.c
+++ b/src/add-ons/translators/hpgs/lib/hpgsimage.c
@@ -36,6 +36,7 @@
 #include <errno.h>
 #if (defined(__BEOS__) || defined(__HAIKU__))
 #include <png.h>
+#define png_infopp_NULL (png_infopp)NULL
 #else
 #include <libpng12/png.h>
 #endif


Other related posts:

  • » [haiku-commits] haiku: hrev44725 - build/jam src/add-ons/translators/hpgs src/add-ons/translators/wonderbrush src/apps/packageinstaller src/libs/tiff - korli