public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x
@ 2020-02-15 12:18 Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4 Naohiro Aota
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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.

Note: keep versionator inheritance because a later patch use it.

Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
 eclass/ruby-ng-gnome2.eclass | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index ce52f27789a2..4e3c30017e9b 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:40   ` Michał Górny
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 3/9] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
 eclass/ruby-ng-gnome2.eclass | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 4e3c30017e9b..8c8e0c8c0a50 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: 4 5 6
 # @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)
+	4|5|6)
 		;;
 	*)
 		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -28,18 +28,11 @@ inherit ruby-fakegem multilib versionator
 
 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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 3/9] ruby-ng-gnome2.eclass: fix LICENSE
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4 Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 4/9] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 8c8e0c8c0a50..e5c2ed193703 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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 4/9] ruby-ng-gnome2.eclass: drop subbinding variable
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4 Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 3/9] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 e5c2ed193703..edb420c9a3a8 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -28,11 +28,9 @@ inherit ruby-fakegem multilib versionator
 
 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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
                   ` (2 preceding siblings ...)
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 4/9] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:42   ` Michał Górny
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

Signed-off-by: Naohiro Aota <naota@gentoo.org>
---
 eclass/ruby-ng-gnome2.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index edb420c9a3a8..dc48a53c58cd 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -29,7 +29,9 @@ inherit ruby-fakegem multilib versionator
 IUSE=""
 
 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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
                   ` (3 preceding siblings ...)
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:36   ` Michał Górny
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index dc48a53c58cd..1cc3cdce4ce6 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -24,7 +24,16 @@ RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}"
 RUBY_FAKEGEM_TASK_TEST=""
 RUBY_FAKEGEM_TASK_DOC=""
 
+# @ECLASS-VARIABLE: RUBY_GNOME2_NEED_VIRTX
+# @DESCRIPTION:
+# If set to 'yes', the test is run with virtx. Set before inheriting this
+# eclass.
+: ${RUBY_GNOME2_NEED_VIRTX:="no"}
+
 inherit ruby-fakegem multilib versionator
+if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
+	inherit virtualx
+fi
 
 IUSE=""
 
@@ -88,3 +97,16 @@ all_ruby_install() {
 
 	all_fakegem_install
 }
+
+# @FUNCTION: each_ruby_test
+# @DESCRIPTION:
+# Run the tests for this package.
+each_ruby_test() {
+	test -e test/run-test.rb || return
+
+	if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
+		virtx ${RUBY} test/run-test.rb || die
+	else
+		${RUBY} test/run-test.rb || die
+	fi
+}
-- 
2.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
                   ` (4 preceding siblings ...)
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:43   ` Michał Górny
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 1cc3cdce4ce6..619a02d0d1d7 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -51,6 +51,8 @@ SLOT="0"
 # @DESCRIPTION:
 # Run the configure script in the subbinding for each specific ruby target.
 each_ruby_configure() {
+	test -e extconf.rb || return
+
 	${RUBY} extconf.rb || die "extconf.rb failed"
 }
 
@@ -58,6 +60,8 @@ each_ruby_configure() {
 # @DESCRIPTION:
 # Compile the C bindings in the subbinding for each specific ruby target.
 each_ruby_compile() {
+	test -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
@@ -74,11 +78,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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
                   ` (5 preceding siblings ...)
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:44   ` Michał Górny
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 619a02d0d1d7..4220dc9f2092 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -47,6 +47,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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x
  2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
                   ` (6 preceding siblings ...)
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
@ 2020-02-15 12:18 ` Naohiro Aota
  2020-02-16  5:48   ` Michał Górny
  7 siblings, 1 reply; 16+ messages in thread
From: Naohiro Aota @ 2020-02-15 12:18 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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 4220dc9f2092..fa5530d36629 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -41,11 +41,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 version_is_at_least "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.25.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
@ 2020-02-16  5:36   ` Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:36 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> 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 | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index dc48a53c58cd..1cc3cdce4ce6 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -24,7 +24,16 @@ 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 multilib versionator
> +if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
> +	inherit virtualx
> +fi
>  
>  IUSE=""
>  
> @@ -88,3 +97,16 @@ all_ruby_install() {
>  
>  	all_fakegem_install
>  }
> +
> +# @FUNCTION: each_ruby_test
> +# @DESCRIPTION:
> +# Run the tests for this package.
> +each_ruby_test() {
> +	test -e test/run-test.rb || return

Don't use test in bash, use [[.

> +
> +	if [[ ${RUBY_GNOME2_NEED_VIRTX} == yes ]]; then
> +		virtx ${RUBY} test/run-test.rb || die

Doesn't virtx die for you?

> +	else
> +		${RUBY} test/run-test.rb || die
> +	fi
> +}

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4 Naohiro Aota
@ 2020-02-16  5:40   ` Michał Górny
  2020-02-17 21:40     ` Naohiro Aota
  0 siblings, 1 reply; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:40 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> Signed-off-by: Naohiro Aota <naota@gentoo.org>
> ---
>  eclass/ruby-ng-gnome2.eclass | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index 4e3c30017e9b..8c8e0c8c0a50 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: 4 5 6
>  # @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)
> +	4|5|6)
>  		;;
>  	*)
>  		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
> 

It's really hard to review this if you provide only minimal context.

I think you can drop multilib inherit for EAPI 6+.

Any reason not to support EAPI 7?

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
@ 2020-02-16  5:42   ` Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:42 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> Signed-off-by: Naohiro Aota <naota@gentoo.org>
> ---
>  eclass/ruby-ng-gnome2.eclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index edb420c9a3a8..dc48a53c58cd 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -29,7 +29,9 @@ inherit ruby-fakegem multilib versionator
>  IUSE=""
>  
>  DEPEND="virtual/pkgconfig"
> -ruby_add_bdepend "dev-ruby/pkg-config"
> +ruby_add_bdepend "
> +	dev-ruby/pkg-config
> +	test? ( >=dev-ruby/test-unit-2 )"

