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: Sat Aug 21, 2021 6:19 am    Post subject: [Risolto] ebuild Reply with quote

Ho una ebuild che installa un binario ma con due "sorgenti" diversi, in base al fatto se sono attive o meno le cpu_flags avx2

Code:
SRC_URI="
amd64? ( !cpu_flags_x86_avx2? ( ........................................... ) )
amd64? ( cpu_flags_x86_avx2? ( ............................................ ) )
"


adesso il problema é che devo applicare una patch al binario, ma la patch é diversa in base al binario da installare

ho provato

Code:
src_prepare() {
     default
     if ( cpu_flags_x86_avx2? ) ; then
       patchelf --replace-needed ...................................................... || die
       patchelf --replace-needed ...................................................... || die
      else
       patchelf --replace-needed ...................................................... || die
       patchelf --replace-needed ...................................................... || die
     fi
}


ma ( cpu_flags_x86_avx2? ) non é un comando conosciuto......

come posso procedere?
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Sat Aug 21, 2021 8:26 am    Post subject: Re: [Risolto] ebuild Reply with quote

antonellocaroli wrote:
Ho una ebuild che installa un binario ma con due "sorgenti" diversi, in base al fatto se sono attive o meno le cpu_flags avx2

Code:
SRC_URI="
amd64? ( !cpu_flags_x86_avx2? ( ........................................... ) )
amd64? ( cpu_flags_x86_avx2? ( ............................................ ) )
"


adesso il problema é che devo applicare una patch al binario, ma la patch é diversa in base al binario da installare

ho provato

Code:
src_prepare() {
     default
     if ( cpu_flags_x86_avx2? ) ; then
       patchelf --replace-needed ...................................................... || die
       patchelf --replace-needed ...................................................... || die
      else
       patchelf --replace-needed ...................................................... || die
       patchelf --replace-needed ...................................................... || die
     fi
}


ma ( cpu_flags_x86_avx2? ) non é un comando conosciuto......

come posso procedere?


Ok risolto...

Code:
if use cpu_flags_x86_avx2 ; then

....................
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