From a16db09969d1493f9ec9f96c448e93e19c558729 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 22 Nov 2012 11:30:24 +0400 Subject: [PATCH] valadoc-9999.ebuild added. --- dev-util/valadoc/Manifest | 1 + dev-util/valadoc/valadoc-9999.ebuild | 38 +++++++ eclass/gnome2-live.eclass | 151 +++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 dev-util/valadoc/Manifest create mode 100644 dev-util/valadoc/valadoc-9999.ebuild create mode 100644 eclass/gnome2-live.eclass diff --git a/dev-util/valadoc/Manifest b/dev-util/valadoc/Manifest new file mode 100644 index 00000000..ba13f886 --- /dev/null +++ b/dev-util/valadoc/Manifest @@ -0,0 +1 @@ +EBUILD valadoc-9999.ebuild 722 SHA256 3783021392246b3817879bc921f56ef57163e6c6664c5263ceebfe30dd4242c5 SHA512 d35148399382b753b84971ced533266082c8aafd727d426b4bdf42267491c2628b322ee58f57ec833467e3242ec7a3d2eeb603816a7932737662b51d45f96ea9 WHIRLPOOL 9285164c684a8764594fcaf90334021c763e5d28e59b48f7cb3fefd6cb60c24b890abc45c2349f24a89948bf0439f4f536a73dccecae28b677fb77142a9ae975 diff --git a/dev-util/valadoc/valadoc-9999.ebuild b/dev-util/valadoc/valadoc-9999.ebuild new file mode 100644 index 00000000..864c865b --- /dev/null +++ b/dev-util/valadoc/valadoc-9999.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +GCONF_DEBUG="no" + +inherit vala gnome2-live git-2 + +DESCRIPTION="A documentation generator for generating API documentation from Vala source code" +HOMEPAGE="http://live.gnome.org/Valadoc" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND="dev-lang/vala:0.12 + dev-libs/libgee + media-gfx/graphviz + dev-libs/glib:2 + x11-libs/gtk+:2 + x11-libs/gdk-pixbuf:2" +RDEPEND="${DEPEND}" + +DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README THANKS" + +VALA_REQUIRED_VERSION="0.12" + +src_prepare() { + vala_src_prepare + gnome2-live_src_prepare +} + +pkg_postinst() { + vala_pkg_postinst + gnome2-live_pkg_postinst +} diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass new file mode 100644 index 00000000..d917a50a --- /dev/null +++ b/eclass/gnome2-live.eclass @@ -0,0 +1,151 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# +# gnome2-live.eclass +# +# Exports additional functions used by live ebuilds written for GNOME packages +# Always to be imported *AFTER* gnome2.eclass +# +# Author: Nirbheek Chauhan +# + + +inherit autotools gnome2 gnome2-utils libtool git-2 + +# Stolen from git.eclass +EXPORTED_FUNCTIONS="src_unpack pkg_postinst" +case "${EAPI:-0}" in + 2|3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;; + 0|1) ;; + *) die "Unknown EAPI, Bug eclass maintainers." ;; +esac +EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} + +# DEPEND on +# app-text/gnome-doc-utils for gnome-doc-* +# dev-util/gtk-doc for gtkdocize +# dev-util/intltool for intltoolize +# gnome-base/gnome-common for GNOME_COMMON_INIT +DEPEND="${DEPEND} + app-text/gnome-doc-utils + dev-util/gtk-doc + dev-util/intltool + gnome-base/gnome-common + sys-devel/gettext" + +# Extra options passed to elibtoolize +ELTCONF=${ELTCONF:-} + +# Default git module name +GNOME_LIVE_MODULE=${GNOME_LIVE_MODULE:-"${PN}"} + +# GIT URI for the project +EGIT_REPO_URI="${EGIT_REPO_URI:-"git://git.gnome.org/${GNOME_LIVE_MODULE}"}" + +# Unset SRC_URI auto-set by gnome2.eclass +SRC_URI="" + +gnome2-live_get_var() { + local var f + var="$1" + f="$2" + echo $(sed -ne "s/${var}(\(.*\))/\1/p" "${f}" | tr -d '[]') +} + +gnome2-live_src_unpack() { + if test -n "${A}"; then + unpack ${A} + fi + git_src_unpack + has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare +} + +gnome2-live_src_prepare() { + # Blame git.eclass + cd "${S}" + for i in ${PATCHES}; do + epatch "${i}" + done + + # If ChangeLog doesn't exist, maybe it's autogenerated + # Avoid a `dodoc` failure by adding an empty ChangeLog + if ! test -e ChangeLog; then + echo > ChangeLog + fi + + # Find and create macro dirs + local macro_dirs=($(gnome2-live_get_var AC_CONFIG_MACRO_DIR configure.*)) + for i in "${macro_dirs[@]}"; do + mkdir -p "$i" + done + + # We don't run gettextize because that does too much stuff + if grep -qe 'GETTEXT' configure.*; then + local aux_dir=${S}/$(gnome2-live_get_var AC_CONFIG_AUX_DIR configure.*) + mkdir -p "${aux_dir}" + test -e "${aux_dir}/config.rpath" || :> "${aux_dir}/config.rpath" + test -e "${aux_dir}/ABOUT-NLS" || cp "${ROOT}/usr/share/gettext/ABOUT-NLS" "${aux_dir}" + fi + + if grep -qe 'GTK_DOC' configure.*; then + ebegin "Running gtkdocize" + gtkdocize + eend $? + fi + if grep -qe 'GNOME_DOC_INIT' configure.*; then + ebegin "Running gnome-doc-common" + gnome-doc-common + eend $? + ebegin "Running gnome-doc-prepare --automake" + gnome-doc-prepare --automake + eend $? + fi + if grep -qe "IT_PROG_INTLTOOL" -e "AC_PROG_INTLTOOL" configure.*; then + if grep -qe "AC_PROG_INTLTOOL" configure.*; then + eqawarn "This package is using deprecated AC_PROG_INTLTOOL macro." + eqawarn "Please fill a bug to the upstream of this package." + fi + ebegin "Running intltoolize --force" + intltoolize --force + eend $? + fi + if test -e m4; then + AT_M4DIR=m4 eautoreconf + else + eautoreconf + fi + + # Disable pyc compiling. Doesn't harm if DNE + ln -sf $(type -P true) py-compile + + ### Keep this in-sync with gnome2.eclass! + + # Don't use the session bus address inherited via the environment + # causes test and introspection-building failures + unset DBUS_SESSION_BUS_ADDRESS + + # Prevent scrollkeeper access violations + gnome2_omf_fix + + # Libtool patching + elibtoolize ${ELTCONF} +} + +# So that it replaces gnome2_src_unpack in ebuilds that call it +gnome2_src_unpack() { + gnome2-live_src_unpack +} + +# So that it replaces gnome2_src_prepare in ebuilds that call it +gnome2_src_prepare() { + gnome2-live_src_prepare +} + +# Run manually for ebuilds that have a custom pkg_postinst +gnome2-live_pkg_postinst() { + ewarn "This is a live ebuild, upstream trunks will mostly be UNstable" + ewarn "Do NOT report bugs about this package to Gentoo" + ewarn "Report upstream bugs (with patches if possible) instead." +}