1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

- Unbreak the build by removing conflict patch; not needed as the

code is compatible with Ruby versions 1.8 and 1.9 out of the box
- Reindent Makefile, tidy up header and COMMENT, renew LIB_DEPENDS
- Utilize those recently added helpers for OPTIONS
- Define LICENSE (GPLv2), and improve port description slightly
This commit is contained in:
Alexey Dokuchaev 2013-08-02 07:17:57 +00:00
parent d6d84cfb3e
commit 08183e8092
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324146
3 changed files with 22 additions and 59 deletions

View File

@ -1,44 +1,33 @@
# Created by: ntarmos@ceid.upatras.gr
# Created by: Nikos Ntarmos <ntarmos@ceid.upatras.gr>
# $FreeBSD$
PORTNAME= usbhotkey
PORTVERSION= 0.4
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/
PORTNAME= usbhotkey
PORTVERSION= 0.4
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
MAINTAINER= ntarmos@ceid.upatras.gr
COMMENT= A utility to remap USB keyboards under X11
MAINTAINER= ntarmos@ceid.upatras.gr
COMMENT= Utility to remap USB keyboards under X11
LIB_DEPENDS= hid.0:${PORTSDIR}/devel/libhid \
Xtst.6:${PORTSDIR}/x11/libXtst
LICENSE= GPLv2
BROKEN= Does not patch
LIB_DEPENDS= libhid.so:${PORTSDIR}/devel/libhid \
libXtst.so:${PORTSDIR}/x11/libXtst
OPTIONS_DEFINE= GUI
OPTIONS_DEFAULT= GUI
GUI_DESC= Enable GUI bits (Imlib dependency)
USE_RUBY= yes
USE_GMAKE= yes
HAS_CONFIGURE= yes
.include <bsd.port.options.mk>
USES= gmake
USE_RUBY= yes
HAS_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include \
-I${LOCALBASE}/include/ruby-${RUBY_VER} \
-I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
LDFLAGS+= -L${LOCALBASE}/lib
.if ${PORT_OPTIONS:MGUI}
LIB_DEPENDS+= Imlib.5:${PORTSDIR}/graphics/imlib
.else
CONFIGURE_ARGS+= --without-Imlib
.endif
OPTIONS_DEFINE= GUI
OPTIONS_DEFAULT= GUI
GUI_DESC= Enable GUI bits (via Imlib)
.include <bsd.port.pre.mk>
GUI_LIB_DEPENDS= libImlib.so:${PORTSDIR}/graphics/imlib
GUI_CONFIGURE_OFF= --without-Imlib
.if ${RUBY_VER} == 1.9
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-main.c
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,26 +0,0 @@
--- 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");
}
}

View File

@ -1,7 +1,7 @@
USBHotkey allows you to catch USB keyboard events (key press and release
events) and transform them into X11 keyboard events using a ruby script.
This provides a mechanism for creating keymaps that can be more
complicated than the standard table-based keymap approach of X11.
events) and transform them into X11 keyboard events using a Ruby script.
This provides mechanism for creating keymaps that can be more complicated
than the standard table-based keymap approach of X11.
WWW: http://usbhotkey.sourceforge.net/