[numlockx/f14/master] Fix up XI2 patch to apply cleanly on all arches

drago01 drago01 at fedoraproject.org
Fri Oct 22 09:00:02 UTC 2010


commit f3a17b89206e9968184dae9cbfe3eb86a9ac6895
Author: Adel Gadllah <adel.gadllah at gmail.com>
Date:   Fri Oct 22 10:59:24 2010 +0200

    Fix up XI2 patch to apply cleanly on all arches

 0001-XI2-support.patch |   59 +++++++++++++-----------------------------------
 numlockx.spec          |   12 ++++-----
 2 files changed, 21 insertions(+), 50 deletions(-)
---
diff --git a/0001-XI2-support.patch b/0001-XI2-support.patch
index 509c2d2..21ce5b4 100644
--- a/0001-XI2-support.patch
+++ b/0001-XI2-support.patch
@@ -1,41 +1,6 @@
-From ade2a74472adb02785efc0c9c182f7accef3af7f Mon Sep 17 00:00:00 2001
-From: Peter Hutterer <peter.hutterer at who-t.net>
-Date: Fri, 22 Oct 2010 09:32:46 +1000
-Subject: [PATCH] XI2 support.
-
-Switching the LED on on the core keyboard alone has no effect on the
-physical keyboards. Use XI2 to turn the LED on on each physical keyboard.
----
- Makefile |    4 ++--
- main.c   |   45 +++++++++++++++++++++++++++++++++++----------
- 1 files changed, 37 insertions(+), 12 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 9e4f8dd..de9978f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -67,7 +67,7 @@ MAKEINFO = makeinfo
- PACKAGE = numlockx
- RANLIB = ranlib
- VERSION = 1.0
--XTESTLIB = -lXtst
-+XTESTLIB = -lXtst -lXi
- X_INCLUDES = -I.
- X_LDFLAGS = -L/usr/lib
- X_PRE_LIBS = 
-@@ -77,7 +77,7 @@ x_libraries = /usr/lib
- bin_PROGRAMS = numlockx
- 
- numlockx_SOURCES = main.c 
--numlockx_LDADD = -lXtst -lXext -lX11 
-+numlockx_LDADD = -lXtst -lXext -lX11 -lXi
- numlockx_LDFLAGS = -L/usr/lib
- INCLUDES = -I.
- 
-diff --git a/main.c b/main.c
-index 106fd0a..2a6fe3d 100644
---- a/main.c
-+++ b/main.c
+diff -upNr numlockx-1.0.orign/main.c numlockx-1.0/main.c
+--- numlockx-1.0.orign/main.c	2001-04-30 22:55:20.000000000 +0200
++++ numlockx-1.0/main.c	2010-10-22 10:56:33.686559525 +0200
 @@ -47,6 +47,8 @@ DEALINGS IN THE SOFTWARE.
  #include <X11/XKBlib.h>
  #endif
@@ -45,7 +10,7 @@ index 106fd0a..2a6fe3d 100644
  #include <X11/keysym.h>
  
  void usage( const char* argv0 )
-@@ -95,10 +97,10 @@ unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name )
+@@ -95,10 +97,10 @@ unsigned int xkb_mask_modifier( XkbDescP
      return 0;
      }
  
@@ -135,7 +100,15 @@ index 106fd0a..2a6fe3d 100644
          return;
  #endif
  #ifdef HAVE_XTEST
-
--- 
-1.7.2.3
-
+diff -upNr numlockx-1.0.orign/Makefile.am numlockx-1.0/Makefile.am
+--- numlockx-1.0.orign/Makefile.am	2001-04-30 21:34:10.000000000 +0200
++++ numlockx-1.0/Makefile.am	2010-10-22 10:56:00.388503102 +0200
+@@ -3,7 +3,7 @@
+ bin_PROGRAMS = numlockx
+ 
+ numlockx_SOURCES = main.c 
+-numlockx_LDADD   = @XTESTLIB@ -lXext -lX11 @X_PRE_LIBS@
++numlockx_LDADD   = @XTESTLIB@ -lXext -lX11 -lXi @X_PRE_LIBS@
+ numlockx_LDFLAGS = @X_LDFLAGS@
+ INCLUDES = @X_INCLUDES@
+ 
diff --git a/numlockx.spec b/numlockx.spec
index 2c6d92f..35f931e 100644
--- a/numlockx.spec
+++ b/numlockx.spec
@@ -1,6 +1,6 @@
 Name:           numlockx
 Version:        1.0
-Release:        17%{?dist}
+Release:        18%{?dist}
 Summary:        NumLockX turns on NumLock after starting X
 
 Group:          Applications/System
@@ -20,15 +20,10 @@ Patch1:        0001-XI2-support.patch
 
 %prep
 %setup -q
-
-
-# patching the makefile, because my masochism is limited but there's no
-# patch expansion during build, so run configure now.
-%configure
 %patch1 -p1 -b .xi2
 
 %build
-
+%configure
 make %{?_smp_mflags}
 
 
@@ -48,6 +43,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS README LICENSE
 
 %changelog
+* Fri Oct 22 2010 Adel Gadllah <adel.gadllah at gmail.com> 1.0-18
+- Fix up XI2 patch to patch Makefile.am and not depend on the arch
+
 * Fri Oct 22 2010 Peter Hutterer <peter.hutterer at redhat.com> 1.0-17
 - 0001-XI2-support.patch: add support for per-device numlock switching.
 


More information about the scm-commits mailing list