summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-01-09 01:17:36 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-01-15 17:55:11 +0100
commitc638e83f617d0b3d4783018715b5d6b35217f273 (patch)
treea3c13e7be173354a81380c9934f0452b345e7752 /eclass/office-ext-r1.eclass
parentoffice-ext-r1.eclass: Drop EAPI-6 support (diff)
downloadgentoo-c638e83f617d0b3d4783018715b5d6b35217f273.tar.gz
gentoo-c638e83f617d0b3d4783018715b5d6b35217f273.tar.bz2
gentoo-c638e83f617d0b3d4783018715b5d6b35217f273.zip
office-ext-r1.eclass: Drop openoffice support and functions
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/office-ext-r1.eclass')
-rw-r--r--eclass/office-ext-r1.eclass123
1 files changed, 14 insertions, 109 deletions
diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass
index 7f39a5359209..c0bb5c8c77dc 100644
--- a/eclass/office-ext-r1.eclass
+++ b/eclass/office-ext-r1.eclass
@@ -7,20 +7,17 @@
# @AUTHOR:
# Tomáš Chvátal <scarabeus@gentoo.org>
# @SUPPORTED_EAPIS: 5 7
-# @BLURB: Eclass for installing libreoffice/openoffice extensions
+# @BLURB: Eclass for installing libreoffice extensions
# @DESCRIPTION:
-# Eclass for easing maintenance of libreoffice/openoffice extensions.
+# Eclass for easing maintenance of libreoffice extensions.
case "${EAPI:-0}" in
- 5) inherit multilib ;;
- 7) ;;
+ 5) inherit eutils multilib ;;
+ 7) inherit eutils ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
-# eutils.eclass: emktemp
-inherit eutils
-
-OEXT_EXPORTED_FUNCTIONS="src_unpack src_install pkg_postinst pkg_prerm"
+EXPORT_FUNCTIONS src_unpack src_install
# @ECLASS-VARIABLE: OFFICE_REQ_USE
# @DESCRIPTION:
@@ -43,9 +40,9 @@ fi
#
# Example:
# @CODE
-# OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
+# OFFICE_IMPLEMENTATIONS=( "libreoffice" )
# @CODE
-[[ -z ${OFFICE_IMPLEMENTATIONS} ]] && OFFICE_IMPLEMENTATIONS=( "libreoffice" "openoffice" )
+[[ -z ${OFFICE_IMPLEMENTATIONS} ]] && OFFICE_IMPLEMENTATIONS=( "libreoffice" )
# @ECLASS-VARIABLE: OFFICE_EXTENSIONS
# @REQUIRED
@@ -76,14 +73,7 @@ RDEPEND=""
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
IUSE+=" office_implementation_${i}"
- if [[ ${i} == "openoffice" ]]; then
- # special only binary
- RDEPEND+="
- office_implementation_openoffice? (
- app-office/openoffice-bin${OFFICE_REQ_USE}
- )
- "
- else
+ if [[ ${i} == "libreoffice" ]]; then
RDEPEND+="
office_implementation_${i}? (
|| (
@@ -147,97 +137,12 @@ office-ext-r1_src_install() {
for i in ${OFFICE_IMPLEMENTATIONS[@]}; do
if use office_implementation_${i}; then
- if [[ ${i} == openoffice ]]; then
- # OOO needs to use uno because direct deployment segfaults.
- # This is bug by their side, but i don't want to waste time
- # fixing it myself.
- insinto /usr/$(get_libdir)/${i}/share/extension/install
- for j in ${OFFICE_EXTENSIONS[@]}; do
- doins ${OFFICE_EXTENSIONS_LOCATION}/${j}
- done
- else
- for j in ${OFFICE_EXTENSIONS[@]}; do
- pushd "${WORKDIR}/${j}/" > /dev/null
- insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
- doins -r *
- popd > /dev/null
- done
- fi
+ for j in ${OFFICE_EXTENSIONS[@]}; do
+ pushd "${WORKDIR}/${j}/" > /dev/null
+ insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
+ doins -r *
+ popd > /dev/null
+ done
fi
done
}
-
-#### OPENOFFICE COMPAT CODE
-
-UNOPKG_BINARY="/usr/lib64/openoffice/program/unopkg"
-
-# @FUNCTION: office-ext-r1_add_extension
-# @DESCRIPTION:
-# Install the extension into the libreoffice/openoffice.
-office-ext-r1_add_extension() {
- debug-print-function ${FUNCNAME} "$@"
- local ext=$1
- local tmpdir=$(emktemp -d)
-
- debug-print "${FUNCNAME}: ${UNOPKG_BINARY} add --shared \"${ext}\""
- ebegin "Adding office extension: \"${ext}\""
- ${UNOPKG_BINARY} add --suppress-license \
- --shared "${ext}" \
- "-env:UserInstallation=file:///${tmpdir}" \
- "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
- eend $?
- ${UNOPKG_BINARY} list --shared > /dev/null
- rm -r "${tmpdir}" || dir "failed to clean up"
-}
-
-# @FUNCTION: office-ext-r1_remove_extension
-# @DESCRIPTION:
-# Remove the extension from the libreoffice/openoffice.
-office-ext-r1_remove_extension() {
- debug-print-function ${FUNCNAME} "$@"
- local ext=$1
- local tmpdir=$(mktemp -d --tmpdir="${T}")
-
- debug-print "${FUNCNAME}: ${UNOPKG_BINARY} remove --shared \"${ext}\""
- ebegin "Removing office extension: \"${ext}\""
- ${UNOPKG_BINARY} remove --suppress-license \
- --shared "${ext}" \
- "-env:UserInstallation=file:///${tmpdir}" \
- "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
- eend $?
- ${UNOPKG_BINARY} list --shared > /dev/null
- rm -r "${tmpdir}" || dir "failed to clean up"
-}
-
-# @FUNCTION: office-ext-r1_pkg_postinst
-# @DESCRIPTION:
-# Add the extensions to the openoffice.
-office-ext-r1_pkg_postinst() {
- if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
- debug-print-function ${FUNCNAME} "$@"
- debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
- local i
-
- for i in ${OFFICE_EXTENSIONS[@]}; do
- office-ext-r1_add_extension "/usr/lib64/openoffice/share/extension/install/${i}"
- done
- fi
-}
-
-# @FUNCTION: office-ext-r1_pkg_prerm
-# @DESCRIPTION:
-# Remove the extensions from the openoffice.
-office-ext-r1_pkg_prerm() {
- if in_iuse office_implementation_openoffice && use office_implementation_openoffice; then
- debug-print-function ${FUNCNAME} "$@"
- debug-print "Extensions: ${OFFICE_EXTENSIONS[@]}"
- local i
-
- for i in ${OFFICE_EXTENSIONS[@]}; do
- office-ext-r1_remove_extension "${i}"
- done
- fi
-}
-
-EXPORT_FUNCTIONS ${OEXT_EXPORTED_FUNCTIONS}
-unset OEXT_EXPORTED_FUNCTIONS