Index: head/misc/hotkeys/Makefile =================================================================== --- head/misc/hotkeys/Makefile (revision 186653) +++ head/misc/hotkeys/Makefile (revision 186654) @@ -1,51 +1,58 @@ # New ports collection makefile for: hotkeys # Date created: May 20th, 2003 # Whom: Andy Pavlo # # $FreeBSD$ PORTNAME= hotkeys PORTVERSION= 0.5.7.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= misc MASTER_SITES= http://ypwong.org/hotkeys/${PORTVERSION}/ \ ${MASTER_SITE_XCONTRIB} DISTNAME= hotkeys_${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Allows usage of special keys on internet/multimedia keyboards -LIB_DEPENDS= xml2.5:${PORTSDIR}/textproc/libxml2 \ - db3.3:${PORTSDIR}/databases/db3 +LIB_DEPENDS= xml2.5:${PORTSDIR}/textproc/libxml2 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -CONFIGURE_ARGS= --with-db3-inc=${LOCALBASE}/include/db3 \ - --with-db3-lib=${LOCALBASE}/lib \ +CONFIGURE_ARGS= --with-db3-inc=${BDB_INCLUDE_DIR} \ + --with-db3-lib=${BDB_LIB_DIR} \ + --with-db-name=${BDB_LIB_NAME} \ --x-includes=${X11BASE}/include \ --x-libraries=${X11BASE}/lib GNU_CONFIGURE= yes +USE_BDB= yes USE_GMAKE= yes + MAN1= hotkeys.1 -ORIG_CONFIG= ${PREFIX}/etc/hotkeys.conf -SAMPLE_CONFIG= ${PREFIX}/etc/hotkeys.conf.sample OPTIONS= XOSD "Enable On-Screen-Display support" on .include .if !defined(WITHOUT_XOSD) LIB_DEPENDS+= xosd.4:${PORTSDIR}/misc/xosd CONFIGURE_ARGS+= --with-xosd .endif post-extract: @${CP} ${PATCHDIR}/error.h ${WRKSRC}/src @${CP} ${PATCHDIR}/eliteduo.def ${WRKSRC}/def @${CP} ${PATCHDIR}/logitech-ultrax.def ${WRKSRC}/def +post-patch: + @${REINPLACE_CMD} -e '/^install-exec-am/s/install-sysconfDATA//' \ + ${WRKSRC}/src/Makefile.in + post-install: - @${MV} ${ORIG_CONFIG} ${SAMPLE_CONFIG} + @${INSTALL_DATA} ${WRKSRC}/src/hotkeys.conf ${PREFIX}/etc/hotkeys.conf.sample + @if [ ! -f ${PREFIX}/etc/hotkeys.conf ]; then \ + ${CP} -p ${PREFIX}/etc/hotkeys.conf.sample ${PREFIX}/etc/hotkeys.conf ; \ + fi @${CAT} ${PKGMESSAGE} .include Property changes on: head/misc/hotkeys/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.9 \ No newline at end of property +1.10 \ No newline at end of property Index: head/misc/hotkeys/files/patch-configure =================================================================== --- head/misc/hotkeys/files/patch-configure (revision 186653) +++ head/misc/hotkeys/files/patch-configure (revision 186654) @@ -1,58 +1,126 @@ ---- configure.orig Sun Dec 8 09:34:24 2002 -+++ configure Sun May 11 22:17:53 2003 +--- configure.orig Sun Dec 8 22:34:24 2002 ++++ configure Fri Mar 2 22:30:45 2007 @@ -251,6 +251,7 @@ # Initializations. # ac_default_prefix=/usr/local + ac_config_libobj_dir=. cross_compiling=no subdirs= @@ -648,6 +649,21 @@ esac done +################################################################# +## Andy Pavlo +## For some reason it wouldn't install in the right +## dir if we gave it a prefix +## I hope this fixes it +################################################################# +if test $prefix != "NONE"; then + ac_default_prefix=$prefix +else + ac_default_prefix=$ac_default_prefix +fi +################################################################# +## END FIX +################################################################# + if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 -@@ -4353,13 +4369,13 @@ +@@ -859,6 +875,7 @@ + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-xml-prefix=PFX Prefix where GNOME XML library is installed ++ --with-db-name=NAME set the library name of Berkeley DB + --with-db3-inc=DIR Set the include directory of Berkeley DB3 + --with-db3-lib=DIR Set the library directory of Berkeley DB3 + --with-gtk Use GTK interface (incl. splash screen, default is +@@ -2827,6 +2844,14 @@ + enable_xmltest=yes + fi; + ++# Check whether --with-db_name or --without-db_name was given. ++if test "${with_db_name+set}" = set; then ++ withval="$with_db_name" ++ test x$withval != x && with_db_name="$withval" ++else ++ with_db_name='db' ++fi; ++ + + # Check whether --with-db3-inc or --without-db3-inc was given. + if test "${with_db3_inc+set}" = set; then +@@ -4353,13 +4378,13 @@ fi -echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5 +echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="-pthread $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ -@@ -4412,7 +4428,7 @@ +@@ -4412,7 +4437,7 @@ #define HAVE_LIBPTHREAD 1 _ACEOF - LIBS="-lpthread $LIBS" + LIBS="-pthread $LIBS" fi +@@ -4435,7 +4460,11 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-ldb3 $LIBS" ++LIBS="-l$with_db_name $LIBS" ++__db_create="db_create" ++if [ "$with_db_name" = "db-4.2" ]; then ++ __db_create="db_create_4002" ++fi + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -4450,11 +4479,11 @@ + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char db_create (); ++char $__db_create (); + int + main () + { +-db_create (); ++$__db_create (); + ; + return 0; + } +@@ -4488,7 +4517,7 @@ + #define HAVE_LIBDB3 1 + _ACEOF + +- LIBS="-ldb3 $LIBS" ++ LIBS="-l$with_db_name $LIBS" + + else + nodb=yes +@@ -4590,7 +4619,7 @@ + { + int major=0, minor=0, patch=0; + db_version(&major, &minor, &patch); +- if ( major==3 && ((minor==2 && patch>=9) || minor>2) ) ++ if ( major > 3 || (major==3 && ((minor==2 && patch>=9) || minor>2)) ) + exit(0); + else + exit(1); Property changes on: head/misc/hotkeys/files/patch-configure ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/misc/hotkeys/files/patch-src-conf.c =================================================================== --- head/misc/hotkeys/files/patch-src-conf.c (revision 186653) +++ head/misc/hotkeys/files/patch-src-conf.c (revision 186654) @@ -1,37 +1,62 @@ --- src/conf.c.orig Thu Nov 28 03:30:08 2002 -+++ src/conf.c Fri Mar 2 19:26:23 2007 -@@ -25,7 +25,7 @@ - #include "common.h" ++++ src/conf.c Fri Mar 2 19:57:12 2007 +@@ -31,6 +31,8 @@ - #include --#include -+#include - #include - #include + #include "conf.h" -@@ -68,6 +68,9 @@ ++#define DB_VERSION (DB_VERSION_MAJOR*100000+DB_VERSION_MINOR*1000+DB_VERSION_PATCH) ++ + char* conf_keys[] = { + + /* KEY DEFAULT VALUE */ +@@ -68,6 +70,9 @@ "Shopping", "mozilla -remote 'openURL(http://thinkgeek.com)'", "Go", "mozilla -remote 'openURL(http://linux.com)'", "Print", "lpr", + "Messenger", "gaim", + "Webcam", "\0", + "Media", "xmms", /* "Screendump", "xwd -root", */ -@@ -75,9 +78,14 @@ +@@ -75,9 +80,14 @@ // "osd_font", "-*-lucidatypewriter-bold-r-normal-*-*-250-*-*-*-*-*-*", "osd_font", "lucidasanstypewriter-bold-24", "osd_color", "LawnGreen", + "osd_shadow_color", "Black", + "osd_shadow_offset", "3", "osd_timeout", "3", "osd_position", "bottom", - "osd_offset", "25", + "osd_align", "center", + "osd_hoffset", "25", + "osd_voffset", "25", + "osd_bar_length", "25", NULL, NULL }; +@@ -242,14 +252,24 @@ + char* h; + char filename[MAXPATHLEN]; + ++ dbp = NULL; ++ + /* Create the hash table */ ++#if DB_VERSION >= 300000 + if ( (ret = db_create(&dbp, dbenv, 0)) != 0 ) + { + uError("Failed in db_create: %d", ret); + bailout(); + } ++#endif + ++#if DB_VERSION >= 401025 ++ if ( (ret = dbp->open(dbp, NULL, NULL, NULL, DB_HASH, DB_CREATE, 0664)) != 0 ) ++#elif DB_VERSION >= 300000 + if ( (ret = dbp->open(dbp, NULL, NULL, DB_HASH, DB_CREATE, 0664)) != 0 ) ++#else ++ if ( (ret = dbp->open(NULL, DB_HASH, DB_CREATE, 0644, NULL, NULL, &dbp)) != 0 ) ++#endif + { + uError("Can't create hash table: %d", ret); + bailout(); Property changes on: head/misc/hotkeys/files/patch-src-conf.c ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/misc/hotkeys/files/patch-src-hotkeys.c =================================================================== --- head/misc/hotkeys/files/patch-src-hotkeys.c (revision 186653) +++ head/misc/hotkeys/files/patch-src-hotkeys.c (revision 186654) @@ -1,308 +1,314 @@ --- src/hotkeys.c.orig Wed Dec 4 03:26:32 2002 -+++ src/hotkeys.c Fri Mar 2 19:27:17 2007 ++++ src/hotkeys.c Mon Mar 5 20:33:39 2007 @@ -54,7 +54,7 @@ #include #include #if defined (__FreeBSD__) -#include +#include #else # if defined (__NetBSD__) || defined (__OpenBSD__) # include /* OSS emulation */ @@ -66,9 +66,9 @@ #endif /* __FreeBSD__ */ /* CDROM related */ -#include /* FIXME: linux specific! */ +//#include /* FIXME: linux specific! */ /* APM (suspend/standby) support */ -#include "apm.h" +//#include "apm.h" #if HAVE_GTK #include "splash.h" #endif @@ -585,7 +585,7 @@ { int mixer_fd = -1, cdrom_fd = -1; int master_vol, cd_vol; - struct cdrom_volctrl cdrom_vol; +// struct cdrom_volctrl cdrom_vol; int left, right; static struct timeval last_time; struct timeval this_time; @@ -683,6 +683,7 @@ } /* open the cdrom/dvdrom drive device */ +/***** ANDY: No CD support yet if ( cdromDevice != NULL ) { if ( (cdrom_fd = open( cdromDevice, O_RDONLY|O_NONBLOCK )) == -1 ) @@ -691,7 +692,7 @@ } else { - /* read the cdrom volume */ + || read the cdrom volume || if ( ioctl(cdrom_fd, CDROMVOLREAD, &cdrom_vol) == -1 ) { uError("Unable to read the CDROM volume of `%s'", cdromDevice); @@ -699,7 +700,7 @@ } else { - /* Set the CDROM volume */ + || Set the CDROM volume || int t; float myAdj; myAdj = 0xFF / 100.0 * adj; @@ -721,9 +722,10 @@ } } } +END Andy *****/ if (mixer_fd != -1) close(mixer_fd); - if (cdrom_fd != -1) close(cdrom_fd); +//Andy if (cdrom_fd != -1) close(cdrom_fd); return ret; } @@ -737,10 +739,10 @@ { static Bool muted = False; static int last_mixer_vol, last_cd_vol; - static struct cdrom_volctrl last_cdrom_vol; +//Andy static struct cdrom_volctrl last_cdrom_vol; int vol, cd_vol; - struct cdrom_volctrl cdrom_vol; +//Andy struct cdrom_volctrl cdrom_vol; int mixer_fd = -1, cdrom_fd = -1; short ret = 0; /* return value */ @@ -751,6 +753,7 @@ uError("Unable to open `%s'", MIXER_DEV); } /* open the cdrom/dvdrom drive device */ +/***** Andy: No CD support if ( cdromDevice != NULL ) { if ( (cdrom_fd = open( cdromDevice, O_RDONLY|O_NONBLOCK )) == -1 ) @@ -758,6 +761,7 @@ uError("Unable to open `%s'", cdromDevice); } } +END Andy *****/ if ( muted ) { @@ -783,6 +787,7 @@ #endif } } +/***** Andy: No CD support #if 0 if (SOUND_IOCTL(mixer_fd, SOUND_MIXER_WRITE_CD, &last_cd_vol) == -1) { @@ -800,6 +805,7 @@ } else muted = False; } +End Andy *****/ } else /* ! muted */ { @@ -837,6 +843,7 @@ } } } +/***** Andy: No CD support #if 0 if ( SOUND_IOCTL(mixer_fd, SOUND_MIXER_READ_CD, &last_cd_vol) == -1) { @@ -853,7 +860,9 @@ muted = True; } #endif +End Andy *****/ /* read and store the cdrom volume */ +/***** Andy: No CD support if (cdrom_fd != -1) { if ( ioctl(cdrom_fd, CDROMVOLREAD, &last_cdrom_vol) == -1 ) @@ -863,8 +872,8 @@ } else { - /* Set the volume to 0. FIXME: is this linux specific? Do - * other platforms also have 4 channels? */ + || Set the volume to 0. FIXME: is this linux specific? Do + * other platforms also have 4 channels? || cdrom_vol.channel0 = cdrom_vol.channel1 = cdrom_vol.channel2 = cdrom_vol.channel3 = 0; if ( ioctl(cdrom_fd, CDROMVOLCTRL, &cdrom_vol) == -1 ) @@ -875,10 +884,11 @@ muted = True; } } +End Andy *****/ } if (mixer_fd != -1) close(mixer_fd); - if (cdrom_fd != -1) close(cdrom_fd); +//Andy if (cdrom_fd != -1) close(cdrom_fd); return ret; } @@ -886,19 +896,20 @@ static int ejectDisc(void) { +/***** Andy: No CD support int fd, status; if ( cdromDevice == NULL ) return 0; - /* the idea of this code is from xine's vcd plugin, mostly linux - specific FIXME */ + || the idea of this code is from xine's vcd plugin, mostly linux + specific FIXME || if ( (fd = open( cdromDevice, O_RDONLY | O_NONBLOCK)) > -1 ) { status = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT); switch (status) { - /* Looks like ATAPI drives doesn't return CDS_TRAY_OPEN, - * at least it's the case on my ASUS DVD drive... */ + || Looks like ATAPI drives doesn't return CDS_TRAY_OPEN, + * at least it's the case on my ASUS DVD drive... || case CDS_TRAY_OPEN: #ifdef HAVE_LIBXOSD if ( osd ) @@ -929,7 +940,7 @@ case CDS_NO_INFO: case CDS_DRIVE_NOT_READY: default: - /* Ignore */ + || Ignore || break; } close(fd); @@ -940,6 +951,7 @@ SYSLOG(LOG_NOTICE, "CDROM_DRIVE_STATUS failed: %s\n", strerror(errno)); return -1; } +End Andy *****/ } @@ -1002,8 +1014,8 @@ #ifdef HAVE_LIBXOSD if ( osd ) { - xosd_display(osd, 0, XOSD_string, "Launching:"); - xosd_display(osd, 1, XOSD_string, getConfig(type)); + xosd_display(osd, 0, XOSD_string, type); + xosd_display(osd, 1, XOSD_string, ""); } #endif } @@ -1015,13 +1027,14 @@ int sleepState(int mode) { +/***** Andy: No APM support #ifdef USE_APMD switch (mode) { - case SUSPEND: + // case SUSPEND: error = system("apm -s"); break; - case STANDBY: + // case STANDBY: error = system("apm -S"); break; default: @@ -1039,10 +1052,10 @@ } switch (mode) { - case SUSPEND: + // case SUSPEND: error = apm_suspend(fd); break; - case STANDBY: + // case STANDBY: error = apm_standby(fd); break; default: @@ -1050,7 +1063,9 @@ break; } apm_close(fd); -#endif /* USE_APMD */ +#endif +End Andy *****/ +/* USE_APMD */ } @@ -1105,8 +1120,8 @@ #ifdef HAVE_LIBXOSD if ( osd ) { - xosd_display(osd, 0, XOSD_string, "Launching:"); - xosd_display(osd, 1, XOSD_string, kbd.customCmds[i].desc); + xosd_display(osd, 0, XOSD_string, kbd.customCmds[i].desc); + xosd_display(osd, 1, XOSD_string, ""); } #endif break; /* break the for loop */ -@@ -1435,15 +1450,17 @@ +@@ -1435,15 +1450,16 @@ #ifdef HAVE_LIBXOSD if ( osd ) { - osd = xosd_init(xstrdup(getConfig("osd_font")), - /* I dunno why, but you must call strdup here... */ - xstrdup(getConfig("osd_color")), - atoi(getConfig("osd_timeout")), - strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top, - atoi(getConfig("osd_offset")), - 3 /* shadow offset */, - 3 /* number_lines */ - ); + osd = xosd_create(3); + xosd_set_pos(osd, strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top); + xosd_set_bar_length(osd, atoi(getConfig("osd_bar_length"))); + xosd_set_colour(osd, xstrdup(getConfig("osd_color"))); + xosd_set_shadow_colour(osd, xstrdup(getConfig("osd_shadow_color"))); + xosd_set_shadow_offset(osd, atoi(getConfig("osd_shadow_offset"))); + xosd_set_horizontal_offset(osd, atoi(getConfig("osd_hoffset"))); + xosd_set_vertical_offset(osd, atoi(getConfig("osd_voffset"))); + xosd_set_font(osd, xstrdup(getConfig("osd_font"))); + xosd_set_align(osd, strncmp(getConfig("osd_align"),"left",4)?((!strncmp(getConfig("osd_align"),"center",6))?XOSD_center:XOSD_right):XOSD_left); -+ xosd_set_align(osd, XOSD_center); } #endif } -@@ -1592,6 +1609,7 @@ +@@ -1592,6 +1608,7 @@ doMute(); } else /* APM stuffs */ +/**** Andy: No APM support if ( ev.message.keycode == (kbd.defCmds)[sleepKey].key || ev.message.keycode == (kbd.defCmds)[wakeupKey].key ) { sleepState(STANDBY); -@@ -1601,8 +1619,9 @@ +@@ -1601,14 +1618,15 @@ } else { +End Andy *****/ lookupUserCmd(ev.message.keycode); /* User-defined stuffs */ - } +//Andy } } } + #ifdef HAVE_LIBXOSD + if (osd) +- xosd_uninit(osd); ++ xosd_destroy(osd); + #endif + XCloseDisplay(dpy); + closelog(); Property changes on: head/misc/hotkeys/files/patch-src-hotkeys.c ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/misc/hotkeys/files/patch-src-hotkeys.conf =================================================================== --- head/misc/hotkeys/files/patch-src-hotkeys.conf (nonexistent) +++ head/misc/hotkeys/files/patch-src-hotkeys.conf (revision 186654) @@ -0,0 +1,13 @@ +--- src/hotkeys.conf.orig Fri Nov 22 02:03:35 2002 ++++ src/hotkeys.conf Mon Mar 5 20:30:28 2007 +@@ -44,4 +44,9 @@ + # osd_timeout=3 + ### osd_position is either 'top' or 'bottom' + # osd_position=bottom +-# osd_offset=25 ++# osd_align=right ++# osd_voffset=10 ++# osd_hoffset=0 ++# osd_shadow_offset=0 ++# osd_shadow_color=Black ++# osd_bar_length=20 Property changes on: head/misc/hotkeys/files/patch-src-hotkeys.conf ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/misc/hotkeys/pkg-plist =================================================================== --- head/misc/hotkeys/pkg-plist (revision 186653) +++ head/misc/hotkeys/pkg-plist (revision 186654) @@ -1,31 +1,33 @@ bin/hotkeys +@unexec if cmp -s %D/etc/hotkeys.conf.sample %D/etc/hotkeys.conf; then rm -f %D/etc/hotkeys.conf; fi etc/hotkeys.conf.sample +@exec if [ ! -f %D/etc/hotkeys.conf ] ; then cp -p %D/%F %B/hotkeys.conf; fi %%DATADIR%%/splash.png %%DATADIR%%/acerwl.def %%DATADIR%%/btc9000.def %%DATADIR%%/eliteduo.def %%DATADIR%%/hp5181.def %%DATADIR%%/ibook.def %%DATADIR%%/itouch.def %%DATADIR%%/kb9930.def %%DATADIR%%/kb9963.def %%DATADIR%%/kbp8993.def %%DATADIR%%/logitech-cfo.def %%DATADIR%%/logitech-ultrax.def %%DATADIR%%/mck800.def %%DATADIR%%/msnatpro.def %%DATADIR%%/msnet.def %%DATADIR%%/msnetpro.def %%DATADIR%%/mx1998.def %%DATADIR%%/mx2500.def %%DATADIR%%/mx3000.def %%DATADIR%%/orktekusb.def %%DATADIR%%/pb5140w.def %%DATADIR%%/polypix.def %%DATADIR%%/sk2500.def %%DATADIR%%/sk2501a.def %%DATADIR%%/sk2505.def %%DATADIR%%/sk2800c.def %%DATADIR%%/sk7100.def %%DATADIR%%/sk9925.def @dirrm %%DATADIR%% Property changes on: head/misc/hotkeys/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property