* [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x
@ 2020-05-04 2:22 Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 02/10] ruby-ng-gnome2.eclass: drop support for <EAPI=6 Naohiro Aota
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
The official tree no longer have ruby-gnome2 packages with 0.19.x. Drop
support for them.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index ce52f27789a2..a6e6fb089c8c 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ruby-ng-gnome2.eclass
@@ -24,7 +24,7 @@ RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}"
RUBY_FAKEGEM_TASK_TEST=""
RUBY_FAKEGEM_TASK_DOC=""
-inherit ruby-fakegem multilib versionator
+inherit ruby-fakegem multilib
IUSE=""
@@ -32,13 +32,9 @@ IUSE=""
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
subbinding=${PN#ruby-}
-if [ $(get_version_component_range "1-2") == "0.19" ]; then
- subbinding=${subbinding/%2}
-else
- subbinding=${subbinding/-/_}
- DEPEND="virtual/pkgconfig"
- ruby_add_bdepend "dev-ruby/pkg-config"
-fi
+subbinding=${subbinding/-/_}
+DEPEND="virtual/pkgconfig"
+ruby_add_bdepend "dev-ruby/pkg-config"
if has "${EAPI:-0}" 0 1 2 3 ; then
S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
else
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 02/10] ruby-ng-gnome2.eclass: drop support for <EAPI=6
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 03/10] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
All users of ruby-ng-gnome2 in the official tree are on EAPI=6, so we
can drop old EAPI support to reduce "if" branches and make the feature
updates simple.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index a6e6fb089c8c..67a5d58fba58 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -6,14 +6,14 @@
# Ruby herd <ruby@gentoo.org>
# @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
# @DESCRIPTION:
# This eclass simplifies installation of the various pieces of
# ruby-gnome2 since they share a very common installation procedure.
case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
+ 6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -24,22 +24,15 @@ RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}"
RUBY_FAKEGEM_TASK_TEST=""
RUBY_FAKEGEM_TASK_DOC=""
-inherit ruby-fakegem multilib
+inherit ruby-fakegem
IUSE=""
-# Define EPREFIX if needed
-has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
subbinding=${PN#ruby-}
subbinding=${subbinding/-/_}
DEPEND="virtual/pkgconfig"
ruby_add_bdepend "dev-ruby/pkg-config"
-if has "${EAPI:-0}" 0 1 2 3 ; then
- S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
-else
- RUBY_S=ruby-gnome2-all-${PV}/${subbinding}
-fi
+RUBY_S=ruby-gnome2-all-${PV}/${subbinding}
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
HOMEPAGE="https://ruby-gnome2.osdn.jp/"
LICENSE="Ruby"
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 03/10] ruby-ng-gnome2.eclass: fix LICENSE
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 02/10] ruby-ng-gnome2.eclass: drop support for <EAPI=6 Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 04/10] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
All ruby-gnome2 packages in the tree is now licensed under LGPL-2.1+.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 67a5d58fba58..42325ce4f33c 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -35,7 +35,7 @@ ruby_add_bdepend "dev-ruby/pkg-config"
RUBY_S=ruby-gnome2-all-${PV}/${subbinding}
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
HOMEPAGE="https://ruby-gnome2.osdn.jp/"
-LICENSE="Ruby"
+LICENSE="LGPL-2.1+"
SLOT="0"
# @FUNCTION: each_ruby_configure
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 04/10] ruby-ng-gnome2.eclass: drop subbinding variable
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 02/10] ruby-ng-gnome2.eclass: drop support for <EAPI=6 Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 03/10] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [ Naohiro Aota
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Since we can set RUBY_S only from RUBY_FAKEGEM_NAME, we no longer need
$subbinding.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 42325ce4f33c..4f3f6011501b 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -28,11 +28,9 @@ inherit ruby-fakegem
IUSE=""
-subbinding=${PN#ruby-}
-subbinding=${subbinding/-/_}
DEPEND="virtual/pkgconfig"
ruby_add_bdepend "dev-ruby/pkg-config"
-RUBY_S=ruby-gnome2-all-${PV}/${subbinding}
+RUBY_S=ruby-gnome2-all-${PV}/${RUBY_FAKEGEM_NAME}
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
HOMEPAGE="https://ruby-gnome2.osdn.jp/"
LICENSE="LGPL-2.1+"
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (2 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 04/10] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 5:05 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
` (5 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 4f3f6011501b..ac112e006205 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -77,7 +77,7 @@ each_ruby_install() {
# Install the files common to all ruby targets.
all_ruby_install() {
for doc in ../AUTHORS ../NEWS ChangeLog README; do
- [ -s "$doc" ] && dodoc $doc
+ [[ -s "$doc" ]] && dodoc $doc
done
if [[ -d sample ]]; then
insinto /usr/share/doc/${PF}
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (3 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [ Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 5:08 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 07/10] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
` (4 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index ac112e006205..a1a84f3045ed 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -26,10 +26,13 @@ RUBY_FAKEGEM_TASK_DOC=""
inherit ruby-fakegem
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
DEPEND="virtual/pkgconfig"
-ruby_add_bdepend "dev-ruby/pkg-config"
+ruby_add_bdepend "
+ dev-ruby/pkg-config
+ test? ( >=dev-ruby/test-unit-2 )"
RUBY_S=ruby-gnome2-all-${PV}/${RUBY_FAKEGEM_NAME}
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
HOMEPAGE="https://ruby-gnome2.osdn.jp/"
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 07/10] ruby-ng-gnome2.eclass: implement common test code
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (4 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Fold common test code from runy-gnome2 ebuild to this eclass.
To support test under virtx, introduce RUBY_GNOME2_NEED_VIRTX variable.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index a1a84f3045ed..3ba1a11c21d0 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -24,7 +24,17 @@ RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}"
RUBY_FAKEGEM_TASK_TEST=""
RUBY_FAKEGEM_TASK_DOC=""
+# @ECLASS-VARIABLE: RUBY_GNOME2_NEED_VIRTX
+# @PRE_INHERIT
+# @DESCRIPTION:
+# If set to 'yes', the test is run with virtx. Set before inheriting this
+# eclass.
+: ${RUBY_GNOME2_NEED_VIRTX:="no"}
+
inherit ruby-fakegem
+if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
+ inherit virtualx
+fi
IUSE="test"
RESTRICT="!test? ( test )"
@@ -89,3 +99,16 @@ all_ruby_install() {
all_fakegem_install
}
+
+# @FUNCTION: each_ruby_test
+# @DESCRIPTION:
+# Run the tests for this package.
+each_ruby_test() {
+ [[ -e test/run-test.rb ]] || return
+
+ if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
+ virtx ${RUBY} test/run-test.rb
+ else
+ ${RUBY} test/run-test.rb || die
+ fi
+}
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (5 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 07/10] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 5:10 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 09/10] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
` (2 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Some ruby-gnome2 ebuild does not build C bindings, so there is no need to
call each_ruby_{configure,compile} and emake install of this eclass. Check
if "extconf.rb" and "Makefile" to decide what to do.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 3ba1a11c21d0..7ffe57d1a9ff 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -53,6 +53,8 @@ SLOT="0"
# @DESCRIPTION:
# Run the configure script in the subbinding for each specific ruby target.
each_ruby_configure() {
+ [[ -e extconf.rb ]] || return
+
${RUBY} extconf.rb || die "extconf.rb failed"
}
@@ -60,6 +62,8 @@ each_ruby_configure() {
# @DESCRIPTION:
# Compile the C bindings in the subbinding for each specific ruby target.
each_ruby_compile() {
+ [[ -e Makefile ]] || return
+
# We have injected --no-undefined in Ruby as a safety precaution
# against broken ebuilds, but the Ruby-Gnome bindings
# unfortunately rely on the lazy load of other extensions; see bug
@@ -76,11 +80,13 @@ each_ruby_compile() {
# @DESCRIPTION:
# Install the files in the subbinding for each specific ruby target.
each_ruby_install() {
- # Create the directories, or the package will create them as files.
- local archdir=$(ruby_rbconfig_value "sitearchdir")
- dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
+ if [[ -e Makefile ]]; then
+ # Create the directories, or the package will create them as files.
+ local archdir=$(ruby_rbconfig_value "sitearchdir")
+ dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
- emake DESTDIR="${D}" install || die "make install failed"
+ emake DESTDIR="${D}" install || die "make install failed"
+ fi
each_fakegem_install
}
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 09/10] ruby-ng-gnome2.eclass: fold common all_ruby_prepare
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (6 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 10/10] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
2020-05-10 8:02 ` [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Hans de Graaff
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 7ffe57d1a9ff..7beb03e778c8 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -49,6 +49,28 @@ HOMEPAGE="https://ruby-gnome2.osdn.jp/"
LICENSE="LGPL-2.1+"
SLOT="0"
+ruby-ng-gnome2_all_ruby_prepare() {
+ # Avoid compilation of dependencies during test.
+ if [[ -e test/run-test.rb ]]; then
+ sed -i -e '/system(/s/which make/true/' test/run-test.rb || die
+ fi
+
+ # work on top directory
+ pushd .. >/dev/null
+
+ # Avoid native installer
+ if [[ -e glib2/lib/mkmf-gnome.rb ]]; then
+ sed -i -e '/native-package-installer/ s:^:#:' \
+ -e '/^setup_homebrew/ s:^:#:' glib2/lib/mkmf-gnome.rb || die
+ fi
+
+ popd >/dev/null
+}
+
+all_ruby_prepare() {
+ ruby-ng-gnome2_all_ruby_prepare
+}
+
# @FUNCTION: each_ruby_configure
# @DESCRIPTION:
# Run the configure script in the subbinding for each specific ruby target.
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [gentoo-dev] [PATCH v2 10/10] ruby-ng-gnome2.eclass: add support for 3.4.x
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (7 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 09/10] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
@ 2020-05-04 2:22 ` Naohiro Aota
2020-05-10 8:02 ` [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Hans de Graaff
9 siblings, 0 replies; 14+ messages in thread
From: Naohiro Aota @ 2020-05-04 2:22 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
Update SRC_URI since the primary release site is moved to github.
Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
eclass/ruby-ng-gnome2.eclass | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 7beb03e778c8..7cd789410b20 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -13,8 +13,8 @@
# ruby-gnome2 since they share a very common installation procedure.
case "${EAPI:-0}" in
- 6|7)
- ;;
+ 6) inherit eapi7-ver ;;
+ 7) ;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
;;
@@ -43,11 +43,17 @@ DEPEND="virtual/pkgconfig"
ruby_add_bdepend "
dev-ruby/pkg-config
test? ( >=dev-ruby/test-unit-2 )"
-RUBY_S=ruby-gnome2-all-${PV}/${RUBY_FAKEGEM_NAME}
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
HOMEPAGE="https://ruby-gnome2.osdn.jp/"
LICENSE="LGPL-2.1+"
SLOT="0"
+if ver_test -ge "3.4.0"; then
+ SRC_URI="https://github.com/ruby-gnome/ruby-gnome/archive/${PV}.tar.gz -> ruby-gnome2-${PV}.tar.gz"
+ RUBY_S=ruby-gnome-${PV}/${RUBY_FAKEGEM_NAME}
+else
+ SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
+ RUBY_S=ruby-gnome2-all-${PV}/${RUBY_FAKEGEM_NAME}
+fi
ruby-ng-gnome2_all_ruby_prepare() {
# Avoid compilation of dependencies during test.
--
2.26.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [ Naohiro Aota
@ 2020-05-04 5:05 ` Michał Górny
0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2020-05-04 5:05 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote:
> Signed-off-by: Naohiro Aota <naota@gentoo.org>
> ---
> eclass/ruby-ng-gnome2.eclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index 4f3f6011501b..ac112e006205 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -77,7 +77,7 @@ each_ruby_install() {
> # Install the files common to all ruby targets.
> all_ruby_install() {
> for doc in ../AUTHORS ../NEWS ChangeLog README; do
> - [ -s "$doc" ] && dodoc $doc
> + [[ -s "$doc" ]] && dodoc $doc
Use ${doc} while at it, please. Also quoting is no longer necessary
in [[ ]].
> done
> if [[ -d sample ]]; then
> insinto /usr/share/doc/${PF}
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
@ 2020-05-04 5:08 ` Michał Górny
0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2020-05-04 5:08 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote:
> Signed-off-by: Naohiro Aota <naota@gentoo.org>
> ---
> eclass/ruby-ng-gnome2.eclass | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index ac112e006205..a1a84f3045ed 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -26,10 +26,13 @@ RUBY_FAKEGEM_TASK_DOC=""
>
> inherit ruby-fakegem
>
> -IUSE=""
> +IUSE="test"
> +RESTRICT="!test? ( test )"
Just in case: do you know that RESTRICT is not stacked, so all ebuilds
need to do RESTRICT+= now?
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
@ 2020-05-04 5:10 ` Michał Górny
0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2020-05-04 5:10 UTC (permalink / raw
To: gentoo-dev; +Cc: ruby, Naohiro Aota
[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]
On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote:
> Some ruby-gnome2 ebuild does not build C bindings, so there is no need to
> call each_ruby_{configure,compile} and emake install of this eclass. Check
> if "extconf.rb" and "Makefile" to decide what to do.
>
> Signed-off-by: Naohiro Aota <naota@gentoo.org>
> ---
> eclass/ruby-ng-gnome2.eclass | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index 3ba1a11c21d0..7ffe57d1a9ff 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -53,6 +53,8 @@ SLOT="0"
> # @DESCRIPTION:
> # Run the configure script in the subbinding for each specific ruby target.
> each_ruby_configure() {
> + [[ -e extconf.rb ]] || return
> +
> ${RUBY} extconf.rb || die "extconf.rb failed"
> }
>
> @@ -60,6 +62,8 @@ each_ruby_configure() {
> # @DESCRIPTION:
> # Compile the C bindings in the subbinding for each specific ruby target.
> each_ruby_compile() {
> + [[ -e Makefile ]] || return
> +
> # We have injected --no-undefined in Ruby as a safety precaution
> # against broken ebuilds, but the Ruby-Gnome bindings
> # unfortunately rely on the lazy load of other extensions; see bug
> @@ -76,11 +80,13 @@ each_ruby_compile() {
> # @DESCRIPTION:
> # Install the files in the subbinding for each specific ruby target.
> each_ruby_install() {
> - # Create the directories, or the package will create them as files.
> - local archdir=$(ruby_rbconfig_value "sitearchdir")
> - dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
> + if [[ -e Makefile ]]; then
> + # Create the directories, or the package will create them as files.
> + local archdir=$(ruby_rbconfig_value "sitearchdir")
> + dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
>
> - emake DESTDIR="${D}" install || die "make install failed"
> + emake DESTDIR="${D}" install || die "make install failed"
Nit: you could remove '|| die' here, and in some other places too.
> + fi
>
> each_fakegem_install
> }
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
` (8 preceding siblings ...)
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 10/10] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
@ 2020-05-10 8:02 ` Hans de Graaff
9 siblings, 0 replies; 14+ messages in thread
From: Hans de Graaff @ 2020-05-10 8:02 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote:
> The official tree no longer have ruby-gnome2 packages with 0.19.x.
> Drop
> support for them.
All of these patches look fine to me. Please go ahead and merge.
Hans
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-05-10 8:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 2:22 [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 02/10] ruby-ng-gnome2.eclass: drop support for <EAPI=6 Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 03/10] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 04/10] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 05/10] ruby-ng-gnome2.eclass: Use [[ instead of [ Naohiro Aota
2020-05-04 5:05 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 06/10] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
2020-05-04 5:08 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 07/10] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
2020-05-04 5:10 ` Michał Górny
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 09/10] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
2020-05-04 2:22 ` [gentoo-dev] [PATCH v2 10/10] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
2020-05-10 8:02 ` [gentoo-dev] [PATCH v2 01/10] ruby-ng-gnome2.eclass: drop support for 0.19.x Hans de Graaff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox