Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

USE flag array similar to USE_EXPAND

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
NathanZachary
Bodhisattva
Bodhisattva
User avatar
Posts: 2627
Joined: Tue Jan 30, 2007 1:50 am

USE flag array similar to USE_EXPAND

  • Quote

Post by NathanZachary » Thu Jul 10, 2025 5:40 pm

Hello,

I'm working on an ebuild for the Ares multi-console video game emulator. Upstream allows for selecting the console support to build, and I would like to include that flexibility in the ebuild. As such, I was considering using something similar to the USE_EXPAND approach in the base profile, but specific to this package. I would appreciate some recommendations on how to handle it. For reference, here is the CMake option to pass to build only the console cores that one wants:

https://github.com/ares-emulator/ares/w ... ares_cores

Thank you in advance for the feedback.

Cheers,
Nathan Zachary
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Top
RumpletonBongworth
Apprentice
Apprentice
User avatar
Posts: 155
Joined: Mon Jun 17, 2024 1:17 am

  • Quote

Post by RumpletonBongworth » Thu Aug 14, 2025 8:05 am

You could declare IUSE in this manner:

Code: Select all

IUSE="$(set -- ares_cores_{a26,fc,sfc,sg,ms,md,ps1,pce,ng,msx,cv,myvision,gb,gba,ws,ngp,spec,n64}; printf %s "$*")"
Effectively, this is a more convenient way of writing:

Code: Select all

IUSE="ares_cores_a26 ares_cores_fc ares_cores_sfc ares_cores_sg ares_cores_ms ares_cores_md ares_cores_ps1 ares_cores_pce ares_cores_ng ares_cores_msx ares_cores_cv ares_cores_myvision ares_cores_gb ares_cores_gba ares_cores_ws ares_cores_ngp ares_cores_spec ares_cores_n64"
As far as I am aware, there would be no way to whitelist ARES_CORES in USE_EXPAND without either creating a custom profile or getting your ebuild into the gentoo repo along with an agreement to modify the base profile accordingly. Nevertheless, whichever flags you choose to place into IUSE can always be enabled/disabled via package.use in their raw form. You might be better off just incorporating the flags without the "ares_cores_" prefix.

EDIT: Setting USE_EXPAND="ARES_CORES" in make.conf seems to work. That might be sufficient for personal use.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic