Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] ebuild
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Mar 10, 2021 7:28 am    Post subject: [Risolto] ebuild Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Wed Mar 10, 2021 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Mar 10, 2021 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Wed Mar 10, 2021 7:53 am    Post subject: Reply with quote

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
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Mar 10, 2021 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Wed Mar 10, 2021 10:03 am    Post subject: Reply with quote

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
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Mar 10, 2021 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum