From 4ac606d81cabc453048a467a48ac1e47d4ea465e Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Fri, 3 Apr 2015 17:58:19 +0300 Subject: [eclass/sab-patches.eclass] upgrade the eclass --- eclass/sab-patches.eclass | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'eclass') diff --git a/eclass/sab-patches.eclass b/eclass/sab-patches.eclass index 8511256e..40e89911 100644 --- a/eclass/sab-patches.eclass +++ b/eclass/sab-patches.eclass @@ -9,10 +9,13 @@ # SÅ‚awomir Nizio # @BLURB: eclass that makes it easier to apply patches from multiple packages # @DESCRIPTION: -# Adds a patch or patches to SRC_URI and makes it easy to apply them, +# Makes it easy to apply patches stored in a remote location # with the intention to make the task easier for Sabayon split ebuilds. # (Plain patches kept in a VCS are very nice, but in the case of split # ebuilds, duplicating the patches is not effective.) +# Patches are not added to SRC_URI by default, because it makes ebuilds +# use "SRC_URI+=..." which makes them more diverged from the original +# one than necessary. # The eclass does not define any phase function. # @ECLASS-VARIABLE: SAB_PATCHES_SRC @@ -31,10 +34,16 @@ if [[ ${#SAB_PATCHES_SRC[@]} -eq 0 ]]; then die "SAB_PATCHES_SRC is not set" fi -for _sab_patch in "${SAB_PATCHES_SRC[@]}"; do - SRC_URI=${_sab_patch} -done -unset _sab_patch +# @FUNCTION: sab-patches_update_SRC_URI +# @DESCRIPTION: +# Appends patches entries to SRC_URI. If it is not done, an error will +# occur later on. +sab-patches_update_SRC_URI() { + local p + for p in "${SAB_PATCHES_SRC[@]}"; do + SRC_URI+=${SRC_URI:+ }${p} + done +} # @FUNCTION: sab-patches_apply_all # @DESCRIPTION: @@ -75,6 +84,21 @@ sab-patches_apply() { done } +# @FUNCTION: sab-patches_unpack +# @DESCRIPTION: +# Unpack every file provided in SAB_PATCHES_SRC. +sab-patches_unpack() { + local p + pushd "${WORKDIR}" > /dev/null || die + + for p in "${SAB_PATCHES_SRC[@]}"; do + local name=${p##*/} + unpack "${name}" + done + + popd > /dev/null || die +} + # @FUNCTION: _sab-patches_apply_nonskipped # @INTERNAL # @DESCRIPTION: -- cgit v1.2.3 From 927d78a9133dad2f94fe24b851b2dfb26ef73a33 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Tue, 7 Apr 2015 22:26:21 +0300 Subject: app-admin/eselect-uimage moved to app-eselect/uimage --- eclass/kogaion-kernel.eclass | 8 ++++---- eclass/rogentos-kernel.eclass | 8 ++++---- eclass/sabayon-kernel.eclass | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'eclass') diff --git a/eclass/kogaion-kernel.eclass b/eclass/kogaion-kernel.eclass index 8c74a29b..f34cfc94 100644 --- a/eclass/kogaion-kernel.eclass +++ b/eclass/kogaion-kernel.eclass @@ -785,8 +785,8 @@ kogaion-kernel_uimage_config() { # 1. /boot/uImage symlink is broken (pkg_postrm) # 2. /boot/uImage symlink doesn't exist (pkg_postinst) - if ! has_version app-admin/eselect-uimage; then - ewarn "app-admin/eselect-uimage not installed" + if ! has_version app-eselect/uimage; then + ewarn "app-eselect/uimage not installed" ewarn "If you are using this tool, please install it" return 0 fi @@ -820,8 +820,8 @@ kogaion-kernel_bzimage_config() { use x86 && kern_arch="x86" use amd64 && kern_arch="x86_64" - if ! has_version app-admin/eselect-bzimage; then - ewarn "app-admin/eselect-bzimage not installed" + if ! has_version app-eselect/eselect-bzimage; then + ewarn "app-eselect/eselect-bzimage not installed" ewarn "If you are using this tool, please install it" return 0 fi diff --git a/eclass/rogentos-kernel.eclass b/eclass/rogentos-kernel.eclass index 78f2f90f..08f83821 100644 --- a/eclass/rogentos-kernel.eclass +++ b/eclass/rogentos-kernel.eclass @@ -785,8 +785,8 @@ rogentos-kernel_uimage_config() { # 1. /boot/uImage symlink is broken (pkg_postrm) # 2. /boot/uImage symlink doesn't exist (pkg_postinst) - if ! has_version app-admin/eselect-uimage; then - ewarn "app-admin/eselect-uimage not installed" + if ! has_version app-eselect/uimage; then + ewarn "app-eselect/uimage not installed" ewarn "If you are using this tool, please install it" return 0 fi @@ -820,8 +820,8 @@ rogentos-kernel_bzimage_config() { use x86 && kern_arch="x86" use amd64 && kern_arch="x86_64" - if ! has_version app-admin/eselect-bzimage; then - ewarn "app-admin/eselect-bzimage not installed" + if ! has_version app-eselect/eselect-bzimage; then + ewarn "app-eselect/eselect-bzimage not installed" ewarn "If you are using this tool, please install it" return 0 fi diff --git a/eclass/sabayon-kernel.eclass b/eclass/sabayon-kernel.eclass index 7197ca00..710aa0a7 100644 --- a/eclass/sabayon-kernel.eclass +++ b/eclass/sabayon-kernel.eclass @@ -786,8 +786,8 @@ sabayon-kernel_uimage_config() { # 1. /boot/uImage symlink is broken (pkg_postrm) # 2. /boot/uImage symlink doesn't exist (pkg_postinst) - if ! has_version app-admin/eselect-uimage; then - ewarn "app-admin/eselect-uimage not installed" + if ! has_version app-eselect/uimage; then + ewarn "app-eselect/uimage not installed" ewarn "If you are using this tool, please install it" return 0 fi @@ -821,8 +821,8 @@ sabayon-kernel_bzimage_config() { use x86 && kern_arch="x86" use amd64 && kern_arch="x86_64" - if ! has_version app-admin/eselect-bzimage; then - ewarn "app-admin/eselect-bzimage not installed" + if ! has_version app-eselect/eselect-bzimage; then + ewarn "app-eselect/eselect-bzimage not installed" ewarn "If you are using this tool, please install it" return 0 fi -- cgit v1.2.3 From 903ff82fb42eda2857f47657c37bdbb911986cbe Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Sun, 12 Apr 2015 19:27:08 +0300 Subject: [eclass] fixed syntaxes from eclasses --- eclass/libreoffice-l10n-2.eclass | 68 ++++++++++++++++++++++++---------------- eclass/rogentos-artwork.eclass | 6 ++-- 2 files changed, 44 insertions(+), 30 deletions(-) (limited to 'eclass') diff --git a/eclass/libreoffice-l10n-2.eclass b/eclass/libreoffice-l10n-2.eclass index e57c83ce..cea31107 100644 --- a/eclass/libreoffice-l10n-2.eclass +++ b/eclass/libreoffice-l10n-2.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2012 Sabayon Linux +# Copyright 2004-2014 Sabayon Linux # Distributed under the terms of the GNU General Public License v2 # $ @@ -11,13 +11,13 @@ OO_EXTENSIONS=( "b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt" ) -inherit base rpm multilib versionator office-ext-r1 +inherit base rpm multilib versionator MY_LANG=${PN/libreoffice-l10n-/} MY_LANG=${MY_LANG/_/-} # export all the available functions here -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst pkg_prerm +EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install # @ECLASS-VARIABLE: L10N_LANG # @DESCRIPTION: @@ -36,22 +36,48 @@ LANGPACK_AVAIL="${LANGPACK_AVAIL:-1}" DESCRIPTION="LibreOffice.org ${L10N_LANG} localisation" HOMEPAGE="http://www.documentfoundation.org" -RESTRICT="nomirror" +RESTRICT="mirror" L10N_VER="$(get_version_component_range 1-3)" -L10N_RC_VERSION="rc2" +L10N_RC_VERSION="$(get_version_component_range 4)" LO_BRANCH=$(get_version_component_range 1-2) -BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${L10N_VER}/rpm" +if [ -n "${L10N_RC_VERSION}" ]; then + # this is a RC, thus testing + BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/testing/${L10N_VER}/rpm" + TARBALL_VERSION="${L10N_VER}.${L10N_RC_VERSION}" +else + BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${L10N_VER}/rpm" + TARBALL_VERSION="${L10N_VER}" +fi SRC_URI="" +if [ "$(get_version_component_range 1)" = "3" ]; then + URI_PREFIX="LibO" + RPM_SUFFIX_LANG="langpack-rpm" + RPM_SUFFIX_HELP="helppack-rpm" +else + URI_PREFIX="LibreOffice" + RPM_SUFFIX_LANG="rpm_langpack" + RPM_SUFFIX_HELP="rpm_helppack" +fi + +# remove "name_part" when not needed +if [[ ${PV} = 4.2.6.* || ${PV} = 4.2.6 ]]; then + name_part=-secfix +else + name_part= +fi + # try guessing if [ "${LANGPACK_AVAIL}" = "1" ]; then - SRC_URI+="${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_langpack-rpm_${MY_LANG}.tar.gz" + SRC_URI+="${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}${name_part}_Linux_x86_${RPM_SUFFIX_LANG}_${MY_LANG}.tar.gz" fi if [ "${HELPPACK_AVAIL}" = "1" ]; then - SRC_URI+=" ${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_helppack-rpm_${MY_LANG}.tar.gz" + SRC_URI+=" ${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}${name_part}_Linux_x86_${RPM_SUFFIX_HELP}_${MY_LANG}.tar.gz" fi +unset name_part + IUSE="" EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice" @@ -83,22 +109,20 @@ libreoffice-l10n-2_src_unpack() { local dir=${lang/_/-} # for english we provide just helppack, as translation is always there if [[ "${LANGPACK_AVAIL}" == "1" ]]; then - rpmdir="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_langpack-rpm_${dir}/RPMS/" - [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\"" + rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_LANG}_${dir}/RPMS/" # First remove dictionaries, we want to use system ones. rm -rf "${S}/${rpmdir}/"*dict*.rpm einfo "Unpacking Langpack" - rpm_unpack "./${rpmdir}/"*.rpm + rpm_unpack ./${rpmdir}/*.rpm fi if [[ "${HELPPACK_AVAIL}" == "1" ]]; then - rpmdir="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_helppack-rpm_${dir}/RPMS/" - [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\"" + rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_HELP}_${dir}/RPMS/" einfo "Unpacking Helppack" - rpm_unpack ./"${rpmdir}/"*.rpm + rpm_unpack ./${rpmdir}/*.rpm fi if [[ -n "${TDEPEND}" ]]; then if use templates; then - for i in ${OO_EXTENSIONS[@]}; do + for i in "${OO_EXTENSIONS[@]}"; do if [[ ! -f "${S}/${i}" ]]; then cp -v "${DISTDIR}/${i}" "${S}" ooextused+=( "${i}" ) @@ -107,8 +131,8 @@ libreoffice-l10n-2_src_unpack() { fi fi OO_EXTENSIONS=() - for i in ${ooextused[@]}; do - OO_EXTENSIONS+=( ${i} ) + for i in "${ooextused[@]}"; do + OO_EXTENSIONS+=( "${i}" ) done } @@ -126,14 +150,4 @@ libreoffice-l10n-2_src_install() { fi # remove extensions that are in the l10n for some weird reason rm -rf "${ED}"/usr/$(get_libdir)/libreoffice/share/extensions/ - - echo "${OO_EXTENSIONS[@]}" - office-ext_src_install -} - -libreoffice-l10n-2_pkg_postinst() { - office-ext_pkg_postinst -} -libreoffice-l10n-2_pkg_prerm() { - office-ext_pkg_prerm } diff --git a/eclass/rogentos-artwork.eclass b/eclass/rogentos-artwork.eclass index 6a74a673..33a84601 100644 --- a/eclass/rogentos-artwork.eclass +++ b/eclass/rogentos-artwork.eclass @@ -44,14 +44,14 @@ update_kernel_initramfs_splash() { } -# @FUNCTION: update_sabayon_kernel_initramfs_splash -# @USAGE: update_sabayon_kernel_initramfs_splash +# @FUNCTION: _update_kogaionkernel_initramfs_splash +# @USAGE: _update_kogaionkernel_initramfs_splash # # @AUTHOR: # Fabio Erculiani # @MAINTAINER: # Brindusa Stefan Cristian -update_sabayon_kernel_initramfs_splash() { +_update_kogaionkernel_initramfs_splash() { local splash_name="${GFX_SPLASH_NAME}" local override_splash_file="${ROOT}etc/${splash_name}" if [ -f "${override_splash_file}" ]; then -- cgit v1.2.3