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.diff -r1.3 -r1.4 pkgsrc/misc/ruby-manpages/Makefile
(taca)
@@ -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 | |||
3 | DISTNAME= manpages-0.6.1 | 3 | DISTNAME= manpages-0.6.1 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= misc | 5 | CATEGORIES= misc | |
6 | 6 | |||
7 | MAINTAINER= pkgsrc-users@NetBSD.org | 7 | MAINTAINER= taca@NetBSD.org | |
8 | HOMEPAGE= https://github.com/bitboxer/manpages | 8 | HOMEPAGE= https://github.com/bitboxer/manpages | |
9 | COMMENT= Adds support for man pages to rubygems | 9 | COMMENT= Adds support for man pages to rubygems | |
10 | LICENSE= mit | 10 | LICENSE= mit | |
11 | 11 | |||
12 | USE_LANGUAGES= # none | 12 | USE_LANGUAGES= # none | |
13 | 13 | |||
14 | SUBST_CLASSES+= path | 14 | SUBST_CLASSES+= path | |
15 | SUBST_MESSAGE.path= Fixing man path. | 15 | SUBST_MESSAGE.path= Fixing man path. | |
16 | SUBST_STAGE.path= pre-configure | 16 | SUBST_STAGE.path= pre-configure | |
17 | SUBST_FILES.path= lib/rubygems/commands/manpages_command.rb | 17 | SUBST_FILES.path= lib/rubygems/commands/manpages_command.rb | |
18 | SUBST_FILES.path+= lib/rubygems_plugin.rb | 18 | SUBST_FILES.path+= lib/rubygems_plugin.rb | |
19 | SUBST_VARS.path+= PKGMANDIR | 19 | SUBST_VARS.path+= PKGMANDIR | |
20 | 20 |
@@ -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 | |||
3 | BLAKE2s (manpages-0.6.1.gem) = f9be6aa72e19fee514ce924206691ff49323ec1c68d1c91160244dc090eaa28b | 3 | BLAKE2s (manpages-0.6.1.gem) = f9be6aa72e19fee514ce924206691ff49323ec1c68d1c91160244dc090eaa28b | |
4 | SHA512 (manpages-0.6.1.gem) = 70839c45db9d0eeef94587853db1514842b7a7e9fed7a967c7a1e9fcfe1ae204de93e04a8bdb24c4dfe6641cef5a27d29136bc4ae6e233040d1d2aa71b077378 | 4 | SHA512 (manpages-0.6.1.gem) = 70839c45db9d0eeef94587853db1514842b7a7e9fed7a967c7a1e9fcfe1ae204de93e04a8bdb24c4dfe6641cef5a27d29136bc4ae6e233040d1d2aa71b077378 | |
5 | Size (manpages-0.6.1.gem) = 14848 bytes | 5 | Size (manpages-0.6.1.gem) = 14848 bytes | |
6 | SHA1 (patch-lib_manpages_install.rb) = cb490bc69237aa8d2bbcae1f314c644f2bf09d0e | 6 | SHA1 (patch-lib_manpages_install.rb) = cb490bc69237aa8d2bbcae1f314c644f2bf09d0e | |
7 | SHA1 (patch-lib_manpages_man__files.rb) = 55757e60d132a876bcbad0fe94256522867cdafd | |||
7 | SHA1 (patch-lib_rubygems__plugin.rb) = fe8e5bf91c42caf9a19f4f4658f6fa16a6e99f7c | 8 | SHA1 (patch-lib_rubygems__plugin.rb) = fe8e5bf91c42caf9a19f4f4658f6fa16a6e99f7c | |
8 | SHA1 (patch-lib_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937 | 9 | SHA1 (patch-lib_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937 |
$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