haiku/build/jam/OptionalBuildFeatures
2013-04-28 19:21:46 +02:00

252 lines
6.9 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.
# 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.0e-x86-gcc4-2011-09-08.zip ;
} else {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-1-x86_gcc2.hpkg ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
local hpkgBaseURL = http://haiku-files.org/files/hpkg ;
HAIKU_OPENSSL_URL = $(hpkgBaseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_SSL) {
if $(TARGET_ARCH) != x86 {
Echo "SSL build feature not available for $(TARGET_ARCH)" ;
} else {
# Download the package.
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)
: develop/headers/ : $(zipFile) : extracted-openssl
] ;
HAIKU_OPENSSL_LIBS = [ ExtractArchive $(HAIKU_OPENSSL_DIR)
:
develop/lib/libcrypto.so
develop/lib/libssl.so
: $(zipFile)
: extracted-openssl
] ;
HAIKU_OPENSSL_ENABLED = 1 ;
HAIKU_OPENSSL_HEADERS
= [ FDirName $(HAIKU_OPENSSL_DIR) develop/headers ] ;
}
}
# ICU
# Note ICU isn't actually optional, but is still an external package
HAIKU_ICU_GCC_2_PACKAGE = icu-4.8.1.1-1-x86_gcc2.hpkg ;
HAIKU_ICU_GCC_4_PACKAGE = icu-4.8.1-x86-gcc4-2011-11-02.zip ;
# TODO: Make hpkg!
HAIKU_ICU_PPC_PACKAGE = icu-4.8.1-ppc-2011-08-20.zip ;
HAIKU_ICU_DEVEL_PACKAGE = icu-devel-4.8.1-1-any.hpkg ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
local icu_package ;
if $(TARGET_ARCH) = ppc {
icu_package = $(HAIKU_ICU_PPC_PACKAGE) ;
} else if $(HAIKU_GCC_VERSION[1]) = 2 {
icu_package = $(HAIKU_ICU_GCC_2_PACKAGE) ;
} else {
icu_package = $(HAIKU_ICU_GCC_4_PACKAGE) ;
}
local packageFile = [ DownloadFile $(icu_package)
: $(hpkgBaseURL)/$(icu_package) ] ;
# zip file and output directory
HAIKU_ICU_PACKAGE_FILE = $(packageFile) ;
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
: $(packageFile)
: extracted-icu
] ;
} else {
HAIKU_ICU_LIBS = [ ExtractArchive $(HAIKU_ICU_DIR)
:
lib/libicudata.so.48.1.1
lib/libicui18n.so.48.1.1
lib/libicuio.so.48.1.1
lib/libicule.so.48.1.1
lib/libiculx.so.48.1.1
lib/libicutu.so.48.1.1
lib/libicuuc.so.48.1.1
: $(packageFile)
: extracted-icu
] ;
}
} else {
Echo "ICU not available for $(TARGET_ARCH)" ;
}
# zip file and output directory
HAIKU_ICU_DEVEL_ZIP_FILE = [ DownloadFile $(HAIKU_ICU_DEVEL_PACKAGE)
: $(hpkgBaseURL)/$(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 ] ;
# CLucene
# Automatically install the CLucene feature, when the optional CLucene optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded CLucene ] {
HAIKU_BUILD_FEATURE_CLUCENE = 1 ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
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 ] ;
}
}
# TagLib
# Automatically install the TagLib feature, when the optional TagLib optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded TagLib ] {
HAIKU_BUILD_FEATURE_TAGLIB = 1 ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_TAGLIB_PACKAGE = taglib-1.6.3-r1a2-x86-gcc2-2010-04-25.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 ] ;
}
}
# LibSolv
if $(TARGET_ARCH) != x86 {
Echo "Libsolv not available for $(TARGET_ARCH)." ;
} else if $(HAIKU_GCC_VERSION[1]) = 2 {
HAIKU_LIBSOLV_PACKAGE
= libsolv-0.3.0_haiku_2013_04_18-2-x86_gcc2.hpkg ;
} else {
Echo "Libsolv not available for gcc4." ;
}
if $(HAIKU_LIBSOLV_PACKAGE) {
# download package
HAIKU_LIBSOLV_PACKAGE_FILE = [ DownloadFile $(HAIKU_LIBSOLV_PACKAGE)
: $(hpkgBaseURL)/$(HAIKU_LIBSOLV_PACKAGE) ] ;
HAIKU_LIBSOLV_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_LIBSOLV_PACKAGE:B) ] ;
# extract headers and libraries
HAIKU_LIBSOLV_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBSOLV_DIR)
: develop/headers/ : $(HAIKU_LIBSOLV_PACKAGE_FILE) : extracted-libsolv
] ;
HAIKU_LIBSOLV_LIBS = [ ExtractArchive $(HAIKU_LIBSOLV_DIR)
:
develop/lib/libsolv.so
develop/lib/libsolvext.so
: $(HAIKU_LIBSOLV_PACKAGE_FILE)
: extracted-libsolv
] ;
HAIKU_LIBSOLV_HEADERS = [ FDirName $(HAIKU_LIBSOLV_DIR) develop/headers ] ;
}