diff options
author | danfe <danfe@FreeBSD.org> | 2013-08-02 15:17:57 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2013-08-02 15:17:57 +0800 |
commit | 5fb9d53d8ffe3888b5da2e8cab6111dff4f4e33a (patch) | |
tree | 7061d51567fa7da244af8a2affbc2d83c2a79a5f /sysutils | |
parent | 5110cdabf228063ca34b6dad618da5a6dab02509 (diff) | |
download | freebsd-ports-gnome-5fb9d53d8ffe3888b5da2e8cab6111dff4f4e33a.tar.gz freebsd-ports-gnome-5fb9d53d8ffe3888b5da2e8cab6111dff4f4e33a.tar.zst freebsd-ports-gnome-5fb9d53d8ffe3888b5da2e8cab6111dff4f4e33a.zip |
- 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
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/usbhotkey/Makefile | 49 | ||||
-rw-r--r-- | sysutils/usbhotkey/files/extra-patch-main.c | 26 | ||||
-rw-r--r-- | sysutils/usbhotkey/pkg-descr | 6 |
3 files changed, 22 insertions, 59 deletions
diff --git a/sysutils/usbhotkey/Makefile b/sysutils/usbhotkey/Makefile index f1bbfd738f9b..03a663432ffb 100644 --- a/sysutils/usbhotkey/Makefile +++ b/sysutils/usbhotkey/Makefile @@ -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 - -.include <bsd.port.pre.mk> +OPTIONS_DEFINE= GUI +OPTIONS_DEFAULT= GUI +GUI_DESC= Enable GUI bits (via Imlib) -.if ${RUBY_VER} == 1.9 -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-main.c -.endif +GUI_LIB_DEPENDS= libImlib.so:${PORTSDIR}/graphics/imlib +GUI_CONFIGURE_OFF= --without-Imlib -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/sysutils/usbhotkey/files/extra-patch-main.c b/sysutils/usbhotkey/files/extra-patch-main.c deleted file mode 100644 index 5b3d40754718..000000000000 --- a/sysutils/usbhotkey/files/extra-patch-main.c +++ /dev/null @@ -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"); - } - } diff --git a/sysutils/usbhotkey/pkg-descr b/sysutils/usbhotkey/pkg-descr index 9755ec2017ad..c72bd8e0bc2a 100644 --- a/sysutils/usbhotkey/pkg-descr +++ b/sysutils/usbhotkey/pkg-descr @@ -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/ |