mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Update wacom input driver to 0.24.99.1
- replace rc.d script with a sample file to simplify configuration - use the underlying install target; this exposes xorg headers which may be used by gnome-settings-daemon - drop gmake and autotools dependencies - drop explicit xinput dependency - require webcamd to get /dev/input/eventN - require xinerama for xsetwacom display mapping - explicitly disable doxygen docs - add wacom to xorg-drivers port - pass maintainership to submitter - enable support of wacom tablets connected via a serial port [1] - support stage PR: 175876 , 181133 [1] Submitted by: Jan Beich, aasoft@gmail.com [1]
This commit is contained in:
parent
1920884475
commit
b7ac854ab4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357422
1
MOVED
1
MOVED
@ -6129,3 +6129,4 @@ net/cvsup-mirror||2014-06-01|Removed: www, doc, gnats, ports repo gone; src repo
|
||||
multimedia/shell-fm||2014-06-02|Has expired: Unusable, subscription radio streaming service will come to an end
|
||||
security/py-posix1e|security/py-pylibacl|2014-06-03|Duplicate of security/py-pylibacl
|
||||
www/mediawiki120||2014-06-08|Has expired: Not maintained upstream
|
||||
x11-drivers/input-wacom|x11-drivers/xf86-input-wacom|2014-06-11|Following the usual naming of xorg input drivers
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
COMMENT = X11 drivers
|
||||
|
||||
SUBDIR += input-wacom
|
||||
SUBDIR += xf86-input-acecad
|
||||
SUBDIR += xf86-input-egalax
|
||||
SUBDIR += xf86-input-elographics
|
||||
@ -16,6 +15,7 @@
|
||||
SUBDIR += xf86-input-penmount
|
||||
SUBDIR += xf86-input-synaptics
|
||||
SUBDIR += xf86-input-vmmouse
|
||||
SUBDIR += xf86-input-wacom
|
||||
SUBDIR += xf86-input-void
|
||||
SUBDIR += xf86-video-apm
|
||||
SUBDIR += xf86-video-ark
|
||||
|
@ -1,113 +0,0 @@
|
||||
# Created by: Dominic Fandrey <kamikaze@bsdforen.de>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= input-wacom
|
||||
PORTVERSION= ${KLD_VERSION}.${WACOM_VERSION:C/-/./g}
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= x11-drivers kld
|
||||
MASTER_SITES= http://www.chillt.de/bsdwacom/:bsdwacom \
|
||||
SF/linuxwacom/xf86-input-wacom/:linuxwacom
|
||||
DISTFILES= ${BSDWACOM}.tbz:bsdwacom \
|
||||
${LINUXWACOM}.tar.bz2:linuxwacom
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= X.Org Wacom tablet driver and kernel module
|
||||
|
||||
BUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat
|
||||
|
||||
MAN4= wacom.4x
|
||||
MAN1= xsetwacom.1
|
||||
#MANCOMPRESSED= yes
|
||||
|
||||
USES= gmake
|
||||
USE_RC_SUBR= wacom
|
||||
|
||||
KMODDIR?= /boot/modules
|
||||
XINPUTMODDIR= lib/xorg/modules/input
|
||||
MAN1DIR= man/man1
|
||||
MAN4DIR= man/man4
|
||||
WRKSRC= ${WRKDIR}
|
||||
|
||||
PLIST_SUB+= KMODDIR=${KMODDIR} \
|
||||
XINPUTMODDIR=${XINPUTMODDIR} \
|
||||
PORTTYPE=${PORTTYPE}
|
||||
SUB_LIST:= ${PLIST_SUB}
|
||||
SUB_FILES+= pkg-message-${PORTTYPE}
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message-${PORTTYPE}
|
||||
|
||||
XORG_CAT= driver
|
||||
USE_XORG= xi xrandr
|
||||
|
||||
LINUXWACOM= xf86-input-wacom-${WACOM_VERSION}
|
||||
BSDWACOM= bsdwacom-${KLD_VERSION}
|
||||
WACOM_VERSION= 0.15.0
|
||||
KLD_VERSION= 40
|
||||
PATCH_WRKSRC= ${WRKDIR}/${LINUXWACOM}
|
||||
CONFIGURE_WRKSRC= ${WRKDIR}/${LINUXWACOM}
|
||||
USE_AUTOTOOLS= autoconf
|
||||
MAKE_ARGS+= UDEV_CFLAGS=""
|
||||
|
||||
OPTIONS_DEFINE= UWACOMKLD
|
||||
UWACOMKLD_DESC= Install USB kernel module (not supported on 8.x)
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MUWACOMKLD}
|
||||
PLIST_SUB+= UWACOMKLD="uwacom.ko"
|
||||
PORTTYPE= usb
|
||||
.else
|
||||
PLIST_SUB+= UWACOMKLD="@noinst UWACOMKLD uwacom.ko"
|
||||
PORTTYPE= serial
|
||||
.endif
|
||||
|
||||
do-build:
|
||||
.if ${PORT_OPTIONS:MUWACOMKLD}
|
||||
@cd ${WRKDIR}/uwacom \
|
||||
&& ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
|
||||
.endif
|
||||
@cd ${WRKDIR}/${LINUXWACOM} \
|
||||
&& ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS}
|
||||
|
||||
do-install:
|
||||
.if ${PORT_OPTIONS:MUWACOMKLD}
|
||||
@${MKDIR} ${KMODDIR}
|
||||
@${INSTALL_KLD} ${WRKDIR}/uwacom/uwacom.ko ${KMODDIR}/
|
||||
.endif
|
||||
@${MKDIR} ${PREFIX}/${XINPUTMODDIR} ${PREFIX}/${MAN4DIR}
|
||||
@cd ${WRKDIR}/${LINUXWACOM}/tools/ \
|
||||
&& ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL}
|
||||
@${INSTALL} ${WRKDIR}/${LINUXWACOM}/src/.libs/wacom_drv.so \
|
||||
${PREFIX}/${XINPUTMODDIR}/
|
||||
@${INSTALL_MAN} ${WRKDIR}/${LINUXWACOM}/man/wacom.4x \
|
||||
${PREFIX}/${MAN4DIR}/
|
||||
@${INSTALL_MAN} ${WRKDIR}/${LINUXWACOM}/man/xsetwacom.1 \
|
||||
${PREFIX}/${MAN1DIR}/
|
||||
|
||||
plist: clean configure
|
||||
@${ECHO} "===> Rebuilding PLIST."
|
||||
@${TOUCH} ${PLIST}
|
||||
@${RM} ${PLIST}
|
||||
@cd ${WRKDIR}/linuxwacom \
|
||||
&& ${SETENV} ${MAKE_ENV} PREFIX=${WRKDIR}/plist ./run_configure
|
||||
@${MKDIR} ${WRKDIR}/plist
|
||||
@cd ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/util \
|
||||
&& ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL}
|
||||
@cd ${WRKDIR}/linuxwacom \
|
||||
&& ${SETENV} ${MAKE_ENV} ./run_configure
|
||||
@${FIND} ${WRKDIR}/plist/ -not -type d \
|
||||
| ${SED} "s|${WRKDIR}/plist/||1" \
|
||||
>> ${PLIST}
|
||||
@${FIND} -d ${WRKDIR}/plist/ -mindepth 2 -type d \
|
||||
| ${SED} "s|${WRKDIR}/plist/|@dirrm |1" \
|
||||
>> ${PLIST}
|
||||
@${ECHO} "%%XINPUTMODDIR%%/wacom_drv.so" >> ${PLIST}
|
||||
@${ECHO} "@dirrmtry %%XINPUTMODDIR%%" >> ${PLIST}
|
||||
@${ECHO} "@cwd %%KMODDIR%%" >> ${PLIST}
|
||||
@${ECHO} "%%UWACOMKLD%%" >> ${PLIST}
|
||||
|
||||
post-install:
|
||||
@${ECHO} "===> Displaying pkg-message."
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
@ -1,4 +0,0 @@
|
||||
SHA256 (xorg/driver/bsdwacom-40.tbz) = 42c37d321768ff29fef10eb088a87a83c94753a1b4ae5f92fd453781039a5df9
|
||||
SIZE (xorg/driver/bsdwacom-40.tbz) = 19305
|
||||
SHA256 (xorg/driver/xf86-input-wacom-0.15.0.tar.bz2) = 2e9b64c30fb223c46407bd0e105a54a1e83f378eb33ac68bd8a73fdbface000f
|
||||
SIZE (xorg/driver/xf86-input-wacom-0.15.0.tar.bz2) = 528528
|
@ -1,11 +0,0 @@
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -56,7 +56,7 @@ PKG_CHECK_MODULES(XORG, [xorg-server >=
|
||||
PKG_CHECK_MODULES(X11, x11 xi xrandr)
|
||||
|
||||
# Obtain compiler/linker options for libudev used by ISDV4 code
|
||||
-PKG_CHECK_MODULES(UDEV, libudev)
|
||||
+#PKG_CHECK_MODULES(UDEV, libudev)
|
||||
|
||||
# X Server SDK location is required to install wacom header files
|
||||
# This location is also relayed in the xorg-wacom.pc file
|
@ -1,40 +0,0 @@
|
||||
--- src/Makefile.in.orig
|
||||
+++ src/Makefile.in
|
||||
@@ -97,7 +97,7 @@ am__base_list = \
|
||||
am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"
|
||||
LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES)
|
||||
@DRIVER_NAME@_drv_la_LIBADD =
|
||||
-am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo wcmISDV4.lo \
|
||||
+am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo \
|
||||
wcmFilter.lo wcmUSB.lo wcmXCommand.lo wcmValidateDevice.lo \
|
||||
wcmTouchFilter.lo
|
||||
am_@DRIVER_NAME@_drv_la_OBJECTS = $(am__objects_1)
|
||||
@@ -291,7 +291,6 @@ DRIVER_SOURCES = \
|
||||
$(top_srcdir)/src/xf86Wacom.h \
|
||||
$(top_srcdir)/src/wcmCommon.c \
|
||||
$(top_srcdir)/src/wcmConfig.c \
|
||||
- $(top_srcdir)/src/wcmISDV4.c \
|
||||
$(top_srcdir)/src/wcmFilter.c \
|
||||
$(top_srcdir)/src/wcmFilter.h \
|
||||
$(top_srcdir)/src/xf86WacomDefs.h \
|
||||
@@ -383,7 +382,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmCommon.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmConfig.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmFilter.Plo@am__quote@
|
||||
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmISDV4.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmTouchFilter.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmUSB.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmValidateDevice.Plo@am__quote@
|
||||
@@ -467,12 +465,7 @@ wcmConfig.lo: $(top_srcdir)/src/wcmConfi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c
|
||||
|
||||
-wcmISDV4.lo: $(top_srcdir)/src/wcmISDV4.c
|
||||
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmISDV4.lo -MD -MP -MF $(DEPDIR)/wcmISDV4.Tpo -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
|
||||
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wcmISDV4.Tpo $(DEPDIR)/wcmISDV4.Plo
|
||||
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/wcmISDV4.c' object='wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
|
||||
|
||||
wcmFilter.lo: $(top_srcdir)/src/wcmFilter.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmFilter.lo -MD -MP -MF $(DEPDIR)/wcmFilter.Tpo -c -o wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c
|
@ -1,16 +0,0 @@
|
||||
--- src/wcmConfig.c.orig
|
||||
+++ src/wcmConfig.c
|
||||
@@ -373,9 +373,12 @@ wcmDetectDeviceClass(const InputInfoPtr
|
||||
return TRUE;
|
||||
|
||||
/* Bluetooth is also considered as USB */
|
||||
+#if 0
|
||||
if (gWacomISDV4Device.Detect(pInfo))
|
||||
common->wcmDevCls = &gWacomISDV4Device;
|
||||
- else if (gWacomUSBDevice.Detect(pInfo))
|
||||
+ else
|
||||
+#endif
|
||||
+ if (gWacomUSBDevice.Detect(pInfo))
|
||||
common->wcmDevCls = &gWacomUSBDevice;
|
||||
else
|
||||
xf86Msg(X_ERROR, "%s: cannot identify device class.\n", pInfo->name);
|
@ -1,11 +0,0 @@
|
||||
--- tools/Makefile.in.orig
|
||||
+++ tools/Makefile.in
|
||||
@@ -54,6 +54,6 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
-bin_PROGRAMS = xsetwacom$(EXEEXT) isdv4-serial-debugger$(EXEEXT)
|
||||
+bin_PROGRAMS = xsetwacom$(EXEEXT)
|
||||
@UNITTESTS_TRUE@check_PROGRAMS = xsetwacom-test$(EXEEXT)
|
||||
subdir = tools
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
@ -1,12 +0,0 @@
|
||||
To setup the wacom driver for X run the following commands as the root user:
|
||||
# %%PREFIX%%/etc/rc.d/wacom onesetup
|
||||
|
||||
Now open your xorg.conf file and check weather the correct serial device
|
||||
was chosen. If you are using a USB to serial converter you might have
|
||||
to change it to cuaUX.
|
||||
|
||||
You can clean up the Xorg configuration by running the following command
|
||||
before deinstalling:
|
||||
# %%PREFIX%%/etc/rc.d/wacom onecleanup
|
||||
|
||||
Now (re)plug in your tablet and restart X.
|
@ -1,16 +0,0 @@
|
||||
To setup the wacom driver for X and start the kernel module upon boot
|
||||
run the following commands as the root user:
|
||||
|
||||
# echo 'wacom_enable="YES"' >> /etc/rc.conf
|
||||
# %%PREFIX%%/etc/rc.d/wacom setup
|
||||
|
||||
You can unload the driver and clean up the Xorg configuration by
|
||||
running the following lines before deinstalling:
|
||||
# %%PREFIX%%/etc/rc.d/wacom cleanup
|
||||
# %%PREFIX%%/etc/rc.d/wacom stop
|
||||
|
||||
To activate the driver without rebooting run:
|
||||
|
||||
# %%PREFIX%%/etc/rc.d/wacom start
|
||||
|
||||
Now (re)plug in your tablet and restart X.
|
@ -1,433 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: wacom
|
||||
# REQUIRE: FILESYSTEMS
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# wacom_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable wacom.
|
||||
# wacom_types (list): Set to "stylus eraser cursor pad touch" by
|
||||
# default. A list of wacom profiles to set up.
|
||||
# wacom_porttype (enum): Set to "%%PORTTYPE%%" by default.
|
||||
# Set this to usb or serial.
|
||||
#
|
||||
# This script additionally offers setup and cleanup to configure Xorg
|
||||
# for use of the driver or remove the configuration settings.
|
||||
# The input devices are only added to the first ServerLayout section
|
||||
# and also only removed once.
|
||||
# In USB mode the file /boot/loader.conf is also adjusted.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="wacom"
|
||||
rcvar=wacom_enable
|
||||
|
||||
extra_commands="setup cleanup"
|
||||
setup_cmd=do_setup
|
||||
start_cmd=do_start
|
||||
stop_cmd=do_stop
|
||||
cleanup_cmd=do_cleanup
|
||||
|
||||
#
|
||||
# Outputs the location of the Xorg configuration file.
|
||||
# Returns 1 if no file could be found.
|
||||
#
|
||||
get_xorg_conf() {
|
||||
local config_locations config
|
||||
|
||||
# Possible Xorg configuration file locations, taken from the
|
||||
# xorg.conf(5) manual page.
|
||||
config_locations="
|
||||
/etc/X11/$XORGCONFIG
|
||||
%%PREFIX%%/etc/X11/$XORGCONFIG
|
||||
/etc/X11/xorg.conf-4
|
||||
/etc/X11/xorg.conf
|
||||
/etc/xorg.conf
|
||||
%%PREFIX%%/etc/X11/xorg.conf.$HOST
|
||||
%%PREFIX%%/etc/X11/xorg.conf-4
|
||||
%%PREFIX%%/etc/X11/xorg.conf
|
||||
%%PREFIX%%/lib/X11/xorg.conf.$HOST
|
||||
%%PREFIX%%/lib/X11/xorg.conf-4
|
||||
%%PREFIX%%/lib/X11/xorg.conf
|
||||
NONE
|
||||
"
|
||||
|
||||
# Find the first matching config file.
|
||||
for config in $config_locations; {
|
||||
test -f "$config" && break
|
||||
}
|
||||
|
||||
if [ "$config" = "NONE" ]; then
|
||||
echo "No Xorg configuration has been found." 1>&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$config"
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the line number of the first line matching the extended regular
|
||||
# expression $2 in the file $1.
|
||||
#
|
||||
# @param $1
|
||||
# The file to get the line number from.
|
||||
# @param $2
|
||||
# An extend regular expression.
|
||||
# @stdout
|
||||
# The line number of the first line matching $2.
|
||||
#
|
||||
get_first() {
|
||||
local result IFS
|
||||
IFS='
|
||||
'
|
||||
result="$(/usr/bin/grep -Ein "$2" "$1")"
|
||||
result="${result%%:*}"
|
||||
|
||||
# No match.
|
||||
if [ -z "$result" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$result"
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the line numbers of lines matching the extended regular
|
||||
# expression $2 in the file $1.
|
||||
#
|
||||
# @param $1
|
||||
# The file to get the line numbers from.
|
||||
# @param $2
|
||||
# An extend regular expression.
|
||||
# @stdout
|
||||
# The line numbers of lines matching $2.
|
||||
#
|
||||
get_all() {
|
||||
local entry result IFS
|
||||
IFS='
|
||||
'
|
||||
|
||||
result="$(/usr/bin/grep -Ein "$2" "$1")"
|
||||
|
||||
# No match.
|
||||
if [ -z "$result" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
for entry in $result; {
|
||||
echo "${entry%%:*}"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the line number of the line before line number $2 that matches the
|
||||
# extended regular expression $3 in the file $1.
|
||||
#
|
||||
# @param $1
|
||||
# The file to get the line number from.
|
||||
# @param $2
|
||||
# The line before which the expression should match.
|
||||
# @param $3
|
||||
# An extend regular expression.
|
||||
# @stdout
|
||||
# The line number of the first line before line $2 matching $3.
|
||||
#
|
||||
get_before() {
|
||||
local result IFS line length
|
||||
IFS='
|
||||
'
|
||||
|
||||
# The length is necessary to make sure the check is run once
|
||||
# again for the last match.
|
||||
length="$(/usr/bin/wc -l "$1")"
|
||||
length=${length% *}
|
||||
|
||||
result=-1
|
||||
for line in $(/usr/bin/grep -Ein "$3" "$1") $(($length + 1)); {
|
||||
line="${line%%:*}"
|
||||
|
||||
# We have passed the line to look for.
|
||||
if [ $line -ge $2 ]; then
|
||||
|
||||
# No match before this line.
|
||||
if [ $result -lt 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$result"
|
||||
return 0
|
||||
fi
|
||||
|
||||
result=$line
|
||||
}
|
||||
|
||||
# No result.
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the line number of the line behind line number $2 that matches the
|
||||
# extended regular expression $3 in the file $1.
|
||||
#
|
||||
# @param $1
|
||||
# The file to get the line number from.
|
||||
# @param $2
|
||||
# The line behind which the expression should match.
|
||||
# @param $3
|
||||
# An extend regular expression.
|
||||
# @stdout
|
||||
# The line number of the first line behind line $2 matching $3.
|
||||
#
|
||||
get_behind() {
|
||||
local IFS line
|
||||
IFS='
|
||||
'
|
||||
|
||||
for line in $(/usr/bin/grep -Ein "$3" "$1"); {
|
||||
line="${line%%:*}"
|
||||
|
||||
# We have passed the line to look for.
|
||||
if [ $line -gt $2 ]; then
|
||||
echo "$line"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# No result.
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Inserts a line at the end of a section of an Xorg configuration file.
|
||||
# The insertion is done on all matching sections!
|
||||
#
|
||||
section_insert_line() {
|
||||
local file section insert sections begin end length
|
||||
file="$1"
|
||||
section="$2"
|
||||
insert="$3"
|
||||
|
||||
# Find the beginning of the section.
|
||||
# Start with the last section to avoid moving sections around
|
||||
# before something is inserted into them.
|
||||
sections="$(get_all "$file" \
|
||||
"^[[:space:]]*Section[[:space:]]+\"$section\"" \
|
||||
| /usr/bin/sort -nr
|
||||
)"
|
||||
|
||||
if [ -z "$sections" ]; then
|
||||
echo "Identifying section $section has failed." 1>&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
for begin in $sections; {
|
||||
|
||||
# Find the end of the section.
|
||||
end="$(get_behind "$file" "$begin" "^[[:space:]]*EndSection")"
|
||||
|
||||
if [ -z "$end" ]; then
|
||||
echo "The section $section($begin) is not closed." 1>&2
|
||||
return 2
|
||||
fi
|
||||
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$file")"
|
||||
length=${length% *}
|
||||
|
||||
# Insert the line.
|
||||
/bin/cp "$file" "$file.$$"
|
||||
|
||||
/usr/bin/head -n$(($end - 1)) "$file.$$" > "$file"
|
||||
echo "$insert" >> "$file"
|
||||
/usr/bin/tail -n$(($length - $end + 1)) "$file.$$" >> "$file"
|
||||
|
||||
/bin/rm "$file.$$"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Adds the necessary lines to the Xorg configuration.
|
||||
#
|
||||
do_setup() {
|
||||
local config ident status
|
||||
|
||||
# Get the Xorg configuration file.
|
||||
config="$(get_xorg_conf)"
|
||||
status=$?
|
||||
test $status -ne 0 && return $status
|
||||
|
||||
echo "Setting up configuration in $config."
|
||||
|
||||
# Add all the necessary sections.
|
||||
for ident in $(eval "echo \${${name}_types}"); {
|
||||
if /usr/bin/grep -Eqi "^[[:space:]]*Identifier[[:space:]]+\"$ident\"" "$config"; then
|
||||
echo "Skipping $ident, because it already exists in $config."
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Inserting $ident."
|
||||
|
||||
echo "Section \"InputDevice\"
|
||||
Driver \"wacom\"
|
||||
Identifier \"$ident\"
|
||||
Option \"Type\" \"$ident\"" >> "$config"
|
||||
|
||||
if [ "$(eval "echo \${${name}_porttype}")" = "usb" ]; then
|
||||
echo " Option \"Device\" \"/dev/event0\"
|
||||
Option \"USB\" \"on\"" >> "$config"
|
||||
else
|
||||
echo " Option \"Device\" \"/dev/ttyd0\"
|
||||
Option \"ForceDevice\" \"ISDV4\"" >> "$config"
|
||||
fi
|
||||
|
||||
echo "EndSection
|
||||
" >> "$config"
|
||||
|
||||
section_insert_line "$config" "ServerLayout" " InputDevice \"$ident\" \"SendCoreEvents\""
|
||||
}
|
||||
|
||||
if [ "$(eval "echo \${${name}_porttype}")" = "usb" ]; then
|
||||
if ! /usr/bin/grep -qx 'uwacom_load="YES"' \
|
||||
/boot/loader.conf; then
|
||||
echo "Setting up /boot/loader.conf"
|
||||
/bin/cp /boot/loader.conf /boot/loader.conf.orig
|
||||
echo 'uwacom_load="YES"' >> /boot/loader.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Removes all wacom stuff from the Xorg configuration file. Beware,
|
||||
# this also affects handwritten content.
|
||||
#
|
||||
do_cleanup() {
|
||||
local config status driver i begin last_begin end length ident IFS
|
||||
|
||||
# Get the Xorg configuration file.
|
||||
config="$(get_xorg_conf)"
|
||||
status=$?
|
||||
test $status -ne 0 && return $status
|
||||
|
||||
echo "Removing wacom entries from $config."
|
||||
|
||||
IFS='
|
||||
'
|
||||
while true; do
|
||||
# Find a wacom section.
|
||||
driver="$(get_first "$config" \
|
||||
"^[[:space:]]*Driver[[:space:]]+\"wacom\"" \
|
||||
)"
|
||||
|
||||
# Not a numeric, no more wacom sections left.
|
||||
test -z "$driver" && break
|
||||
|
||||
# Find the beginning of the section.
|
||||
begin="$(get_before "$config" "$driver" \
|
||||
"^[[:space:]]*Section[[:space:]]+\"InputDevice\"" \
|
||||
)"
|
||||
|
||||
if [ -z "$begin" ]; then
|
||||
echo "Beginning of wacom driver section" \
|
||||
"could not be found!" 1>&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Find the end of the section.
|
||||
end="$(get_behind "$config" "$driver" \
|
||||
"^[[:space:]]*EndSection" \
|
||||
)"
|
||||
|
||||
if [ -z "$end" ]; then
|
||||
echo "The Wacom driver section is" \
|
||||
"not closed properly." 1>&2
|
||||
return 2
|
||||
fi
|
||||
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$config")"
|
||||
length=${length% *}
|
||||
|
||||
# Adjust the end by trailing newlines.
|
||||
while [ $end -lt $length -a \
|
||||
-z "$(/usr/bin/tail -n$(($length - $end)) "$config" \
|
||||
| /usr/bin/head -n1)" ]; do
|
||||
end=$(($end + 1))
|
||||
done
|
||||
|
||||
# Remove the section.
|
||||
/bin/cp "$config" "$config.$$"
|
||||
|
||||
/usr/bin/head -n$(($begin - 1)) "$config.$$" > "$config"
|
||||
/usr/bin/tail -n$(($length - $end)) "$config.$$" >> "$config"
|
||||
|
||||
/bin/rm "$config.$$"
|
||||
done
|
||||
IFS='
|
||||
'
|
||||
|
||||
echo "Cleaning up ServerLayout section."
|
||||
|
||||
for ident in $(eval "echo \${${name}_types}"); {
|
||||
while true; do
|
||||
driver="$(get_first "$config" \
|
||||
"[[:space:]]*InputDevice[[:space:]]+\"$ident\"" \
|
||||
)"
|
||||
|
||||
# There is no line matching this driver.
|
||||
test -z "$driver" && break
|
||||
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$config")"
|
||||
length=${length% *}
|
||||
|
||||
# Remove the section.
|
||||
/bin/cp "$config" "$config.$$"
|
||||
|
||||
/usr/bin/head -n$(($driver - 1)) "$config.$$" > "$config"
|
||||
/usr/bin/tail -n$(($length - $driver)) "$config.$$" >> "$config"
|
||||
|
||||
/bin/rm "$config.$$"
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$(eval "echo \${${name}_porttype}")" = "usb" ]; then
|
||||
if /usr/bin/grep -qx 'uwacom_load="YES"' \
|
||||
/boot/loader.conf; then
|
||||
echo "Cleaning up /boot/loader.conf"
|
||||
/bin/cp /boot/loader.conf /boot/loader.conf.orig
|
||||
/usr/bin/grep -xv 'uwacom_load="YES"' \
|
||||
/boot/loader.conf.orig > /boot/loader.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
do_start() {
|
||||
if /sbin/kldstat | /usr/bin/grep -q uwacom; then
|
||||
return 0
|
||||
fi
|
||||
echo "Starting ${name}."
|
||||
/sbin/kldload %%KMODDIR%%/uwacom.ko
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
if ! /sbin/kldstat | /usr/bin/grep -q uwacom; then
|
||||
echo "${name} is not running."
|
||||
return 0
|
||||
fi
|
||||
echo "Stopping ${name}."
|
||||
/sbin/kldunload %%KMODDIR%%/uwacom.ko
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
eval ": \${${name}_enable=\"NO\"}"
|
||||
eval ": \${${name}_types=\"stylus eraser cursor pad touch\"}"
|
||||
eval ": \${${name}_porttype=\"%%PORTTYPE%%\"}"
|
||||
|
||||
run_rc_command "$1"
|
@ -1,14 +0,0 @@
|
||||
This package contains the X.Org linuxwacom driver, a Wacom kernel module
|
||||
and a script to configure Xorg.
|
||||
|
||||
The kernel module is provided by Bartosz Fabianowski <freebsd@chillt.de> and
|
||||
supports the following devices:
|
||||
Graphire*, Graphire2*, Graphire3, Graphire4
|
||||
Bamboo, Bamboo One*, Bamboo Fun
|
||||
Intuos3, Cintiq 21UX
|
||||
Volito*, Volito2*
|
||||
PenStation2*, PenPartner2*
|
||||
|
||||
* not tested
|
||||
|
||||
WWW: http://linuxwacom.sourceforge.net/
|
@ -1,5 +0,0 @@
|
||||
bin/xsetwacom
|
||||
%%XINPUTMODDIR%%/wacom_drv.so
|
||||
@dirrmtry %%XINPUTMODDIR%%
|
||||
@cwd %%KMODDIR%%
|
||||
%%UWACOMKLD%%
|
38
x11-drivers/xf86-input-wacom/Makefile
Normal file
38
x11-drivers/xf86-input-wacom/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= xf86-input-wacom
|
||||
PORTVERSION= 0.24.99.1
|
||||
CATEGORIES= x11-drivers
|
||||
MASTER_SITES= SF/linuxwacom/${PORTNAME}
|
||||
|
||||
MAINTAINER= jbeich@vfemail.net
|
||||
COMMENT= X.Org Wacom tablet driver
|
||||
|
||||
BUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat
|
||||
RUN_DEPENDS= webcamd>0:${PORTSDIR}/multimedia/webcamd
|
||||
|
||||
USES= tar:bzip2 pathfix pkgconfig libtool
|
||||
USE_XORG= xrandr xinerama
|
||||
XORG_CAT= driver
|
||||
SUB_FILES= pkg-message
|
||||
CONFIGURE_ARGS= --without-systemd-unit-dir \
|
||||
--without-udev-rules-dir \
|
||||
--without-doxygen
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's/as_fn_error.*udev/${TRUE} &/' \
|
||||
-e 's/dir=.*xorg-server/& \
|
||||
--define-variable prefix="$$prefix"/' \
|
||||
${WRKSRC}/configure
|
||||
|
||||
# XXX adjust MatchProduct to whatever Xorg/devd reports
|
||||
@${REINPLACE_CMD} -e '/^SUBDIRS/s/ conf//' \
|
||||
${WRKSRC}/Makefile.in
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/xorg/modules/input/wacom_drv.so
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
|
||||
${INSTALL_DATA} ${FILESDIR}/wacom.conf.sample \
|
||||
${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
|
||||
|
||||
.include <bsd.port.mk>
|
2
x11-drivers/xf86-input-wacom/distinfo
Normal file
2
x11-drivers/xf86-input-wacom/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (xorg/driver/xf86-input-wacom-0.24.99.1.tar.bz2) = 4b68b1570bd6ce085010980fa1842825e5d676cd2962ec6ad2d7d5bc52149983
|
||||
SIZE (xorg/driver/xf86-input-wacom-0.24.99.1.tar.bz2) = 586002
|
19
x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c
Normal file
19
x11-drivers/xf86-input-wacom/files/patch-src-wcmConfig.c
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/wcmConfig.c~
|
||||
+++ src/wcmConfig.c
|
||||
@@ -307,7 +307,7 @@ out:
|
||||
*/
|
||||
static void wcmSplitName(char* devicename, char *basename, char *subdevice, char *tool, size_t len)
|
||||
{
|
||||
- char *name = strdupa(devicename);
|
||||
+ char *name = strdup(devicename);
|
||||
char *a, *b;
|
||||
|
||||
*basename = *subdevice = *tool = '\0';
|
||||
@@ -325,6 +325,7 @@ static void wcmSplitName(char* devicenam
|
||||
strncat(tool, a+1, len-1);
|
||||
}
|
||||
strncat(basename, name, len-1);
|
||||
+ free(name);
|
||||
}
|
||||
|
||||
/**
|
83
x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c
Normal file
83
x11-drivers/xf86-input-wacom/files/patch-src-wcmISDV4.c
Normal file
@ -0,0 +1,83 @@
|
||||
--- src/wcmISDV4.c~
|
||||
+++ src/wcmISDV4.c
|
||||
@@ -24,11 +24,16 @@
|
||||
#include "xf86Wacom.h"
|
||||
#include <xf86_OSproc.h>
|
||||
#include "wcmFilter.h"
|
||||
-#include <linux/serial.h>
|
||||
#include "isdv4.h"
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+#include <linux/serial.h>
|
||||
#include <libudev.h>
|
||||
+#else
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
|
||||
#define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0)
|
||||
|
||||
@@ -192,10 +197,15 @@ static int wcmSerialValidate(InputInfoPt
|
||||
|
||||
static Bool isdv4Detect(InputInfoPtr pInfo)
|
||||
{
|
||||
- struct serial_struct ser;
|
||||
int rc;
|
||||
|
||||
+#ifdef __linux__
|
||||
+ struct serial_struct ser;
|
||||
rc = ioctl(pInfo->fd, TIOCGSERIAL, &ser);
|
||||
+#else
|
||||
+ struct termios termAttr;
|
||||
+ rc = tcgetattr(pInfo->fd, &termAttr);
|
||||
+#endif
|
||||
if (rc == -1)
|
||||
return FALSE;
|
||||
|
||||
@@ -959,6 +969,7 @@ static Bool get_keys_vendor_tablet_id(ch
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
/**
|
||||
* Return the content of id file from sysfs: /sys/.../device/id
|
||||
*
|
||||
@@ -1004,6 +1015,7 @@ out:
|
||||
|
||||
return ret;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* Query the device's fd for the key bits and the tablet ID. Returns the ID
|
||||
@@ -1018,11 +1030,16 @@ out:
|
||||
*/
|
||||
static int isdv4ProbeKeys(InputInfoPtr pInfo)
|
||||
{
|
||||
- struct serial_struct tmp;
|
||||
WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
|
||||
WacomCommonPtr common = priv->common;
|
||||
|
||||
+#ifdef __linux__
|
||||
+ struct serial_struct tmp;
|
||||
if (ioctl(pInfo->fd, TIOCGSERIAL, &tmp) < 0)
|
||||
+#else
|
||||
+ struct termios tmp;
|
||||
+ if (tcgetattr(pInfo->fd, &tmp) < 0)
|
||||
+#endif
|
||||
return 0;
|
||||
|
||||
common->tablet_id = 0x90;
|
||||
@@ -1037,9 +1054,11 @@ static int isdv4ProbeKeys(InputInfoPtr p
|
||||
common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC;
|
||||
|
||||
if (!get_keys_vendor_tablet_id(pInfo->name, common)) {
|
||||
+#ifdef __linux__
|
||||
char buf[15] = {0};
|
||||
if (get_sysfs_id(pInfo, buf, sizeof(buf)))
|
||||
get_keys_vendor_tablet_id(buf, common);
|
||||
+#endif
|
||||
}
|
||||
|
||||
return common->tablet_id;
|
@ -1,15 +1,15 @@
|
||||
--- src/wcmUSB.c.orig
|
||||
--- src/wcmUSB.c~
|
||||
+++ src/wcmUSB.c
|
||||
@@ -23,10 +23,17 @@
|
||||
|
||||
#include "xf86Wacom.h"
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
+#ifdef __linux__
|
||||
#include <asm/types.h>
|
||||
+#endif
|
||||
#include <linux/input.h>
|
||||
#include <sys/utsname.h>
|
||||
+#ifndef __FreeBSD__
|
||||
+#ifdef __linux__
|
||||
#include <linux/version.h>
|
||||
+#else
|
||||
+#define LINUX_VERSION_CODE 1
|
@ -1,10 +1,10 @@
|
||||
--- src/xf86WacomDefs.h.orig
|
||||
--- src/xf86WacomDefs.h~
|
||||
+++ src/xf86WacomDefs.h
|
||||
@@ -24,7 +24,9 @@
|
||||
* General Defines
|
||||
****************************************************************************/
|
||||
#include <wacom-util.h>
|
||||
+#ifndef __FreeBSD__
|
||||
+#ifdef __linux__
|
||||
#include <asm/types.h>
|
||||
+#endif
|
||||
#include <linux/input.h>
|
@ -0,0 +1,10 @@
|
||||
--- tools/isdv4-serial-debugger.c~
|
||||
+++ tools/isdv4-serial-debugger.c
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <linux/serial.h>
|
||||
#include <getopt.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
@ -0,0 +1,71 @@
|
||||
--- tools/isdv4-serial-inputattach.c~
|
||||
+++ tools/isdv4-serial-inputattach.c
|
||||
@@ -23,8 +23,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
+#ifdef __linux__
|
||||
#include <linux/serio.h>
|
||||
#include <libudev.h>
|
||||
+#endif
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
@@ -49,7 +52,11 @@ static void usage(void)
|
||||
"--verbose - verbose output\n"
|
||||
"--version - version info\n"
|
||||
"--baudrate <19200|38400> - set baudrate\n",
|
||||
+#ifdef __GLIBC__
|
||||
program_invocation_short_name
|
||||
+#else
|
||||
+ getprogname()
|
||||
+#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,6 +71,7 @@ static int set_line_discipline(int fd, i
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#ifdef __linux
|
||||
static int bind_kernel_driver(int fd)
|
||||
{
|
||||
unsigned long devt;
|
||||
@@ -77,9 +85,11 @@ static int bind_kernel_driver(int fd)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int get_baud_rate(int fd)
|
||||
{
|
||||
+#ifdef __linux__
|
||||
struct stat st;
|
||||
int baudrate = 19200;
|
||||
int id;
|
||||
@@ -112,6 +122,9 @@ int get_baud_rate(int fd)
|
||||
udev_unref(udev);
|
||||
|
||||
return baudrate;
|
||||
+#else
|
||||
+ return 19200;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void sighandler(int signum)
|
||||
@@ -194,6 +207,7 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
/* some of the 19200 tablets can't set the line discipline */
|
||||
set_line_discipline(fd, N_MOUSE);
|
||||
|
||||
@@ -201,6 +215,7 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "Failed to bind the kernel driver.\n");
|
||||
goto out;
|
||||
}
|
||||
+#endif
|
||||
|
||||
signal(SIGINT, sighandler);
|
||||
signal(SIGHUP, sighandler);
|
@ -0,0 +1,34 @@
|
||||
--- tools/tools-shared.c~
|
||||
+++ tools/tools-shared.c
|
||||
@@ -23,7 +23,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#ifdef __linux__
|
||||
#include <linux/serial.h>
|
||||
+#endif
|
||||
#include <getopt.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
@@ -51,7 +53,6 @@ void version(void)
|
||||
int open_device(const char *path)
|
||||
{
|
||||
int fd;
|
||||
- struct serial_struct ser;
|
||||
|
||||
TRACE("Opening device '%s'.\n", path);
|
||||
fd = open(path, O_RDWR | O_NOCTTY);
|
||||
@@ -59,7 +60,13 @@ int open_device(const char *path)
|
||||
if (fd < 1)
|
||||
perror("Failed to open device file");
|
||||
|
||||
+#ifdef __linux__
|
||||
+ struct serial_struct ser;
|
||||
if (ioctl(fd, TIOCGSERIAL, &ser) == -1)
|
||||
+#else
|
||||
+ struct termios termAttr;
|
||||
+ if (tcgetattr(fd, &termAttr) == -1)
|
||||
+#endif
|
||||
{
|
||||
perror("Not a serial device?");
|
||||
close(fd);
|
13
x11-drivers/xf86-input-wacom/files/pkg-message.in
Normal file
13
x11-drivers/xf86-input-wacom/files/pkg-message.in
Normal file
@ -0,0 +1,13 @@
|
||||
To configure the driver with HAL just reattach the tablet for Xserver
|
||||
to pick it up. Otherwise, use/edit the sample configuration file:
|
||||
|
||||
$ cd %%PREFIX%%/etc/X11/xorg.conf.d/
|
||||
$ cp wacom.conf.sample wacom.conf
|
||||
|
||||
On xorg-server-1.7 and earlier you may need to also merge wacom.conf
|
||||
into xorg.conf and add the following lines to ServerLayout section
|
||||
|
||||
InputDevice "wacom stylus"
|
||||
InputDevice "wacom eraser"
|
||||
InputDevice "wacom touch"
|
||||
InputDevice "wacom pad"
|
33
x11-drivers/xf86-input-wacom/files/wacom.conf.sample
Normal file
33
x11-drivers/xf86-input-wacom/files/wacom.conf.sample
Normal file
@ -0,0 +1,33 @@
|
||||
# A static configuration example for Bamboo P&T for use without HAL.
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "wacom stylus"
|
||||
Driver "wacom"
|
||||
Option "Type" "stylus"
|
||||
Option "Device" "/dev/input/event0"
|
||||
Option "AutoServerLayout" "true"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "wacom eraser"
|
||||
Driver "wacom"
|
||||
Option "Type" "eraser"
|
||||
Option "Device" "/dev/input/event0"
|
||||
Option "AutoServerLayout" "true"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "wacom touch"
|
||||
Driver "wacom"
|
||||
Option "Type" "touch"
|
||||
Option "Device" "/dev/input/event1"
|
||||
Option "AutoServerLayout" "true"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "wacom pad"
|
||||
Driver "wacom"
|
||||
Option "Type" "pad"
|
||||
Option "Device" "/dev/input/event1"
|
||||
Option "AutoServerLayout" "true"
|
||||
EndSection
|
4
x11-drivers/xf86-input-wacom/pkg-descr
Normal file
4
x11-drivers/xf86-input-wacom/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
An X.Org driver for Wacom tablets. It communicates with a character
|
||||
device provided by linux kernel driver in webcamd.
|
||||
|
||||
WWW: http://linuxwacom.sourceforge.net/
|
19
x11-drivers/xf86-input-wacom/pkg-plist
Normal file
19
x11-drivers/xf86-input-wacom/pkg-plist
Normal file
@ -0,0 +1,19 @@
|
||||
bin/isdv4-serial-debugger
|
||||
bin/isdv4-serial-inputattach
|
||||
bin/xsetwacom
|
||||
@comment not marked @sample due to conflict with HAL
|
||||
etc/X11/xorg.conf.d/wacom.conf.sample
|
||||
include/xorg/Xwacom.h
|
||||
include/xorg/isdv4.h
|
||||
include/xorg/wacom-properties.h
|
||||
include/xorg/wacom-util.h
|
||||
lib/xorg/modules/input/wacom_drv.so
|
||||
libdata/pkgconfig/xorg-wacom.pc
|
||||
man/man1/xsetwacom.1.gz
|
||||
man/man4/wacom.4x.gz
|
||||
@dirrmtry lib/xorg/modules/input
|
||||
@dirrmtry lib/xorg/modules
|
||||
@dirrmtry lib/xorg
|
||||
@dirrmtry include/xorg
|
||||
@dirrmtry etc/X11/xorg.conf.d
|
||||
@dirrmtry etc/X11
|
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= xorg-drivers
|
||||
PORTVERSION= 7.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-drivers
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
@ -26,7 +27,8 @@ INPUT_DRIVERS= mouse \
|
||||
penmount \
|
||||
synaptics \
|
||||
vmmouse \
|
||||
void
|
||||
void \
|
||||
wacom
|
||||
|
||||
VIDEO_DRIVERS= ati \
|
||||
mach64 \
|
||||
|
Loading…
Reference in New Issue
Block a user