[SM-Commit] GIT changes to master grimoire by Robin Cook (1d1a5874f47fa84a7a3aa250aecc2b159a59e7c3)

Robin Cook scm at sourcemage.org
Sun Aug 10 09:17:18 EDT 2008


GIT changes to master grimoire by Robin Cook <rcook at wyrms.net>:

 display/svgalib/HISTORY                    |    4 +++
 display/svgalib/PRE_BUILD                  |    5 +++-
 display/svgalib/svgalib_helper-2.6.26.diff |   33 +++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)

New commits:
commit 1d1a5874f47fa84a7a3aa250aecc2b159a59e7c3
Author: Robin Cook <rcook at wyrms.net>
Commit: Robin Cook <rcook at wyrms.net>

    svgalib: apply patch for kernel 2.6.26

diff --git a/display/svgalib/HISTORY b/display/svgalib/HISTORY
index 5c72579..f9159d2 100644
--- a/display/svgalib/HISTORY
+++ b/display/svgalib/HISTORY
@@ -1,3 +1,7 @@
+2008-08-10 Robin Cook <rcook at wyrms.net>
+	* PRE_BUILD: updated to apply patch for 2.6.26
+	  http://bugs.gentoo.org/attachment.cgi?id=161385&action=view
+
 2007-11-10 Robin Cook <rcook at wyrms.net>
 	* PRE_BUILD: added to apply patch for 2.6.23
 	  http://groups.google.com/group/svgalib/browse_thread/thread/367b73b209a0bb77
diff --git a/display/svgalib/PRE_BUILD b/display/svgalib/PRE_BUILD
index 8f3b0f9..e882761 100755
--- a/display/svgalib/PRE_BUILD
+++ b/display/svgalib/PRE_BUILD
@@ -10,7 +10,10 @@ sedit "s:\$(shell uname -r):$KER:g"                                  \
 
 # Apply patchs for kernel versions 2.6.15* and newer
 KER=${KER:0:6}                                                       &&
-if [ ${KER//\./} > 2623 ]; then
+if [ ${KER//\./} > 2626 ]; then
+   patch -p1 < ${SCRIPT_DIRECTORY}/svgalib_helper-2.6.26.diff
+   patch -p1 < ${SCRIPT_DIRECTORY}/svgalib_helper-2.6.23.diff
+elif [ ${KER//\./} > 2623 ]; then
    patch -p1 < ${SCRIPT_DIRECTORY}/svgalib_helper-2.6.23.diff
 elif [ ${KER//\./} > 2619 ]; then
    patch -p0 < ${SCRIPT_DIRECTORY}/svgalib_helper-2.6.19.diff
diff --git a/display/svgalib/svgalib_helper-2.6.26.diff b/display/svgalib/svgalib_helper-2.6.26.diff
new file mode 100644
index 0000000..2fa1129
--- /dev/null
+++ b/display/svgalib/svgalib_helper-2.6.26.diff
@@ -0,0 +1,33 @@
+--- svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h
++++ svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h
+@@ -105,7 +109,8 @@
+      class_device_create(svgalib_helper_class,                      	\
+                              MKDEV(SVGALIB_HELPER_MAJOR, _minor),       \
+                              &sh_pci_devs[_minor]->dev->dev, _name);
+-#else /* 2.6.15 changed class_device_create */
++/* 2.6.15 changed class_device_create */
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ #  define SLH_SYSFS_ADD_CONTROL                                         \
+      class_device_create(svgalib_helper_class, NULL,                	\
+                              MKDEV(SVGALIB_HELPER_MAJOR, 0),            \
+@@ -115,7 +120,18 @@
+      class_device_create(svgalib_helper_class, NULL,                	\
+                              MKDEV(SVGALIB_HELPER_MAJOR, _minor),       \
+                              &sh_pci_devs[_minor]->dev->dev, _name);
+-#endif /* 2.6.15 */
++/* 2.6.26 changed class_device_create to device_create */
++#else
++#  define SLH_SYSFS_ADD_CONTROL                                         \
++     device_create(svgalib_helper_class, NULL,                		\
++                             MKDEV(SVGALIB_HELPER_MAJOR, 0),            \
++                             NULL, "svga");
++
++#  define SLH_SYSFS_ADD_DEVICE(_name, _minor)                           \
++     device_create(svgalib_helper_class, NULL,                		\
++                             MKDEV(SVGALIB_HELPER_MAJOR, _minor),       \
++                             &sh_pci_devs[_minor]->dev->dev, _name);
++#endif
+ 
+ #  define SLH_SYSFS_REMOVE_DEVICE(i)                                    \
+      class_destroy(svgalib_helper_class);
+



More information about the SM-Commit mailing list