c73c8e2367
* use the shared library libgutenprint.so * remove the xml data files from the tree and the Haiku package.
402 lines
9.1 KiB
Plaintext
402 lines
9.1 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
|
|
|
|
|
|
# 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)" ;
|
|
}
|
|
|
|
|
|
# GL (GL Kit, Mesa3D)
|
|
if [ IsPackageAvailable mesa_devel ] {
|
|
ExtractBuildFeatureArchives mesa :
|
|
file: base mesa
|
|
runtime: lib
|
|
file: devel mesa_devel
|
|
depends: base
|
|
library: $(developLibDir)/libGL.so
|
|
headers: $(developHeadersDir)/os/opengl
|
|
;
|
|
|
|
EnableBuildFeatures mesa ;
|
|
} else {
|
|
Echo "GL not yet available on $(TARGET_PACKAGING_ARCH)" ;
|
|
}
|
|
|
|
|
|
# FFmpeg
|
|
if [ IsPackageAvailable ffmpeg_devel ] {
|
|
local ffmpegLibs = libavformat.so libavcodec.so libavdevice.so
|
|
libavfilter.so libswscale.so libavutil.so ;
|
|
|
|
ExtractBuildFeatureArchives ffmpeg :
|
|
file: base ffmpeg
|
|
runtime: lib
|
|
file: devel ffmpeg_devel
|
|
depends: base
|
|
libraries: $(developLibDir)/$(ffmpegLibs)
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures ffmpeg ;
|
|
|
|
} 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)" ;
|
|
}
|
|
|
|
|
|
# Gutenprint
|
|
if [ IsPackageAvailable gutenprint_devel ] {
|
|
ExtractBuildFeatureArchives gutenprint :
|
|
file: base gutenprint
|
|
runtime: lib
|
|
file: devel gutenprint_devel
|
|
depends: base
|
|
library: $(developLibDir)/libgutenprint.so
|
|
headers: $(developHeadersDir) $(developHeadersDir)/gutenprint
|
|
;
|
|
|
|
EnableBuildFeatures gutenprint ;
|
|
} else {
|
|
Echo "Gutenprint 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)/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)" ;
|
|
}
|
|
|
|
|
|
# qrencode
|
|
if [ IsPackageAvailable qrencode_devel ] {
|
|
ExtractBuildFeatureArchives libqrencode :
|
|
file: base qrencode
|
|
runtime: lib
|
|
file: devel qrencode_devel
|
|
depends: base
|
|
library: $(developLibDir)/libqrencode.a
|
|
headers: $(developHeadersDir)
|
|
;
|
|
|
|
EnableBuildFeatures libqrencode ;
|
|
} else {
|
|
Echo "qrencode support not available on $(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 ;
|
|
}
|