aboutsummaryrefslogtreecommitdiff
path: root/sysutils/usbhotkey
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-08-02 07:17:57 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-08-02 07:17:57 +0000
commit08183e80928c136ea2d2a87059d024d1fbaf6144 (patch)
tree7061d51567fa7da244af8a2affbc2d83c2a79a5f /sysutils/usbhotkey
parentd6d84cfb3eb5d1fa099793b65ba21787f0590ab9 (diff)
downloadports-08183e80928c136ea2d2a87059d024d1fbaf6144.tar.gz
ports-08183e80928c136ea2d2a87059d024d1fbaf6144.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
Notes
Notes: svn path=/head/; revision=324146
Diffstat (limited to 'sysutils/usbhotkey')
-rw-r--r--sysutils/usbhotkey/Makefile49
-rw-r--r--sysutils/usbhotkey/files/extra-patch-main.c26
-rw-r--r--sysutils/usbhotkey/pkg-descr6
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/