I don't know if ruby has some deep magic for this but it looks
suspicious to set test?-deps without adding IUSE=test and RESTRICT.

>  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/"

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
@ 2020-02-16  5:43   ` Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]

On Sat, 2020-02-15 at 21:18 +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 1cc3cdce4ce6..619a02d0d1d7 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -51,6 +51,8 @@ SLOT="0"
>  # @DESCRIPTION:
>  # Run the configure script in the subbinding for each specific ruby target.
>  each_ruby_configure() {
> +	test -e extconf.rb || return

Don't use 'test'.

> +
>  	${RUBY} extconf.rb || die "extconf.rb failed"
>  }
>  
> @@ -58,6 +60,8 @@ each_ruby_configure() {
>  # @DESCRIPTION:
>  # Compile the C bindings in the subbinding for each specific ruby target.
>  each_ruby_compile() {
> +	test -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
> @@ -74,11 +78,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

Don't use [.

> +		# 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
>  }

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
@ 2020-02-16  5:44   ` Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:44 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> 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 619a02d0d1d7..4220dc9f2092 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -47,6 +47,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

Don't use [.

> +		sed -i -e '/system(/s/which make/true/' test/run-test.rb || die
> +	fi
> +
> +	# work on top directory
> +	pushd .. >/dev/null

|| die

> +
> +	# Avoid native installer
> +	if [ -e glib2/lib/mkmf-gnome.rb ]; then

Don't use [.

> +		sed -i -e '/native-package-installer/ s:^:#:' \
> +			-e '/^setup_homebrew/ s:^:#:' glib2/lib/mkmf-gnome.rb || die
> +	fi
> +
> +	popd >/dev/null

|| die

> +}
> +
> +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.

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x
  2020-02-15 12:18 ` [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
@ 2020-02-16  5:48   ` Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-02-16  5:48 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> 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 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> index 4220dc9f2092..fa5530d36629 100644
> --- a/eclass/ruby-ng-gnome2.eclass
> +++ b/eclass/ruby-ng-gnome2.eclass
> @@ -41,11 +41,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 version_is_at_least "3.4.0"; then

Use eapi7-ver.  versionator is deprecated for almost 2 years.

> +	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.

-- 
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] 16+ messages in thread

* Re: [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4
  2020-02-16  5:40   ` Michał Górny
@ 2020-02-17 21:40     ` Naohiro Aota
  0 siblings, 0 replies; 16+ messages in thread
From: Naohiro Aota @ 2020-02-17 21:40 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, Naohiro Aota

On Sun, Feb 16, 2020 at 06:40:08AM +0100, Michał Górny wrote:
> On Sat, 2020-02-15 at 21:18 +0900, Naohiro Aota wrote:
> > Signed-off-by: Naohiro Aota <naota@gentoo.org>
> > ---
> >  eclass/ruby-ng-gnome2.eclass | 13 +++----------
> >  1 file changed, 3 insertions(+), 10 deletions(-)
> > 
> > diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
> > index 4e3c30017e9b..8c8e0c8c0a50 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: 4 5 6
> >  # @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)
> > +	4|5|6)
> >  		;;
> >  	*)
> >  		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
> > 
> 
> It's really hard to review this if you provide only minimal context.

I wanted to drop old EAPIS and reduce conditional branches to set EPREFIX=
and S=.
> 
> I think you can drop multilib inherit for EAPI 6+.
> 
> Any reason not to support EAPI 7?

Ah, I somwhow misunderstood ruby-fakegem or something is not supporting
EAPI 7... I will rewrite this series with EAPI 6 and 7 along with fixing
other bash style mistakes.

Thanks,

> 
> -- 
> Best regards,
> Michał Górny
> 




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-02-17 21:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-15 12:18 [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x Naohiro Aota
2020-02-15 12:18 ` [gentoo-dev] [PATCH 2/9] ruby-ng-gnome2.eclass: drop support for <EAPI=4 Naohiro Aota
2020-02-16  5:40   ` Michał Górny
2020-02-17 21:40     ` Naohiro Aota
2020-02-15 12:18 ` [gentoo-dev] [PATCH 3/9] ruby-ng-gnome2.eclass: fix LICENSE Naohiro Aota
2020-02-15 12:18 ` [gentoo-dev] [PATCH 4/9] ruby-ng-gnome2.eclass: drop subbinding variable Naohiro Aota
2020-02-15 12:18 ` [gentoo-dev] [PATCH 5/9] ruby-ng-gnome2.eclass: add test dependency Naohiro Aota
2020-02-16  5:42   ` Michał Górny
2020-02-15 12:18 ` [gentoo-dev] [PATCH 6/9] ruby-ng-gnome2.eclass: implement common test code Naohiro Aota
2020-02-16  5:36   ` Michał Górny
2020-02-15 12:18 ` [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages Naohiro Aota
2020-02-16  5:43   ` Michał Górny
2020-02-15 12:18 ` [gentoo-dev] [PATCH 8/9] ruby-ng-gnome2.eclass: fold common all_ruby_prepare Naohiro Aota
2020-02-16  5:44   ` Michał Górny
2020-02-15 12:18 ` [gentoo-dev] [PATCH 9/9] ruby-ng-gnome2.eclass: add support for 3.4.x Naohiro Aota
2020-02-16  5:48   ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox