[haiku-commits] Re: haiku: hrev44293 - src/apps/webpositive

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 08 Jul 2012 04:25:25 +0200

Matt Madia wrote:
> Here's a rough patch, I've been working on. Basically, it leverages
> AddFilesToAlternativeGCCArchive to make WebPositive get compiled inside
> the alternative gcc4 generated directory and added to the image.
> 
> Would this be in the right direction?
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
> index 926469f..a54d99e 100644
> --- a/build/jam/OptionalPackages
> +++ b/build/jam/OptionalPackages
> @@ -1850,11 +1850,16 @@ if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
>   } else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
>   Echo "No optional package WebPositive available for gcc2" ;
>   } else {
> - InstallOptionalHaikuImagePackage
> - WebPositive-gcc4-x86-r586-2012-03-31.zip
> - : $(baseURL)/WebPositive-gcc4-x86-r586-2012-03-31.zip ;
> + if $(HAIKU_GCC_VERSION[1]) < 4 {
> + AddFilesToAlternativeGCCArchive system apps : WebPositive : WebPositive ;
> + } else {
> + AddFilesToHaikuImage system apps : WebPositive ;
> + }

For gcc 2  tthere is no WebPositive, so nothing can be added. For a gcc 2 
hybrid build a sub build process with gcc 4 is invoked, which builds the 
alternative gcc archive (which in turn is eventually unzipped to the image by 
the main jam). For a gcc 4 based image WebPositive can be added to the build 
directly. So both rules must be executed only for gcc 4. Note that the rules 
are declarative, so there is no clash and no need to check whether an image or 
an alternative gcc archive is built. There's a shorthand 
AddFilesToHaikuHybridImage which calls both rules and should be used here.

>   AddSymlinkToHaikuImage home config settings deskbar Applications
> - : /boot/apps/WebPositive/WebPositive ;
> + : /boot/system/apps/WebPositive ;

Only for a gcc 4 build. There's AddSymlinkToHaikuHybridImage that should be 
used. The installation location should not be system, when dependencies are 
installed in common. So /boot/apps is fine for the time being.

> + InstallOptionalHaikuImagePackage $(HAIKU_WEBKIT_FILE)
> + : $(baseURL)/$(HAIKU_WEBKIT_FILE)
> + : common ;

This should just be declared as an optional package and as a dependency for 
WebPositive in OptionalPackageDependencies. I mentioned in my previous mail, 
that I wasn't sure whether this dependency would be picked up correctly in a 
gcc 2 hybrid situation, but it really should be. An actual problem will be the 
dependencies for WebKit, though. E.g. if Curl is declared as a dependency, the 
gcc 2 package would be installed. The easiest work-around for the time being 
might be splitting the Curl package in packages CurlGCC2 and CurlGCC4 and 
adding CurlGCC4 as a dependency for WebKit. To keep things simple for other 
packages that depend on Curl a pseudo package Curl could be introduced which 
would depend on CurlGCC2 or CurlGCC4 depending on the current gcc. The same 
goes for Curl's dependency (OpenSSL) and recursively all other WebKit 
dependencies.

CU, Ingo

Other related posts: