http://devmanual.gentoo.org/ebuild-writing/variables/index.htmlfreenode / #gentoo-dev-help:
<mizerydearia> In regards to compiling a package (bitcoin) from source and using useflags to determine whether to compile bitcoin binary (gui requiring wxwidgets-2.9) and/or bitcoind binary (daemon), which useflag method does anyone suggest: use "gui" and "daemon", use "wxwidgets" or something else?
<mizerydearia> Does it matter or is it important what useflags are used?
<mizerydearia> Perhaps it would be acceptable to use useflags "bitcoin" and "bitcoind?"
<nao> mizerydearia: maybe client and server use-flags are better?
<mizerydearia> nao, I don't think so because bitcoin is a gui-based p2p client that connects to the p2p network and bitcoind is a daemon-based p2p client that connects tot he p2p network.
<mizerydearia> Both have server and client characteristics
<nao> mizerydearia: they share some code or they are completly different?
<mizerydearia> nao: They share code
<nao> mizerydearia: they share some libs or other resources? e.g. Can you compile +gui -daemon, install it, then compile -gui +daemon and install again without collision with previous?
<mizerydearia> hmm, I used "wxidgets" and "daemon" useflags. "wxwidgets" provides gui binary and "daemon" provides daemon and init.d/conf.d scripts
<mizerydearia> It is possible to install only the gui or only the daemon
<nao> mizerydearia: IMHO wxidgets is not the best variant, maybe use "gui"?
<mizerydearia> hmm, really? I thought it was better than gui
<nao> mizerydearia: gui is more generic
<mizerydearia> And in the case in future that a second gui is available to be compiled that isn't reliant on wxwidgets, then how to separate them?
<mizerydearia> gui2?
<nao> mizerydearia: hm... seems you are right
<nao> mizerydearia: can this package be splitted into two?
<nao> two separate ebuild
<nao> ebuilds
<mizerydearia> I suppose, but they would download content from same repository and use same files
<mizerydearia> and there only be very minor difference in indicating to build bitcoind or bitcoin binary.
<mizerydearia> It would seem pointless to split into two.
<mizerydearia> dry (don't repeat yourself)?
<nao> mizerydearia: IMHO, if files are not overlap... splitting may be useful
<mizerydearia> nao, Can you provide examples of ebuilds in portage that have been split?
<nao> mizerydearia: dev-games/renpy -> dev-games/renpy, dev-games/renpy-modules is splitted by me in sunrise
<mizerydearia> Any examples in portage?
<mizerydearia> in main? not sure of name
<nao> mizerydearia: but no, there was a special reason for that
<nao> mizerydearia: try this:
<nao> mizerydearia: cat /var/db/pkg/*/*/SRC_URI | tr ' ' '\n' | grep '^http\|^ftp\|^mirror' | sed 's@^.*/\([^/]*\)$@\1@' | sort | uniq -dc | sort -n
<nao> mizerydearia: hmm... there are some bug in my script;) wait...
<nao> mizerydearia: *-ant packages, vim-core and gvim
<nao> mizerydearia: i.e. splitting is not used widely
<mizerydearia> I agree
<nao> mizerydearia: then not forget to test if at last one of the flags enabled
<nao> mizerydearia: you can use confutils.eclass for that
<mizerydearia> nao, Here is the ebuild. How does it look?
http://github.com/mizerydearia/bitcoin_gentoo_ebuild/blob/master/net-p2p/bitcoin/bitcoin-9999.ebuild<nao> mizerydearia: The name of ebuild (package) can be removed from description
<nao> mizerydearia: Add / to the end of HOMEPAGE
<nao> mizerydearia: bitcoin in SRC_URI can be replaced by ${PN}
<nao> mizerydearia: sort DEPEND
<nao> mizerydearia: min version of app-admin/eselect-wxwidgets in portage is 1.1, so you can drop version
<nao> mizerydearia: using ${PN} in enewuser... don`t know, better to ask someone on the channel
<nao> mizerydearia: don`t use 'cd trunk', you can set S variable for that
<nao> mizerydearia: try to use emake instead of make
<mizerydearia> S variable?
<mizerydearia> $ grep "enewuser.*PN" */*/*.ebuild
<mizerydearia> Shows a couple packages using ${PN}
<mizerydearia> Not too many though
<mizerydearia> nao, Thanks for tips. Anything else?
<nao> mizerydearia: lines 45,46 can be expanded to more lines
<nao> mizerydearia: inlines with if fi is not readable
<nao> mizerydearia: nls? needs gettext, or maybe virtual/libintl
<mizerydearia> Which is better to rely on: sys-devel/gettext or virtual/libintl?
<mizerydearia> I'll use sys-devel/gettext
<nao> mizerydearia: don`t know. but many of ebuilds in portage rely on sys-devel/gettext
<nao> mizerydearia: I just found 'domo' helper
you can use it for .mo files
<mizerydearia> mm, domo?
<nao> mizerydearia: And, I think, if LINGUAS is not set, you need to install all mo files
<mizerydearia> ah
<mizerydearia> Only a few ebuilds use domo
<mizerydearia> Very few even
<nao> mizerydearia: yes, but you can use it:)
<nao> mizerydearia: don`t know much about stuff on lines 56-70. hope you know it better
<nao> mizerydearia: I don`t have more comments on your ebuild