portupgrade's shebang problem

Akinori MUSHA knu at FreeBSD.org
Wed Nov 24 08:00:04 UTC 2010


Hi,

I can't recall if I've already reported this, but portupgrade's
shebang patcher in the build process has a legacy piece of code in it
that does not work any more with ruby 1.8/1.9.

This applies to both ports-mgmt/portupgrade and -devel.

--- bin/Makefile.orig	2010-11-24 05:29:20.000000000 +0900
+++ bin/Makefile	2010-11-24 16:19:06.587423414 +0900
@@ -28,7 +28,7 @@
 	${RUBY} -pe ' \
 		if $$. == 1; \
 		 if /^#!/; \
-		  $$_.sub(/^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"); \
+		  $$_.sub!(/^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"); \
 		 else; \
 		  $$_ = "#!${RUBY}\n" + $$_; \
 		 end; \


Regards,

--
Akinori MUSHA / http://akinori.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20101124/6ec3640b/attachment.pgp


More information about the freebsd-ruby mailing list