pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/ruby-manpages misc/ruby-manpages: support our ins...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/88b24f1fc942
branches:  trunk
changeset: 390794:88b24f1fc942
user:      taca <taca%pkgsrc.org@localhost>
date:      Thu Dec 29 16:21:35 2022 +0000

description:
misc/ruby-manpages: support our install-root propery

* Fix symblic link(s) of manual pages.
* No need to set RUBYGEM_MANPAGES here.

Should be fix error message when pkg_alternatives is installed.
(Reported by wiz@ via private e-mail.)

Bump PKGREVISION.

## require pull-up

diffstat:

 misc/ruby-manpages/Makefile                              |   5 +-
 misc/ruby-manpages/distinfo                              |   5 +-
 misc/ruby-manpages/patches/patch-lib_manpages_install.rb |  27 ++++++++++++++++
 misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb |  22 ++++++++----
 4 files changed, 46 insertions(+), 13 deletions(-)

diffs (103 lines):

diff -r f54cc18dd2c3 -r 88b24f1fc942 misc/ruby-manpages/Makefile
--- a/misc/ruby-manpages/Makefile       Thu Dec 29 12:49:23 2022 +0000
+++ b/misc/ruby-manpages/Makefile       Thu Dec 29 16:21:35 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2022/12/18 14:53:07 taca Exp $
+# $NetBSD: Makefile,v 1.3 2022/12/29 16:21:35 taca Exp $
 
 DISTNAME=      manpages-0.6.1
+PKGREVISION=   1
 CATEGORIES=    misc
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -10,8 +11,6 @@
 
 USE_LANGUAGES= # none
 
-RUBYGEM_MANPAGES=      no
-
 SUBST_CLASSES+=                path
 SUBST_MESSAGE.path=    Fixing man path.
 SUBST_STAGE.path=      pre-configure
diff -r f54cc18dd2c3 -r 88b24f1fc942 misc/ruby-manpages/distinfo
--- a/misc/ruby-manpages/distinfo       Thu Dec 29 12:49:23 2022 +0000
+++ b/misc/ruby-manpages/distinfo       Thu Dec 29 16:21:35 2022 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2022/11/11 14:06:24 taca Exp $
+$NetBSD: distinfo,v 1.2 2022/12/29 16:21:35 taca Exp $
 
 BLAKE2s (manpages-0.6.1.gem) = f9be6aa72e19fee514ce924206691ff49323ec1c68d1c91160244dc090eaa28b
 SHA512 (manpages-0.6.1.gem) = 70839c45db9d0eeef94587853db1514842b7a7e9fed7a967c7a1e9fcfe1ae204de93e04a8bdb24c4dfe6641cef5a27d29136bc4ae6e233040d1d2aa71b077378
 Size (manpages-0.6.1.gem) = 14848 bytes
-SHA1 (patch-lib_rubygems__plugin.rb) = cc70539c9eee2c77b7c7bcb0c245eb21c4476801
+SHA1 (patch-lib_manpages_install.rb) = cb490bc69237aa8d2bbcae1f314c644f2bf09d0e
+SHA1 (patch-lib_rubygems__plugin.rb) = fe8e5bf91c42caf9a19f4f4658f6fa16a6e99f7c
 SHA1 (patch-lib_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937
diff -r f54cc18dd2c3 -r 88b24f1fc942 misc/ruby-manpages/patches/patch-lib_manpages_install.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/patches/patch-lib_manpages_install.rb  Thu Dec 29 16:21:35 2022 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-lib_manpages_install.rb,v 1.1 2022/12/29 16:21:35 taca Exp $
+
+Handle --install-root option.
+
+--- lib/manpages/install.rb.orig       2022-12-29 07:41:29.224449401 +0000
++++ lib/manpages/install.rb
+@@ -2,10 +2,11 @@ require "fileutils"
+ 
+ module Manpages
+   class Install
+-    def initialize(gem_spec, gem_dir, target_dir)
++    def initialize(gem_spec, gem_dir, target_dir, install_root)
+       @gem_spec   = gem_spec
+       @gem_dir    = gem_dir
+       @target_dir = target_dir
++      @install_root = install_root
+     end
+ 
+     def install_manpages
+@@ -24,6 +25,7 @@ module Manpages
+       man_target_file = ManFiles.new(@gem_dir, @target_dir).man_file_path(file)
+       return if man_target_file.exist?
+ 
++      file = file.to_s.delete_prefix @install_root unless @install_root.nil?
+       begin
+         FileUtils.mkdir_p(man_target_file.dirname)
+         FileUtils.ln_s(file, man_target_file, force: true)
diff -r f54cc18dd2c3 -r 88b24f1fc942 misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb
--- a/misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb  Thu Dec 29 12:49:23 2022 +0000
+++ b/misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb  Thu Dec 29 16:21:35 2022 +0000
@@ -1,19 +1,25 @@
-$NetBSD: patch-lib_rubygems__plugin.rb,v 1.1 2022/11/11 14:06:24 taca Exp $
-
-Fixate manpath.
+$NetBSD: patch-lib_rubygems__plugin.rb,v 1.2 2022/12/29 16:21:35 taca Exp $
 
---- lib/rubygems_plugin.rb.orig        2022-11-08 15:03:34.185367972 +0000
+* Fixate manpath.
+* Handle --install-root option.
+
+--- lib/rubygems_plugin.rb.orig        2022-12-29 16:12:22.401050134 +0000
 +++ lib/rubygems_plugin.rb
-@@ -6,7 +6,7 @@ Gem::CommandManager.instance.register_co
+@@ -6,15 +6,18 @@ Gem::CommandManager.instance.register_co
  
  Gem.post_install do |installer|
    source_dir = installer.spec.gem_dir
 -  target_dir = File.expand_path("#{installer.bin_dir}/../share/man")
+-
+-  Manpages::Install.new(installer.spec, source_dir, target_dir).install_manpages
 +  target_dir = File.expand_path("#{installer.bin_dir}/../@PKGMANDIR@")
++  install_root = nil
++  if installer.options[:install_root]
++    install_root = installer.options[:install_root]
++  end
++  Manpages::Install.new(installer.spec, source_dir, target_dir, install_root).install_manpages
+ end
  
-   Manpages::Install.new(installer.spec, source_dir, target_dir).install_manpages
- end
-@@ -14,7 +14,7 @@ end
  Gem.pre_uninstall do |uninstaller|
    bin_dir = uninstaller.bin_dir || Gem.bindir(uninstaller.spec.base_dir)
    source_dir = uninstaller.spec.gem_dir



Home | Main Index | Thread Index | Old Index