You are not logged in.

#1 2008-04-01 17:07:01

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

How can I use this patch?

http://gentoo-wiki.com/HARDWARE_Synapti … Transforms

I want to use the twofinger+button1 patch to map the right key.

Last edited by raul_nds (2008-04-01 17:07:48)

Offline

#2 2008-04-01 17:49:49

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: How can I use this patch?

Grab the pkgbuild and patch, edit the pkgbuild to include the patch, recompile the pkgbuild. Simple.

Offline

#3 2008-04-01 20:56:48

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How can I use this patch?

Ok I added the line:

wget http://douglas.mayle.org/synaptics-two- … click.diff -q -O- | patch -p0

to the PKGBUILD but i  get this:

==> Starting build()...
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru synaptics-0.14.6/synaptics.c synaptics-two-finger-click-0.14.6/synaptics.c
|--- synaptics-0.14.6/synaptics.c    2006-07-15 11:54:29.000000000 -0400
|+++ synaptics-two-finger-click-0.14.6/synaptics.c    2007-10-12 08:38:52.000000000 -0400
--------------------------
File to patch:

here is my PKGBUILD

# $Id: PKGBUILD,v 1.20 2008/01/27 09:25:39 tpowa Exp $
# Maintainer: Tobias Powalowski  <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=synaptics
pkgver=0.14.6.99
pkgrel=2
pkgdesc="synaptics driver for notebook touchpads"
arch=(i686 x86_64)
url="http://w1.894.telia.com/~u89404340/touchpad/"
depends=('libxext' 'libx11')
makedepends=('pkgconfig' 'xorg-server')
source=(http://w1.894.telia.com/~u89404340/touchpad/files/${pkgname}-0.14.6.tar.bz2 \
        synaptics-0.14.6.99-git-master.patch xinerama-fix.patch)
install="synaptics.install"

build() {
  cd ${startdir}/src/${pkgname}-0.14.6
  
  wget http://douglas.mayle.org/synaptics-two-finger-click.diff -q -O- | patch -p0
  
  patch -Np1 -i ${startdir}/src/synaptics-0.14.6.99-git-master.patch || return 1
  # fix http://bugs.archlinux.org/task/8732
  patch -Np0 -i ../xinerama-fix.patch || return 1
  # make synaptics play nice with pixman and it's -1
  sed -i -e 's:ALLINCLUDES = :ALLINCLUDES = -I/usr/include/pixman-1 :g' Makefile

  make BUILD_MODULAR=y || return 1
  make DESTDIR=${startdir}/pkg/ \
       BINDIR=${startdir}/pkg/usr/bin \
       MANDIR=${startdir}/pkg/usr/man/ install
}
md5sums=('1102cd575045640a064ab6f9b1e391af'
         '3a88281ace381f9e105a5ff2bdd706a7'
         '0cc00b308a79daab468ad8bd46496b4e')

Thanks for your reply smile

Offline

#4 2008-04-01 21:00:13

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: How can I use this patch?

Try changing the value of the -p switch used with the patch command (i.e. try -Np0 or -Np2, etc.), one of the values should work...

Offline

#5 2008-04-01 21:00:17

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How can I use this patch?

Never mind. I opened the patch and  the file had to be in the parent directory of the source. However. when I do this, build hangs =\

Offline

#6 2008-04-01 21:19:33

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How can I use this patch?

Wer'e getting somewhere now. I pasted the wget line again, and when asked, I gave the correct files to patch, and ultimately I get this:

patching file synclient.c
patching file COMPATIBILITY
patching file FILES
patching file INSTALL
patching file README
patching file README.alps
patching file alpscomm.c
patching file docs/tapndrag.dia
patching file eventcomm.c
patching file linux_input.h
patching file manpages/synaptics.5
patching file ps2comm.c
patching file psmcomm.c
patching file synaptics.c
Hunk #1 FAILED at 1.
Hunk #2 succeeded at 112 (offset 3 lines).
Hunk #4 succeeded at 336 (offset 3 lines).
Hunk #6 succeeded at 431 (offset 3 lines).
Hunk #8 succeeded at 470 (offset 6 lines).
Hunk #10 succeeded at 601 (offset 6 lines).
Hunk #12 succeeded at 700 (offset 6 lines).
Hunk #14 succeeded at 961 (offset 6 lines).
Hunk #16 succeeded at 1093 (offset 6 lines).
Hunk #18 succeeded at 1131 (offset 6 lines).
Hunk #20 succeeded at 1168 (offset 6 lines).
Hunk #22 succeeded at 1215 (offset 6 lines).
Hunk #24 succeeded at 1298 (offset 6 lines).
Hunk #26 succeeded at 1333 (offset 6 lines).
Hunk #28 succeeded at 1475 (offset 6 lines).
Hunk #30 succeeded at 1503 (offset 6 lines).
Hunk #32 succeeded at 1586 (offset 6 lines).
Hunk #34 succeeded at 1747 (offset 6 lines).
Hunk #35 succeeded at 1837 with fuzz 2 (offset 50 lines).
Hunk #36 succeeded at 1946 (offset 6 lines).
1 out of 36 hunks FAILED -- saving rejects to file synaptics.c.rej
patching file synaptics.h
Hunk #1 succeeded at 57 (offset 7 lines).
Hunk #2 FAILED at 66.
Hunk #3 succeeded at 89 (offset 1 line).
Hunk #4 succeeded at 109 (offset 7 lines).
Hunk #5 succeeded at 141 (offset 1 line).
Hunk #6 succeeded at 215 (offset 7 lines).
Hunk #7 succeeded at 217 (offset 1 line).
Hunk #8 succeeded at 231 (offset 7 lines).
Hunk #9 succeeded at 241 (offset 1 line).
1 out of 9 hunks FAILED -- saving rejects to file synaptics.h.rej
patching file synclient.c
Hunk #5 succeeded at 110 (offset 3 lines).
patching file synproto.h
==> ERROR: Build Failed.
    Aborting...
[raul@horus synaptics]$

Offline

#7 2008-04-01 21:21:07

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: How can I use this patch?

Looks like the patch doesn't apply to the current version of code anymore.

Last edited by fwojciec (2008-04-01 21:27:41)

Offline

#8 2008-04-01 21:43:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How can I use this patch?

OT package-making tip: list your patch in the source array, and add an appropriate patch command, as is done with the other two patches.

Offline

#9 2008-04-01 21:48:12

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: How can I use this patch?

I just tried this -- the patch seems to be incompatible with the "git-master" patch (it doesn't apply if the git-master patch is included) while, at the same time, without the git-master patch the source doesn't compile at all...  So it doesn't seem like there is an easy way to add this functionality.

Offline

#10 2008-04-01 22:31:58

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How can I use this patch?

Well, I did the ugliest thing I could think of:

open the patch file, see what files it altered, and manually add the lines, comment out the source and all other patches lines, and built the package again.

it's working, but I confess that it's not working that well sad now sometimes i do a normal left-click and it's mapped to a right click. It was a fun experience though, messing with the drivers source code tongue

Offline

Board footer

Powered by FluxBB