You are not logged in.

#1 2010-11-03 20:22:27

machoo02
Member
Registered: 2009-02-22
Posts: 35

[SOLVED] Alternate depends for i686 and x86_64

How would one go about listing alternate dependencies for i686 and x86_64? For example, a program requires java-environment and sh on both environments, but when installed on x86_64 also requires lib32-glibc to run, how could that be specified in the depends() array? I've tried:

if [ "$CARCH" = "i686" ]; then
depends=('sh' 'java-environment')
elif [ "$CARCH" = "x86_64" ]; then
depends=('sh' 'lib32-glibc' 'java-environment')
fi

but that doesn't seem to work, as my i686 installation does not have lib32-glibc installed. Adding 'glibc' to the first depends array doesn't work either.

Last edited by machoo02 (2010-11-04 12:27:14)

Offline

#2 2010-11-03 20:51:19

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [SOLVED] Alternate depends for i686 and x86_64

Try

if [[ $CARCH == "i686" ]]; then
depends=('sh' 'java-environment')
elif [[ $CARCH == "x86_64" ]]; then
depends=('sh' 'lib32-glibc' 'java-environment')
fi

Offline

#3 2010-11-03 20:52:34

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Alternate depends for i686 and x86_64

depends=('sh' 'java-environment')
[[ $CARCH == "x86_64" ]] && depends=("${depends[@]}" ''lib32-glibc')

sounds more clean big_smile


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2010-11-04 12:26:45

machoo02
Member
Registered: 2009-02-22
Posts: 35

Re: [SOLVED] Alternate depends for i686 and x86_64

Thanks to both of you for the suggestions. wonder...your version worked.

Offline

Board footer

Powered by FluxBB