--- /usr/portage/eclass/enlightenment.eclass 2005-06-02 00:35:45.000000000 +0200 +++ /usr/local/portage/gentoofr/eclass/enlightenment.eclass 2005-06-22 16:31:56.000000000 +0200 @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/enlightenment.eclass,v 1.48 2005/06/01 22:13:02 vapier Exp $ # -# Author: vapier@gentoo.org +# Author: vapier@gentoo.org, beber@setibzh.com -inherit eutils +inherit eutils flag-o-matic ECLASS=enlightenment INHERITED="$INHERITED $ECLASS" @@ -45,9 +45,10 @@ snap) KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86";; live) KEYWORDS="-*";; esac -IUSE="nls doc" +IUSE="nls doc debug" -DEPEND="doc? ( app-doc/doxygen )" +DEPEND="doc? ( app-doc/doxygen ) + debug? ( sys-devel/gdb )" RDEPEND="nls? ( sys-devel/gettext )" case ${ECVS_STATE} in @@ -56,23 +57,33 @@ live) S=${WORKDIR}/${ECVS_MODULE};; esac +# debug.eclass modify RESTRICT, it seem to not work because (from the man) have +# to be in ebuilds. +use debug && { FEATURES="${FEATURES} nostrip" ; append-flags -g ; } + enlightenment_warning_msg() { if [[ ${ECVS_STATE} == "snap" ]] ; then ewarn "Please do not contact the E team about bugs in Gentoo." - ewarn "Only contact vapier@gentoo.org via e-mail or bugzilla." + ewarn "Only contact vapier@gentoo.org or beber@setibzh.com via e-mail or bugzilla." + ewarn "USE debug is available, use it, abuse it ;)" ewarn "Remember, this stuff is CVS only code so dont cry when" ewarn "I break you :)." + use debug || ewarn "PLEASE COMPILE WITH USE=\"debug\"" elif [[ ${ECVS_STATE} == "live" ]] ; then eerror "This is a LIVE CVS ebuild." eerror "That means there are NO promises it will work." eerror "If it fails to build, FIX THE CODE YOURSELF" eerror "before reporting any issues." + eerror "USE debug is available, use it, abuse it ;)" + eerror "Find bugs, and repair them if you can, but report debugger information" + eerror "Run gdb, valgrind, the best one you like, everybody will be happy :)" + use debug || eerror "PLEASE COMPILE WITH USE=\"debug\"" fi } enlightenment_die() { enlightenment_warning_msg - die "$@"$'\n'"!!! SEND BUG REPORTS TO vapier@gentoo.org NOT THE E TEAM" + die "$@"$'\n'"!!! SEND BUG REPORTS TO vapier@gentoo.org or beber@setibzh.com NOT THE E TEAM" } enlightenment_pkg_setup() { @@ -101,6 +112,7 @@ enlightenment_src_compile() { if [[ ${ECVS_STATE} != "release" ]] || [[ ! -e configure ]] ; then export WANT_AUTOMAKE=${EAUTOMAKE:-1.8} + env \ PATH="${T}:${PATH}" \ NOCONFIGURE=yes \ @@ -120,6 +132,7 @@ fi fi epunt_cxx + MY_ECONF="${MY_ECONF} $(use_enable debug debug)" econf ${MY_ECONF} || enlightenment_die "econf failed" emake || enlightenment_die "emake failed" use doc && [[ -x ./gendoc ]] && { ./gendoc || enlightenment_die "gendoc failed" ; }