From 5fb9d53d8ffe3888b5da2e8cab6111dff4f4e33a Mon Sep 17 00:00:00 2001 From: danfe Date: Fri, 2 Aug 2013 07:17:57 +0000 Subject: - 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 --- sysutils/usbhotkey/Makefile | 49 +++++++++++------------------ sysutils/usbhotkey/files/extra-patch-main.c | 26 --------------- sysutils/usbhotkey/pkg-descr | 6 ++-- 3 files changed, 22 insertions(+), 59 deletions(-) delete mode 100644 sysutils/usbhotkey/files/extra-patch-main.c (limited to 'sysutils') 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 # $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 +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 +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 +.include 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; clen; c++) -- printf( "usbhotkey: \tfrom %s\n", RSTRING(RARRAY(ary)->ptr[c])->ptr); -+ for( c=0; c