# 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 libDir = lib$(secondaryArchSubDir) ; 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)" ; } } # gcc_syslibs if $(TARGET_PACKAGING_ARCH) != x86_gcc2 { if [ IsPackageAvailable gcc_syslibs ] { ExtractBuildFeatureArchives gcc_syslibs : file: base gcc_syslibs libgcc_s.so: $(libDir)/libgcc_s.so libstdc++.so: $(libDir)/libstdc++.so libsupc++.so: $(libDir)/libsupc++.so ; EnableBuildFeatures gcc_syslibs ; } else { Echo "gcc_syslibs not available for $(TARGET_PACKAGING_ARCH)" ; } } # gcc_syslibs_devel if [ IsPackageAvailable gcc_syslibs_devel ] { if $(TARGET_PACKAGING_ARCH) = x86_gcc2 { ExtractBuildFeatureArchives gcc_syslibs_devel : file: base gcc_syslibs_devel libgcc.a: $(developLibDir)/libgcc.a libgcc_eh.a: libgcc-kernel.a: $(developLibDir)/libgcc.a libgcc_eh-kernel.a: libstdc++.a: libsupc++.a: libsupc++-kernel.a: ; } else { ExtractBuildFeatureArchives gcc_syslibs_devel : file: base gcc_syslibs_devel libgcc.a: $(developLibDir)/libgcc.a libgcc_eh.a: $(developLibDir)/libgcc_eh.a libgcc-kernel.a: $(developLibDir)/libgcc-kernel.a libgcc_eh-kernel.a: $(developLibDir)/libgcc_eh.a libstdc++.a: $(developLibDir)/libstdc++.a libsupc++.a: $(developLibDir)/libsupc++.a libsupc++-kernel.a: $(developLibDir)/libsupc++-kernel.a c++-headers: $(developHeadersDir)/c++ gcc-headers: $(developHeadersDir)/gcc ; } EnableBuildFeatures gcc_syslibs_devel ; } else { Echo "gcc_syslibs_devel not available for $(TARGET_PACKAGING_ARCH)" ; } # ICU 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 # Giflib if [ IsPackageAvailable giflib_devel ] { ExtractBuildFeatureArchives giflib : file: base giflib runtime: lib file: devel giflib_devel depends: base library: $(developLibDir)/libgif.so.7 headers: $(developHeadersDir) ; EnableBuildFeatures giflib ; } else { Echo "Giflib support not available on $(TARGET_PACKAGING_ARCH)" ; } # 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 libpng16 runtime: lib file: devel libpng16_devel depends: base library: $(developLibDir)/libpng16.so headers: $(developHeadersDir) ; EnableBuildFeatures libpng ; } else { Echo "libpng support not available on $(TARGET_PACKAGING_ARCH)" ; } # libicns if [ IsPackageAvailable libicns_devel ] { ExtractBuildFeatureArchives libicns : file: base libicns runtime: lib file: devel libicns_devel depends: base library: $(developLibDir)/libicns.so.1 headers: $(developHeadersDir) ; EnableBuildFeatures libicns ; } else { Echo "libicns support not available on $(TARGET_PACKAGING_ARCH)" ; } # Jasper if [ IsPackageAvailable jasper_devel ] { ExtractBuildFeatureArchives jasper : file: base jasper runtime: lib file: devel jasper_devel depends: base library: $(developLibDir)/libjasper.so.1 headers: $(developHeadersDir) $(developHeadersDir)/jasper ; EnableBuildFeatures jasper ; } else { Echo "Jasper 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)" ; } # libedit if [ IsPackageAvailable libedit_devel ] { ExtractBuildFeatureArchives libedit : file: base libedit runtime: lib file: devel libedit_devel depends: base library: $(developLibDir)/libedit.so headers: $(developHeadersDir) ; EnableBuildFeatures libedit ; } else { Echo "libedit 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_kdl_devel ] { ExtractBuildFeatureArchives libqrencode_kdl : file: devel qrencode_kdl_devel library: $(developLibDir)/libqrencode_kdl.a headers: $(developHeadersDir) ; EnableBuildFeatures libqrencode_kdl ; } else { Echo "qrencode support not available on $(TARGET_PACKAGING_ARCH)" ; } # tiff if [ IsPackageAvailable tiff_devel ] { ExtractBuildFeatureArchives tiff : file: base tiff runtime: lib file: devel tiff_devel depends: base library: $(developLibDir)/libtiff.so.3 headers: $(developHeadersDir) $(developHeadersDir)/tiff ; EnableBuildFeatures tiff ; } else { Echo "Tiff support not available on $(TARGET_PACKAGING_ARCH)" ; } # libwebp if [ IsPackageAvailable libwebp_devel ] { ExtractBuildFeatureArchives libwebp : file: base libwebp runtime: lib file: devel libwebp_devel depends: base library: $(developLibDir)/libwebp.so.5 headers: $(developHeadersDir) $(developHeadersDir)/webp ; EnableBuildFeatures libwebp ; } else { Echo "Libwebp support not available on $(TARGET_PACKAGING_ARCH)" ; } # ncurses if [ IsPackageAvailable ncurses_devel ] { ExtractBuildFeatureArchives ncurses : file: base ncurses runtime: lib file: devel ncurses_devel depends: base library: $(developLibDir)/libncurses.so.5 headers: $(developHeadersDir) ; EnableBuildFeatures ncurses ; } else { Echo "ncurses support not available on $(TARGET_PACKAGING_ARCH)" ; } # expat if [ IsPackageAvailable expat_devel ] { ExtractBuildFeatureArchives expat : file: base expat runtime: lib file: devel expat_devel depends: base library: $(developLibDir)/libexpat.so.1 headers: $(developHeadersDir) ; EnableBuildFeatures expat ; } else { Echo "expat 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 ; }