[haiku-commits] Re: r39194 - haiku/trunk/build/jam

On Sat, Oct 30, 2010 at 03:22, scott mc <scottmc2@xxxxxxxxx> wrote:
> Author: scottmc
> Date: 2010-10-30 09:22:17 +0200 (Sat, 30 Oct 2010)
> New Revision: 39194
> Changeset: http://dev.haiku-os.org/changeset/39194
>
> Added:
>   haiku/trunk/build/jam/OptionalLibPackages
> Modified:
>   haiku/trunk/build/jam/HaikuImage
>   haiku/trunk/build/jam/OptionalPackageDependencies
> Log:
> Added OptionalLibPackages, which brings in most of the LibPak gcc2 libs.
> TODO: Create fresh gcc4 packages for several libs which are currently #'d out 
> in the version.
>
>
> Added: haiku/trunk/build/jam/OptionalLibPackages
> ===================================================================

> +# SDLLibs
> +if [ IsOptionalHaikuImagePackageAdded SDLLibs ]
> +               && $(TARGET_ARCH) = x86 {

installoptionalpackage doesn't support this specific compound if statement.
(i know, i know  installoptionalpackage should be updated, but it's a
small miracle that it works as well as it does)
This style is preferred:

if [ IsOptionalHaikuImagePackageAdded SDLLibs ] {
        if $(TARGET_ARCH) != x86 {
                Echo "No optional package SDLLibs available for $(TARGET_ARCH)" 
;
        } else ....


> +       # libsdl and related libs
> +       if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
> +               InstallOptionalHaikuImagePackage
> +                       libsdl-1.2-hg--x86-gcc-2-2010-10-29.zip
> +                       : 
> $(baselibURL)/libsdl-1.2-hg--x86-gcc2-2010-10-29.zip ;
                
                ...
                
> +       }
> +
> +       if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) {
> +#              InstallOptionalHaikuImagePackage
> +#                      libsdl-1.2-hg-x86-gcc-4-2010-10-29.zip
> +#                      : $(baselibURL)/libsdl-1.2-hg-x86-gcc4-2010-10-29.zip 
> ;
                
                ...
                
> +       }
> +}

Even though the libs for gcc4 are commented out, the logic in the
conditionals isn't correct.

This example will favor gcc2 packages in gcc4 hybrids:

if [ IsOptionalHaikuImagePackageAdded SDLLibs ] {
        if $(TARGET_ARCH) != x86 {
                Echo "No optional package SDLLibs available for $(TARGET_ARCH)" 
;
        } else if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
                ...
        } else {
                #       $(HAIKU_GCC_VERSION[1]) >= 4
                ...
        }
}

I'll start updating installoptionalpackage to support this new
OptionalLibPackages file.
If you don't beat me to it, i would update this too.

--mmadia

Other related posts: