Update openssl package

Also use the new build feature rules
This commit is contained in:
Ingo Weinhold 2013-06-13 16:43:40 +02:00
parent 5ce950ae76
commit ebb78dd9b7
7 changed files with 53 additions and 56 deletions

View File

@ -24,44 +24,32 @@ if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
HAIKU_BUILD_FEATURE_SSL = 1 ;
}
if $(HAIKU_GCC_VERSION[1]) >= 4 {
if $(TARGET_ARCH) = x86_64 {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-x86_64-2012-12-18.zip ;
} else {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-r1a4-x86-gcc4-2012-08-29.zip ;
}
} else {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-1-x86_gcc2.hpkg ;
}
HAIKU_OPENSSL_URL = $(hpkgBaseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_SSL) {
if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
# Download the package.
local zipFile = [ DownloadFile $(HAIKU_OPENSSL_PACKAGE)
: $(HAIKU_OPENSSL_URL) ] ;
if $(TARGET_ARCH) in x86 x86_64 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
if $(TARGET_ARCH) = x86_64 {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-x86_64-2012-12-18.zip ;
} else {
HAIKU_OPENSSL_PACKAGE
= openssl-1.0.0j-r1a4-x86-gcc4-2012-08-29.zip ;
}
} else {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-2-x86_gcc2.hpkg ;
HAIKU_OPENSSL_DEVEL_PACKAGE = openssl_devel-1.0.0j-2-x86_gcc2.hpkg ;
}
# zip file and output directory
HAIKU_OPENSSL_ZIP_FILE = $(zipFile) ;
HAIKU_OPENSSL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_OPENSSL_PACKAGE:B) ] ;
HAIKU_OPENSSL_URL = $(hpkgBaseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
HAIKU_OPENSSL_DEVEL_URL
= $(hpkgBaseURL)/$(HAIKU_OPENSSL_DEVEL_PACKAGE) ;
# extract headers and libraries
HAIKU_OPENSSL_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_OPENSSL_DIR)
: develop/headers/ : $(zipFile) : extracted-openssl
] ;
HAIKU_OPENSSL_LIBS = [ ExtractArchive $(HAIKU_OPENSSL_DIR)
:
develop/lib/libcrypto.so
develop/lib/libssl.so
: $(zipFile)
: extracted-openssl
] ;
HAIKU_OPENSSL_HEADERS
= [ FDirName $(HAIKU_OPENSSL_DIR) develop/headers ] ;
ExtractBuildFeatureArchives openssl :
file: base $(HAIKU_OPENSSL_URL)
runtime: lib
file: devel $(HAIKU_OPENSSL_DEVEL_URL)
depends: base
libraries: develop/lib/libcrypto.so develop/lib/libssl.so
headers: develop/headers
;
EnableBuildFeatures openssl ;
} else {

View File

@ -1478,6 +1478,9 @@ if [ IsOptionalHaikuImagePackageAdded OpenSSH ] {
if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_URL) ;
if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ] {
InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_DEVEL_URL) ;
}
} else {
Echo "No optional package OpenSSL available for $(TARGET_ARCH)" ;
}

View File

@ -17,10 +17,11 @@ local sources =
;
# use OpenSSL, if enabled
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
if [ FIsBuildFeatureEnabled openssl ] {
SubDirC++Flags -DUSE_SSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
UseBuildFeatureHeaders openssl ;
Includes [ FGristFiles $(sources) ]
: [ BuildFeatureAttribute openssl : headers ] ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
@ -33,7 +34,8 @@ AddResources POP3 : POP3.rdef ;
Addon POP3
: $(sources)
: be libbnetapi.so libmail.so $(HAIKU_LOCALE_LIBS)
$(HAIKU_OPENSSL_LIBS) $(TARGET_LIBSUPC++) $(TARGET_NETWORK_LIBS)
[ BuildFeatureAttribute openssl : libraries ] $(TARGET_LIBSUPC++)
$(TARGET_NETWORK_LIBS)
;
Package haiku-maildaemon-cvs :

View File

@ -13,10 +13,11 @@ local sources =
;
# use OpenSSL, if enabled
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
if [ FIsBuildFeatureEnabled openssl ] {
SubDirC++Flags -DUSE_SSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
UseBuildFeatureHeaders openssl ;
Includes [ FGristFiles $(sources) ]
: [ BuildFeatureAttribute openssl : headers ] ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
@ -29,7 +30,7 @@ AddResources SMTP : SMTP.rdef ;
Addon SMTP
: $(sources)
: be libmail.so $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++)
$(HAIKU_LOCALE_LIBS) $(HAIKU_OPENSSL_LIBS)
$(HAIKU_LOCALE_LIBS) [ BuildFeatureAttribute openssl : libraries ]
;
DoCatalogs SMTP :

View File

@ -12,12 +12,12 @@ SubDirSysHdrs [ FDirName $(SUBDIR) md5 ] ;
# use OpenSSL, if enabled
local sslSources ;
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
if [ FIsBuildFeatureEnabled openssl ] {
SubDirCcFlags -DHAVE_LIBSSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
UseBuildFeatureHeaders openssl ;
sslSources = openssl.c ;
Includes [ FGristFiles $(sslSources) ]
: $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
: [ BuildFeatureAttribute openssl : headers ] ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
@ -75,5 +75,5 @@ BinCommand wget :
xmalloc.c
xalloc-die.c
$(sslSources)
: $(TARGET_NETWORK_LIBS) $(HAIKU_OPENSSL_LIBS)
: $(TARGET_NETWORK_LIBS) [ BuildFeatureAttribute openssl : libraries ]
;

View File

@ -36,10 +36,11 @@ local sources =
# use OpenSSL, if enabled
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
if [ FIsBuildFeatureEnabled openssl ] {
SubDirC++Flags -DUSE_SSL ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
UseBuildFeatureHeaders openssl ;
Includes [ FGristFiles $(sources) ]
: [ BuildFeatureAttribute openssl : headers ] ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
@ -56,7 +57,7 @@ SharedLibrary libmail.so :
$(TARGET_LIBSTDC++)
$(TARGET_NETWORK_LIBS)
$(TARGET_SELECT_UNAME_ETC_LIB)
$(HAIKU_OPENSSL_LIBS)
[ BuildFeatureAttribute openssl : libraries ]
$(HAIKU_LOCALE_LIBS)
;

View File

@ -8,13 +8,14 @@ UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
local sslSources ;
local md5Sources ;
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
if [ FIsBuildFeatureEnabled openssl ] {
SubDirC++Flags -DOPENSSL_ENABLED ;
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
UseBuildFeatureHeaders openssl ;
sslSources = SSL.cpp ;
md5Sources = ;
Includes [ FGristFiles $(sslSources) SecureSocket.cpp HttpAuthentication.cpp ]
: $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
Includes [ FGristFiles $(sslSources) SecureSocket.cpp
HttpAuthentication.cpp ]
: [ BuildFeatureAttribute openssl : headers ] ;
# Dependency needed to trigger downloading/unzipping the package before
# compiling the files.
SetupFeatureObjectsDir ssl ;
@ -71,6 +72,7 @@ SharedLibrary libbnetapi.so :
UrlSynchronousRequest.cpp
:
be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) $(HAIKU_OPENSSL_LIBS)
be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute openssl : libraries ]
libshared.a
;