haiku/build/jam/OptionalBuildFeatures
Alexander von Gluck IV fb7f48a9eb OpenGL Kit: Use GLU-9.0 for gcc2 and gcc4
* As of Mesa3D 9.0+, GLU is a seperate project
 * Our in-tree GLUT builds with GLU-9.0  without
   modification.
 * We ignore the GLU libraries that Mesa-7.8.2 and
   Mesa-8.1-devel provide and use the glu-9.0 ones
 * This is kind of a limbo state, but works for now.
 * Eventually we will be on Mesa 9.0 (which requires
   the external GLU) and Mesa 7.8.2 (which works with
   the newer external GLU) and will rip GLU out of the
   7.8.2 OptionalBuildPackage.
 * I don't *think* we are using the Mesa GLU headers...
   we will know for sure when I pull'em out of the
   OptionalBuildPackages :D
2012-11-13 10:52:06 -06:00

649 lines
20 KiB
Plaintext

# This file contains setup for features that can optionally be used for the
# build. For features that require downloading a zip file from somewhere it is
# likely the same file use for an optional package.
# Detect a hybrid GCC2/GCC4 image and disable the checks for unavailable GCC4
# packages. (It does not matter if a package was built with either compiler,
# the system should have the respective other system libs.)
local isHybridBuild ;
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
isHybridBuild = 1 ;
}
local baseURL = http://www.haiku-files.org/files/optional-packages ;
# SSL
# Automatically enable the SSL feature, when the optional OpenSSL optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
HAIKU_BUILD_FEATURE_SSL = 1 ;
}
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-r1a4-x86-gcc4-2012-08-29.zip ;
} else {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-r1a4-x86-gcc2-2012-08-26.zip ;
}
HAIKU_OPENSSL_URL = $(baseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_SSL) {
if $(TARGET_ARCH) != x86 {
Echo "SSL build feature not available for $(TARGET_ARCH)" ;
} else {
# Download the zip archive.
local zipFile = [ DownloadFile $(HAIKU_OPENSSL_PACKAGE)
: $(HAIKU_OPENSSL_URL) ] ;
# zip file and output directory
HAIKU_OPENSSL_ZIP_FILE = $(zipFile) ;
HAIKU_OPENSSL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_OPENSSL_PACKAGE:B) ] ;
# extract headers and libraries
HAIKU_OPENSSL_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_OPENSSL_DIR)
: common/include/ : $(zipFile) : extracted-openssl
] ;
HAIKU_OPENSSL_LIBS = [ ExtractArchive $(HAIKU_OPENSSL_DIR)
:
common/lib/libcrypto.so
common/lib/libssl.so
: $(zipFile)
: extracted-openssl
] ;
HAIKU_OPENSSL_ENABLED = 1 ;
HAIKU_OPENSSL_HEADERS
= [ FDirName $(HAIKU_OPENSSL_DIR) common include ] ;
}
}
# ICU
# Note ICU isn't actually optional, but is still an external package
HAIKU_ICU_GCC_2_PACKAGE = icu-4.8.1.1-r1a4-x86-gcc2-2012-08-29.zip ;
HAIKU_ICU_GCC_4_PACKAGE = icu-4.8.1.1-r1a4-x86-gcc4-2012-08-29.zip ;
HAIKU_ICU_PPC_PACKAGE = icu-4.8.1-ppc-2011-08-20.zip ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
local icu_package ;
if $(TARGET_ARCH) = ppc {
icu_package = $(HAIKU_ICU_PPC_PACKAGE) ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.8.1-ppc-2011-12-19.zip ;
} else if $(HAIKU_GCC_VERSION[1]) = 2 {
icu_package = $(HAIKU_ICU_GCC_2_PACKAGE) ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.8.1.1-x86-gcc2-2011-12-20.zip ;
} else {
icu_package = $(HAIKU_ICU_GCC_4_PACKAGE) ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.8.1.1-x86-gcc4-2011-12-20.zip ;
}
local zipFile = [ DownloadFile $(icu_package)
: $(baseURL)/$(icu_package) ] ;
# zip file and output directory
HAIKU_ICU_ZIP_FILE = $(zipFile) ;
HAIKU_ICU_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(icu_package:B) ] ;
# extract libraries
if $(TARGET_ARCH) = ppc {
HAIKU_ICU_LIBS = [ ExtractArchive $(HAIKU_ICU_DIR)
:
libicudata.so.48.1
libicui18n.so.48.1
libicuio.so.48.1
libicule.so.48.1
libiculx.so.48.1
libicutu.so.48.1
libicuuc.so.48.1
: $(zipFile)
: extracted-icu
] ;
} else {
HAIKU_ICU_LIBS = [ ExtractArchive $(HAIKU_ICU_DIR)
:
libicudata.so.48.1.1
libicui18n.so.48.1.1
libicuio.so.48.1.1
libicule.so.48.1.1
libiculx.so.48.1.1
libicutu.so.48.1.1
libicuuc.so.48.1.1
: $(zipFile)
: extracted-icu
] ;
}
# zip file and output directory
HAIKU_ICU_DEVEL_ZIP_FILE = [ DownloadFile $(HAIKU_ICU_DEVEL_PACKAGE)
: $(baseURL)/$(HAIKU_ICU_DEVEL_PACKAGE) ] ;
HAIKU_ICU_DEVEL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_ICU_DEVEL_PACKAGE:B) ] ;
# extract headers
HAIKU_ICU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_ICU_DEVEL_DIR)
: develop/headers/3rdparty : $(HAIKU_ICU_DEVEL_ZIP_FILE)
: extracted-icu-devel ] ;
HAIKU_ICU_HEADERS
= [ FDirName $(HAIKU_ICU_DEVEL_DIR) develop headers 3rdparty ] ;
} else {
Echo "ICU not available for $(TARGET_ARCH)" ;
}
# CLucene
# Automatically install the CLucene feature, when the optional CLucene optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded CLucene ] {
HAIKU_BUILD_FEATURE_CLUCENE = 1 ;
}
HAIKU_CLUCENE_PACKAGE = clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip ;
HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_CLUCENE) {
if $(TARGET_ARCH) != x86 {
Echo "CLucene build feature not available for $(TARGET_ARCH)" ;
} else {
# Download the zip archive.
local zipFile = [ DownloadFile $(HAIKU_CLUCENE_PACKAGE)
: $(HAIKU_CLUCENE_URL) ] ;
# zip file and output directory
HAIKU_CLUCENE_ZIP_FILE = $(zipFile) ;
HAIKU_CLUCENE_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_CLUCENE_PACKAGE:B) ] ;
# extract headers and libraries
HAIKU_CLUCENE_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_CLUCENE_DIR)
: common/include/ : $(zipFile) : extracted-clucene
] ;
HAIKU_CLUCENE_LIBS = [ ExtractArchive $(HAIKU_CLUCENE_DIR)
:
common/lib/libclucene.a
: $(zipFile)
: extracted-clucene
] ;
HAIKU_CLUCENE_HEADERS
= [ FDirName $(HAIKU_CLUCENE_DIR) common include ] ;
}
}
# GLU (GL Utilities)
if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_GLU_FILE = glu-9.0-x86-gcc4-2012-11-13.zip ;
} else {
HAIKU_GLU_FILE = glu-9.0-x86-gcc2-2012-11-13.zip ;
}
local zipFile = [ DownloadFile $(HAIKU_GLU_FILE)
: $(baseURL)/lib/$(HAIKU_GLU_FILE) ] ;
HAIKU_GLU_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_GLU_FILE:B) ] ;
HAIKU_GLU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_GLU_DIR)
: develop/headers/os/opengl/GL : $(zipFile) : extracted-glu-headers ] ;
HAIKU_GLU_LIBS = [ ExtractArchive $(HAIKU_GLU_DIR)
: system/lib/libGLU.a : $(zipFile) : extracted-glu ] ;
HAIKU_GLU_HEADERS = [ FDirName $(HAIKU_GLU_DIR) develop headers os opengl ] ;
} else {
Echo "GLU not yet available on $(TARGET_ARCH)" ;
}
# Mesa
if $(TARGET_ARCH) = x86 {
local glslObject ;
local galliumObjects ;
local zipFile ;
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_MESA_FILE = mesa-8.1devel-x86-gcc4-2012-06-07.zip ;
#HAIKU_MESA_FILE = mesa-8.1develdbg-x86-gcc4-2012-06-07.zip ;
glslObject = lib.haiku/libglsl.a ;
galliumObjects = lib.haiku/libgallium.a ;
} else {
HAIKU_MESA_FILE = mesa-7.8.2-x86-gcc2-2012-01-17.zip ;
}
zipFile = [ DownloadFile $(HAIKU_MESA_FILE)
: $(baseURL)/$(HAIKU_MESA_FILE) ] ;
HAIKU_MESA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_MESA_FILE:B) ] ;
HAIKU_MESA_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_MESA_DIR)
: include/ : $(zipFile) : extracted-mesa ] ;
HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR)
:
$(galliumObjects)
lib.haiku/libglapi.a
$(glslObject)
lib.haiku/libmesa.a
: $(zipFile)
: extracted-mesa ] ;
HAIKU_MESA_HEADERS = [ FDirName $(HAIKU_MESA_DIR) include ] ;
Depends $(HAIKU_MESA_HEADERS_DEPENDENCY) : $(HAIKU_GLU_HEADERS_DEPENDENCY) ;
Depends $(HAIKU_MESA_LIBS) : $(HAIKU_GLU_LIBS) ;
} else {
Echo "Mesa 3D rendering support not available on $(TARGET_ARCH)" ;
}
# FFmpeg
local ffmpegBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-r1a4-x86-gcc4-2012-09-02.zip ;
HAIKU_SPEEX_FILE = speex-1.2rc1-r1a4-x86-gcc4-2012-09-02.zip ;
HAIKU_LIBTHEORA_FILE = libtheora-1.1.1-r1a4-x86-gcc4-2012-09-02.zip ;
HAIKU_LIBVORBIS_FILE = libvorbis-1.3.2-r1a4-x86-gcc4-2012-09-02.zip ;
HAIKU_LIBOGG_FILE = libogg-1.3.0-r1a4-x86-gcc4-2012-09-02.zip ;
HAIKU_LIBVPX_FILE = libvpx-1.0.0-r1a4-x86-gcc4-2012-09-02.zip ;
} else {
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-r1a4-x86-gcc2-2012-08-30.zip ;
HAIKU_SPEEX_FILE = speex-1.2rc1-r1a4-x86-gcc2-2012-08-29.zip ;
HAIKU_LIBTHEORA_FILE = libtheora-1.1.1-r1a4-x86-gcc2-2012-08-29.zip ;
HAIKU_LIBVORBIS_FILE = libvorbis-1.3.2-r1a4-x86-gcc2-2012-08-29.zip ;
HAIKU_LIBOGG_FILE = libogg-1.3.0-r1a4-x86-gcc2-2012-08-29.zip ;
HAIKU_LIBVPX_FILE = libvpx-1.0.0-r1a4-x86-gcc2-2012-08-29.zip ;
}
local ffmpegZipFile = [ DownloadFile $(HAIKU_FFMPEG_FILE)
: $(ffmpegBaseURL)/$(HAIKU_FFMPEG_FILE) ] ;
local speexZipFile = [ DownloadFile $(HAIKU_SPEEX_FILE)
: $(ffmpegBaseURL)/$(HAIKU_SPEEX_FILE) ] ;
local libtheoraZipFile = [ DownloadFile $(HAIKU_LIBTHEORA_FILE)
: $(ffmpegBaseURL)/$(HAIKU_LIBTHEORA_FILE) ] ;
local libvorbisZipFile = [ DownloadFile $(HAIKU_LIBVORBIS_FILE)
: $(ffmpegBaseURL)/$(HAIKU_LIBVORBIS_FILE) ] ;
local liboggZipFile = [ DownloadFile $(HAIKU_LIBOGG_FILE)
: $(ffmpegBaseURL)/$(HAIKU_LIBOGG_FILE) ] ;
local libvpxZipFile = [ DownloadFile $(HAIKU_LIBVPX_FILE)
: $(ffmpegBaseURL)/$(HAIKU_LIBVPX_FILE) ] ;
HAIKU_FFMPEG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_FFMPEG_FILE:B) ] ;
HAIKU_SPEEX_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_SPEEX_FILE:B) ] ;
HAIKU_LIBTHEORA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBTHEORA_FILE:B) ] ;
HAIKU_LIBVORBIS_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBVORBIS_FILE:B) ] ;
HAIKU_LIBOGG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBOGG_FILE:B) ] ;
HAIKU_LIBVPX_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBVPX_FILE:B) ] ;
HAIKU_FFMPEG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_FFMPEG_DIR)
: common/include/ : $(ffmpegZipFile) : extracted-ffmpeg ] ;
HAIKU_SPEEX_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_SPEEX_DIR)
: common/include/ : $(speexZipFile) : extracted-speex ] ;
HAIKU_LIBTHEORA_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBTHEORA_DIR)
: common/include/ : $(libtheoraZipFile) : extracted-libtheora ] ;
HAIKU_LIBVORBIS_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBVORBIS_DIR)
: common/include/ : $(libvorbisZipFile) : extracted-libvorbis ] ;
HAIKU_LIBOGG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBOGG_DIR)
: common/include/ : $(liboggZipFile) : extracted-libogg ] ;
HAIKU_LIBVPX_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBVPX_DIR)
: common/include/ : $(libvpxZipFile) : extracted-libvpx ] ;
HAIKU_FFMPEG_LIBS = [ ExtractArchive $(HAIKU_FFMPEG_DIR)
:
common/lib/libavformat.a
common/lib/libavcodec.a
common/lib/libavdevice.a
common/lib/libavfilter.a
common/lib/libswscale.a
common/lib/libavutil.a
: $(ffmpegZipFile)
: extracted-ffmpeg ] ;
Depends $(HAIKU_FFMPEG_LIBS) : $(HAIKU_FFMPEG_HEADERS_DEPENDENCY) ;
HAIKU_SPEEX_LIBS = [ ExtractArchive $(HAIKU_SPEEX_DIR)
:
common/lib/libspeex.a
: $(speexZipFile)
: extracted-speex ] ;
Depends $(HAIKU_SPEEX_LIBS) : $(HAIKU_SPEEX_HEADERS_DEPENDENCY) ;
HAIKU_LIBTHEORA_LIBS = [ ExtractArchive $(HAIKU_LIBTHEORA_DIR)
:
common/lib/libtheora.a
common/lib/libtheoradec.a
common/lib/libtheoraenc.a
: $(libtheoraZipFile)
: extracted-libtheora ] ;
Depends $(HAIKU_LIBTHEORA_LIBS) : $(HAIKU_LIBTHEORA_HEADERS_DEPENDENCY) ;
HAIKU_LIBVORBIS_LIBS = [ ExtractArchive $(HAIKU_LIBVORBIS_DIR)
:
common/lib/libvorbis.a
common/lib/libvorbisenc.a
: $(libvorbisZipFile)
: extracted-libvorbis ] ;
Depends $(HAIKU_LIBVORBIS_LIBS) : $(HAIKU_LIBVORBIS_HEADERS_DEPENDENCY) ;
HAIKU_LIBOGG_LIBS = [ ExtractArchive $(HAIKU_LIBOGG_DIR)
:
common/lib/libogg.a
: $(liboggZipFile)
: extracted-libogg ] ;
Depends $(HAIKU_LIBOGG_LIBS) : $(HAIKU_LIBOGG_HEADERS_DEPENDENCY) ;
HAIKU_LIBVPX_LIBS = [ ExtractArchive $(HAIKU_LIBVPX_DIR)
:
common/lib/libvpx.a
: $(libvpxZipFile)
: extracted-libvpx ] ;
Depends $(HAIKU_LIBVPX_LIBS) : $(HAIKU_LIBVPX_HEADERS_DEPENDENCY) ;
HAIKU_FFMPEG_HEADERS = [ FDirName $(HAIKU_FFMPEG_DIR) common include ] ;
HAIKU_SPEEX_HEADERS = [ FDirName $(HAIKU_SPEEX_DIR) common include ] ;
HAIKU_LIBTHEORA_HEADERS = [ FDirName $(HAIKU_LIBTHEORA_DIR) common include ] ;
HAIKU_LIBVORBIS_HEADERS = [ FDirName $(HAIKU_LIBVORBIS_DIR) common include ] ;
HAIKU_LIBOGG_HEADERS = [ FDirName $(HAIKU_LIBOGG_DIR) common include ] ;
HAIKU_LIBVPX_HEADERS = [ FDirName $(HAIKU_LIBVPX_DIR) common include ] ;
} else {
Echo "FFMpeg support not available on $(TARGET_ARCH)" ;
}
# MikMod
local mikmodBaseURL = http://haiku-files.org/files/optional-packages/lib ;
if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_MIKMOD_FILE = libmikmod-3.1.11-r1a4-x86-gcc4-2012-09-02.zip ;
} else {
HAIKU_MIKMOD_FILE = libmikmod-3.1.11-r1a4-x86-gcc2-2012-08-29.zip ;
}
local mikmodZipFile = [ DownloadFile $(HAIKU_MIKMOD_FILE)
: $(mikmodBaseURL)/$(HAIKU_MIKMOD_FILE) ] ;
HAIKU_MIKMOD_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_MIKMOD_FILE:B) ] ;
HAIKU_MIKMOD_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_MIKMOD_DIR)
: common/include/ : $(mikmodZipFile) : extracted-mikmod ] ;
HAIKU_MIKMOD_LIBS = [ ExtractArchive $(HAIKU_MIKMOD_DIR)
:
common/lib/libmikmod.a
: $(mikmodZipFile)
: extracted-ffmpeg ] ;
Depends $(HAIKU_MIKMOD_LIBS) : $(HAIKU_MIKMOD_HEADERS_DEPENDENCY) ;
HAIKU_MIKMOD_HEADERS = [ FDirName $(HAIKU_MIKMOD_DIR) common include ] ;
} else {
Echo "MikMod support not available on $(TARGET_ARCH)" ;
}
# Freetype
local freetypeBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = ppc {
HAIKU_FREETYPE_FILE = freetype-2.4.9-ppc-gcc4-2012-06-26.zip ;
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_FREETYPE_FILE = freetype-2.4.9-r1a4-x86-gcc4-2012-09-02.zip ;
} else {
HAIKU_FREETYPE_FILE = freetype-2.4.9-r1a4-x86-gcc2-2012-08-28.zip ;
}
local freetypeZipFile = [ DownloadFile $(HAIKU_FREETYPE_FILE)
: $(freetypeBaseURL)/$(HAIKU_FREETYPE_FILE) ] ;
HAIKU_FREETYPE_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_FREETYPE_FILE:B) ] ;
HAIKU_FREETYPE_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_FREETYPE_DIR)
: develop/headers/3rdparty/freetype2 : $(freetypeZipFile)
: extracted-freetype ] ;
HAIKU_FREETYPE_LIB = [ ExtractArchive $(HAIKU_FREETYPE_DIR)
:
common/lib/libfreetype.so
: $(freetypeZipFile)
: extracted-freetype ] ;
HAIKU_FREETYPE_CURRENT_LIB = [ ExtractArchive $(HAIKU_FREETYPE_DIR)
:
common/lib/libfreetype.so.6.8.1
: $(freetypeZipFile)
: extracted-freetype ] ;
Depends $(HAIKU_FREETYPE_LIB) $(HAIKU_FREETYPE_CURRENT_LIB) : $(HAIKU_FREETYPE_HEADERS_DEPENDENCY) ;
HAIKU_FREETYPE_CURRENT_LINK = libfreetype.so.6 ;
HAIKU_FREETYPE_HEADERS = [ FDirName $(HAIKU_FREETYPE_DIR) develop
headers 3rdparty ] [ FDirName $(HAIKU_FREETYPE_DIR) develop
headers 3rdparty freetype2 ] ;
} else {
Echo "Freetype support not available on $(TARGET_ARCH)" ;
}
# TagLib
# Automatically install the TagLib feature, when the optional TagLib optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded TagLib ] {
HAIKU_BUILD_FEATURE_TAGLIB = 1 ;
}
HAIKU_TAGLIB_PACKAGE = taglib-1.6.3-r1a4-x86-gcc2-2012-09-03.zip ;
HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_TAGLIB) {
if $(TARGET_ARCH) != x86 {
Echo "TagLib build feature not available for $(TARGET_ARCH)" ;
} else {
# Download the zip archive.
local zipFile = [ DownloadFile $(HAIKU_TAGLIB_PACKAGE)
: $(HAIKU_TAGLIB_URL) ] ;
# zip file and output directory
HAIKU_TAGLIB_ZIP_FILE = $(zipFile) ;
HAIKU_TAGLIB_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_TAGLIB_PACKAGE:B) ] ;
# extract headers and libraries
HAIKU_TAGLIB_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_TAGLIB_DIR)
: common/include/ : $(zipFile) : extracted-taglib
] ;
HAIKU_TAGLIB_LIBS = [ ExtractArchive $(HAIKU_TAGLIB_DIR)
:
common/lib/libtag.so
common/lib/libtag_c.so
: $(zipFile)
: extracted-taglib
] ;
HAIKU_TAGLIB_HEADERS
= [ FDirName $(HAIKU_TAGLIB_DIR) common include taglib ] ;
}
}
# WebKit
# Automatically install the WebKit feature, when the optional WebPositive
# optional package is enabled.
if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
HAIKU_BUILD_FEATURE_WEBKIT = 1 ;
}
HAIKU_WEBKIT_FILE = haikuwebkit-1.1.3-x86-gcc4-2012-08-31a.zip ;
if $(HAIKU_BUILD_FEATURE_WEBKIT) {
if $(TARGET_ARCH) != x86 {
Echo "WebKit support not available on $(TARGET_ARCH)" ;
} else if $(HAIKU_GCC_VERSION[1]) < 4 {
if ! $(isHybridBuild) {
Echo "WebKit support not available on gcc $(HAIKU_GCC_VERSION[1])" ;
} else {
Echo "WebKit to be utilized by gcc4 inside $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR)" ;
}
} else {
local zipFile = [ DownloadFile $(HAIKU_WEBKIT_FILE)
: $(baseURL)/$(HAIKU_WEBKIT_FILE) ] ;
HAIKU_WEBKIT_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_WEBKIT_FILE:B) ] ;
HAIKU_WEBKIT_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
: include/ : $(zipFile) : extracted-webkit ] ;
HAIKU_WEBKIT_LIBS = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
:
lib/libwtf.so
lib/libjavascriptcore.so
lib/libwebcore.so
lib/libwebkit.so
: $(zipFile)
: extracted-webkit
] ;
HAIKU_WEBKIT_HEADERS = [ FDirName $(HAIKU_WEBKIT_DIR) include ] ;
}
}
# libpng
local libpngBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = ppc {
HAIKU_LIBPNG_FILE = libpng-1.5.12-ppc-gcc4-2012-08-27.zip ;
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_LIBPNG_FILE = libpng-1.5.12-x86-gcc4-2012-08-23.zip ;
} else {
HAIKU_LIBPNG_FILE = libpng-1.5.12-x86-gcc2-2012-08-23.zip ;
}
local libpngZipFile = [ DownloadFile $(HAIKU_LIBPNG_FILE)
: $(libpngBaseURL)/$(HAIKU_LIBPNG_FILE) ] ;
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 ] ;
} else {
Echo "libpng support not available on $(TARGET_ARCH)" ;
}
# jpeg
local jpegBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = ppc {
HAIKU_JPEG_FILE = jpeg-8d-ppc-gcc4-2012-08-27.zip ;
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_JPEG_FILE = jpeg-8d-x86-gcc4-2012-08-23.zip ;
} else {
HAIKU_JPEG_FILE = jpeg-8d-x86-gcc2-2012-08-23.zip ;
}
local jpegZipFile = [ DownloadFile $(HAIKU_JPEG_FILE)
: $(jpegBaseURL)/$(HAIKU_JPEG_FILE) ] ;
HAIKU_JPEG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_JPEG_FILE:B) ] ;
HAIKU_JPEG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_JPEG_DIR)
: common/include : $(jpegZipFile)
: extracted-jpeg ] ;
HAIKU_JPEG_LIB = [ ExtractArchive $(HAIKU_JPEG_DIR)
:
common/lib/libjpeg.so
: $(jpegZipFile)
: extracted-jpeg ] ;
HAIKU_JPEG_CURRENT_LIB = [ ExtractArchive $(HAIKU_JPEG_DIR)
:
common/lib/libjpeg.so.8.4.0
: $(jpegZipFile)
: extracted-jpeg ] ;
Depends $(HAIKU_JPEG_LIB) $(HAIKU_JPEG_CURRENT_LIB) : $(HAIKU_JPEG_HEADERS_DEPENDENCY) ;
HAIKU_JPEG_CURRENT_LINK = libjpeg.so.8 ;
HAIKU_JPEG_HEADERS = [ FDirName $(HAIKU_JPEG_DIR) common include ] ;
} 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)" ;
}