From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AEF2B1381F3 for ; Wed, 11 Sep 2013 10:19:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A4FCE0BA0; Wed, 11 Sep 2013 10:19:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB0C9E0BA0 for ; Wed, 11 Sep 2013 10:19:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A0F8E33EC07 for ; Wed, 11 Sep 2013 10:19:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0E770E5465 for ; Wed, 11 Sep 2013 10:19:02 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1378894636.c965acd69042387a64a6564ee76ad960f555d3da.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: / X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay-9999.ebuild X-VCS-Directories: / X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: c965acd69042387a64a6564ee76ad960f555d3da X-VCS-Branch: master Date: Wed, 11 Sep 2013 10:19:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 19ccd7de-26bd-472d-b1a4-20cadf57d191 X-Archives-Hash: 114d43d19063d7d06804ff5da5951b3b commit: c965acd69042387a64a6564ee76ad960f555d3da Author: André Erdmann mailerd de> AuthorDate: Wed Sep 11 10:17:16 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Sep 11 10:17:16 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=c965acd6 update roverlay-9999.ebuild * uses git-r3, distutils-r1 * should have proper dependencies now * pkg_config() will be restored once roverlay-setup is done --- roverlay-9999.ebuild | 283 +++++++-------------------------------------------- 1 file changed, 36 insertions(+), 247 deletions(-) diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild index 2d5daee..dd6b088 100644 --- a/roverlay-9999.ebuild +++ b/roverlay-9999.ebuild @@ -2,276 +2,65 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=4 +EAPI=5 -# python < 2.7 is not supported -PYTHON_COMPAT="python2_7 python3_2" -PYTHON_USE="ssl" - -inherit base python-distutils-ng git-2 user bash-completion-r1 +# dev-python/mako doesn't support python3.3, currently +PYTHON_COMPAT=( python{2_7,3_2} ) +PYTHON_REQ_USE="ssl,threads(+),readline(+)" EGIT_REPO_URI='git://git.overlays.gentoo.org/proj/R_overlay.git' -[[ "${PV}" != "99999"* ]] || EGIT_BRANCH=gsoc13/next -DESCRIPTION="Automatically generated overlay of R packages (SoC2012)" +DOCS=() +HTML_DOCS=( doc/html/. ) + +inherit user distutils-r1 git-r3 + +DESCRIPTION="Automatically generated overlay of R packages" HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=summary" SRC_URI="" LICENSE="GPL-2+" SLOT="0" -IUSE="bash-completion bzip2 +prebuilt-documentation" - KEYWORDS="" +IUSE="bzip2 +prebuilt-documentation" -_CDEPEND=" - dev-python/setuptools - python_targets_python2_7? ( dev-python/futures[python_targets_python2_7] ) -" -DEPEND="${_CDEPEND} - !prebuilt-documentation? ( >=dev-python/docutils-0.9 ) -" -RDEPEND="${_CDEPEND} + +_CDEPEND="dev-python/setuptools" +RDEPEND="${_CDEPEND?} + prebuilt-documentation? ( >=dev-python/docutils-0.9 )" +DEPEND="${_CDEPEND?} sys-apps/portage virtual/python-argparse - net-analyzer/rrdtool - dev-python/mako -" + dev-python/mako[${PYTHON_USEDEP}] + $(python_gen_cond_dep dev-python/futures[$(python_gen_usedep python2_7)] python2_7)" + + +pkg_setup() { + enewgroup roverlay +} python_prepare_all() { - base_src_prepare + distutils-r1_python_prepare_all if use bzip2; then - einfo "USE=bzip2: Compressing dependency rule files" - emake BUILDDIR="${S}/tmp" compress-config + einfo "USE=bzip2: Compressing dependency rules and license map" + emake BUILDDIR="${S}/compressed" compress-config fi } -src_compile() { - python-distutils-ng_src_compile - - if ! use prebuilt-documentation; then - emake htmldoc - fi +python_compile_all() { + use prebuilt-documentation || emake htmldoc } python_install_all() { - # hooks etc. into /usr/share (architecture-independent data) - emake BUILDDIR="${S}/tmp" DESTDIR="${D}" \ - install-data $(usex bzip2 install-config{-compressed,}) - - dohtml doc/html/* + distutils-r1_python_install_all - if use bash-completion; then - newbashcomp "${S}/files/misc/${PN}.bashcomp" "${PN}" - fi + emake BUILDDIR="${S}/compressed" DESTDIR="${D}" \ + install-data $(usex bzip2 install-config{-compressed,}) - # roverlay expects these directories to exist - # (due to the default config file) - keepdir /etc/${PN}/{files,package-rules.d} + newbashcomp "${S}/files7misc/${PN}.bashcomp" "${PN}" } -pkg_setup() { - enewgroup roverlay -} - -pkg_config() { - ## func - get_user_dir() { - if [[ -d "${1}" ]]; then - return 0 - else - mkdir -m 0750 "${1}" && \ - chown -h "${roverlay_user}:${roverlay_group}" "${1}" || \ - die "failed to create '${1}'." - fi - } - # enable_hook ( hook_script_name, hook_name, **hook_destdir, **data_root ) - enable_hook() { - local hook_src="${data_root?}/hooks/${1%.sh}.sh" - local hook_dest="${hook_destdir?}/${2%.sh}.sh" - - if [[ ! -f "${hook_src}" ]]; then - die "hook script '${hook_src}' does not exist." - elif [[ -L "${hook_dest}" ]]; then - if [[ "$(readlink -f ${hook_dest})" == "${hook_src}" ]]; then - einfo "skipping ${2%.sh} - already set up" - else - ewarn "skipping ${2%.sh} - link to another script" - fi - elif [[ -e "${hook_dest}" ]]; then - ewarn "skipping hook ${2%.sh} - exists, but not a link" - else - ebegin "Adding hook ${1%.sh} as ${2%.sh}" - ln -sT "${hook_src}" "${hook_dest}" && \ - chown -Ph "${roverlay_user}:${roverlay_group}" "${hook_dest}" - eend $? || die "failed to add hook ${2%.sh}" - fi - } - - ## vars - local DEFAULT_CONF_ROOT="${ROOT}etc/${PN}" - - local roverlay_user="roverlay" - local roverlay_group="roverlay" - #local user_is_root - local want_conf_import - - local data_root="${ROOT}usr/share/${PN}" - local conf_root - local work_root - - local want_default_hooks=y - - local input - - ## get user input - einfo "Enter user/uid that will run ${PN} (user has to exist!) ['${roverlay_user}']:" - # input= not strictly needed - input=; read input - [[ -z "${input}" ]] || roverlay_user="${input}" - - egetent passwd "${roverlay_user}" 1>/dev/null || \ - die "no such user/uid: ${roverlay_user}" - - case "${roverlay_user}" in - '0'|'root') - #user_is_root=y - - work_root="${ROOT}var/${PN}" - conf_root="${DEFAULT_CONF_ROOT}" - config_file="${conf_root}/R-overlay.conf" - - einfo "config root is ${conf_root}" - want_conf_import=n - ;; - *) - #user_is_root=n - - # get user config location - input="$(egethome ${roverlay_user})" - [[ -d "${input}" ]] || die "user has no home directory: ${input}" - - work_root="${input}/${PN}" - conf_root="${work_root}/config" - config_file="${work_root}/R-overlay.conf" - - if [[ ! -e "${conf_root}" ]]; then - einfo "config root is ${conf_root} (will be created)" - want_conf_import=y - else - einfo "config root is ${conf_root} (already exists)" - want_conf_import=n - fi - - einfo "Import default config (${DEFAULT_CONF_ROOT})? (y/n) ['${want_conf_import}']" - input=; read input - case "${input}" in - '') true ;; - 'y'|'n') want_conf_import="${input}" ;; - *) die "answer '${input}' not understood." ;; - esac - ;; - esac - - if [[ -e "${config_file}" ]]; then - einfo "This will overwrite ${config_file}!" - echo - fi - - einfo "Enable default overlay creation hooks (git history and metadata cache)? (y/n) ['${want_default_hooks}']" - input=; read input - case "${input}" in - '') true ;; - 'y'|'n') want_default_hooks="${input}" ;; - *) die "answer '${input}' not understood." ;; - esac - - einfo "Enter the directory for 'work' data (overlay, distfiles, mirror) ['${work_root}']:" - - input=; read input - [[ -z "${input}" ]] || work_root="${input}" - - # setting ADDITIONS_DIR here "breaks" hook activation - einfo "Enter additional config options (VAR=VALUE; use with care) [optional]:" - input=; read input - - ## print what would be done - local noconf="(not configurable)" - echo - einfo "Configuration:" - einfo "- user/uid : ${roverlay_user}" - einfo "- group/gid : ${roverlay_group} ${noconf}" - einfo "- work root : ${work_root}" - einfo "- data root : ${data_root} ${noconf}" - einfo "- config root : ${conf_root}" - einfo "- import config : ${want_conf_import}" - einfo "- enable default hooks : ${want_default_hooks}" - einfo "- additional options : ${input:-}" - einfo - einfo "Press Enter to continue..." - read - - ## do it - - # temporary config file - will be moved to its final location when done - ebegin "Creating temporary config file" - /usr/bin/roverlay-mkconfig -O "${T}/${PF}.config" \ - -W "${work_root}" -D "${data_root}" -C "${conf_root}" -- ${input-} - eend $? || die - - # import config - if [[ "${want_conf_import}" == "y" ]]; then - [[ -d "${conf_root}" ]] || mkdir -p "${conf_root}" || \ - die "cannot create ${conf_root}" - - ebegin "Importing default config (${DEFAULT_CONF_ROOT})" - cp -dRu --preserve=mode,timestamps \ - "${DEFAULT_CONF_ROOT}"/* "${conf_root}"/ && \ - chown -Rh --from="root:root" \ - "${roverlay_user}:${roverlay_group}" "${conf_root}" - eend $? || die - fi - - # run "roverlay setupdirs" - ebegin "Creating directories" - /usr/bin/roverlay --config "${T}/${PF}.config" \ - --target-uid ${roverlay_user} --target-gid ${roverlay_group} setupdirs - eend $? || die - - # move config file - ebegin "Copying new config file to ${config_file}" - cp --preserve=mode,timestamps "${T}/${PF}.config" "${config_file}" && \ - chown "${roverlay_user}:${roverlay_group}" "${config_file}" - eend $? || die - - # adjust permissions for $work_root - if [[ ! -L "${work_root}" ]]; then - # ^ chmod doesn't work nicely for symlinks - - ebegin "Adjusting permissions for ${work_root}" - chmod 0750 "${work_root}" && \ - chown -h --from="root:root" \ - "${roverlay_user}:${roverlay_group}" "${work_root}" - eend $? || die - fi - - # enable hooks - if [[ "${want_default_hooks}" ]]; then - einfo "Activating default hooks" - if [[ ! -d "${conf_root}/files" ]]; then - ewarn "Skipping hook activation: ADDITIONS_DIR not in config root." - else - local hook_destdir="${conf_root}/files/hooks/overlay_success" - - # non-recursive - get_user_dir "${hook_destdir%/*}" - get_user_dir "${hook_destdir}" - - enable_hook {,50-}create-metadata-cache - enable_hook {,80-}git-commit-overlay - fi - fi - - echo - einfo "Configuration for user '${roverlay_user}' is complete." - einfo "You can run '${PN} --print-config' (as user) to verify it." -} +## TODO (when roverlay-setup is done) +##pkg_config() { +## : +##}