-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
There has been a long standing need to be able to patch rubygem- ports. I've had some ideas on it and finally got around to working on a patch. Please see attached or check: http://people.freebsd.org/~swills/ruby_gem_patching.txt It's a very rough first draft, but it did allow me to drop a patch into a "files" dir in a rubygem- port and have it applied. It does break some rubygem- ports which seem to not have their gemspec updated to work with the latest ruby gems. To avoid that issue, perhaps similar things could be done on a per port basis or these changes could be enabled with a USE_RUBYGEMS_PATCH flag. Like I said, it's a very rough first draft, but I wanted to get it out there for comment in case I'm completely on the wrong track. Thanks, Steve -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJOdJc2AAoJEPXPYrMgexuhUQ8H/iaApSmXEpFtqv8f6BEHjwEm sZ4jBkatjYDnWE6WSYA8rii9/0FLycjdc4gbxYEM2N3uSlIZxKuC+Q/yX/LDwghX JEe5GLy/JtdeXmuw8LcCGd7kPS5RIOhT84KpOTo1Bln+wYRiWz5tA2Png2BeMJ7U 8VQ70/nmmqit2J8NNPWsrg331e79WkKvXWvvO+Oj4ke/iBcsqn/aNg79xMPV3+ld 1HIwncWLW5QneVsh2VDgs2oPTS4iGT8J+0NDnR0Hyt8ev3VF5jkIPcNBeLlQqWuU 93ePUXUveKJaoo5R34vyFQw3H6NEB1NFMS3dlj7emt5iDO24e1JatWI5FL3P+fU= =W2He -----END PGP SIGNATURE-----
Index: Mk/bsd.ruby.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.ruby.mk,v
retrieving revision 1.210
diff -u -r1.210 bsd.ruby.mk
--- Mk/bsd.ruby.mk 24 Aug 2011 00:52:12 -0000 1.210
+++ Mk/bsd.ruby.mk 10 Sep 2011 20:42:42 -0000
@@ -389,6 +389,7 @@
. if ${RUBY_VER} == 1.8
BUILD_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
RUN_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
+EXTRACT_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
. endif
PKGNAMEPREFIX?= rubygem-
@@ -396,8 +397,6 @@
EXTRACT_ONLY=
DIST_SUBDIR= rubygem
-NO_BUILD= yes
-
GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER}
GEMS_DIR= ${GEMS_BASE_DIR}/gems
DOC_DIR= ${GEMS_BASE_DIR}/doc
@@ -437,10 +436,23 @@
RUBYGEM_ARGS+= --no-rdoc
.endif
+do-extract:
+ @${RM} -rf ${WRKDIR}
+ @${MKDIR} ${WRKDIR}
+ ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR}
${DISTDIR}/${DIST_SUBDIR}/${GEMFILES}
+ ${TAR} -xOzf ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} metadata.gz |
${GZCAT} > ${BUILD_WRKSRC}/${GEMFILES}spec
+
+do-build:
+ @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build
${GEMFILES}spec ; then \
+ if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \
+ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \
+ (${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+ fi; \
+ ${FALSE}; \
+ fi)
+
do-install:
-.for _D in ${GEMFILES}
- ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS}
${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}
-.endfor
+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install
${RUBYGEM_ARGS} ${GEMFILES} -- --build-args ${CONFIGURE_ARGS})
. if defined(RUBYGEM_AUTOPLIST)
. if !target(post-install-script)
ruby_gem_patching.txt.sig
Description: Binary data
_______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ruby To unsubscribe, send any mail to "[email protected]"
