Update libpng package

Also make use of new build feature rules
This commit is contained in:
Ingo Weinhold 2013-06-13 22:48:00 +02:00
parent 29f8805f6c
commit e9f440fdfd
10 changed files with 61 additions and 57 deletions

View File

@ -515,44 +515,31 @@ if $(HAIKU_BUILD_FEATURE_WEBKIT) {
# libpng
local libpngBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 || $(TARGET_ARCH) = arm {
if $(TARGET_ARCH) in arm ppc x86 x86_64 {
if $(TARGET_ARCH) = arm {
HAIKU_LIBPNG_FILE = libpng-1.5.12-arm-2012-11-21.zip ;
HAIKU_LIBPNG_PACKAGE = libpng-1.5.12-arm-2012-11-21.zip ;
} else if $(TARGET_ARCH) = ppc {
HAIKU_LIBPNG_FILE = libpng-1.5.12-ppc-gcc4-2012-08-27.zip ;
HAIKU_LIBPNG_PACKAGE = libpng-1.5.12-ppc-gcc4-2012-08-27.zip ;
} else if $(TARGET_ARCH) = x86_64 {
HAIKU_LIBPNG_FILE = libpng-1.5.12-x86_64-2012-11-18.zip ;
HAIKU_LIBPNG_PACKAGE = libpng-1.5.12-x86_64-2012-11-18.zip ;
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_LIBPNG_FILE = libpng-1.5.12-x86-gcc4-2012-08-23.zip ;
HAIKU_LIBPNG_PACKAGE = libpng-1.5.12-x86-gcc4-2012-08-23.zip ;
} else {
HAIKU_LIBPNG_FILE = libpng-1.5.12-x86-gcc2-2012-08-23.zip ;
HAIKU_LIBPNG_PACKAGE = libpng-1.5.12-2-x86_gcc2.hpkg ;
HAIKU_LIBPNG_DEVEL_PACKAGE = libpng_devel-1.5.12-2-x86_gcc2.hpkg ;
}
local libpngZipFile = [ DownloadFile $(HAIKU_LIBPNG_FILE)
: $(libpngBaseURL)/$(HAIKU_LIBPNG_FILE) ] ;
HAIKU_LIBPNG_URL = $(hpkgBaseURL)/$(HAIKU_LIBPNG_PACKAGE) ;
HAIKU_LIBPNG_DEVEL_URL = $(hpkgBaseURL)/$(HAIKU_LIBPNG_DEVEL_PACKAGE) ;
HAIKU_LIBPNG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBPNG_FILE:B) ] ;
HAIKU_LIBPNG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBPNG_DIR)
: common/include : $(libpngZipFile)
: extracted-libpng ] ;
HAIKU_LIBPNG_LIB = [ ExtractArchive $(HAIKU_LIBPNG_DIR)
:
common/lib/libpng.so
: $(libpngZipFile)
: extracted-libpng ] ;
HAIKU_LIBPNG_CURRENT_LIB = [ ExtractArchive $(HAIKU_LIBPNG_DIR)
:
common/lib/libpng15.so.15.12.0
: $(libpngZipFile)
: extracted-libpng ] ;
Depends $(HAIKU_LIBPNG_LIB) $(HAIKU_LIBPNG_CURRENT_LIB) : $(HAIKU_LIBPNG_HEADERS_DEPENDENCY) ;
HAIKU_LIBPNG_CURRENT_LINK = libpng15.so.15 ;
HAIKU_LIBPNG_HEADERS = [ FDirName $(HAIKU_LIBPNG_DIR) common include ] ;
ExtractBuildFeatureArchives libpng :
file: base $(HAIKU_LIBPNG_URL)
runtime: lib
file: devel $(HAIKU_LIBPNG_DEVEL_URL)
depends: base
library: develop/lib/libpng.so
headers: develop/headers
;
EnableBuildFeatures libpng ;
} else {

View File

@ -77,7 +77,6 @@ SYSTEM_LIBS = [ FFilterByBuildFeatures
] ;
PRIVATE_SYSTEM_LIBS = [ FFilterByBuildFeatures
$(HAIKU_JPEG_CURRENT_LIB)
$(HAIKU_LIBPNG_CURRENT_LIB)
libalm.so
libfluidsynth.so
libilmimf.so

View File

@ -11,8 +11,10 @@ OptionalPackageDependencies Caya : Expat ;
OptionalPackageDependencies CDRecord : GetTextLibintl LibIconv ;
OptionalPackageDependencies Curl : OpenSSL ;
OptionalPackageDependencies DevelopmentBase : CDRecord DevelopmentMin Yasm ;
OptionalPackageDependencies Development
: DevelopmentBase FFMpeg-devel FreeType-devel GLU-devel Perl Zlib-devel ;
OptionalPackageDependencies Development :
DevelopmentBase FFMpeg-devel FreeType-devel GLU-devel Libpng-devel Perl
Zlib-devel
;
OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
OptionalPackageDependencies GetText : GetTextLibintl ;
OptionalPackageDependencies GetTextLibintl : LibIconv ;
@ -46,4 +48,4 @@ OptionalPackageDependencies XZ-Utils : Tar ;
OptionalPackageDependencies Zlib-devel : Zlib ;
OptionalPackageDependencies MandatoryPackages
: Bzip Ctags FFMpeg FreeType GLU Grep ICU LibSolv Mesa Sed Tar Zlib ;
: Bzip Ctags FFMpeg FreeType GLU Grep ICU Libpng LibSolv Mesa Sed Tar Zlib ;

View File

@ -67,6 +67,8 @@
# LibIconv - text encoding conversion library
# LibLayout - GCC2 package needed by some BeOS apps to compile
# Libmng - mng support library
# Libpng - Portable Network Graphics library
# Libpng-devel - Libpng development files
# LibSolv - package dependency solver library
# LibXML2 - the XML support library
# LibXSLT - xslt library and utility
@ -1249,6 +1251,26 @@ if [ IsOptionalHaikuImagePackageAdded Libmng ] {
}
# Libpng
if [ IsOptionalHaikuImagePackageAdded Libpng ] {
if $(TARGET_ARCH) in arm ppc x86 x86_64 {
InstallOptionalHaikuImagePackage $(HAIKU_LIBPNG_URL) : system ;
} else {
Echo "No optional package Libpng available for $(TARGET_ARCH)" ;
}
}
# Libpng-devel
if [ IsOptionalHaikuImagePackageAdded Libpng-devel ] {
if $(TARGET_ARCH) in arm ppc x86 x86_64 {
InstallOptionalHaikuImagePackage $(HAIKU_LIBPNG_DEVEL_URL) : system ;
} else {
Echo "No optional package Libpng-devel available for $(TARGET_ARCH)" ;
}
}
# LibSolv
if [ IsOptionalHaikuImagePackageAdded LibSolv ] {
if ! $(HAIKU_LIBSOLV_PACKAGE) {

View File

@ -104,18 +104,11 @@ SYSTEM_LIBS_ALIASES =
OPTIONAL_LIBS_ALIASES =
libjpeg.so
libpng.so
libz.so
;
# TODO: Remove the following symlinks when the libraries have been packaged
# properly!
# libpng.so links to the current libpng
AddSymlinkToPackage lib : $(HAIKU_LIBPNG_CURRENT_LIB:BS)
: $(HAIKU_LIBPNG_CURRENT_LINK) : : true ;
AddSymlinkToPackage lib : $(HAIKU_LIBPNG_CURRENT_LINK)
: libpng.so : : true ;
# libjpeg.so links to the current libjpeg
AddSymlinkToPackage lib : $(HAIKU_JPEG_CURRENT_LIB:BS)
: $(HAIKU_JPEG_CURRENT_LINK) : : true ;

View File

@ -73,9 +73,6 @@ AddHeaderDirectoryToPackage libs tiff : 3rdparty ;
CopyDirectoryToPackage develop headers : $(HAIKU_JPEG_HEADERS_DEPENDENCY)
: 3rdparty : : isTarget ;
CopyDirectoryToPackage develop headers : $(HAIKU_LIBPNG_HEADERS_DEPENDENCY)
: 3rdparty : : isTarget ;
# cpp headers
if $(HAIKU_GCC_VERSION[1]) = 2 {
# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package

View File

@ -3,8 +3,8 @@ SubDir HAIKU_TOP src add-ons translators hpgs ;
SubDirSysHdrs [ FDirName $(SUBDIR) lib ] ;
SubDirCcFlags -DHPGS_SHARED -std=c99 ;
UseLibraryHeaders iconv ;
UseBuildFeatureHeaders libpng ;
UseBuildFeatureHeaders zlib ;
UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
local sources =
@ -42,7 +42,7 @@ hpgszostream.c
;
Includes [ FGristFiles hpgsimage.c ]
: $(HAIKU_LIBPNG_HEADERS_DEPENDENCY) ;
: [ BuildFeatureAttribute libpng : headers ] ;
Includes [ FGristFiles hpgszostream.c ]
: [ BuildFeatureAttribute zlib : headers ] ;
@ -51,7 +51,8 @@ Translator HPGSTranslator :
ConfigView.cpp
HPGSTranslator.cpp
$(sources)
: be translation $(HAIKU_LIBPNG_LIB) libtextencoding.so
: be translation libtextencoding.so
[ BuildFeatureAttribute libpng : library ]
[ BuildFeatureAttribute zlib : library ]
libtranslatorsutils.a $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: true

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons translators icns ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
UseBuildFeatureHeaders libpng ;
SubDirSysHdrs [ FDirName $(SUBDIR) openjpeg ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) libicns ] ;
@ -45,7 +45,7 @@ local openjpeg_files =
ObjectCcFlags [ FGristFiles $(openjpeg_files:S=$(SUFOBJ)) ] : -w ;
Includes [ FGristFiles icns_png.c ]
: $(HAIKU_LIBPNG_HEADERS_DEPENDENCY) ;
: [ BuildFeatureAttribute libpng : headers ] ;
local libicns_files =
icns_debug.c
@ -76,7 +76,8 @@ Translator ICNSTranslator :
$(libicns_files)
: be translation libtranslatorsutils.a $(TARGET_LIBSUPC++)
$(HAIKU_LIBPNG_LIB) $(HAIKU_LOCALE_LIBS)
[ BuildFeatureAttribute libpng : library ]
$(HAIKU_LOCALE_LIBS)
: true
;

View File

@ -2,8 +2,8 @@ SubDir HAIKU_TOP src add-ons translators png ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UseBuildFeatureHeaders libpng ;
UseBuildFeatureHeaders zlib ;
UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
AddResources PNGTranslator : PNGTranslator.rdef ;
@ -13,16 +13,17 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
}
Includes [ FGristFiles PNGTranslator.cpp PNGView.cpp ]
: $(HAIKU_LIBPNG_HEADERS_DEPENDENCY) ;
: [ BuildFeatureAttribute libpng : headers ] ;
Translator PNGTranslator :
PNGMain.cpp
PNGTranslator.cpp
PNGView.cpp
: be translation $(HAIKU_LIBPNG_LIB)
: be translation
[ BuildFeatureAttribute libpng : library ]
[ BuildFeatureAttribute zlib : library ]
$(TARGET_LIBSUPC++) libtranslatorsutils.a
$(TARGET_LIBSUPC++) libtranslatorsutils.a
$(HAIKU_LOCALE_LIBS)
: true
;

View File

@ -1,15 +1,16 @@
SubDir HAIKU_TOP src tools translation pnginfo ;
UseBuildFeatureHeaders zlib ;
UseHeaders $(HAIKU_LIBPNG_HEADERS) : true ;
UseBuildFeatureHeaders libpng ;
Includes [ FGristFiles pnginfo.cpp ]
:
$(HAIKU_LIBPNG_HEADERS_DEPENDENCY)
[ BuildFeatureAttribute libpng : headers ]
[ BuildFeatureAttribute zlib : headers ]
;
BinCommand pnginfo : pnginfo.cpp : be $(HAIKU_LIBPNG_LIB)
BinCommand pnginfo : pnginfo.cpp : be
[ BuildFeatureAttribute libpng : library ]
[ BuildFeatureAttribute zlib : library ]
$(TARGET_LIBSUPC++) ;