Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Nov 2008 20:38:31 GMT
From:      Dominic Fandrey <kamikaze@bsdforen.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/128547: [new port] x11-drivers/xf86-input-wacom
Message-ID:  <200811022038.mA2KcVLd032024@www.freebsd.org>
Resent-Message-ID: <200811022040.mA2Ke1VZ027293@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         128547
>Category:       ports
>Synopsis:       [new port] x11-drivers/xf86-input-wacom
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 02 20:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dominic Fandrey
>Release:        RELENG_7
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Tue Oct 28 10:36:18 CET 2008     root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b  amd64
>Description:
Kernel module and X driver for various Wacom tablet devices.
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ports/x11-drivers/xf86-input-wacom
#	ports/x11-drivers/xf86-input-wacom/Makefile
#	ports/x11-drivers/xf86-input-wacom/distinfo
#	ports/x11-drivers/xf86-input-wacom/pkg-descr
#	ports/x11-drivers/xf86-input-wacom/files
#	ports/x11-drivers/xf86-input-wacom/files/wacom.in
#	ports/x11-drivers/xf86-input-wacom/pkg-plist
#	ports/x11-drivers/xf86-input-wacom/pkg-message
#
echo c - ports/x11-drivers/xf86-input-wacom
mkdir -p ports/x11-drivers/xf86-input-wacom > /dev/null 2>&1
echo x - ports/x11-drivers/xf86-input-wacom/Makefile
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/Makefile << '2c8ac90824175dfffa7ed05f34e7748e'
X# New ports collection makefile for:	xf86-input-wacom
X# Date Created:				24 Oct 2008
X# Whom:					Dominic Fandrey <kamikaze@bsdforen.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	xf86-input-wacom
XPORTVERSION=	${WACOM_VERSION:C/-/./g}.${KLD_VERSION}
XCATEGORIES=	x11-drivers kld
XMASTER_SITES=	http://www.chillt.de/ \
X		${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	\
X		linuxwacom
XDISTFILES=	bsdwacom.tbz \
X		${LINUXWACOM}.tar.bz2
XEXTRACT_ONLY=	bsdwacom.tbz
X
XMAINTAINER=	kamikaze@bsdforen.de
XCOMMENT=	X.Org Wacom tablet driver and kernel module
X
XMAN4=		wacom.4x
XMANCOMPRESSED=	yes
X
XUSE_GMAKE=	yes
XUSE_RC_SUBR=	wacom
X
XPLIST_SUB=	DESTDIR=${DESTDIR}
X
XXORG_CAT=	driver
X
XLINUXWACOM=	linuxwacom-${WACOM_VERSION}
XWACOM_VERSION=	0.8.1-3
XKLD_VERSION=	2008.11.02
X
Xdo-configure:
X	@cd ${WRKDIR}/linuxwacom \
X		&& ${LN} -s ${DISTDIR}/${LINUXWACOM}.tar.bz2 \
X		&& ./run_configure
X
Xdo-build:
X	@cd ${WRKDIR}/uwacom \
X		&& ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
X	@cd ${WRKDIR}/linuxwacom/${LINUXWACOM} \
X		&& ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS}
X
Xdo-install:
X	@${INSTALL} ${WRKDIR}/uwacom/uwacom.ko ${DESTDIR}/boot/modules/
X	@${INSTALL} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/xdrv/wacom_drv.so \
X		${PREFIX}/lib/xorg/modules/input/
X	@${INSTALL_MAN} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/wacom.4x.gz \
X		${PREFIX}/man/man4/
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
2c8ac90824175dfffa7ed05f34e7748e
echo x - ports/x11-drivers/xf86-input-wacom/distinfo
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/distinfo << 'f0832b4922279a28a93db1930c3afee1'
XMD5 (xorg/driver/bsdwacom.tbz) = 94cb1823723dc7f260c4cf385941f9bd
XSHA256 (xorg/driver/bsdwacom.tbz) = b2697c87d55976ea52acbd1d2296b9d066b702dba7b1cd264c4799e43aa4104b
XSIZE (xorg/driver/bsdwacom.tbz) = 19951
XMD5 (xorg/driver/linuxwacom-0.8.1-3.tar.bz2) = d09b212946e321cc503adf84e243ca99
XSHA256 (xorg/driver/linuxwacom-0.8.1-3.tar.bz2) = cf1ac159d87666d16e2e3bfad81ede93e088b3bf64bb6d2d469adceb2a4c9dee
XSIZE (xorg/driver/linuxwacom-0.8.1-3.tar.bz2) = 1209228
f0832b4922279a28a93db1930c3afee1
echo x - ports/x11-drivers/xf86-input-wacom/pkg-descr
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/pkg-descr << '8458a9ec0fb3bb01a24dd1346d561afd'
XThis package contains the X.Org linuxwacom driver, a Wacom kernel module
Xand a script to configure Xorg.
X
XThe kernel module is provided by Bartosz Fabianowski <freebsd@chillt.de> and
Xsupports the following devices:
X	Graphire*, Graphire2*, Graphire3, Graphire4
X	Bamboo, Bamboo One*, Bamboo Fun
X	Intuos3, Cintiq 21UX
X	Volito*, Volito2*
X	PenStation2*, PenPartner2*
X
X* not tested
X
XWWW: http://linuxwacom.sourceforge.net/
X
X- Kamikaze
Xkamikaze@bsdforen.de
8458a9ec0fb3bb01a24dd1346d561afd
echo c - ports/x11-drivers/xf86-input-wacom/files
mkdir -p ports/x11-drivers/xf86-input-wacom/files > /dev/null 2>&1
echo x - ports/x11-drivers/xf86-input-wacom/files/wacom.in
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/files/wacom.in << 'd5245a860ec402b4007475b181b81e43'
X#!/bin/sh
X
X# PROVIDE: wacom
X# REQUIRE: FILESYSTEMS
X#
X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
X# to enable this service:
X#
X# wacom_enable (bool):   Set to NO by default.
X#               Set it to YES to enable doormand.
X#
X
X. %%RC_SUBR%%
X
Xname="wacom"
Xrcvar=${name}_enable
X
Xextra_commands=setup
Xsetup_cmd=do_setup
Xstart_cmd=do_start
Xstop_cmd=do_stop
X
Xsection_insert_line() {
X	local file section insert begin end length
X	file="$1"
X	section="$2"
X	insert="$3"
X
X	begin="$(
X		/usr/bin/grep -Ein \
X		"^[[:space:]]*Section[[:space:]]+\"$section\"" \
X		"$file"
X	)"
X	begin="${begin%%:*}"
X
X	if ! [ "$begin" -eq "$begin" ]; then
X		# Begin is not numeric, something is wrong, bail out.
X		echo "Identifying section $section has failed."
X		echo "The section has to appear exactly once."
X		return 1
X	fi
X
X	for end in $(/usr/bin/grep -Ein "^[[:space:]]*EndSection" "$file"); {
X		end="${end%%:*}"
X		test "$end" -gt "$begin" && break
X	}
X
X	if ! [ "$end" -gt "$begin" ]; then
X		echo "The section $section is not closed."
X		return 2
X	fi
X
X	length="$(/usr/bin/wc -l "$file")"
X	length=${length% *}
X
X	/bin/cp "$file" "$file.$$"
X
X	/usr/bin/head -n$(($end - 1)) "$file.$$" > "$file"
X	echo "$insert" >> "$file"
X	/usr/bin/tail -n$(($length - $end + 1)) "$file.$$" >> "$file"
X	
X	/bin/rm "$file.$$"
X}
X
Xdo_setup() {
X	local config_locations config
X
X	# Possible Xorg configuration file locations, taken from the
X	# xorg.conf(5) manual page.
X	config_locations="
X/etc/X11/$XORGCONFIG
X/usr/local/etc/X11/$XORGCONFIG
X/etc/X11/xorg.conf-4
X/etc/X11/xorg.conf
X/etc/xorg.conf
X/usr/local/etc/X11/xorg.conf.$HOST
X/usr/local/etc/X11/xorg.conf-4
X/usr/local/etc/X11/xorg.conf
X/usr/local/lib/X11/xorg.conf.$HOST
X/usr/local/lib/X11/xorg.conf-4
X/usr/local/lib/X11/xorg.conf
XNONE
X"
X
X	for config in $config_locations; {
X		test -f "$config" && break
X	}
X
X	if [ "$config" = "NONE" ]; then
X		echo "No Xorg configuration has been found."
X		return 1
X	fi
X
X	echo "Setting up configuration in $config."
X
X	for ident in stylus eraser cursor pad touch; {
X		if /usr/bin/grep -Eqi "^[[:space:]]*Identifier[[:space:]]+\"$ident\"" "$config"; then
X			echo "Skipping $ident, because it already exists in $config."
X			continue
X		fi
X
X		echo "Inserting $ident."
X
X		echo "
XSection \"InputDevice\"
X	Driver		\"wacom\"
X	Identifier	\"$ident\"
X	Option		\"Device\"	\"/dev/event0\"
X	Option		\"Type\"	\"$ident\"
X	Option		\"USB\"		\"on\"
XEndSection
X" >> "$config"
X
X		section_insert_line "$config" "ServerLayout" "	InputDevice	\"$ident\"	\"SendCoreEvents\""
X	}
X
X}
X
Xdo_start() {
X	if /sbin/kldstat | /usr/bin/grep -q uwacom; then
X		echo "${name} is already running."
X		return 0
X	fi
X	echo "Starting ${name}."
X	/sbin/kldload uwacom
X}
X
Xdo_stop() {
X	if ! /sbin/kldstat | /usr/bin/grep -q uwacom; then
X		echo "${name} is not running."
X		return 0
X	fi
X	echo "Stopping ${name}."
X	/sbin/kldunload uwacom
X}
X
Xload_rc_config $name
X
X: ${wacom_enable="NO"}
X
Xrun_rc_command "$1"
d5245a860ec402b4007475b181b81e43
echo x - ports/x11-drivers/xf86-input-wacom/pkg-plist
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/pkg-plist << 'c8e8f39ea9b008a2398c7c41a43d661a'
Xlib/xorg/modules/input/wacom_drv.so
X@cwd %%DESTDIR%%/
Xboot/modules/uwacom.ko
c8e8f39ea9b008a2398c7c41a43d661a
echo x - ports/x11-drivers/xf86-input-wacom/pkg-message
sed 's/^X//' >ports/x11-drivers/xf86-input-wacom/pkg-message << 'e91b20850a8d72e042364d9f88e71619'
XTo setup the wacom driver for X and start the kernel module upon boot
Xrun the following commands as the root user:
X
X# echo 'wacom_enable="YES"' >> /etc/rc.conf
X# /usr/local/etc/rc.d/wacom setup
X
XTo activate the driver without rebooting run:
X
X# /usr/local/etc/rc.d/wacom start
X
XNow (re)plug in your tablet and restart X.
e91b20850a8d72e042364d9f88e71619
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811022038.mA2KcVLd032024>