ports/159198: [PATCH] fix sysutils/usbhotkey to work with Ruby 1.9
Steve Wills
swills at FreeBSD.org
Tue Jul 26 02:30:13 UTC 2011
>Number: 159198
>Category: ports
>Synopsis: [PATCH] fix sysutils/usbhotkey to work with Ruby 1.9
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 26 02:30:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Steve Wills
>Release:
>Organization:
>Environment:
>Description:
sysutils/usbhotkey does not build with Ruby 1.9. The attached patch fixes that. Note I have only done build testing with this patch; run testing should be done.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/usbhotkey/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile 28 Mar 2010 06:44:05 -0000 1.11
+++ Makefile 26 Jul 2011 02:17:17 -0000
@@ -26,10 +26,12 @@
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_PTHREADS)
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS} -I${LOCALBASE}/include \
+ -I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}" \
LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS} -L${LOCALBASE}/lib"
.else
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include \
+ -I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
.endif
Index: files/patch-main.c
===================================================================
RCS file: files/patch-main.c
diff -N files/patch-main.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-main.c 26 Jul 2011 02:21:20 -0000
@@ -0,0 +1,26 @@
+--- main.c.orig 2011-07-26 02:17:43.000000000 +0000
++++ main.c 2011-07-26 02:20:01.000000000 +0000
+@@ -167,18 +167,18 @@
+ unsigned c;
+ VALUE lasterr = rb_gv_get("$!");
+ VALUE message = rb_obj_as_string(lasterr);
+- VALUE ary = rb_funcall( ruby_errinfo, rb_intern("backtrace"), 0);
++ VALUE ary = rb_funcall( rb_errinfo, rb_intern("backtrace"), 0);
+
+- if( ! strcmp(RSTRING(message)->ptr, "exit"))
++ if( ! strcmp(RSTRING_PTR(message), "exit"))
+ {
+ quitMe(1);
+ return;
+ }
+
+- printf( "usbhotkey: %s\n", RSTRING(message)->ptr);
++ printf( "usbhotkey: %s\n", RSTRING_PTR(message));
+ printf( "usbhotkey: Backtrace:\n");
+- for( c=0; c<RARRAY(ary)->len; c++)
+- printf( "usbhotkey: \tfrom %s\n", RSTRING(RARRAY(ary)->ptr[c])->ptr);
++ for( c=0; c<RARRAY_LEN(ary); c++)
++ printf( "usbhotkey: \tfrom %s\n", RSTRING_PTR(RARRAY_PTR(ary)[c]));
+ errorHelp( "Error executing start script\n");
+ }
+ }
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list