From 5b4e5d83e39462483c93ccf22f1438d1375db548 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 3 May 2018 14:47:24 +0200 Subject: app-office/libreoffice: versionator -> eapi7-ver.eclass, some cleanup Package-Manager: Portage-2.3.33, Repoman-2.3.9 --- app-office/libreoffice/libreoffice-6.0.9999.ebuild | 86 ++++++++++---------- app-office/libreoffice/libreoffice-9999.ebuild | 92 +++++++++++----------- 2 files changed, 87 insertions(+), 91 deletions(-) (limited to 'app-office/libreoffice') diff --git a/app-office/libreoffice/libreoffice-6.0.9999.ebuild b/app-office/libreoffice/libreoffice-6.0.9999.ebuild index edf22ead40df..c29d9ffa33db 100644 --- a/app-office/libreoffice/libreoffice-6.0.9999.ebuild +++ b/app-office/libreoffice/libreoffice-6.0.9999.ebuild @@ -6,21 +6,22 @@ EAPI=6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) PYTHON_REQ_USE="threads,xml" +MY_PV="${PV/_alpha/.alpha}" +MY_PV="${MY_PV/_beta/.beta}" # experimental ; release ; old -# Usually the tarballs are moved a lot so this should make -# everyone happy. +# Usually the tarballs are moved a lot so this should make everyone happy. DEV_URI=" https://dev-builds.libreoffice.org/pre-releases/src - https://download.documentfoundation.org/libreoffice/src/${PV:0:5}/ - https://downloadarchive.documentfoundation.org/libreoffice/old/${PV}/src + https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/ + https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src " ADDONS_URI="https://dev-www.libreoffice.org/src/" BRANDING="${PN}-branding-gentoo-0.8.tar.xz" PATCHSET="${PN}-6.0.3.2-patchset-01.tar.xz" -[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3" -inherit multiprocessing autotools bash-completion-r1 check-reqs gnome2-utils java-pkg-opt-2 pax-utils python-single-r1 toolchain-funcs flag-o-matic versionator xdg-utils qmake-utils ${SCM_ECLASS} +[[ ${MY_PV} == *9999* ]] && SCM_ECLASS="git-r3" +inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils ${SCM_ECLASS} unset SCM_ECLASS DESCRIPTION="A full office productivity suite" @@ -28,14 +29,13 @@ HOMEPAGE="https://www.libreoffice.org" SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )" [[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}" -# Split modules following git/tarballs -# Core MUST be first! +# Split modules following git/tarballs; Core MUST be first! # Help is used for the image generator # Only release has the tarballs -if [[ ${PV} != *9999* ]]; then +if [[ ${MY_PV} != *9999* ]]; then for i in ${DEV_URI}; do - SRC_URI+=" ${i}/${P}.tar.xz" - SRC_URI+=" ${i}/${PN}-help-${PV}.tar.xz" + SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz" + SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz" done unset i fi @@ -67,9 +67,18 @@ IUSE="bluetooth +branding coinmp +cups dbus debug eds firebird googledrive gstreamer +gtk gtk2 jemalloc kde libressl mysql odk pdfimport postgres test vlc $(printf 'libreoffice_extensions_%s ' ${LO_EXTS})" +REQUIRED_USE="${PYTHON_REQUIRED_USE} + bluetooth? ( dbus ) + kde? ( gtk ) + libreoffice_extensions_nlpsolver? ( java ) + libreoffice_extensions_scripting-beanshell? ( java ) + libreoffice_extensions_scripting-javascript? ( java ) + libreoffice_extensions_wiki-publisher? ( java ) +" + LICENSE="|| ( LGPL-3 MPL-1.1 )" SLOT="0" -[[ ${PV} == *9999* ]] || \ +[[ ${MY_PV} == *9999* ]] || \ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" COMMON_DEPEND="${PYTHON_DEPS} @@ -151,12 +160,14 @@ COMMON_DEPEND="${PYTHON_DEPS} dev-libs/glib:2 dev-libs/gobject-introspection gnome-base/dconf + media-libs/mesa[egl] x11-libs/gtk+:3 ) gtk2? ( x11-libs/gdk-pixbuf >=x11-libs/gtk+-2.24:2 ) + jemalloc? ( dev-libs/jemalloc ) kde? ( dev-qt/qtcore:5 dev-qt/qtgui:5 @@ -168,7 +179,6 @@ COMMON_DEPEND="${PYTHON_DEPS} kde-frameworks/kio:5 kde-frameworks/kwindowsystem:5 ) - jemalloc? ( dev-libs/jemalloc ) libreoffice_extensions_scripting-beanshell? ( dev-java/bsh ) libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) mysql? ( dev-db/mysql-connector-c++ ) @@ -189,8 +199,8 @@ RDEPEND="${COMMON_DEPEND} vlc? ( media-video/vlc ) " -if [[ ${PV} != *9999* ]]; then - PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*" +if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then + PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*" else # Translations are not reliable on live ebuilds # rather force people to use english only. @@ -231,15 +241,6 @@ DEPEND="${COMMON_DEPEND} ) " -REQUIRED_USE="${PYTHON_REQUIRED_USE} - bluetooth? ( dbus ) - kde? ( gtk ) - libreoffice_extensions_nlpsolver? ( java ) - libreoffice_extensions_scripting-beanshell? ( java ) - libreoffice_extensions_scripting-javascript? ( java ) - libreoffice_extensions_wiki-publisher? ( java ) -" - PATCHES=( # not upstreamable stuff "${FILESDIR}/${PN}-5.4-system-pyuno.patch" @@ -252,6 +253,17 @@ PATCHES=( "${WORKDIR}"/${PATCHSET/.tar.xz/} ) +S="${WORKDIR}/${PN}-${MY_PV}" + +_check_reqs() { + CHECKREQS_MEMORY="512M" + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + CHECKREQS_DISK_BUILD="22G" + else + CHECKREQS_DISK_BUILD="6G" + fi +} + pkg_pretend() { use java || \ ewarn "If you plan to use Base application you should enable java or you will get various crashes." @@ -263,12 +275,7 @@ pkg_pretend() { fi if [[ ${MERGE_TYPE} != binary ]]; then - CHECKREQS_MEMORY="512M" - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - CHECKREQS_DISK_BUILD="22G" - else - CHECKREQS_DISK_BUILD="6G" - fi + _check_reqs check-reqs_pkg_pretend fi } @@ -279,12 +286,7 @@ pkg_setup() { xdg_environment_reset if [[ ${MERGE_TYPE} != binary ]]; then - CHECKREQS_MEMORY="512M" - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - CHECKREQS_DISK_BUILD="22G" - else - CHECKREQS_DISK_BUILD="6G" - fi + _check_reqs check-reqs_pkg_setup fi } @@ -292,12 +294,12 @@ pkg_setup() { src_unpack() { default - if [[ ${PV} = *9999* ]]; then + if [[ ${MY_PV} = *9999* ]]; then local base_uri branch mypv base_uri="https://anongit.freedesktop.org/git" branch="master" - mypv=${PV/.9999} - [[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}" + mypv=${MY_PV/.9999} + [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}" git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}" git-r3_checkout "${base_uri}/${PN}/core" @@ -340,7 +342,7 @@ src_prepare() { if use branding; then # hack... - mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die + mv -v "${WORKDIR}/branding-intro.png" "icon-themes/galaxy/brand/intro.png" || die fi # Don't list pdfimport support in desktop when built with none, bug # 605464 @@ -554,10 +556,6 @@ src_install() { pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin } -pkg_preinst() { - gnome2_icon_savelist -} - pkg_postinst() { gnome2_icon_cache_update xdg_desktop_database_update diff --git a/app-office/libreoffice/libreoffice-9999.ebuild b/app-office/libreoffice/libreoffice-9999.ebuild index 3799a7815c0e..45222450d1f2 100644 --- a/app-office/libreoffice/libreoffice-9999.ebuild +++ b/app-office/libreoffice/libreoffice-9999.ebuild @@ -6,36 +6,36 @@ EAPI=6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) PYTHON_REQ_USE="threads,xml" +MY_PV="${PV/_alpha/.alpha}" +MY_PV="${MY_PV/_beta/.beta}" # experimental ; release ; old -# Usually the tarballs are moved a lot so this should make -# everyone happy. +# Usually the tarballs are moved a lot so this should make everyone happy. DEV_URI=" https://dev-builds.libreoffice.org/pre-releases/src - https://download.documentfoundation.org/libreoffice/src/${PV:0:5}/ - https://downloadarchive.documentfoundation.org/libreoffice/old/${PV}/src + https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/ + https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src " ADDONS_URI="https://dev-www.libreoffice.org/src/" BRANDING="${PN}-branding-gentoo-0.8.tar.xz" # PATCHSET="${P}-patchset-01.tar.xz" -[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3" -inherit multiprocessing autotools bash-completion-r1 check-reqs gnome2-utils java-pkg-opt-2 pax-utils python-single-r1 toolchain-funcs flag-o-matic versionator xdg-utils qmake-utils ${SCM_ECLASS} +[[ ${MY_PV} == *9999* ]] && SCM_ECLASS="git-r3" +inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils ${SCM_ECLASS} unset SCM_ECLASS DESCRIPTION="A full office productivity suite" HOMEPAGE="https://www.libreoffice.org" SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )" -[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}" +[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}" -# Split modules following git/tarballs -# Core MUST be first! +# Split modules following git/tarballs; Core MUST be first! # Help is used for the image generator # Only release has the tarballs -if [[ ${PV} != *9999* ]]; then +if [[ ${MY_PV} != *9999* ]]; then for i in ${DEV_URI}; do - SRC_URI+=" ${i}/${P}.tar.xz" - SRC_URI+=" ${i}/${PN}-help-${PV}.tar.xz" + SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz" + SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz" done unset i fi @@ -67,10 +67,19 @@ IUSE="bluetooth +branding coinmp +cups dbus debug eds firebird googledrive gstreamer +gtk gtk2 kde libressl mysql odk pdfimport postgres test vlc $(printf 'libreoffice_extensions_%s ' ${LO_EXTS})" +REQUIRED_USE="${PYTHON_REQUIRED_USE} + bluetooth? ( dbus ) + kde? ( gtk ) + libreoffice_extensions_nlpsolver? ( java ) + libreoffice_extensions_scripting-beanshell? ( java ) + libreoffice_extensions_scripting-javascript? ( java ) + libreoffice_extensions_wiki-publisher? ( java ) +" + LICENSE="|| ( LGPL-3 MPL-1.1 )" SLOT="0" -[[ ${PV} == *9999* ]] || \ -KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" +[[ ${MY_PV} == *9999* ]] || \ +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" COMMON_DEPEND="${PYTHON_DEPS} app-arch/unzip @@ -151,6 +160,7 @@ COMMON_DEPEND="${PYTHON_DEPS} dev-libs/glib:2 dev-libs/gobject-introspection gnome-base/dconf + media-libs/mesa[egl] x11-libs/gtk+:3 ) gtk2? ( @@ -188,8 +198,8 @@ RDEPEND="${COMMON_DEPEND} vlc? ( media-video/vlc ) " -if [[ ${PV} != *9999* ]]; then - PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*" +if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then + PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*" else # Translations are not reliable on live ebuilds # rather force people to use english only. @@ -230,15 +240,6 @@ DEPEND="${COMMON_DEPEND} ) " -REQUIRED_USE="${PYTHON_REQUIRED_USE} - bluetooth? ( dbus ) - kde? ( gtk ) - libreoffice_extensions_nlpsolver? ( java ) - libreoffice_extensions_scripting-beanshell? ( java ) - libreoffice_extensions_scripting-javascript? ( java ) - libreoffice_extensions_wiki-publisher? ( java ) -" - PATCHES=( # "${WORKDIR}"/${PATCHSET/.tar.xz/} @@ -250,6 +251,17 @@ PATCHES=( "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch" ) +S="${WORKDIR}/${PN}-${MY_PV}" + +_check_reqs() { + CHECKREQS_MEMORY="512M" + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + CHECKREQS_DISK_BUILD="22G" + else + CHECKREQS_DISK_BUILD="6G" + fi +} + pkg_pretend() { use java || \ ewarn "If you plan to use Base application you should enable java or you will get various crashes." @@ -261,12 +273,7 @@ pkg_pretend() { fi if [[ ${MERGE_TYPE} != binary ]]; then - CHECKREQS_MEMORY="512M" - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - CHECKREQS_DISK_BUILD="22G" - else - CHECKREQS_DISK_BUILD="6G" - fi + _check_reqs check-reqs_pkg_pretend fi } @@ -277,12 +284,7 @@ pkg_setup() { xdg_environment_reset if [[ ${MERGE_TYPE} != binary ]]; then - CHECKREQS_MEMORY="512M" - if is-flagq "-g*" && ! is-flagq "-g*0" ; then - CHECKREQS_DISK_BUILD="22G" - else - CHECKREQS_DISK_BUILD="6G" - fi + _check_reqs check-reqs_pkg_setup fi } @@ -290,12 +292,12 @@ pkg_setup() { src_unpack() { default - if [[ ${PV} = *9999* ]]; then + if [[ ${MY_PV} = *9999* ]]; then local base_uri branch mypv base_uri="https://anongit.freedesktop.org/git" branch="master" - mypv=${PV/.9999} - [[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}" + mypv=${MY_PV/.9999} + [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}" git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}" git-r3_checkout "${base_uri}/${PN}/core" @@ -338,7 +340,7 @@ src_prepare() { if use branding; then # hack... - mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die + mv -v "${WORKDIR}/branding-intro.png" "icon-themes/galaxy/brand/intro.png" || die fi # Don't list pdfimport support in desktop when built with none, bug # 605464 @@ -431,9 +433,9 @@ src_configure() { $(use_enable gstreamer gstreamer-1-0) $(use_enable gtk gtk3) $(use_enable gtk2 gtk) - $(use_enable kde qt5) - $(use_enable kde kde5) $(use_enable kde gtk3-kde5) + $(use_enable kde kde5) + $(use_enable kde qt5) $(use_enable mysql ext-mariadb-connector) $(use_enable odk) $(use_enable pdfimport) @@ -553,10 +555,6 @@ src_install() { pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin } -pkg_preinst() { - gnome2_icon_savelist -} - pkg_postinst() { gnome2_icon_cache_update xdg_desktop_database_update -- cgit v1.2.3-65-gdbad