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). 4 5 6local architecture = $(TARGET_PACKAGING_ARCH) ; 7local secondaryArchSubDir = [ MultiArchIfPrimary "" : /$(architecture) ] ; 8local libDir = lib$(secondaryArchSubDir) ; 9local developLibDir = develop/lib$(secondaryArchSubDir) ; 10local developHeadersDir = develop/headers$(secondaryArchSubDir) ; 11 12 13# SSL 14 15# Automatically enable the SSL feature, when the OpenSSL package is enabled. 16if [ IsHaikuImagePackageAdded openssl ] { 17 HAIKU_BUILD_FEATURE_SSL = 1 ; 18} 19 20if $(HAIKU_BUILD_FEATURE_SSL) { 21 if [ IsPackageAvailable openssl_devel ] { 22 ExtractBuildFeatureArchives openssl : 23 file: base openssl 24 runtime: lib 25 file: devel openssl_devel 26 depends: base 27 libraries: 28 $(developLibDir)/libcrypto.so 29 $(developLibDir)/libssl.so 30 headers: $(developHeadersDir) 31 ; 32 33 EnableBuildFeatures openssl ; 34 } else { 35 Echo "SSL build feature not available for $(TARGET_PACKAGING_ARCH)" ; 36 } 37} 38 39 40# gcc_syslibs 41 42if $(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 49 ; 50 51 EnableBuildFeatures gcc_syslibs ; 52 } else { 53 Echo "gcc_syslibs not available for $(TARGET_PACKAGING_ARCH)" ; 54 } 55} 56 57 58# gcc_syslibs_devel 59 60if [ 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 65 libgcc_eh.a: 66 libgcc-kernel.a: $(developLibDir)/libgcc.a 67 libgcc_eh-kernel.a: 68 libstdc++.a: 69 libsupc++.a: 70 libsupc++-kernel.a: 71 ; 72 } else { 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 84 ; 85 } 86 87 EnableBuildFeatures gcc_syslibs_devel ; 88} else { 89 Echo "gcc_syslibs_devel not available for $(TARGET_PACKAGING_ARCH)" ; 90} 91 92 93# ICU 94 95if [ IsPackageAvailable icu_devel ] { 96 ExtractBuildFeatureArchives icu : 97 file: base icu 98 runtime: lib 99 file: devel icu_devel 100 depends: base 101 libraries: 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) 110 ; 111 112 EnableBuildFeatures icu ; 113} else { 114 Echo "ICU not available for $(TARGET_PACKAGING_ARCH)" ; 115} 116 117 118# curl 119if [ IsPackageAvailable curl_devel ] { 120 ExtractBuildFeatureArchives curl : 121 file: base curl 122 runtime: lib 123 file: devel curl_devel 124 depends: base 125 library: 126 $(developLibDir)/libcurl.so 127 headers: $(developHeadersDir) $(developHeadersDir)/curl 128 ; 129 130 EnableBuildFeatures curl ; 131} else { 132 Echo "Curl not available for $(TARGET_PACKAGING_ARCH)" ; 133} 134 135 136# CLucene 137 138# TODO: Update to packages! 139if ! 1 { 140 141# Automatically install the CLucene feature, when the CLucene package is 142# enabled. 143if [ IsHaikuImagePackageAdded clucene ] { 144 HAIKU_BUILD_FEATURE_CLUCENE = 1 ; 145} 146 147 148HAIKU_CLUCENE_PACKAGE = clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip ; 149HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ; 150 151if $(HAIKU_BUILD_FEATURE_CLUCENE) { 152 if $(TARGET_ARCH) != x86 { 153 Echo "CLucene build feature not available for" 154 "$(TARGET_PACKAGING_ARCH)" ; 155 } else { 156 # Download the zip archive. 157 local zipFile = [ DownloadFile $(HAIKU_CLUCENE_PACKAGE) 158 : $(HAIKU_CLUCENE_URL) ] ; 159 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) ] ; 164 165 # extract headers and libraries 166 HAIKU_CLUCENE_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_CLUCENE_DIR) 167 : common/include/ : $(zipFile) : extracted-clucene 168 ] ; 169 170 HAIKU_CLUCENE_LIBS = [ ExtractArchive $(HAIKU_CLUCENE_DIR) 171 : 172 common/lib/libclucene.a 173 : $(zipFile) 174 : extracted-clucene 175 ] ; 176 177 HAIKU_CLUCENE_HEADERS 178 = [ FDirName $(HAIKU_CLUCENE_DIR) common include ] ; 179 180 EnableBuildFeatures clucene ; 181 } 182} 183 184} # ! 1 185 186 187# Giflib 188if [ IsPackageAvailable giflib_devel ] { 189 ExtractBuildFeatureArchives giflib : 190 file: base giflib 191 runtime: lib 192 file: devel giflib_devel 193 depends: base 194 library: $(developLibDir)/libgif.so.7 195 headers: $(developHeadersDir) 196 ; 197 198 EnableBuildFeatures giflib ; 199} else { 200 Echo "Giflib support not available on $(TARGET_PACKAGING_ARCH)" ; 201} 202 203 204# GLU (GL Utilities) 205if [ IsPackageAvailable glu_devel ] { 206 ExtractBuildFeatureArchives glu : 207 file: base glu 208 runtime: lib 209 file: devel glu_devel 210 depends: base 211 library: $(developLibDir)/libGLU.so 212 headers: $(developHeadersDir) 213 ; 214 215 EnableBuildFeatures glu ; 216} else { 217 Echo "GLU not yet available on $(TARGET_PACKAGING_ARCH)" ; 218} 219 220 221# GL (GL Kit, Mesa3D) 222if [ IsPackageAvailable mesa_devel ] { 223 ExtractBuildFeatureArchives mesa : 224 file: base mesa 225 runtime: lib 226 file: devel mesa_devel 227 depends: base 228 library: $(developLibDir)/libGL.so 229 headers: $(developHeadersDir)/os/opengl 230 ; 231 232 EnableBuildFeatures mesa ; 233} else { 234 Echo "GL not yet available on $(TARGET_PACKAGING_ARCH)" ; 235} 236 237 238# FFmpeg 239if [ IsPackageAvailable ffmpeg_devel ] { 240 local ffmpegLibs = libavformat.so libavcodec.so libavdevice.so 241 libavfilter.so libswscale.so libavutil.so ; 242 243 ExtractBuildFeatureArchives ffmpeg : 244 file: base ffmpeg 245 runtime: lib 246 file: devel ffmpeg_devel 247 depends: base 248 libraries: $(developLibDir)/$(ffmpegLibs) 249 headers: $(developHeadersDir) 250 ; 251 252 EnableBuildFeatures ffmpeg ; 253 254} else { 255 Echo "FFMpeg support not available on $(TARGET_PACKAGING_ARCH)" ; 256} 257 258 259# Freetype 260if [ IsPackageAvailable freetype_devel ] { 261 ExtractBuildFeatureArchives freetype : 262 file: base freetype 263 runtime: lib 264 file: devel freetype_devel 265 depends: base 266 library: $(developLibDir)/libfreetype.so 267 headers: $(developHeadersDir) $(developHeadersDir)/freetype2 268 ; 269 270 EnableBuildFeatures freetype ; 271} else { 272 Echo "Freetype support not available on $(TARGET_PACKAGING_ARCH)" ; 273} 274 275 276# Gutenprint 277if [ IsPackageAvailable gutenprint_devel ] { 278 ExtractBuildFeatureArchives gutenprint : 279 file: base gutenprint 280 runtime: lib 281 file: devel gutenprint_devel 282 depends: base 283 library: $(developLibDir)/libgutenprint.so 284 headers: $(developHeadersDir) $(developHeadersDir)/gutenprint 285 ; 286 287 EnableBuildFeatures gutenprint ; 288} else { 289 Echo "Gutenprint support not available on $(TARGET_PACKAGING_ARCH)" ; 290} 291 292 293# TagLib 294 295# TODO: Update to packages! 296if ! 1 { 297 298# Automatically install the TagLib feature, when the optional TagLib optional 299# package is enabled. 300if [ IsHaikuImagePackageAdded taglib ] { 301 HAIKU_BUILD_FEATURE_TAGLIB = 1 ; 302} 303 304HAIKU_TAGLIB_PACKAGE = taglib-1.6.3-r1a4-x86-gcc2-2012-09-03.zip ; 305HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ; 306 307if $(HAIKU_BUILD_FEATURE_TAGLIB) { 308 if $(TARGET_ARCH) != x86 { 309 Echo "TagLib build feature not available for $(TARGET_PACKAGING_ARCH)" ; 310 } else { 311 # Download the zip archive. 312 local zipFile = [ DownloadFile $(HAIKU_TAGLIB_PACKAGE) 313 : $(HAIKU_TAGLIB_URL) ] ; 314 315 # zip file and output directory 316 HAIKU_TAGLIB_ZIP_FILE = $(zipFile) ; 317 HAIKU_TAGLIB_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) 318 $(HAIKU_TAGLIB_PACKAGE:B) ] ; 319 320 # extract headers and libraries 321 HAIKU_TAGLIB_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_TAGLIB_DIR) 322 : common/include/ : $(zipFile) : extracted-taglib 323 ] ; 324 325 HAIKU_TAGLIB_LIBS = [ ExtractArchive $(HAIKU_TAGLIB_DIR) 326 : 327 common/lib/libtag.so 328 common/lib/libtag_c.so 329 : $(zipFile) 330 : extracted-taglib 331 ] ; 332 333 HAIKU_TAGLIB_HEADERS 334 = [ FDirName $(HAIKU_TAGLIB_DIR) common include taglib ] ; 335 336 EnableBuildFeatures taglib ; 337 } 338} 339 340} # ! 1 341 342 343# WebKit 344if [ IsPackageAvailable haikuwebkit_devel ] { 345 ExtractBuildFeatureArchives webkit : 346 file: base haikuwebkit 347 runtime: lib 348 file: devel haikuwebkit_devel 349 depends: base 350 libraries: 351 $(developLibDir)/libWebKit.so 352 headers: $(developHeadersDir) 353 ; 354 355 EnableBuildFeatures webkit ; 356} else { 357 Echo "WebKit build feature not available for $(TARGET_PACKAGING_ARCH)" ; 358} 359 360 361# libpng 362if [ IsPackageAvailable libpng_devel ] { 363 ExtractBuildFeatureArchives libpng : 364 file: base libpng16 365 runtime: lib 366 file: devel libpng16_devel 367 depends: base 368 library: $(developLibDir)/libpng16.so 369 headers: $(developHeadersDir) 370 ; 371 372 EnableBuildFeatures libpng ; 373} else { 374 Echo "libpng support not available on $(TARGET_PACKAGING_ARCH)" ; 375} 376 377 378# libicns 379if [ IsPackageAvailable libicns_devel ] { 380 ExtractBuildFeatureArchives libicns : 381 file: base libicns 382 runtime: lib 383 file: devel libicns_devel 384 depends: base 385 library: $(developLibDir)/libicns.so.1 386 headers: $(developHeadersDir) 387 ; 388 389 EnableBuildFeatures libicns ; 390} else { 391 Echo "libicns support not available on $(TARGET_PACKAGING_ARCH)" ; 392} 393 394 395# Jasper 396if [ IsPackageAvailable jasper_devel ] { 397 ExtractBuildFeatureArchives jasper : 398 file: base jasper 399 runtime: lib 400 file: devel jasper_devel 401 depends: base 402 library: $(developLibDir)/libjasper.so.1 403 headers: $(developHeadersDir) $(developHeadersDir)/jasper 404 ; 405 406 EnableBuildFeatures jasper ; 407} else { 408 Echo "Jasper support not available on $(TARGET_PACKAGING_ARCH)" ; 409} 410 411 412# jpeg 413if [ IsPackageAvailable jpeg_devel ] { 414 ExtractBuildFeatureArchives jpeg : 415 file: base jpeg 416 runtime: lib 417 file: devel jpeg_devel 418 depends: base 419 library: $(developLibDir)/libjpeg.so 420 headers: $(developHeadersDir) 421 ; 422 423 EnableBuildFeatures jpeg ; 424} else { 425 Echo "jpeg support not available on $(TARGET_PACKAGING_ARCH)" ; 426} 427 428 429# zlib 430if [ IsPackageAvailable zlib_devel ] { 431 ExtractBuildFeatureArchives zlib : 432 file: base zlib 433 runtime: lib 434 file: devel zlib_devel 435 depends: base 436 library: $(developLibDir)/libz.so 437 headers: $(developHeadersDir) 438 # sources are required for the primary architecture only 439 primary @{ 440 file: source zlib_source 441 sources: develop/sources/%portRevisionedName%/sources 442 }@ 443 ; 444 445 EnableBuildFeatures zlib ; 446} else { 447 Echo "zlib support not available on $(TARGET_PACKAGING_ARCH)" ; 448} 449 450 451# libedit 452if [ IsPackageAvailable libedit_devel ] { 453 ExtractBuildFeatureArchives libedit : 454 file: base libedit 455 runtime: lib 456 file: devel libedit_devel 457 depends: base 458 library: $(developLibDir)/libedit.so 459 headers: $(developHeadersDir) 460 ; 461 462 EnableBuildFeatures libedit ; 463} else { 464 Echo "libedit support not available on $(TARGET_PACKAGING_ARCH)" ; 465} 466 467 468# libsolv 469if [ IsPackageAvailable libsolv_devel ] { 470 ExtractBuildFeatureArchives libsolv : 471 file: base libsolv 472 runtime: lib 473 file: devel libsolv_devel 474 depends: base 475 libraries: 476 $(developLibDir)/libsolv.so 477 $(developLibDir)/libsolvext.so 478 headers: $(developHeadersDir) 479 # sources are required for the primary architecture only 480 primary @{ 481 file: source libsolv_source 482 sources: develop/sources/%portRevisionedName%/sources 483 }@ 484 ; 485 486 EnableBuildFeatures libsolv ; 487} else { 488 Echo "libsolv package not available for $(TARGET_PACKAGING_ARCH)" ; 489} 490 491 492# qrencode 493if [ IsPackageAvailable qrencode_kdl_devel ] { 494 ExtractBuildFeatureArchives libqrencode_kdl : 495 file: devel qrencode_kdl_devel 496 library: $(developLibDir)/libqrencode_kdl.a 497 headers: $(developHeadersDir) 498 ; 499 500 EnableBuildFeatures libqrencode_kdl ; 501} else { 502 Echo "qrencode support not available on $(TARGET_PACKAGING_ARCH)" ; 503} 504 505 506# tiff 507if [ IsPackageAvailable tiff_devel ] { 508 ExtractBuildFeatureArchives tiff : 509 file: base tiff 510 runtime: lib 511 file: devel tiff_devel 512 depends: base 513 library: $(developLibDir)/libtiff.so.3 514 headers: $(developHeadersDir) $(developHeadersDir)/tiff 515 ; 516 517 EnableBuildFeatures tiff ; 518} else { 519 Echo "Tiff support not available on $(TARGET_PACKAGING_ARCH)" ; 520} 521 522 523# libwebp 524if [ IsPackageAvailable libwebp_devel ] { 525 ExtractBuildFeatureArchives libwebp : 526 file: base libwebp 527 runtime: lib 528 file: devel libwebp_devel 529 depends: base 530 library: $(developLibDir)/libwebp.so.5 531 headers: $(developHeadersDir) $(developHeadersDir)/webp 532 ; 533 534 EnableBuildFeatures libwebp ; 535} else { 536 Echo "Libwebp support not available on $(TARGET_PACKAGING_ARCH)" ; 537} 538 539 540# ncurses 541if [ IsPackageAvailable ncurses_devel ] { 542 ExtractBuildFeatureArchives ncurses : 543 file: base ncurses 544 runtime: lib 545 file: devel ncurses_devel 546 depends: base 547 library: $(developLibDir)/libncurses.so.5 548 headers: $(developHeadersDir) 549 ; 550 551 EnableBuildFeatures ncurses ; 552} else { 553 Echo "ncurses support not available on $(TARGET_PACKAGING_ARCH)" ; 554} 555 556 557# expat 558if [ IsPackageAvailable expat_devel ] { 559 ExtractBuildFeatureArchives expat : 560 file: base expat 561 runtime: lib 562 file: devel expat_devel 563 depends: base 564 library: $(developLibDir)/libexpat.so.1 565 headers: $(developHeadersDir) 566 ; 567 568 EnableBuildFeatures expat ; 569} else { 570 Echo "expat support not available on $(TARGET_PACKAGING_ARCH)" ; 571} 572 573 574# GPL add-ons 575if $(HAIKU_INCLUDE_GPL_ADDONS) = 1 { 576 EnableBuildFeatures gpl ; 577} 578 579 580# ATA vs. IDE 581#HACK: remove when old ide code is removed! 582if $(HAIKU_ATA_STACK) = 1 { 583 EnableBuildFeatures ata ; 584} else { 585 EnableBuildFeatures ide ; 586} 587