summaryrefslogtreecommitdiff
path: root/misc/rubygems
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2011-03-27 13:02:17 +0000
committertaca <taca@pkgsrc.org>2011-03-27 13:02:17 +0000
commitbbb6f9887fd41f83e25bb4285f28271f6c5370db (patch)
tree7c306be5bc0f2121284cebcba7c75a8c85d843df /misc/rubygems
parentd0b6657ccd69a4e8066f090d99ccfea75b0fbf81 (diff)
downloadpkgsrc-bbb6f9887fd41f83e25bb4285f28271f6c5370db.tar.gz
* Allow build on not only ruby18 but ruby19.
* Ugly hack to replace with already installed gem command. Bump PKGREVISION.
Diffstat (limited to 'misc/rubygems')
-rw-r--r--misc/rubygems/DEINSTALL12
-rw-r--r--misc/rubygems/INSTALL12
-rw-r--r--misc/rubygems/Makefile17
-rw-r--r--misc/rubygems/PLIST4
4 files changed, 40 insertions, 5 deletions
diff --git a/misc/rubygems/DEINSTALL b/misc/rubygems/DEINSTALL
new file mode 100644
index 00000000000..d272743ae1a
--- /dev/null
+++ b/misc/rubygems/DEINSTALL
@@ -0,0 +1,12 @@
+# $NetBSD: DEINSTALL,v 1.1 2011/03/27 13:02:17 taca Exp $
+
+RUBYGEM="@PREFIX@/bin/@RUBYGEM_NAME@"
+
+case ${STAGE} in
+DEINSTALL)
+ ${MV} ${RUBYGEM} ${RUBYGEM}.new
+ if [ -f ${RUBYGEM}.orig ]; then
+ ${MV} ${RUBYGEM}.orig ${RUBYGEM}
+ fi
+ ;;
+esac
diff --git a/misc/rubygems/INSTALL b/misc/rubygems/INSTALL
new file mode 100644
index 00000000000..f71f36e1205
--- /dev/null
+++ b/misc/rubygems/INSTALL
@@ -0,0 +1,12 @@
+# $NetBSD: INSTALL,v 1.1 2011/03/27 13:02:17 taca Exp $
+
+RUBYGEM="@PREFIX@/bin/@RUBYGEM_NAME@"
+
+case ${STAGE} in
+POST-INSTALL)
+ if [ -f ${RUBYGEM} ]; then
+ ${MV} ${RUBYGEM} ${RUBYGEM}.orig
+ fi
+ ${CP} -p ${RUBYGEM}.new ${RUBYGEM}
+ ;;
+esac
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index d9a0725c78b..0b6fb579181 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.37 2011/03/23 14:35:04 taca Exp $
+# $NetBSD: Makefile,v 1.38 2011/03/27 13:02:17 taca Exp $
DISTNAME= rubygems-1.6.2
+PKGREVISION= 1
CATEGORIES= misc ruby
MASTER_SITES= http://production.cf.rubygems.org/rubygems/ \
http://rubyforge.org/frs/download.php/74445/
@@ -19,9 +20,7 @@ CONFLICTS+= rubygems-[0-9]*
NO_CONFIGURE= yes
NO_BUILD= yes
-RUBY_VERSION= ${RUBY18_VERSION}
-RUBY_VERSION_SUPPORTED= 18
REPLACE_RUBY_DIRS= bin
REPLACE_RUBY_PAT= [a-z]*
@@ -40,6 +39,8 @@ SUBST_FILES.conf= lib/rubygems/config_file.rb
SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
SUBST_MESSAGE.conf= Fixing configuration files.
+FILES_SUBST+= RUBYGEM_NAME=${RUBYGEM_NAME}
+
# Generate a dynamic PLIST for the rubygems documentation directory.
GENERATE_PLIST+= \
${ECHO} "@comment The following lines are automatically generated." && \
@@ -63,8 +64,18 @@ INSTALL_TARGET+= --destdir=${DESTDIR:Q}
# command to install.
#
do-install:
+ if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} ]; then \
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig; \
+ fi
cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${RUBY} setup.rb ${INSTALL_TARGET}
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.new
+ if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig ]; then \
+ ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig \
+ ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}; \
+ fi
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST
index 58a2033fc91..86173ff4d26 100644
--- a/misc/rubygems/PLIST
+++ b/misc/rubygems/PLIST
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.16 2011/03/23 14:35:04 taca Exp $
-bin/gem${RUBY_VER}
+@comment $NetBSD: PLIST,v 1.17 2011/03/27 13:02:17 taca Exp $
+bin/gem${RUBY_VER}.new
${RUBY_VENDORLIB}/gauntlet_rubygems.rb
${RUBY_VENDORLIB}/rbconfig/datadir.rb
${RUBY_VENDORLIB}/rubygems.rb