[gentoo-commits] repo/user/ssnb:master commit in: eclass/
commit: 8cf526362cc588112c3bfb8fc0ac877e709b90c7 Author: Samuel Bernardo gmail com> AuthorDate: Sun May 10 18:13:00 2020 + Commit: Samuel Bernardo gmail com> CommitDate: Sun May 10 18:13:00 2020 + URL:https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=8cf52636 Correct npm eclass to set lib as demanded by Gentoo environment Signed-off-by: Samuel Bernardo gmail.com> eclass/npm.eclass | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/npm.eclass b/eclass/npm.eclass index 3ec0bf5..c4e35b1 100644 --- a/eclass/npm.eclass +++ b/eclass/npm.eclass @@ -78,6 +78,14 @@ npm_src_unpack() { mv "${WORKDIR}/package" ${S} } +# @FUNCTION: npm-src_prepare +# @DESCRIPTION: +# This function prepare the source for NodeJS/npm packages. +npm_src_prepare() { +default +for f in $(grep -rlI "/lib/" "${S}"); do sed -i -e "s|/lib/|/$(get_libdir)/|" "${f}"; done || die "Failed to correct usr/lib path in lib" +} + # @FUNCTION: npm-src_compile # @DESCRIPTION: # This function does nothing. @@ -135,4 +143,4 @@ npm_src_install() { fi } -EXPORT_FUNCTIONS src_unpack src_compile src_install +EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install
[gentoo-commits] repo/user/ssnb:master commit in: eclass/, dev-nodejs/bower/
commit: bb023a4c977a214b52e180a3587ca47cf78f8c14 Author: Samuel Bernardo gmail com> AuthorDate: Sun May 10 16:54:06 2020 + Commit: Samuel Bernardo gmail com> CommitDate: Sun May 10 16:54:06 2020 + URL:https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=bb023a4c Update bower and npm eclasses to EAPI 7 Signed-off-by: Samuel Bernardo gmail.com> dev-nodejs/bower/Manifest | 4 +++- dev-nodejs/bower/bower-1.8.4.ebuild | 2 +- dev-nodejs/bower/{bower-1.8.4.ebuild => bower-1.8.8.ebuild} | 4 ++-- eclass/npm-tools.eclass | 4 ++-- eclass/npm.eclass | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dev-nodejs/bower/Manifest b/dev-nodejs/bower/Manifest index 99283b9..37d8010 100644 --- a/dev-nodejs/bower/Manifest +++ b/dev-nodejs/bower/Manifest @@ -1,3 +1,5 @@ DIST bower-1.8.4.tgz 4870523 BLAKE2B 4eb08374318e9be63d3a69b6a4e174d928eee30f3a282ad06bce5bf656b35fd7df38df8f355c4488a0ceb49d81aaca447fb078a21ae0d9dd720579d88f8716c2 SHA512 da40d171f149e82ae4f50fb20ad9899160785ff478b9d650c88c5eb685d21aba499e9e8010059b70a11eb0a49848932b67d256413c3ca2c35c064c82d14a79d8 -EBUILD bower-1.8.4.ebuild 334 BLAKE2B 6365e89bc65e40e5ed3d59965ab63ee271ba6a625501e36d304f58679d9ad3303596b3b9fece8697e3490db76e531c902a972bc3a3af8bdcdfbabd5e114ebe01 SHA512 780a595f84029d085dc9c3dedbffb043491b7a928fd310e9b041bdcaf1fea197d9e1b86aba99b3f86f4ed9e63e6dcf99c8fa91dca4e563546c5c5c752189bff0 +DIST bower-1.8.8.tgz 4853602 BLAKE2B a3dc0b50e4985dd01fac9a0373d5ff67e6d32fcc000ad1b293641c8157f89386f38f0b72011125d4b9ff8502d74df78cb669c2f6e21a33ed72415c84f37f641a SHA512 d52ac99d79e43fdb282131e9b523be6a1c7740aa77715ce7f29a08eae8ea73949e3a48398aa335a4af47f8349cd8e43c4a73b48c2fcd1b852bfd4230cbbe7be0 +EBUILD bower-1.8.4.ebuild 331 BLAKE2B 3b2fe0bc4cb599013752c3a87b8677f0dfdaef771370c159f24ef1079105ae5c35bbf92867610d97ba24306ca6b13b2e41aece9ab5b832e80f4056342d6bebdb SHA512 6a3fc743d27acb6a8addbbf99b7878c1fcfecdd0fdd9734fea88f45d231ff27785fc6ff3857784afd0f0c48c3ca5089d6c6bb3442c5ec0db1c2bb201d9b50196 +EBUILD bower-1.8.8.ebuild 331 BLAKE2B 6629d5ff4b1bbb16016a07d3412ec03b2805c9eca534a994dd3ace8b24f4eea9ca3050074d14519a363bc0646b7555d1b6308afdada2cb38bf9221f311e49362 SHA512 7db94cdb858e4f279655400a80daac8f3680ab91b4292c0763d3e61da3ffa8ed646956d1e5f26c18686d4fbbf72c7358c36bd0cfd9acdec0137e2cea6155f7ce MISC metadata.xml 159 BLAKE2B 1874e3af4a6c7f7ae7f3e6d4c497285da514376330d15173d0b667317398c37989e85c7fa71cff0b53c1fdd3e6358955b1ad12238b324b9cc174afe0fca5ce2d SHA512 0d6d278aef7bd376d99b4f23af5d26573e625e50864403c2dd0f5c253a4f7ddd5e8d3363f154cbf020a7ecd9d3ecb64e0e4c144860602ae2aee9cd50 diff --git a/dev-nodejs/bower/bower-1.8.4.ebuild b/dev-nodejs/bower/bower-1.8.4.ebuild index 9e4f8ca..d23e292 100644 --- a/dev-nodejs/bower/bower-1.8.4.ebuild +++ b/dev-nodejs/bower/bower-1.8.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/dev-nodejs/bower/bower-1.8.4.ebuild b/dev-nodejs/bower/bower-1.8.8.ebuild similarity index 85% copy from dev-nodejs/bower/bower-1.8.4.ebuild copy to dev-nodejs/bower/bower-1.8.8.ebuild index 9e4f8ca..54f1631 100644 --- a/dev-nodejs/bower/bower-1.8.4.ebuild +++ b/dev-nodejs/bower/bower-1.8.8.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=6 +EAPI=7 inherit npm diff --git a/eclass/npm-tools.eclass b/eclass/npm-tools.eclass index 6dcc821..470924d 100644 --- a/eclass/npm-tools.eclass +++ b/eclass/npm-tools.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: npm-tools.eclass @@ -28,7 +28,7 @@ _NPM_TOOLS_ECLASS=1 # Run npm install in the provided project directory. # If no directory is provided it will run on current path. case ${EAPI:-0} in -5|6) +5|6|7) npm_install() { local dir="$1" if [[ -z "${dir}" ]] ; then diff --git a/eclass/npm.eclass b/eclass/npm.eclass index 111068b..3ec0bf5 100644 --- a/eclass/npm.eclass +++ b/eclass/npm.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # $Header: $ @@ -12,7 +12,7 @@ # Requires EAPI=2 or later. case ${EAPI} in -2|3|4|5|6) : ;; +2|3|4|5|6|7) : ;; *) die "npm.eclass: unsupported EAPI=${EAPI:-0}" ;; esac
[gentoo-commits] repo/user/ssnb:master commit in: eclass/
commit: d011395592d36de996703a172430ff737fc5d1aa Author: Samuel Bernardo gmail com> AuthorDate: Mon Sep 10 17:27:40 2018 + Commit: Samuel Bernardo gmail com> CommitDate: Mon Sep 10 17:27:40 2018 + URL:https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=d0113955 add qt4-r2 eclass eclass/qt4-r2.eclass | 139 +++ 1 file changed, 139 insertions(+) diff --git a/eclass/qt4-r2.eclass b/eclass/qt4-r2.eclass new file mode 100644 index 000..d8a7252 --- /dev/null +++ b/eclass/qt4-r2.eclass @@ -0,0 +1,139 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: qt4-r2.eclass +# @MAINTAINER: +# q...@gentoo.org +# @BLURB: Eclass for Qt4-based packages, second edition. +# @DESCRIPTION: +# This eclass contains various functions that may be useful when +# dealing with packages using Qt4 libraries. Supports only EAPIs +# 2, 3, 4, and 5. Use qmake-utils.eclass in EAPI 6 and later. + +case ${EAPI} in + 2|3|4|5) : ;; + 6) die "qt4-r2.eclass is banned in EAPI 6 and later" ;; + *) die "qt4-r2.eclass: unsupported EAPI=${EAPI:-0}" ;; +esac + +inherit base eutils qmake-utils + +export XDG_CONFIG_HOME="${T}" + +# @ECLASS-VARIABLE: DOCS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array containing documents passed to dodoc command. +# Paths can be absolute or relative to ${S}. +# +# Example: DOCS=( ChangeLog README "${WORKDIR}/doc_folder/" ) + +# @ECLASS-VARIABLE: HTML_DOCS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array containing documents passed to dohtml command. +# Paths can be absolute or relative to ${S}. +# +# Example: HTML_DOCS=( "doc/document.html" "${WORKDIR}/html_folder/" ) + +# @ECLASS-VARIABLE: LANGS +# @DEFAULT_UNSET +# @DESCRIPTION: +# In case your Qt4 application provides various translations, use this variable +# to specify them in order to populate "linguas_*" IUSE automatically. Make sure +# that you set this variable before inheriting qt4-r2 eclass. +# +# Example: LANGS="de el it ja" +for x in ${LANGS}; do + IUSE+=" linguas_${x}" +done + +# @ECLASS-VARIABLE: LANGSLONG +# @DEFAULT_UNSET +# @DESCRIPTION: +# Same as LANGS, but this variable is for LINGUAS that must be in long format. +# Remember to set this variable before inheriting qt4-r2 eclass. +# Look at ${PORTDIR}/profiles/desc/linguas.desc for details. +# +# Example: LANGSLONG="en_GB ru_RU" +for x in ${LANGSLONG}; do + IUSE+=" linguas_${x%_*}" +done +unset x + +# @ECLASS-VARIABLE: PATCHES +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array variable containing all the patches to be applied. This variable +# is expected to be defined in the global scope of ebuilds. Make sure to +# specify the full path. This variable is used in src_prepare phase. +# +# Example: +# @CODE +# PATCHES=( +# "${FILESDIR}/mypatch.patch" +# "${FILESDIR}/mypatch2.patch" +# ) +# @CODE + +# @FUNCTION: qt4-r2_src_unpack +# @DESCRIPTION: +# Default src_unpack function for packages that depend on qt4. If you have to +# override src_unpack in your ebuild (probably you don't need to), call +# qt4-r2_src_unpack in it. +qt4-r2_src_unpack() { + debug-print-function $FUNCNAME "$@" + + base_src_unpack "$@" +} + +# @FUNCTION: qt4-r2_src_prepare +# @DESCRIPTION: +# Default src_prepare function for packages that depend on qt4. If you have to +# override src_prepare in your ebuild, you should call qt4-r2_src_prepare in it, +# otherwise autopatcher will not work! +qt4-r2_src_prepare() { + debug-print-function $FUNCNAME "$@" + + base_src_prepare "$@" +} + +# @FUNCTION: qt4-r2_src_configure +# @DESCRIPTION: +# Default src_configure function for packages that depend on qt4. If you have to +# override src_configure in your ebuild, call qt4-r2_src_configure in it. +qt4-r2_src_configure() { + debug-print-function $FUNCNAME "$@" + + local project_file=$(qmake-utils_find_pro_file) + + if [[ -n ${project_file} ]]; then + eqmake4 "${project_file}" + else + base_src_configure "$@" + fi +} + +# @FUNCTION: qt4-r2_src_compile +# @DESCRIPTION: +# Default src_compile function for packages that depend on qt4. If you have to +# override src_compile in your ebuild (probably you don't need to), call +# qt4-r2_src_compile in it. +qt4-r2_src_compile() { + debug-print-function $FUNCNAME "$@" + + base_src_compile "$@" +} + +# @FUNCTION: qt4-r2_src_install +# @DESCRIPTION: +# Default src_install function for qt4-based packages. Installs compiled code, +# and documentation (via DOCS and HTML_DOCS variables). +qt4-r2_src_install() { + debug-print-function $FUNCNAME "$@" + + base_src_install INSTALL_ROOT="${D}" "$@" + einstalldocs +} + +EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install