mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Update to 0.8.2
PR: 129906 Submitted by: Dominic Fandrey <kamikaze@bsdforen.de> (maintainer)
This commit is contained in:
parent
560ed285d8
commit
4a2b408062
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226338
4 changed files with 96 additions and 35 deletions
|
@ -30,10 +30,11 @@ MAN4DIR= man/man4
|
|||
WRKSRC= ${WRKDIR}
|
||||
|
||||
PLIST_SUB+= KMODDIR=${KMODDIR} \
|
||||
XINPUTMODDIR=${XINPUTMODDIR}
|
||||
XINPUTMODDIR=${XINPUTMODDIR} \
|
||||
PORTTYPE=${PORTTYPE}
|
||||
SUB_LIST:= ${PLIST_SUB}
|
||||
SUB_FILES+= pkg-message
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
SUB_FILES+= pkg-message-${PORTTYPE}
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message-${PORTTYPE}
|
||||
|
||||
XORG_CAT= driver
|
||||
USE_XORG= xi
|
||||
|
@ -49,14 +50,16 @@ OPTIONS= UWACOMKLD "Install USB kernel module" On
|
|||
|
||||
.if defined(WITH_UWACOMKLD)
|
||||
PLIST_SUB+= UWACOMKLD="uwacom.ko"
|
||||
PORTTYPE= usb
|
||||
.else
|
||||
PLIST_SUB+= UWACOMKLD="@noinst UWACOMKLD uwacom.ko"
|
||||
PORTTYPE= serial
|
||||
.endif
|
||||
|
||||
do-configure:
|
||||
@cd ${WRKDIR}/linuxwacom \
|
||||
&& ${LN} -s ${DISTDIR}/${DIST_SUBDIR}/${LINUXWACOM}.tar.bz2 \
|
||||
&& ${SETENV} PREFIX=${PREFIX} ./run_configure
|
||||
&& ${SETENV} ${MAKE_ENV} ./run_configure
|
||||
|
||||
do-build:
|
||||
.if defined(WITH_UWACOMKLD)
|
||||
|
@ -73,7 +76,7 @@ do-install:
|
|||
.endif
|
||||
@${MKDIR} ${PREFIX}/${XINPUTMODDIR} ${PREFIX}/${MAN4DIR}
|
||||
@cd ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/util/ \
|
||||
&& ${GMAKE} install
|
||||
&& ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
||||
@${INSTALL} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/xdrv/wacom_drv.so \
|
||||
${PREFIX}/${XINPUTMODDIR}/
|
||||
@${INSTALL_MAN} ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/wacom.4x.gz \
|
||||
|
@ -84,11 +87,12 @@ plist: clean configure
|
|||
@${TOUCH} ${PLIST}
|
||||
@${RM} ${PLIST}
|
||||
@cd ${WRKDIR}/linuxwacom \
|
||||
&& ${SETENV} PREFIX=${WRKDIR}/plist ./run_configure
|
||||
&& ${SETENV} ${MAKE_ENV} PREFIX=${WRKDIR}/plist ./run_configure
|
||||
@${MKDIR} ${WRKDIR}/plist
|
||||
@cd ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/util && ${GMAKE} install
|
||||
@cd ${WRKDIR}/linuxwacom/${LINUXWACOM}/src/util \
|
||||
&& ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
||||
@cd ${WRKDIR}/linuxwacom \
|
||||
&& ${SETENV} PREFIX=${PREFIX} ./run_configure
|
||||
&& ${SETENV} ${MAKE_ENV} ./run_configure
|
||||
@${FIND} ${WRKDIR}/plist/ -not -type d \
|
||||
| ${SED} "s|${WRKDIR}/plist/||1" \
|
||||
>> ${PLIST}
|
||||
|
|
12
x11-drivers/input-wacom/files/pkg-message-serial.in
Normal file
12
x11-drivers/input-wacom/files/pkg-message-serial.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
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.
|
|
@ -91,6 +91,34 @@ get_first() {
|
|||
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.
|
||||
|
@ -171,44 +199,50 @@ get_behind() {
|
|||
|
||||
#
|
||||
# Inserts a line at the end of a section of an Xorg configuration file.
|
||||
# Only works on the first matching section.
|
||||
# The insertion is done on all matching sections!
|
||||
#
|
||||
section_insert_line() {
|
||||
local file section insert begin end length
|
||||
local file section insert sections begin end length
|
||||
file="$1"
|
||||
section="$2"
|
||||
insert="$3"
|
||||
|
||||
# Find the beginning of the section.
|
||||
begin="$(get_first "$file" \
|
||||
# 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 "$begin" ]; then
|
||||
if [ -z "$sections" ]; then
|
||||
echo "Identifying section $section has failed." 1>&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Find the end of the section.
|
||||
end="$(get_behind "$file" "$begin" "^[[:space:]]*EndSection")"
|
||||
for begin in $sections; {
|
||||
|
||||
if [ -z "$end" ]; then
|
||||
echo "The section $section is not closed." 1>&2
|
||||
return 2
|
||||
fi
|
||||
# Find the end of the section.
|
||||
end="$(get_behind "$file" "$begin" "^[[:space:]]*EndSection")"
|
||||
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$file")"
|
||||
length=${length% *}
|
||||
if [ -z "$end" ]; then
|
||||
echo "The section $section($begin) is not closed." 1>&2
|
||||
return 2
|
||||
fi
|
||||
|
||||
# Insert the line.
|
||||
/bin/cp "$file" "$file.$$"
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$file")"
|
||||
length=${length% *}
|
||||
|
||||
/usr/bin/head -n$(($end - 1)) "$file.$$" > "$file"
|
||||
echo "$insert" >> "$file"
|
||||
/usr/bin/tail -n$(($length - $end + 1)) "$file.$$" >> "$file"
|
||||
# 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.$$"
|
||||
/bin/rm "$file.$$"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -225,7 +259,7 @@ do_setup() {
|
|||
echo "Setting up configuration in $config."
|
||||
|
||||
# Add all the necessary sections.
|
||||
for ident in stylus eraser cursor pad touch; {
|
||||
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
|
||||
|
@ -236,10 +270,17 @@ do_setup() {
|
|||
echo "Section \"InputDevice\"
|
||||
Driver \"wacom\"
|
||||
Identifier \"$ident\"
|
||||
Option \"Device\" \"/dev/event0\"
|
||||
Option \"Type\" \"$ident\"
|
||||
Option \"USB\" \"on\"
|
||||
EndSection
|
||||
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\""
|
||||
|
@ -318,13 +359,14 @@ do_cleanup() {
|
|||
|
||||
echo "Cleaning up ServerLayout section."
|
||||
|
||||
for ident in stylus eraser cursor pad touch; {
|
||||
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" && continue
|
||||
test -z "$driver" && break
|
||||
|
||||
# Determine the length of the configuration file.
|
||||
length="$(/usr/bin/wc -l "$config")"
|
||||
|
@ -337,6 +379,7 @@ do_cleanup() {
|
|||
/usr/bin/tail -n$(($length - $driver)) "$config.$$" >> "$config"
|
||||
|
||||
/bin/rm "$config.$$"
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,6 +403,8 @@ do_stop() {
|
|||
|
||||
load_rc_config $name
|
||||
|
||||
: ${wacom_enable="NO"}
|
||||
eval ": \${${name}_enable=\"NO\"}"
|
||||
eval ": \${${name}_types=\"stylus eraser cursor pad touch\"}"
|
||||
eval ": \${${name}_porttype=\"%%PORTTYPE%%\"}"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Add table
Reference in a new issue