Sat Dec 31 16:20:40 2022 UTC ()
misc/ruby-manpages: more better adaptation with pkg_alternatives

* Take maintainer ship.
* More better adaptation with pkg_alternatices; install manual pages
  with ${RUBY_VER} as like commands.

Bump PKGREVISION.


(taca)
diff -r1.3 -r1.4 pkgsrc/misc/ruby-manpages/Makefile
diff -r1.2 -r1.3 pkgsrc/misc/ruby-manpages/distinfo
diff -r0 -r1.1 pkgsrc/misc/ruby-manpages/patches/patch-lib_manpages_man__files.rb

cvs diff -r1.3 -r1.4 pkgsrc/misc/ruby-manpages/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/ruby-manpages/Makefile 2022/12/29 16:21:35 1.3
+++ pkgsrc/misc/ruby-manpages/Makefile 2022/12/31 16:20:39 1.4
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: Makefile,v 1.3 2022/12/29 16:21:35 taca Exp $ 1# $NetBSD: Makefile,v 1.4 2022/12/31 16:20:39 taca Exp $
2 2
3DISTNAME= manpages-0.6.1 3DISTNAME= manpages-0.6.1
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= misc 5CATEGORIES= misc
6 6
7MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= taca@NetBSD.org
8HOMEPAGE= https://github.com/bitboxer/manpages 8HOMEPAGE= https://github.com/bitboxer/manpages
9COMMENT= Adds support for man pages to rubygems 9COMMENT= Adds support for man pages to rubygems
10LICENSE= mit 10LICENSE= mit
11 11
12USE_LANGUAGES= # none 12USE_LANGUAGES= # none
13 13
14SUBST_CLASSES+= path 14SUBST_CLASSES+= path
15SUBST_MESSAGE.path= Fixing man path. 15SUBST_MESSAGE.path= Fixing man path.
16SUBST_STAGE.path= pre-configure 16SUBST_STAGE.path= pre-configure
17SUBST_FILES.path= lib/rubygems/commands/manpages_command.rb 17SUBST_FILES.path= lib/rubygems/commands/manpages_command.rb
18SUBST_FILES.path+= lib/rubygems_plugin.rb 18SUBST_FILES.path+= lib/rubygems_plugin.rb
19SUBST_VARS.path+= PKGMANDIR 19SUBST_VARS.path+= PKGMANDIR
20 20

cvs diff -r1.2 -r1.3 pkgsrc/misc/ruby-manpages/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/ruby-manpages/distinfo 2022/12/29 16:21:35 1.2
+++ pkgsrc/misc/ruby-manpages/distinfo 2022/12/31 16:20:39 1.3
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1$NetBSD: distinfo,v 1.2 2022/12/29 16:21:35 taca Exp $ 1$NetBSD: distinfo,v 1.3 2022/12/31 16:20:39 taca Exp $
2 2
3BLAKE2s (manpages-0.6.1.gem) = f9be6aa72e19fee514ce924206691ff49323ec1c68d1c91160244dc090eaa28b 3BLAKE2s (manpages-0.6.1.gem) = f9be6aa72e19fee514ce924206691ff49323ec1c68d1c91160244dc090eaa28b
4SHA512 (manpages-0.6.1.gem) = 70839c45db9d0eeef94587853db1514842b7a7e9fed7a967c7a1e9fcfe1ae204de93e04a8bdb24c4dfe6641cef5a27d29136bc4ae6e233040d1d2aa71b077378 4SHA512 (manpages-0.6.1.gem) = 70839c45db9d0eeef94587853db1514842b7a7e9fed7a967c7a1e9fcfe1ae204de93e04a8bdb24c4dfe6641cef5a27d29136bc4ae6e233040d1d2aa71b077378
5Size (manpages-0.6.1.gem) = 14848 bytes 5Size (manpages-0.6.1.gem) = 14848 bytes
6SHA1 (patch-lib_manpages_install.rb) = cb490bc69237aa8d2bbcae1f314c644f2bf09d0e 6SHA1 (patch-lib_manpages_install.rb) = cb490bc69237aa8d2bbcae1f314c644f2bf09d0e
 7SHA1 (patch-lib_manpages_man__files.rb) = 55757e60d132a876bcbad0fe94256522867cdafd
7SHA1 (patch-lib_rubygems__plugin.rb) = fe8e5bf91c42caf9a19f4f4658f6fa16a6e99f7c 8SHA1 (patch-lib_rubygems__plugin.rb) = fe8e5bf91c42caf9a19f4f4658f6fa16a6e99f7c
8SHA1 (patch-lib_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937 9SHA1 (patch-lib_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937

File Added: pkgsrc/misc/ruby-manpages/patches/patch-lib_manpages_man__files.rb
$NetBSD: patch-lib_manpages_man__files.rb,v 1.1 2022/12/31 16:20:39 taca Exp $

* Install manual page with RUBY_VER style.

--- lib/manpages/man_files.rb.orig	2022-12-30 09:50:10.725925400 +0000
+++ lib/manpages/man_files.rb
@@ -1,7 +1,9 @@
 require "pathname"
+require "rbconfig"
 
 module Manpages
   class ManFiles
+    RUBY_VER = RbConfig::CONFIG["MAJOR"] + RbConfig::CONFIG["MINOR"]
     attr_reader :man_dir
 
     def initialize(gem_dir, target_dir = "")
@@ -23,7 +25,9 @@ module Manpages
 
     def man_file_path(file)
       man_section = file.extname.match(/\.(\d*)/)
-      @target_dir.join("man#{man_section[1]}", file.basename)
+      suffix = ".#{man_section[1]}"
+      name = file.basename(suffix).to_s + RUBY_VER + suffix
+      @target_dir.join("man#{man_section[1]}", name)
     end
   end
 end