Opened 16 years ago
Closed 16 years ago
#3423 closed enhancement (fixed)
Automate creation of cross-ssl dir
Reported by: | mmadia | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Another feature to improve build automation...
Currently, any application that makes use of OpenSSL will fail to compile unless the user expands the optional package openssl to $HAIKU_OUTPUT_DIR/cross-ssl
The build system supports downloading the archive and expanding the archive to the build destination.
Could a rule SetupSSLDir be created to automate this process? Then any jamfile that makes use of the variable sslDir could be updated to call this rule.
I'm willing to implement this, just tell me how you would like it done.
Attachments (2)
Change History (8)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
I haven't had time to work on this more, due to hardware issues. Though, here's an idea of how to implement the commented sections
## Untested Code for ImageRules ## if [ IsOptionalBuildSoftwareAdded OpenSSL ] { if $(TARGET_ARCH) != x86 { Echo "No optional package OpenSSL available for $(TARGET_ARCH)" ; } else { local baseURL = http://haiku-files.org/files/optional-packages ; InstallOptionalBuildSoftware openssl-0.9.8j-gcc2-2009-01-28 : $(baseURL)/openssl-0.9.8j-gcc2-2009-01-28.zip : ; } } rule InstallOptionalBuildSoftware package : url : dirTokens { # download zip file local zipFile = $(package:G=download).zip ; MakeLocate $(zipFile) : $(HAIKU_DOWNLOAD_DIR) ; DownloadFile $(zipFile) : $(url) ; # unzip to container UnzipArchiveToContainer $(HAIKU_OUTPUT_DIR) : $(dirTokens) : $(zipFile) ; }
comment:3 by , 16 years ago
jam -q @alpha-raw
....
don't know how to make generated/cross-ssl/lib/libssl.so
don't know how to make generated/cross-ssl/lib/libcrypto.so
....
...found 71932 target(s)...
...updating 8236 target(s)...
...can't find 2 target(s)...
...can't make 6 target(s)...
Am I going about this wrong? Do I need to figure out how to inform jam how to make those shared objects?
For some reason, I thought that having SetupCrossSSLDir in build/jam/ReleaseBuildProfiles would be sufficient.
comment:4 by , 16 years ago
- Probably unintentionally you've inserted a second
AddOptionalHaikuImagePackages
rule, which will override the first one. UnzipArchiveToContainer
does unzip the given archive to an installation container (HaikuImage, NetBootArchive, BootFloppy,...), not to a directory. The unzipping happens in the build_haiku_image script, which is too late for your purpose. Unless I'm much mistaken there is no rule to unzip a file yet. The closest rule is UnarchiveObjects in FileRules, which extracts object files from a static library. An unzip rule could work similarly.- Rather than adding every optional build dependency, I would create a new file similar to OptionalPackages (say OptionalBuildPackages) which would execute the download and unzip rules for each enabled package and set some global variables that can be used in the Jamfiles. Like HAIKU_OPTIONAL_{LIBSSL,LIBCRYPTO,SSL_HEADERS} for OpenSSL.
comment:5 by , 16 years ago
I still haven't taken enough time to learn how to do this. The bits about HAIKU_OPTIONAL_{LIBSSL, LIBCRYPTO, SSL_HEADERS} are still beyond me.
For the meantime, here's a rinky dink shell script to help people. I don't intend for it to be committed, but felt it useful enough to be added to the ticket. The script needs to be run from the users HAIKU_OUTPUT_DIR.
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Implemented a solution in hrev30021.
How's this look so far?
*UserBuildConfig and ReleaseBuildProfiles
haiku/build/jam/MiscRules :
( or a similar *Rules file )
A side effect of this, all packages that test "if $USE_SSL = 1", would be able to expect SSL_DIR to be valid.
old:
new: