aboutsummaryrefslogtreecommitdiff
path: root/x11/libsynaptics
diff options
context:
space:
mode:
authorMarkus Brueffer <markus@FreeBSD.org>2006-04-28 12:07:53 +0000
committerMarkus Brueffer <markus@FreeBSD.org>2006-04-28 12:07:53 +0000
commit0e5aa1add15ba2b90e4141f498fcaf8786ca992e (patch)
treeabc57756e996c1bc7604c04e4fe213aba8e20c48 /x11/libsynaptics
parent434da160eb06c3fc587446a5ceb77aabf46605da (diff)
downloadports-0e5aa1add15ba2b90e4141f498fcaf8786ca992e.tar.gz
ports-0e5aa1add15ba2b90e4141f498fcaf8786ca992e.zip
Notes
Diffstat (limited to 'x11/libsynaptics')
-rw-r--r--x11/libsynaptics/Makefile4
-rw-r--r--x11/libsynaptics/files/patch-Makefile.in11
-rw-r--r--x11/libsynaptics/files/patch-pad.cpp85
3 files changed, 100 insertions, 0 deletions
diff --git a/x11/libsynaptics/Makefile b/x11/libsynaptics/Makefile
index 470b3105815f..9a1fe4a92d07 100644
--- a/x11/libsynaptics/Makefile
+++ b/x11/libsynaptics/Makefile
@@ -21,4 +21,8 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
+post-patch:
+ @${REINPLACE_CMD} -e 's/%%PTHREAD_LIBS%%/${PTHREAD_LIBS}/g' \
+ ${WRKSRC}/Makefile.in
+
.include <bsd.port.mk>
diff --git a/x11/libsynaptics/files/patch-Makefile.in b/x11/libsynaptics/files/patch-Makefile.in
new file mode 100644
index 000000000000..a2a56f61a4e7
--- /dev/null
+++ b/x11/libsynaptics/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Thu Apr 27 01:35:21 2006
++++ Makefile.in Thu Apr 27 01:35:41 2006
+@@ -209,7 +209,7 @@
+ library_includedir = $(includedir)/synaptics
+ library_include_HEADERS = pad.h Shm_0_14_4 synaptics.h syndebug.h synparams.h synshm.h version.h
+ syntest_SOURCES = syntest.cpp synaptics.h
+-syntest_LDADD = libsynaptics.la
++syntest_LDADD = libsynaptics.la %%PTHREAD_LIBS%%
+ all: all-am
+
+ .SUFFIXES:
diff --git a/x11/libsynaptics/files/patch-pad.cpp b/x11/libsynaptics/files/patch-pad.cpp
new file mode 100644
index 000000000000..133cb7a5c40a
--- /dev/null
+++ b/x11/libsynaptics/files/patch-pad.cpp
@@ -0,0 +1,85 @@
+--- pad.cpp.orig Thu Apr 27 00:53:03 2006
++++ pad.cpp Thu Apr 27 01:26:18 2006
+@@ -15,11 +15,13 @@
+ #include "version.h"
+
+ #include <X11/Xdefs.h> // for typedef Bool
++#include <sys/types.h>
+ #include <sys/shm.h>
+ #include <stdlib.h>
++#include <stdio.h>
+
+ #include <pthread.h>
+-static pthread_mutex_t lock;
++static pthread_mutex_t mylock;
+
+ #define PAROFF( verId, par ) \
+ offsetof( SynShm, verId ) + offsetof( ShmSegment##verId, par )
+@@ -31,7 +33,7 @@
+ p.max_val = max;
+
+ #define NODRIVERVER VER( 0, 0, 0 )
+-#define RETURN( val ) pthread_mutex_unlock( &lock ); return ( val )
++#define RETURN( val ) pthread_mutex_unlock( &mylock ); return ( val )
+
+
+ //
+@@ -81,7 +83,7 @@
+ mSelf = new Synaptics::Pad(); // call constructor
+ else
+ {
+- pthread_mutex_lock( &lock );
++ pthread_mutex_lock( &mylock );
+ return;
+ }
+
+@@ -310,7 +312,7 @@
+ PadType pt = PT_NONE;
+
+ // FIXME: detection just based on the assumption that the driver will register as unknown
+- if ( mHasShm and mDetectedDriver == DV_UNKNOWN )
++ if ( mHasShm && mDetectedDriver == DV_UNKNOWN )
+ pt = PT_UNKNOWN;
+ else
+ {
+@@ -345,19 +347,19 @@
+ {
+ Param p = mSupportedDriver[ DRIVERSTR ][ param ];
+
+- if ( ( p.type == PT_BOOL ) or ( p.type == PT_BOOL_RO ) )
++ if ( ( p.type == PT_BOOL ) || ( p.type == PT_BOOL_RO ) )
+ {
+ rb = *(Bool*)(((char*)mSynShm) + p.offset );
+ RETURN( rb );
+ }
+
+- if ( ( p.type == PT_INT ) or ( p.type == PT_INT_RO ) )
++ if ( ( p.type == PT_INT ) || ( p.type == PT_INT_RO ) )
+ {
+ ri = *(int*)(((char*)mSynShm) + p.offset );
+ RETURN( ri );
+ }
+
+- if ( ( p.type == PT_DOUBLE ) or ( p.type == PT_DOUBLE_RO ) )
++ if ( ( p.type == PT_DOUBLE ) || ( p.type == PT_DOUBLE_RO ) )
+ {
+ rd = *(double*)(((char*)mSynShm) + p.offset );
+ RETURN( rd );
+@@ -376,7 +378,7 @@
+ {
+ Param p = mSupportedDriver[ DRIVERSTR ][ param ];
+
+- if ( ( p.min_val <= v ) and ( p.max_val >= v ) )
++ if ( ( p.min_val <= v ) && ( p.max_val >= v ) )
+ {
+ if ( p.type == PT_BOOL )
+ (*(Bool*)(((char*)mSynShm) + p.offset)) = (Bool)v;
+@@ -391,7 +393,7 @@
+ }
+ }
+ // instead of RETURN(void)
+- pthread_mutex_unlock( &lock );
++ pthread_mutex_unlock( &mylock );
+ }
+
+ int Synaptics::Pad::driverVersion()