View previous topic :: View next topic |
Author |
Message |
antonellocaroli Guru

Joined: 11 Aug 2016 Posts: 513
|
Posted: Wed Mar 10, 2021 7:28 am Post subject: [Risolto] ebuild |
|
|
Ho un aebuild che installa dei binari, dove le src_uri sono cosi:
SRC_URI="
amd64? (....................................rpm )
arm64? ( ....................................deb )
"
avrei bisogno di una terza voce con la key amd64 e se la cpu ha AVX2
c'é un modo per farlo?
cioé una voce amd64 || AVX2
con avx2 rilevato in qualche modo automaticamente? se c'é?
Last edited by antonellocaroli on Wed Mar 10, 2021 5:56 pm; edited 1 time in total |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31660 Location: here
|
Posted: Wed Mar 10, 2021 7:43 am Post subject: |
|
|
Penso che puoi usare la logica booleana
Code: | SRC_URI="
amd64? ( avx2? ( ....................................rpm ) )
amd64? ( !avx2? ( ....................................rpm ) )
arm64? ( ....................................deb )
" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
antonellocaroli Guru

Joined: 11 Aug 2016 Posts: 513
|
Posted: Wed Mar 10, 2021 7:47 am Post subject: |
|
|
fedeliallalinea wrote: | Penso che puoi usare la logica booleana
Code: | SRC_URI="
amd64? ( avx2? ( ....................................rpm ) )
amd64? ( !avx2? ( ....................................rpm ) )
arm64? ( ....................................deb )
" |
|
ma avx2 lo dovrei mettere come USE falgs?
non c'é un modo che la ebuild lo ricavi in auto? cioé leggendo le istruzioni della cpu? |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31660 Location: here
|
Posted: Wed Mar 10, 2021 7:53 am Post subject: |
|
|
antonellocaroli wrote: | ma avx2 lo dovrei mettere come USE falgs? |
Si deve essere nelle use flag
antonellocaroli wrote: | non c'é un modo che la ebuild lo ricavi in auto? cioé leggendo le istruzioni della cpu? |
No, ma non vedo il problema di aggiungere la use flag.
Comunque userei quella esistente cpu_flags_x86_avx cosi' se uno imposta CPU_FLAGS_X86 nel make.conf viene aggiornato anche questo pacchetto. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
antonellocaroli Guru

Joined: 11 Aug 2016 Posts: 513
|
Posted: Wed Mar 10, 2021 9:58 am Post subject: |
|
|
fedeliallalinea wrote: | antonellocaroli wrote: | ma avx2 lo dovrei mettere come USE falgs? |
Si deve essere nelle use flag
antonellocaroli wrote: | non c'é un modo che la ebuild lo ricavi in auto? cioé leggendo le istruzioni della cpu? |
No, ma non vedo il problema di aggiungere la use flag.
Comunque userei quella esistente cpu_flags_x86_avx cosi' se uno imposta CPU_FLAGS_X86 nel make.conf viene aggiornato anche questo pacchetto. |
Quindi qualcosa del genere?
Code: |
SRC_URI="
amd64? ( avx2? ( ....................................rpm ) )
amd64? ( !avx2? ( ....................................rpm ) )
arm64? ( ....................................deb )
"
IUSE="cpu_flags_x86_avx2"
|
|
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31660 Location: here
|
Posted: Wed Mar 10, 2021 10:03 am Post subject: |
|
|
No, devi cambiare la variabile anche in SRC_URI
Code: | SRC_URI="
amd64? ( cpu_flags_x86_avx2? ( ....................................rpm ) )
amd64? ( !cpu_flags_x86_avx2? ( ....................................rpm ) )
arm64? ( ....................................deb )
"
IUSE="cpu_flags_x86_avx2" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
antonellocaroli Guru

Joined: 11 Aug 2016 Posts: 513
|
Posted: Wed Mar 10, 2021 5:57 pm Post subject: |
|
|
fedeliallalinea wrote: | No, devi cambiare la variabile anche in SRC_URI
Code: | SRC_URI="
amd64? ( cpu_flags_x86_avx2? ( ....................................rpm ) )
amd64? ( !cpu_flags_x86_avx2? ( ....................................rpm ) )
arm64? ( ....................................deb )
"
IUSE="cpu_flags_x86_avx2" |
|
Grazie Fedeliallalinea! |
|
Back to top |
|
 |
|