Created attachment 449276 [details] xfconf-2-eclass converted my own personal copy of xfce-dev overlay to use EAPI=6 using this new eclass xfconf-2.eclass based on existing xfconf.eclass only some patches needed adjustment to conform to eapply requirements xfce4-session .. xflock4 .. required leading aa/ and bb/ directories in the patch interal path info
To be honest, I don't like it. It feels just like another copy of xfconf.eclass. That is, no improvement at all.
Comment on attachment 449276 [details] xfconf-2-eclass ># Copyright 1999-2016 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Id$ > ># @ECLASS: xfconf-2.eclass ># @MAINTAINER: ># XFCE maintainers <xfce@gentoo.org> ># @BLURB: Default XFCE ebuild layout ># @DESCRIPTION: ># EAPI=6 XFCE ebuild layout > ># @ECLASS-VARIABLE: EAUTORECONF This needs to be namespaced. ># @DESCRIPTION: ># Run eautoreconf instead of elibtoolize if the variable is set > >if [[ -n ${EAUTORECONF} ]] ; then > AUTOTOOLS_AUTO_DEPEND=yes >else > : ${AUTOTOOLS_AUTO_DEPEND:=no} >fi Sounds like we don't dep on autotools by default for live ebuilds. > ># @ECLASS-VARIABLE: XFCONF ># @DESCRIPTION: ># This should be an array defining arguments for econf This is just ugly. Kill it with fire. >unset _xfconf_live >[[ $PV == *9999* ]] && _xfconf_live=git-r3 Someone mentioned we can kill that already and use additional inherit line. ># eutils should be inherited already >inherit ${_xfconf_live} autotools fdo-mime gnome2-utils libtool > ># obsolete EGIT_BOOTSTRAP=autogen.sh Then kill it? >EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}" Using MY_PN is wrong. Namespace it and document it. > >_xfconf_deps="" >_xfconf_m4=">=dev-util/xfce4-dev-tools-4.10" > >[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}" >[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}" > >RDEPEND="" >DEPEND="${_xfconf_deps}" > >unset _xfconf_deps >unset _xfconf_m4 Kill the extra variables, append straight to DEPEND. > >case ${EAPI:-0} in > 6) ;; > *) die "Unknown EAPI." ;; >esac > >[[ -n $_xfconf_live ]] && _xfconf_live=src_unpack > >EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm > ># @FUNCTION: xfconf-2_use_debug ># @DESCRIPTION: ># If IUSE has debug, return --enable-debug=minimum. ># If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes. ># If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full. That's an ugly logic. I have no clue what it does exactly, and I don't know if we want it at all. >xfconf-2_use_debug() { > if has debug ${IUSE}; then > if use debug; then > if [[ -n $XFCONF_FULL_DEBUG ]]; then > echo "--enable-debug=full" > else > echo "--enable-debug" > fi > else > echo "--enable-debug=minimum" > fi > else > ewarn "${FUNCNAME} called without debug in IUSE" > fi >} > ># @FUNCTION: xfconf-2_src_unpack ># @DESCRIPTION: ># Run git-r3_src_unpack if required (mods) >xfconf-2_src_unpack() { > NOCONFIGURE=1 git-r3_src_unpack NOCONFIGURE is meaningless here. >} > ># @FUNCTION: xfconf-2_src_prepare ># @DESCRIPTION: ># Process PATCHES with eapply and run eapply_user followed by run of ># elibtoolize, or eautoreconf if EAUTORECONF is set. (mods) >xfconf-2_src_prepare() { > > debug-print-function ${FUNCNAME} "$@" >#diagnotics ># cd ${S} ># ls > > default > ># NOCONFIGURE=1 > > [[ -n $_xfconf_live ]] && ./autogen.sh I don't like calling autogen.sh at all. We have eautoreconf for a reason. > > if [[ -n $EAUTORECONF ]]; then > AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf > else > elibtoolize > fi > >} > ># @FUNCTION: xfconf-2_src_configure ># @DESCRIPTION: ># Run econf with opts from the XFCONF array >xfconf-2_src_configure() { > debug-print-function ${FUNCNAME} "$@" > [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode ) It's quite confusing to implicitly append to user-defined variable here. > econf "${XFCONF[@]}" >} > ># @FUNCTION: xfconf-2_src_install ># @DESCRIPTION: ># Run emake install to DESTDIR, einstalldocs to process DOCS and ># prune_libtool_files --all to always remove libtool files (.la) >xfconf-2_src_install() { > debug-print-function ${FUNCNAME} "$@" > > # FIXME > if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then > touch ChangeLog > fi Is this actually needed? Why is it FIXME? > > emake DESTDIR="${D}" "$@" install > > einstalldocs > > prune_libtool_files --all Replace this with find ... -delete. >} > ># @FUNCTION: xfconf-2_pkg_preinst ># @DESCRIPTION: ># Run gnome2_icon_savelist >xfconf-2_pkg_preinst() { > debug-print-function ${FUNCNAME} "$@" > gnome2_icon_savelist >} > ># @FUNCTION: xfconf-2_pkg_postinst ># @DESCRIPTION: ># Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update >xfconf-2_pkg_postinst() { > debug-print-function ${FUNCNAME} "$@" > fdo-mime_desktop_database_update > fdo-mime_mime_database_update > gnome2_icon_cache_update >} > ># @FUNCTION: xfconf-2_pkg_postrm ># @DESCRIPTION: ># Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update >xfconf-2_pkg_postrm() { > debug-print-function ${FUNCNAME} "$@" > fdo-mime_desktop_database_update > fdo-mime_mime_database_update > gnome2_icon_cache_update >} That are my first complaints so far. However, I have no clue if it's really worth to include the live ebuild code here since nobody seems to care about the overlay anymore.
thank you for the feedback RE: your last comment .. yes the xfce-dev (-9999) overlay is neglected but I am using a personal copy of it regularly so I wanted to convert it to being EAPI=6 thus the work on converting xfconf to xfconf-2 to keep it functional .. yes it is a bit of a hack and very much a work still in progress. I thought I would offer it here to others who might be able help .. improve it .. Thank you again.
Just to be clear, I don't mind having -9999 ebuilds. However, I do mind having to keep ::gentoo and some overlay in sync all the time. So if other team members agree, and if you'd be interested, you can working on moving them to ::gentoo. Maybe as a some form of joint effort with new eclass. However, to develop one I think I'd like to get some research results first. Like the meaning of various debug thingies, functions of autogen.sh in various packages. In other words, to figure out a real minimal subset of the eclass necessary to get things rolling.
read through some of the macros in xfce4-dev-tools as that is where the debug flags are set .. these were created by the xfce developers and the xfce4 sources require them for " helper services " during building
/usr/share/xfce4/dev-tools/m4macros/xdt-features.m4 has the debug macro in it 4 levels defined: no|minimum|yes|full minimum being the default the other macros are also interesting ..
I do not know if this would be the right time to do " universal ebuilds " i.e. with (-9999) ebuild version detection as the current development versions are slowly being converted to >=x11-libs/gtk+-3.20.0 .. and gdbus instead of glib-dbus .. perhaps only those ebuilds which already have gtk3 options at present?
Just FYI, I don't care the slightest bit for 'universal ebuilds'. As far as I'm concerned, live ebuilds can have little common with release ebuilds, and we can use vimdiff or the like. That said, one of the things I don't get about xfconf is why it declares EGIT_REPO_URIs but not SRC_URIs.
I always wondered why the xfce4-dev git ebuilds were magically sourced .. until I tried to do an app or plugin git (-9999) ebuild .. and it could not find the source/repo .. then I went looking .. and learned how to specify the proper URL via EGIT_REPO_URI.. the weird EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}" did not help .. but I think it was done this way to handle "Thunar" until xfce changed the repo name case .. ssuominen I think wrote xfconf.eclass and would know the history .. if he's still arround..
Created attachment 452172 [details] xfconf-dev.eclass split xfconf into two eclasses xfconf-dev for current xfce-dev overlay ebuilds and xfconf-r1 for current tree based ebuilds
Created attachment 452174 [details] xfconf-r1.eclass stripped live-ebuild functionality from original xfconf and renamed functions for testing purposes xfconf-r1 should work the same as xfconf .. not yet tested xfconf-dev is tested and so far works well .. stripped out un-needed bits and streamlined .. existing xfce-dev overlay ebuilds require minor modifications addition of: EGIT_REPO_URI="git://git.xfce.org/xfce/${PN}" and removal of all references to ChangeLog in DOCS line as well as adjusting the relevant function calls and eclass references EAUTORECONF functionality is commented out or removed for live ebuilds .. does not appear to be needed ..
Honestly, I think you reached the point where this eclass stops making sense. The only useful part seems to be the debug magic. Not sure if it's worth splitting into a separate eclass.
Created attachment 454146 [details] skel.ebuild for xfce "normal ebuild) a generalized skel.ebuild for xfce4-base and xfce4-extra .. eliminates xfconf.eclass
Created attachment 454148 [details] skel-9999.ebuild for git based xfce4 ebuilds generalized skel-9999.ebuild for git based (xfce-dev overlay) xfce4 ebuilds eliminates xfconf
OBSOLETE .. current ebuilds being convert to eliminate xfconf eclass .. same builds can be adapted to 9999/git builds ..