507 lines
13 KiB
Plaintext
507 lines
13 KiB
Plaintext
# This file contains setup for build features that require external packages. It
|
|
# is included once for each configured packaging architecture (with
|
|
# TARGET_PACKAGING_ARCH set accordingly).
|
|
|
|
|
|
local architecture = $(TARGET_PACKAGING_ARCH) ;
|
|
local secondaryArchSubDir = [ MultiArchIfPrimary "" : /$(architecture) ] ;
|
|
local developLibDir = develop/lib$(secondaryArchSubDir) ;
|
|
local developHeadersDir = develop/headers$(secondaryArchSubDir) ;
|
|
|
|
|
|
# SSL
|
|
|
|
# Automatically enable the SSL feature, when the OpenSSL package is enabled.
|
|
if [ IsHaikuImagePackageAdded openssl ] {
|
|
HAIKU_BUILD_FEATURE_SSL = 1 ;
|
|
}
|
|
|
|
if $(HAIKU_BUILD_FEATURE_SSL) {
|
|
if [ IsPackageAvailable openssl_devel ] {
|
|
ExtractBuildFeatureArchives openssl :
|
|
file: base openssl
|
|
runtime: lib
|
|
file: devel openssl_devel
|
|
depends: base
|
|
libraries:
|
|
$(developLibDir)/libcrypto.so
|
|
$(developLibDir)/libssl.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures openssl ;
|
|
} else {
|
|
Echo "SSL build feature not available for $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
}
|
|
|
|
|
|
# ICU
|
|
|
|
# Note ICU isn't actually optional, but is still an external package
|
|
if [ IsPackageAvailable icu_devel ] {
|
|
ExtractBuildFeatureArchives icu :
|
|
file: base icu
|
|
runtime: lib
|
|
file: devel icu_devel
|
|
depends: base
|
|
libraries:
|
|
$(developLibDir)/libicudata.so
|
|
$(developLibDir)/libicui18n.so
|
|
$(developLibDir)/libicuio.so
|
|
$(developLibDir)/libicule.so
|
|
$(developLibDir)/libiculx.so
|
|
$(developLibDir)/libicutu.so
|
|
$(developLibDir)/libicuuc.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures icu ;
|
|
} else {
|
|
Echo "ICU not available for $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# curl
|
|
if [ IsPackageAvailable curl_devel ] {
|
|
ExtractBuildFeatureArchives curl :
|
|
file: base curl
|
|
runtime: lib
|
|
file: devel curl_devel
|
|
depends: base
|
|
library:
|
|
$(developLibDir)/libcurl.so
|
|
headers: $(developHeadersDir) $(developHeadersDir)/curl
|
|
;
|
|
|
|
EnableBuildFeatures curl ;
|
|
} else {
|
|
Echo "Curl not available for $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# CLucene
|
|
|
|
# TODO: Update to packages!
|
|
if ! 1 {
|
|
|
|
# Automatically install the CLucene feature, when the CLucene package is
|
|
# enabled.
|
|
if [ IsHaikuImagePackageAdded 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_PACKAGING_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 ] ;
|
|
|
|
EnableBuildFeatures clucene ;
|
|
}
|
|
}
|
|
|
|
} # ! 1
|
|
|
|
|
|
# TODO: Update to packages!
|
|
if ! 1 {
|
|
|
|
# LLVM
|
|
if $(TARGET_ARCH) = x86 {
|
|
if $(TARGET_GCC_VERSION_$(architecture)[1]) >= 4 {
|
|
HAIKU_LLVM_FILE = llvm-3.2-x86-gcc4-2012-12-21.zip ;
|
|
local zipFile = [ DownloadFile $(HAIKU_LLVM_FILE)
|
|
: $(baseURL)/$(HAIKU_LLVM_FILE) ] ;
|
|
|
|
HAIKU_LLVM_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
|
$(HAIKU_LLVM_FILE:B) ] ;
|
|
|
|
HAIKU_LLVM_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LLVM_DIR)
|
|
: common/include/ : $(zipFile) : extracted-llvm ] ;
|
|
HAIKU_LLVM_HEADERS = [ FDirName $(HAIKU_LLVM_DIR) common include ] ;
|
|
|
|
# We can't Glob these because they aren't extracted yet.
|
|
HAIKU_LLVM_LIBS = [ ExtractArchive $(HAIKU_LLVM_DIR)
|
|
:
|
|
common/lib/libLLVMAsmParser.a
|
|
common/lib/libLLVMInstrumentation.a
|
|
common/lib/libLLVMLinker.a
|
|
common/lib/libLLVMArchive.a
|
|
common/lib/libLLVMBitReader.a
|
|
common/lib/libLLVMDebugInfo.a
|
|
common/lib/libLLVMJIT.a
|
|
common/lib/libLLVMipo.a
|
|
common/lib/libLLVMVectorize.a
|
|
common/lib/libLLVMBitWriter.a
|
|
common/lib/libLLVMTableGen.a
|
|
#common/lib/libLLVMHexagonCodeGen.a
|
|
#common/lib/libLLVMHexagonAsmPrinter.a
|
|
#common/lib/libLLVMHexagonDesc.a
|
|
#common/lib/libLLVMHexagonInfo.a
|
|
#common/lib/libLLVMNVPTXCodeGen.a
|
|
#common/lib/libLLVMNVPTXDesc.a
|
|
#common/lib/libLLVMNVPTXInfo.a
|
|
#common/lib/libLLVMNVPTXAsmPrinter.a
|
|
#common/lib/libLLVMMBlazeCodeGen.a
|
|
#common/lib/libLLVMMBlazeAsmParser.a
|
|
#common/lib/libLLVMMBlazeDisassembler.a
|
|
#common/lib/libLLVMMBlazeDesc.a
|
|
#common/lib/libLLVMMBlazeInfo.a
|
|
#common/lib/libLLVMMBlazeAsmPrinter.a
|
|
common/lib/libLLVMCppBackendCodeGen.a
|
|
common/lib/libLLVMCppBackendInfo.a
|
|
#common/lib/libLLVMMSP430CodeGen.a
|
|
#common/lib/libLLVMMSP430Desc.a
|
|
#common/lib/libLLVMMSP430AsmPrinter.a
|
|
#common/lib/libLLVMMSP430Info.a
|
|
#common/lib/libLLVMXCoreCodeGen.a
|
|
#common/lib/libLLVMXCoreDesc.a
|
|
#common/lib/libLLVMXCoreInfo.a
|
|
#common/lib/libLLVMCellSPUCodeGen.a
|
|
#common/lib/libLLVMCellSPUDesc.a
|
|
#common/lib/libLLVMCellSPUInfo.a
|
|
#common/lib/libLLVMMipsAsmParser.a
|
|
#common/lib/libLLVMMipsCodeGen.a
|
|
#common/lib/libLLVMMipsDesc.a
|
|
#common/lib/libLLVMMipsAsmPrinter.a
|
|
#common/lib/libLLVMMipsDisassembler.a
|
|
#common/lib/libLLVMMipsInfo.a
|
|
#common/lib/libLLVMARMAsmParser.a
|
|
#common/lib/libLLVMARMCodeGen.a
|
|
#common/lib/libLLVMARMDisassembler.a
|
|
#common/lib/libLLVMARMDesc.a
|
|
#common/lib/libLLVMARMInfo.a
|
|
#common/lib/libLLVMARMAsmPrinter.a
|
|
#common/lib/libLLVMPowerPCCodeGen.a
|
|
#common/lib/libLLVMPowerPCDesc.a
|
|
#common/lib/libLLVMPowerPCInfo.a
|
|
#common/lib/libLLVMPowerPCAsmPrinter.a
|
|
#common/lib/libLLVMSparcCodeGen.a
|
|
#common/lib/libLLVMSparcDesc.a
|
|
#common/lib/libLLVMSparcInfo.a
|
|
common/lib/libLLVMX86AsmParser.a
|
|
common/lib/libLLVMX86CodeGen.a
|
|
common/lib/libLLVMSelectionDAG.a
|
|
common/lib/libLLVMAsmPrinter.a
|
|
common/lib/libLLVMX86Disassembler.a
|
|
common/lib/libLLVMX86Desc.a
|
|
common/lib/libLLVMX86Info.a
|
|
common/lib/libLLVMX86AsmPrinter.a
|
|
common/lib/libLLVMX86Utils.a
|
|
common/lib/libLLVMMCDisassembler.a
|
|
common/lib/libLLVMMCParser.a
|
|
common/lib/libLLVMInterpreter.a
|
|
common/lib/libLLVMCodeGen.a
|
|
common/lib/libLLVMScalarOpts.a
|
|
common/lib/libLLVMInstCombine.a
|
|
common/lib/libLLVMTransformUtils.a
|
|
common/lib/libLLVMipa.a
|
|
common/lib/libLLVMAnalysis.a
|
|
common/lib/libLLVMMCJIT.a
|
|
common/lib/libLLVMRuntimeDyld.a
|
|
common/lib/libLLVMExecutionEngine.a
|
|
common/lib/libLLVMTarget.a
|
|
common/lib/libLLVMMC.a
|
|
common/lib/libLLVMObject.a
|
|
common/lib/libLLVMCore.a
|
|
common/lib/libLLVMSupport.a
|
|
: $(zipFile) : extracted-llvm ]
|
|
;
|
|
|
|
EnableBuildFeatures llvm ;
|
|
} else {
|
|
# Nor will it ever be
|
|
Echo "LLVM not available on GCC2" ;
|
|
}
|
|
} else {
|
|
Echo "LLVM not yet available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
} # ! 1
|
|
|
|
|
|
# GLU (GL Utilities)
|
|
if [ IsPackageAvailable glu_devel ] {
|
|
ExtractBuildFeatureArchives glu :
|
|
file: base glu
|
|
runtime: lib
|
|
file: devel glu_devel
|
|
depends: base
|
|
library: $(developLibDir)/libGLU.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures glu ;
|
|
} else {
|
|
Echo "GLU not yet available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# Mesa
|
|
if [ IsPackageAvailable mesa_devel ] {
|
|
ExtractBuildFeatureArchives mesa : [ FFilterByBuildFeatures
|
|
file: devel mesa_devel
|
|
mesaLibrary: $(developLibDir)/libmesa.a
|
|
glapiLibrary: $(developLibDir)/libglapi.a
|
|
headers: $(developHeadersDir)
|
|
privateHeaders: $(developHeadersDir)/mesa_private
|
|
|
|
!gcc2 @{
|
|
glslLibrary: $(developLibDir)/libglsl.a
|
|
galliumLibrary: $(developLibDir)/libgallium.a
|
|
llvm @{
|
|
galliumLlvmpipeLibrary: $(developLibDir)/libllvmpipe.a
|
|
}@
|
|
!llvm @{
|
|
galliumSoftpipeLibrary: $(developLibDir)/libsoftpipe.a
|
|
}@
|
|
}@ # !gcc2
|
|
] ;
|
|
|
|
Depends [ BuildFeatureAttribute mesa : galliumLlvmpipeLibrary ]
|
|
: $(HAIKU_LLVM_LIBS) ;
|
|
|
|
EnableBuildFeatures mesa ;
|
|
} else {
|
|
Echo "Mesa 3D rendering support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# FFmpeg
|
|
if [ IsPackageAvailable ffmpeg_devel ] {
|
|
local ffmpegLibs = libavformat.so libavcodec.so libavdevice.so
|
|
libavfilter.so libswscale.so libavutil.so ;
|
|
local speexLibs = libspeex.so ;
|
|
local libtheoraLibs = libtheora.so libtheoradec.so libtheoraenc.so ;
|
|
local libvorbisLibs = libvorbis.so libvorbisenc.so ;
|
|
local liboggLibs = libogg.so ;
|
|
local libvpxLibs = libvpx.so ;
|
|
|
|
local feature ;
|
|
for feature in ffmpeg speex libtheora libvorbis libogg libvpx {
|
|
ExtractBuildFeatureArchives $(feature) :
|
|
file: base $(feature)
|
|
runtime: lib
|
|
file: devel $(feature)_devel
|
|
depends: base
|
|
libraries: $(developLibDir)/$($(feature)Libs)
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures $(feature) ;
|
|
}
|
|
} else {
|
|
Echo "FFMpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# Freetype
|
|
if [ IsPackageAvailable freetype_devel ] {
|
|
ExtractBuildFeatureArchives freetype :
|
|
file: base freetype
|
|
runtime: lib
|
|
file: devel freetype_devel
|
|
depends: base
|
|
library: $(developLibDir)/libfreetype.so
|
|
headers: $(developHeadersDir) $(developHeadersDir)/freetype2
|
|
;
|
|
|
|
EnableBuildFeatures freetype ;
|
|
} else {
|
|
Echo "Freetype support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# TagLib
|
|
|
|
# TODO: Update to packages!
|
|
if ! 1 {
|
|
|
|
# Automatically install the TagLib feature, when the optional TagLib optional
|
|
# package is enabled.
|
|
if [ IsHaikuImagePackageAdded 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_PACKAGING_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 ] ;
|
|
|
|
EnableBuildFeatures taglib ;
|
|
}
|
|
}
|
|
|
|
} # ! 1
|
|
|
|
|
|
# WebKit
|
|
if [ IsPackageAvailable haikuwebkit_devel ] {
|
|
ExtractBuildFeatureArchives webkit :
|
|
file: base haikuwebkit
|
|
runtime: lib
|
|
file: devel haikuwebkit_devel
|
|
depends: base
|
|
libraries:
|
|
$(developLibDir)/libwtf.so
|
|
$(developLibDir)/libjavascriptcore.so
|
|
$(developLibDir)/libwebcore.so
|
|
$(developLibDir)/libwebkit.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures webkit ;
|
|
} else {
|
|
Echo "WebKit build feature not available for $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# libpng
|
|
if [ IsPackageAvailable libpng_devel ] {
|
|
ExtractBuildFeatureArchives libpng :
|
|
file: base libpng
|
|
runtime: lib
|
|
file: devel libpng_devel
|
|
depends: base
|
|
library: $(developLibDir)/libpng.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures libpng ;
|
|
} else {
|
|
Echo "libpng support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# jpeg
|
|
if [ IsPackageAvailable jpeg_devel ] {
|
|
ExtractBuildFeatureArchives jpeg :
|
|
file: base jpeg
|
|
runtime: lib
|
|
file: devel jpeg_devel
|
|
depends: base
|
|
library: $(developLibDir)/libjpeg.so
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures jpeg ;
|
|
} else {
|
|
Echo "jpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# zlib
|
|
if [ IsPackageAvailable zlib_devel ] {
|
|
ExtractBuildFeatureArchives zlib :
|
|
file: base zlib
|
|
runtime: lib
|
|
file: devel zlib_devel
|
|
depends: base
|
|
library: $(developLibDir)/libz.so
|
|
headers: $(developHeadersDir)
|
|
# sources are required for the primary architecture only
|
|
primary @{
|
|
file: source zlib_source
|
|
sources: develop/sources/%portRevisionedName%/sources
|
|
}@
|
|
;
|
|
|
|
EnableBuildFeatures zlib ;
|
|
} else {
|
|
Echo "zlib support not available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# libsolv
|
|
if [ IsPackageAvailable libsolv_devel ] {
|
|
ExtractBuildFeatureArchives libsolv :
|
|
file: base libsolv
|
|
runtime: lib
|
|
file: devel libsolv_devel
|
|
depends: base
|
|
libraries:
|
|
$(developLibDir)/libsolv.so
|
|
$(developLibDir)/libsolvext.so
|
|
headers: $(developHeadersDir)
|
|
# sources are required for the primary architecture only
|
|
primary @{
|
|
file: source libsolv_source
|
|
sources: develop/sources/%portRevisionedName%/sources
|
|
}@
|
|
;
|
|
|
|
EnableBuildFeatures libsolv ;
|
|
} else {
|
|
Echo "libsolv package not available for $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# GPL add-ons
|
|
if $(HAIKU_INCLUDE_GPL_ADDONS) = 1 {
|
|
EnableBuildFeatures gpl ;
|
|
}
|
|
|
|
|
|
# ATA vs. IDE
|
|
#HACK: remove when old ide code is removed!
|
|
if $(HAIKU_ATA_STACK) = 1 {
|
|
EnableBuildFeatures ata ;
|
|
} else {
|
|
EnableBuildFeatures ide ;
|
|
}
|