* Moved the optional package dependency definitions into the new

build/jam/OptionalPackageDependencies and include it earlier (before the
  Jamfiles).
* Introduced build/jam/OptionalBuildFeatures which is supposed to do the setup
  for optional build features that need it.
* Renamed USE_SSL to HAIKU_BUILD_FEATURE_SSL and made it more intelligent.
  The OpenSSL optional package is downloaded and unzipped automatically when
  enabled. Switching between enabled/disabled HAIKU_BUILD_FEATURE_SSL is
  handled gracefully -- the concerned components are built in separate
  subdirectories. Adding the OpenSSL optional package to the image also enables
  HAIKU_BUILD_FEATURE_SSL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30021 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-04-08 10:07:17 +00:00
parent d339b68bef
commit ff81d306d4
12 changed files with 175 additions and 111 deletions
+47
View File
@@ -0,0 +1,47 @@
# This file contains setup for features that can optionally be used for the
# build. For features that require downloading a zip file from somewhere it is
# likely the same file use for an optional package.
# SSL
# Automatically enable the SSL feature, when the optional OpenSSL optional
# package is enabled.
if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
HAIKU_BUILD_FEATURE_SSL = 1 ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_OPENSSL_PACKAGE = openssl-0.9.8j-gcc2-2009-01-28 ;
HAIKU_OPENSSL_URL = $(baseURL)/$(HAIKU_OPENSSL_PACKAGE).zip ;
if $(HAIKU_BUILD_FEATURE_SSL) {
if $(TARGET_ARCH) != x86 {
Echo "SSL build feature not available for $(TARGET_ARCH)" ;
} else {
# Download the zip archive.
local zipFile = [ DownloadOptionalPackage $(HAIKU_OPENSSL_PACKAGE)
: $(HAIKU_OPENSSL_URL) ] ;
# zip file and output directory
HAIKU_OPENSSL_ZIP_FILE = $(zipFile) ;
HAIKU_OPENSSL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_OPENSSL_PACKAGE) ] ;
# unzip headers and libraries
HAIKU_OPENSSL_HEADERS_DEPENDENCY = [ UnzipArchive $(HAIKU_OPENSSL_DIR)
: common/include/ : $(zipFile)
] ;
HAIKU_OPENSSL_LIBS = [ UnzipArchive $(HAIKU_OPENSSL_DIR)
:
common/lib/libcrypto.so
common/lib/libssl.so
: $(zipFile)
] ;
HAIKU_OPENSSL_ENABLED = 1 ;
HAIKU_OPENSSL_HEADERS
= [ FDirName $(HAIKU_OPENSSL_DIR) common include ] ;
}
}
+9
View File
@@ -0,0 +1,9 @@
# package dependencies
OptionalPackageDependencies APR-util : APR ;
OptionalPackageDependencies BeHappy : BeBook NetSurf ;
OptionalPackageDependencies Development : Perl ;
OptionalPackageDependencies LibLayout : Development ;
OptionalPackageDependencies NetSurf : OpenSSL ;
OptionalPackageDependencies OpenSSH : OpenSSL ;
OptionalPackageDependencies Subversion : OpenSSL ;
+2 -16
View File
@@ -43,16 +43,6 @@ if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) && $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
# Yasm
# package dependencies
OptionalPackageDependencies APR-util : APR ;
OptionalPackageDependencies BeHappy : BeBook NetSurf ;
OptionalPackageDependencies Development : Perl ;
OptionalPackageDependencies LibLayout : Development ;
OptionalPackageDependencies NetSurf : OpenSSL ;
OptionalPackageDependencies OpenSSH : OpenSSL ;
OptionalPackageDependencies Subversion : OpenSSL ;
# APR
if [ IsOptionalHaikuImagePackageAdded APR ] {
if $(TARGET_ARCH) != x86 {
@@ -446,16 +436,14 @@ if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
if $(TARGET_ARCH) != x86 {
Echo "No optional package OpenSSL available for $(TARGET_ARCH)" ;
} else {
local baseURL = http://haiku-files.org/files/optional-packages ;
InstallOptionalHaikuImagePackage openssl-0.9.8j-gcc2-2009-01-28
: $(baseURL)/openssl-0.9.8j-gcc2-2009-01-28.zip
InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_PACKAGE)
: $(HAIKU_OPENSSL_URL)
:
;
}
}
# P7zip
if [ IsOptionalHaikuImagePackageAdded P7zip ] {
if $(TARGET_ARCH) != x86 {
@@ -481,8 +469,6 @@ if [ IsOptionalHaikuImagePackageAdded P7zip ] {
}
# Pe text editor
if [ IsOptionalHaikuImagePackageAdded Pe ] {
if $(TARGET_ARCH) != x86 {
-1
View File
@@ -9,7 +9,6 @@ switch $(HAIKU_BUILD_PROFILE) {
AddGroupToHaikuImage party : 101 : user sshd ;
HAIKU_IMAGE_HOST_NAME = shredder ;
HAIKU_IMAGE_SIZE = 400 ;
USE_SSL = 1 ;
AddOptionalHaikuImagePackages BePDF Firefox Pe Vision VLC WonderBrush ;
AddOptionalHaikuImagePackages CVS Development Subversion OpenSSH Yasm ;
+5
View File
@@ -49,6 +49,11 @@ AppendToConfigVar DEFINES : HAIKU_TOP src kits : RUN_WITHOUT_REGISTRAR
# has no effect on executables or other shared objects.
DEBUG on <src!bin!gdb!gdb!>haiku-nat.o = 1 ;
# Enables the SSL build feature. Several targets will be compiled with SSL
# support. Adding the OpenSSL optional package will automatically enable this
# feature.
HAIKU_BUILD_FEATURE_SSL = 1 ;
# Haiku Image Related Modifications