1 # This file contains setup for build features that require external packages. It
2 # is included once for each configured packaging architecture (with
3 # TARGET_PACKAGING_ARCH set accordingly).
6 local architecture = $(TARGET_PACKAGING_ARCH) ;
7 local secondaryArchSubDir = [ MultiArchIfPrimary "" : /$(architecture) ] ;
8 local libDir = lib$(secondaryArchSubDir) ;
9 local developLibDir = develop/lib$(secondaryArchSubDir) ;
10 local developHeadersDir = develop/headers$(secondaryArchSubDir) ;
15 # Automatically enable the SSL feature, when the OpenSSL package is enabled.
16 if [ IsHaikuImagePackageAdded openssl ] {
17 HAIKU_BUILD_FEATURE_SSL = 1 ;
20 if $(HAIKU_BUILD_FEATURE_SSL) {
21 if [ IsPackageAvailable openssl_devel ] {
22 ExtractBuildFeatureArchives openssl :
25 file: devel openssl_devel
28 $(developLibDir)/libcrypto.so
29 $(developLibDir)/libssl.so
30 headers: $(developHeadersDir)
33 EnableBuildFeatures openssl ;
35 Echo "SSL build feature not available for $(TARGET_PACKAGING_ARCH)" ;
42 if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
43 if [ IsPackageAvailable gcc_syslibs ] {
44 ExtractBuildFeatureArchives gcc_syslibs :
45 file: base gcc_syslibs
46 libgcc_s.so: $(libDir)/libgcc_s.so
47 libstdc++.so: $(libDir)/libstdc++.so
48 libsupc++.so: $(libDir)/libsupc++.so
51 EnableBuildFeatures gcc_syslibs ;
53 Echo "gcc_syslibs not available for $(TARGET_PACKAGING_ARCH)" ;
60 if [ IsPackageAvailable gcc_syslibs_devel ] {
61 if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
62 ExtractBuildFeatureArchives gcc_syslibs_devel :
63 file: base gcc_syslibs_devel
64 libgcc.a: $(developLibDir)/libgcc.a
66 libgcc-kernel.a: $(developLibDir)/libgcc.a
73 ExtractBuildFeatureArchives gcc_syslibs_devel :
74 file: base gcc_syslibs_devel
75 libgcc.a: $(developLibDir)/libgcc.a
76 libgcc_eh.a: $(developLibDir)/libgcc_eh.a
77 libgcc-kernel.a: $(developLibDir)/libgcc-kernel.a
78 libgcc_eh-kernel.a: $(developLibDir)/libgcc_eh.a
79 libstdc++.a: $(developLibDir)/libstdc++.a
80 libsupc++.a: $(developLibDir)/libsupc++.a
81 libsupc++-kernel.a: $(developLibDir)/libsupc++-kernel.a
82 c++-headers: $(developHeadersDir)/c++
83 gcc-headers: $(developHeadersDir)/gcc
87 EnableBuildFeatures gcc_syslibs_devel ;
89 Echo "gcc_syslibs_devel not available for $(TARGET_PACKAGING_ARCH)" ;
95 if [ IsPackageAvailable icu_devel ] {
96 ExtractBuildFeatureArchives icu :
102 $(developLibDir)/libicudata.so
103 $(developLibDir)/libicui18n.so
104 $(developLibDir)/libicuio.so
105 $(developLibDir)/libicule.so
106 $(developLibDir)/libiculx.so
107 $(developLibDir)/libicutu.so
108 $(developLibDir)/libicuuc.so
109 headers: $(developHeadersDir)
112 EnableBuildFeatures icu ;
114 Echo "ICU not available for $(TARGET_PACKAGING_ARCH)" ;
119 if [ IsPackageAvailable curl_devel ] {
120 ExtractBuildFeatureArchives curl :
123 file: devel curl_devel
126 $(developLibDir)/libcurl.so
127 headers: $(developHeadersDir) $(developHeadersDir)/curl
130 EnableBuildFeatures curl ;
132 Echo "Curl not available for $(TARGET_PACKAGING_ARCH)" ;
138 # TODO: Update to packages!
141 # Automatically install the CLucene feature, when the CLucene package is
143 if [ IsHaikuImagePackageAdded clucene ] {
144 HAIKU_BUILD_FEATURE_CLUCENE = 1 ;
148 HAIKU_CLUCENE_PACKAGE = clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip ;
149 HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ;
151 if $(HAIKU_BUILD_FEATURE_CLUCENE) {
152 if $(TARGET_ARCH) != x86 {
153 Echo "CLucene build feature not available for"
154 "$(TARGET_PACKAGING_ARCH)" ;
156 # Download the zip archive.
157 local zipFile = [ DownloadFile $(HAIKU_CLUCENE_PACKAGE)
158 : $(HAIKU_CLUCENE_URL) ] ;
160 # zip file and output directory
161 HAIKU_CLUCENE_ZIP_FILE = $(zipFile) ;
162 HAIKU_CLUCENE_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
163 $(HAIKU_CLUCENE_PACKAGE:B) ] ;
165 # extract headers and libraries
166 HAIKU_CLUCENE_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_CLUCENE_DIR)
167 : common/include/ : $(zipFile) : extracted-clucene
170 HAIKU_CLUCENE_LIBS = [ ExtractArchive $(HAIKU_CLUCENE_DIR)
172 common/lib/libclucene.a
177 HAIKU_CLUCENE_HEADERS
178 = [ FDirName $(HAIKU_CLUCENE_DIR) common include ] ;
180 EnableBuildFeatures clucene ;
188 if [ IsPackageAvailable giflib_devel ] {
189 ExtractBuildFeatureArchives giflib :
192 file: devel giflib_devel
194 library: $(developLibDir)/libgif.so.7
195 headers: $(developHeadersDir)
198 EnableBuildFeatures giflib ;
200 Echo "Giflib support not available on $(TARGET_PACKAGING_ARCH)" ;
205 if [ IsPackageAvailable glu_devel ] {
206 ExtractBuildFeatureArchives glu :
209 file: devel glu_devel
211 library: $(developLibDir)/libGLU.so
212 headers: $(developHeadersDir)
215 EnableBuildFeatures glu ;
217 Echo "GLU not yet available on $(TARGET_PACKAGING_ARCH)" ;
221 # GL (GL Kit, Mesa3D)
222 if [ IsPackageAvailable mesa_devel ] {
223 ExtractBuildFeatureArchives mesa :
226 file: devel mesa_devel
228 library: $(developLibDir)/libGL.so
229 headers: $(developHeadersDir)/os/opengl
232 EnableBuildFeatures mesa ;
234 Echo "GL not yet available on $(TARGET_PACKAGING_ARCH)" ;
239 if [ IsPackageAvailable ffmpeg_devel ] {
240 local ffmpegLibs = libavformat.so libavcodec.so libavfilter.so libswscale.so
241 libavutil.so libswresample.so ;
243 ExtractBuildFeatureArchives ffmpeg :
246 file: devel ffmpeg_devel
248 libraries: $(developLibDir)/$(ffmpegLibs)
249 headers: $(developHeadersDir)
252 EnableBuildFeatures ffmpeg ;
255 Echo "FFMpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
260 if [ IsPackageAvailable fluidlite_devel ] && [ IsPackageAvailable libvorbis_devel ] {
261 ExtractBuildFeatureArchives fluidlite :
262 file: devel fluidlite_devel
263 library: $(developLibDir)/libfluidlite.a
264 headers: $(developHeadersDir)
267 EnableBuildFeatures fluidlite ;
269 Echo "Fluidlite support not available on $(TARGET_PACKAGING_ARCH)" ;
274 if [ IsPackageAvailable libvorbis_devel ] {
275 ExtractBuildFeatureArchives libvorbis :
278 file: devel libvorbis_devel
280 library: $(developLibDir)/libvorbisfile.so.3
281 headers: $(developHeadersDir)
284 EnableBuildFeatures libvorbis ;
286 Echo "Libvorbis support not available on $(TARGET_PACKAGING_ARCH)" ;
291 if [ IsPackageAvailable freetype_devel ] {
292 ExtractBuildFeatureArchives freetype :
295 file: devel freetype_devel
297 library: $(developLibDir)/libfreetype.so
298 headers: $(developHeadersDir) $(developHeadersDir)/freetype2
301 EnableBuildFeatures freetype ;
303 Echo "Freetype support not available on $(TARGET_PACKAGING_ARCH)" ;
307 if [ IsPackageAvailable fontconfig_devel ] {
308 ExtractBuildFeatureArchives fontconfig :
309 file: base fontconfig
311 file: devel fontconfig_devel
313 library: $(developLibDir)/libfontconfig.so
314 headers: $(developHeadersDir) $(developHeadersDir)/fontconfig
317 EnableBuildFeatures fontconfig ;
319 Echo "fontconfig support not available on $(TARGET_PACKAGING_ARCH)" ;
323 if [ IsPackageAvailable gutenprint_devel ] {
324 ExtractBuildFeatureArchives gutenprint :
325 file: base gutenprint
327 file: devel gutenprint_devel
329 library: $(developLibDir)/libgutenprint.so
330 headers: $(developHeadersDir) $(developHeadersDir)/gutenprint
333 EnableBuildFeatures gutenprint ;
335 Echo "Gutenprint support not available on $(TARGET_PACKAGING_ARCH)" ;
341 # TODO: Update to packages!
344 # Automatically install the TagLib feature, when the optional TagLib optional
345 # package is enabled.
346 if [ IsHaikuImagePackageAdded taglib ] {
347 HAIKU_BUILD_FEATURE_TAGLIB = 1 ;
350 HAIKU_TAGLIB_PACKAGE = taglib-1.6.3-r1a4-x86-gcc2-2012-09-03.zip ;
351 HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ;
353 if $(HAIKU_BUILD_FEATURE_TAGLIB) {
354 if $(TARGET_ARCH) != x86 {
355 Echo "TagLib build feature not available for $(TARGET_PACKAGING_ARCH)" ;
357 # Download the zip archive.
358 local zipFile = [ DownloadFile $(HAIKU_TAGLIB_PACKAGE)
359 : $(HAIKU_TAGLIB_URL) ] ;
361 # zip file and output directory
362 HAIKU_TAGLIB_ZIP_FILE = $(zipFile) ;
363 HAIKU_TAGLIB_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
364 $(HAIKU_TAGLIB_PACKAGE:B) ] ;
366 # extract headers and libraries
367 HAIKU_TAGLIB_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_TAGLIB_DIR)
368 : common/include/ : $(zipFile) : extracted-taglib
371 HAIKU_TAGLIB_LIBS = [ ExtractArchive $(HAIKU_TAGLIB_DIR)
374 common/lib/libtag_c.so
380 = [ FDirName $(HAIKU_TAGLIB_DIR) common include taglib ] ;
382 EnableBuildFeatures taglib ;
390 if [ IsPackageAvailable haikuwebkit_devel ] {
391 ExtractBuildFeatureArchives webkit :
392 file: base haikuwebkit
394 file: devel haikuwebkit_devel
397 $(developLibDir)/libWebKit.so
398 headers: $(developHeadersDir)
401 EnableBuildFeatures webkit ;
403 Echo "WebKit build feature not available for $(TARGET_PACKAGING_ARCH)" ;
408 if [ IsPackageAvailable libpng16_devel ] {
409 ExtractBuildFeatureArchives libpng :
412 file: devel libpng16_devel
414 library: $(developLibDir)/libpng16.so
415 headers: $(developHeadersDir)
418 EnableBuildFeatures libpng ;
420 Echo "libpng support not available on $(TARGET_PACKAGING_ARCH)" ;
425 if [ IsPackageAvailable libicns_devel ] {
426 ExtractBuildFeatureArchives libicns :
429 file: devel libicns_devel
431 library: $(developLibDir)/libicns.so.1
432 headers: $(developHeadersDir)
435 EnableBuildFeatures libicns ;
437 Echo "libicns support not available on $(TARGET_PACKAGING_ARCH)" ;
442 if [ IsPackageAvailable jasper_devel ] {
443 ExtractBuildFeatureArchives jasper :
446 file: devel jasper_devel
448 library: $(developLibDir)/libjasper.so.4
449 headers: $(developHeadersDir) $(developHeadersDir)/jasper
452 EnableBuildFeatures jasper ;
454 Echo "Jasper support not available on $(TARGET_PACKAGING_ARCH)" ;
459 if [ IsPackageAvailable jpeg_devel ] {
460 ExtractBuildFeatureArchives jpeg :
463 file: devel jpeg_devel
465 library: $(developLibDir)/libjpeg.so
466 headers: $(developHeadersDir)
469 EnableBuildFeatures jpeg ;
471 Echo "jpeg support not available on $(TARGET_PACKAGING_ARCH)" ;
476 if [ IsPackageAvailable zlib_devel ] {
477 ExtractBuildFeatureArchives zlib :
480 file: devel zlib_devel
482 library: $(developLibDir)/libz.so
483 headers: $(developHeadersDir)
484 # sources are required for the primary architecture only
486 file: source zlib_source
487 sources: develop/sources/%portRevisionedName%/sources
491 EnableBuildFeatures zlib ;
493 Echo "zlib support not available on $(TARGET_PACKAGING_ARCH)" ;
498 if [ IsPackageAvailable libedit_devel ] {
499 ExtractBuildFeatureArchives libedit :
502 file: devel libedit_devel
504 library: $(developLibDir)/libedit.so
505 headers: $(developHeadersDir)
508 EnableBuildFeatures libedit ;
510 Echo "libedit support not available on $(TARGET_PACKAGING_ARCH)" ;
515 if [ IsPackageAvailable libsolv_devel ] {
516 ExtractBuildFeatureArchives libsolv :
519 file: devel libsolv_devel
522 $(developLibDir)/libsolv.so
523 $(developLibDir)/libsolvext.so
524 headers: $(developHeadersDir)
525 # sources are required for the primary architecture only
527 file: source libsolv_source
528 sources: develop/sources/%portRevisionedName%/sources
532 EnableBuildFeatures libsolv ;
534 Echo "libsolv package not available for $(TARGET_PACKAGING_ARCH)" ;
539 if [ IsPackageAvailable qrencode_kdl_devel ] {
540 ExtractBuildFeatureArchives libqrencode_kdl :
541 file: devel qrencode_kdl_devel
542 library: $(developLibDir)/libqrencode_kdl.a
543 headers: $(developHeadersDir)
546 EnableBuildFeatures libqrencode_kdl ;
548 Echo "qrencode support not available on $(TARGET_PACKAGING_ARCH)" ;
553 if [ IsPackageAvailable tiff4_devel ] {
554 ExtractBuildFeatureArchives tiff :
557 file: devel tiff4_devel
559 library: $(developLibDir)/libtiff.so.5
560 headers: $(developHeadersDir) $(developHeadersDir)/tiff
563 EnableBuildFeatures tiff ;
565 Echo "Tiff support not available on $(TARGET_PACKAGING_ARCH)" ;
570 if [ IsPackageAvailable openexr_devel ]
571 && [ IsPackageAvailable ilmbase_devel ] {
572 ExtractBuildFeatureArchives openexr :
575 file: devel openexr_devel
578 $(developLibDir)/libIlmImf.so
579 $(developLibDir)/libIlmImfUtil.so
580 headers: $(developHeadersDir) $(developHeadersDir)/OpenEXR
583 EnableBuildFeatures openexr ;
585 Echo "OpenEXR support not available on $(TARGET_PACKAGING_ARCH)" ;
590 if [ IsPackageAvailable ilmbase_devel ] {
591 ExtractBuildFeatureArchives ilmbase :
594 file: devel ilmbase_devel
597 $(developLibDir)/libHalf.so
598 $(developLibDir)/libIex.so
599 $(developLibDir)/libIexMath.so
600 $(developLibDir)/libIlmThread.so
601 $(developLibDir)/libImath.so
602 headers: $(developHeadersDir) $(developHeadersDir)/OpenEXR
605 EnableBuildFeatures ilmbase ;
607 Echo "IlmBase support not available on $(TARGET_PACKAGING_ARCH)" ;
612 if [ IsPackageAvailable libwebp_devel ] {
613 if $(HAIKU_PACKAGING_ARCH) = x86 && $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
614 ExtractBuildFeatureArchives libwebp :
617 file: devel libwebp_devel
619 library: $(developLibDir)/libwebp.so.6
620 headers: $(developHeadersDir) $(developHeadersDir)/webp
623 ExtractBuildFeatureArchives libwebp :
626 file: devel libwebp_devel
628 library: $(developLibDir)/libwebp.so.7
629 headers: $(developHeadersDir) $(developHeadersDir)/webp
633 EnableBuildFeatures libwebp ;
635 Echo "Libwebp support not available on $(TARGET_PACKAGING_ARCH)" ;
640 if [ IsPackageAvailable live555_devel ] {
641 ExtractBuildFeatureArchives live555 :
642 file: devel live555_devel
644 $(developLibDir)/libliveMedia.a
645 $(developLibDir)/libBasicUsageEnvironment.a
646 $(developLibDir)/libgroupsock.a
647 $(developLibDir)/libUsageEnvironment.a
649 headers: $(developHeadersDir)
650 $(developHeadersDir)/liveMedia
651 $(developHeadersDir)/BasicUsageEnvironment
652 $(developHeadersDir)/groupsock
653 $(developHeadersDir)/UsageEnvironment
655 EnableBuildFeatures live555 ;
657 Echo "live555 not available for $(TARGET_PACKAGING_ARCH)" ;
662 if [ IsPackageAvailable ncurses6_devel ] {
663 ExtractBuildFeatureArchives ncurses :
666 file: devel ncurses6_devel
668 library: $(developLibDir)/libncurses.so.6
669 headers: $(developHeadersDir)
672 EnableBuildFeatures ncurses ;
674 Echo "ncurses support not available on $(TARGET_PACKAGING_ARCH)" ;
679 if [ IsPackageAvailable expat_devel ] {
680 ExtractBuildFeatureArchives expat :
683 file: devel expat_devel
685 library: $(developLibDir)/libexpat.so.1
686 headers: $(developHeadersDir)
689 EnableBuildFeatures expat ;
691 Echo "expat support not available on $(TARGET_PACKAGING_ARCH)" ;
696 if $(TARGET_PACKAGING_ARCH) = x86_64 {
697 if [ IsPackageAvailable gnu_efi_kernel ] {
698 ExtractBuildFeatureArchives gnuefi :
699 file: base gnu_efi_kernel
700 headers: develop/headers/gnuefi
701 headersProtocol: develop/headers/gnuefi/protocol
702 headersArch: develop/headers/gnuefi/$(TARGET_ARCH)
703 libdir: develop/lib/gnuefi
706 EnableBuildFeatures gnuefi ;
708 Echo "gnu_efi_kernel support not available on $(TARGET_PACKAGING_ARCH)" ;
714 if [ IsPackageAvailable zstd_devel ] {
715 ExtractBuildFeatureArchives zstd :
718 file: devel zstd_devel
720 library: $(developLibDir)/libzstd.so
721 headers: $(developHeadersDir)
722 # sources are required for the primary architecture only
724 file: source zstd_source
725 sources: develop/sources/%portRevisionedName%/sources
729 EnableBuildFeatures zstd ;
731 Echo "zstd support not available on $(TARGET_PACKAGING_ARCH)" ;
736 EnableBuildFeatures ata ;