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: add package ver...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c54393e71a12
branches:  trunk
changeset: 387989:c54393e71a12
user:      taca <taca%pkgsrc.org@localhost>
date:      Fri Nov 11 14:06:24 2022 +0000

description:
misc/ruby-manpages: add package version 0.6.1

Required by ruby-lolcat package.


Manpages

This plugin will add man pages support to ruby gems.  Instead of adding a
new command like gem-man it will try to link the files to a place the man
command automatically discovers.

With rvm and chruby it works out of the box, but sadly for rbenv we need to
add hooks that modify the man symlink depending on the ruby version
currently used.

diffstat:

 misc/ruby-manpages/DESCR                                                    |   9 +++
 misc/ruby-manpages/Makefile                                                 |  21 +++++++
 misc/ruby-manpages/PLIST                                                    |  30 ++++++++++
 misc/ruby-manpages/distinfo                                                 |   7 ++
 misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb                    |  24 ++++++++
 misc/ruby-manpages/patches/patch-lib_rubygems_commands_manpages__command.rb |  15 +++++
 6 files changed, 106 insertions(+), 0 deletions(-)

diffs (130 lines):

diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/DESCR  Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,9 @@
+Manpages
+
+This plugin will add man pages support to ruby gems.  Instead of adding a
+new command like gem-man it will try to link the files to a place the man
+command automatically discovers.
+
+With rvm and chruby it works out of the box, but sadly for rbenv we need to
+add hooks that modify the man symlink depending on the ruby version
+currently used.
diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/Makefile       Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2022/11/11 14:06:24 taca Exp $
+
+DISTNAME=      manpages-0.6.1
+CATEGORIES=    misc
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/bitboxer/manpages
+COMMENT=       Adds support for man pages to rubygems
+LICENSE=       mit
+
+USE_LANGUAGES= # none
+
+SUBST_CLASSES+=                path
+SUBST_MESSAGE.path=    Fixing man path.
+SUBST_STAGE.path=      pre-configure
+SUBST_FILES.path=      lib/rubygems/commands/manpages_command.rb
+SUBST_FILES.path+=     lib/rubygems_plugin.rb
+SUBST_VARS.path+=      PKGMANDIR
+
+.include "../../lang/ruby/gem.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/PLIST  Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST,v 1.1 2022/11/11 14:06:24 taca Exp $
+${GEM_HOME}/cache/${GEM_NAME}.gem
+${GEM_LIBDIR}/.gitignore
+${GEM_LIBDIR}/.rspec
+${GEM_LIBDIR}/.rubocop.yml
+${GEM_LIBDIR}/.rubocop_todo.yml
+${GEM_LIBDIR}/.travis.yml
+${GEM_LIBDIR}/CHANGELOG.md
+${GEM_LIBDIR}/CODE_OF_CONDUCT.md
+${GEM_LIBDIR}/Gemfile
+${GEM_LIBDIR}/Gemfile.lock
+${GEM_LIBDIR}/LICENSE
+${GEM_LIBDIR}/README.md
+${GEM_LIBDIR}/Rakefile
+${GEM_LIBDIR}/lib/manpages.rb
+${GEM_LIBDIR}/lib/manpages/gem_version.rb
+${GEM_LIBDIR}/lib/manpages/install.rb
+${GEM_LIBDIR}/lib/manpages/man_files.rb
+${GEM_LIBDIR}/lib/manpages/uninstall.rb
+${GEM_LIBDIR}/lib/manpages/version.rb
+${GEM_LIBDIR}/lib/rubygems/commands/manpages_command.rb
+${GEM_LIBDIR}/lib/rubygems_plugin.rb
+${GEM_LIBDIR}/manpages.gemspec
+${GEM_LIBDIR}/rbenv/hooks/install-man.bash
+${GEM_LIBDIR}/rbenv/hooks/version-name-change-man.bash
+${GEM_LIBDIR}/rbenv/rbenv_hook_install.sh
+${GEM_LIBDIR}/rbenv/remove_hook_folders.sh
+${GEM_LIBDIR}/rbenv/vars.sh
+${PLIST.ruby_plugins}${GEM_PLUGINSDIR}/manpages_plugin.rb
+${GEM_HOME}/specifications/${GEM_NAME}.gemspec
diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/distinfo       Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/11/11 14:06:24 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_rubygems_commands_manpages__command.rb) = a4ab65190a9ef1bab7805d2eb76f39dd97743937
diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/patches/patch-lib_rubygems__plugin.rb  Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-lib_rubygems__plugin.rb,v 1.1 2022/11/11 14:06:24 taca Exp $
+
+Fixate manpath.
+
+--- lib/rubygems_plugin.rb.orig        2022-11-08 15:03:34.185367972 +0000
++++ lib/rubygems_plugin.rb
+@@ -6,7 +6,7 @@ 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")
++  target_dir = File.expand_path("#{installer.bin_dir}/../@PKGMANDIR@")
+ 
+   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
+-  target_dir = File.expand_path("#{bin_dir}/../share/man")
++  target_dir = File.expand_path("#{bin_dir}/../@PKGMANDIR@")
+ 
+   Manpages::Uninstall.new(uninstaller.spec, source_dir, target_dir).uninstall_manpages
+ end
diff -r c61894c8629e -r c54393e71a12 misc/ruby-manpages/patches/patch-lib_rubygems_commands_manpages__command.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/ruby-manpages/patches/patch-lib_rubygems_commands_manpages__command.rb       Fri Nov 11 14:06:24 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_rubygems_commands_manpages__command.rb,v 1.1 2022/11/11 14:06:24 taca Exp $
+
+Fixate manpath.
+
+--- lib/rubygems/commands/manpages_command.rb.orig     2022-11-08 15:03:34.184546225 +0000
++++ lib/rubygems/commands/manpages_command.rb
+@@ -38,7 +38,7 @@ class Gem::Commands::ManpagesCommand < G
+           Manpages::GemVersion.new(spec).latest?
+ 
+       say "Installing man pages for #{spec.name} #{spec.version}"
+-      target_dir = File.expand_path("#{Gem.bindir}/../share/man")
++      target_dir = File.expand_path("#{Gem.bindir}/../@PKGMANDIR@")
+       Manpages::Install.new(spec, spec.gem_dir, target_dir).install_manpages
+     end
+   end



Home | Main Index | Thread Index | Old Index