Robert Buchholz schrieb: > On Monday 30 March 2009, Thomas Sachau wrote: >> Ciaran McCreesh schrieb: >>> So far, we've got this, by agreement of the Council: >>> >>> * There will be a default src_install in EAPI 3 >>> * It will have a DOCS variable, or something along those lines. >>> >>> I'd like to suggest the following too: >>> >>> * If DOCS is explicitly specified, it is an error if anything in it >>> doesn't exist. >>> * If DOCS isn't explicitly specified, it isn't an error if anything >>> in its default, if it has one, doesn't exist. >>> >>> We don't have an implementation yet. So I'll start off with this: >>> >>> default_src_install() { >>> emake -j1 DESTDIR="${D}" install >> Why do you want to force -j1 here? >> >> And i had this proposal some months ago, which noone argued against >> any more (the default list may of course be extended): > ... > > What Ciaran added was a way to disable installation of default DOCS. The > implmenetation we discussed on the thread a while ago does not check > whether DOCS is declared but empty. > I believe the way the DOCS variable is handled in the first example of > the thread starter is good for a default_src_install although I don't > know if we really need arrays. But why not? :-)
ok, so actually it is the following: first this part: default_src_install() { if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then emake DESTDIR="${D}" install || die "emake install failed" fi then there are 2 ideas from Ciaran: 1.: local d if ! declare -p DOCS >/dev/null 2>&1 ; then for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do [[ -s "${d}" ]] && dodoc "${d}" done elif declare -p DOCS | grep -q '^declare -a ' ; then for d in "${do...@]}" ; do dodoc "${d}" done else dodoc ${DOCS} fi } and 2.: emagicdocs emagicdocs() { done_docs= old_set=$(shopt | grep 'nocaseglob[[:space:]]*on') shopt -s nocaseglob for d in '' "${default_src_install_extra_subdi...@]}" ; do if [[ -n ${d} ]]; then [[ -d ${d} ]] || die "${d} is not a dir" pushd "${d}" > /dev/null || die "Failed to enter ${d}" local docdesttree="${DOCDESTTREE}" docinto "${d}" fi for f in README Change{,s,Log} AUTHORS NEWS TODO ABOUT THANKS {KNOWN_,}BUGS SUBMITTING \ HACKING FAQ CREDITS PKG-INFO HISTORY PACKAGING MAINTAINER{,S} CONTRIBUT{E,OR,ORS} RELEASE \ ANNOUNCE PORTING NOTES PROBLEMS NOTICE "${default_src_install_extra_do...@]}"; do for p in "${default_src_install_extra_prefix...@]}" '' ; do for doc in "${p}"*([[:digit:]])"${f}"{,+([._-])*} ; do if [[ -s "${doc}" ]] ; then for e in "${default_src_install_exclu...@]}" ; do [[ ${doc} == ${e} ]] && continue 2 done done_docs="${done_docs} ${d%/}${d:+/}${doc}" dodoc "${doc}" fi done done done if [[ -n ${d} ]]; then docinto "${docdesttree}" popd > /dev/null || die "Failed to leave ${d}" fi done if [[ -n "${done_docs}" ]] ; then echo "Installed docs ${done_docs# }" else echo "Didn't find any docs to install" fi [[ -n ${old_set} ]] || shopt -u nocaseglob } Any more comments about this? > > >> So what about this funcion for the next EAPI and also implementation >> in base.eclass? > > Why would you want to implement it in base.eclass when it's in EAPI=3? I > can't think of a case where "inherit base" would make things easier > than bumping to EAPI=3. In both cases, you might need to change logic > within your ebuild and test it. That ideas was months ago, where EAPI-2 was just introduced and i had no idea when a default src_install with EAPI-3 could come in, so i suggested base.eclass as alternative, so it could be used earlier. -- Thomas Sachau Gentoo Linux Developer
signature.asc
Description: OpenPGP digital signature