From b8b5f60c1f086cd982b4be369bf992b5e4728a93 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Wed, 9 May 2012 16:12:16 +0000 Subject: Add the src_unpack phase for office-ext eclass. --- eclass/ChangeLog | 5 ++++- eclass/office-ext.eclass | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'eclass') diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 24908d82844f..a5bb0d7d06ba 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.245 2012/05/09 08:23:14 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.246 2012/05/09 16:12:16 scarabeus Exp $ + + 09 May 2012; Tomáš Chvátal office-ext.eclass: + Add the src_unpack phase for office-ext eclass. 09 May 2012; Pacho Ramos gnome2.eclass: Don't call gtk-doc configure option when not available diff --git a/eclass/office-ext.eclass b/eclass/office-ext.eclass index 6ae9c739279b..153661321c9a 100644 --- a/eclass/office-ext.eclass +++ b/eclass/office-ext.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.2 2011/11/12 12:03:05 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.3 2012/05/09 16:12:16 scarabeus Exp $ # @ECLASS: office-ext.eclass # @AUTHOR: @@ -12,7 +12,7 @@ # Eclass for easing maitenance of libreoffice/openoffice extensions. case "${EAPI:-0}" in - 4) OEXT_EXPORTED_FUNCTIONS="src_install pkg_postinst pkg_prerm" ;; + 4) OEXT_EXPORTED_FUNCTIONS="src_unpack src_install pkg_postinst pkg_prerm" ;; *) die "EAPI=${EAPI} is not supported" ;; esac @@ -32,6 +32,25 @@ fi DEPEND="virtual/ooo" RDEPEND="virtual/ooo" +# Most projects actually do not provide any workdir and we do not unpack the +# .oxt file at all. +S="${WORKDIR}" + +# @FUNCTION: office-ext_src_unpack +# @DESCRIPTION: +# Flush the cache after removal of an extension. +office-ext_src_unpack() { + debug-print-function ${FUNCNAME} "$@" + local i + + default + + for i in ${OO_EXTENSIONS[@]}; do + debug-print "${FUNCNAME}: cp -v \"${DISTDIR}/${i}\" \"${S}\"" + cp -v "${DISTDIR}/${i}" "${S}" || die + done +} + # @FUNCTION: office-ext_flush_unopkg_cache # @DESCRIPTION: # Flush the cache after removal of an extension. -- cgit v1.2.3-65-gdbad