remove_libX11_dep.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. diff -Nuar pardus-python-0.4.8.orig/pardus/__init__.py pardus-python-0.4.8/pardus/__init__.py
  2. --- pardus-python-0.4.8.orig/pardus/__init__.py 2010-12-09 14:47:32.000000000 +0200
  3. +++ pardus-python-0.4.8/pardus/__init__.py 2015-03-06 17:46:44.000000000 +0200
  4. @@ -24,8 +24,7 @@
  5. "netfilterutils",
  6. "shellutils",
  7. "strutils",
  8. - "sysutils",
  9. - "xorg"]
  10. + "sysutils"]
  11. def versionString():
  12. diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/capslock.c pardus-python-0.4.8/pardus/xorg/capslock.c
  13. --- pardus-python-0.4.8.orig/pardus/xorg/capslock.c 2010-12-09 14:47:32.000000000 +0200
  14. +++ pardus-python-0.4.8/pardus/xorg/capslock.c 1970-01-01 02:00:00.000000000 +0200
  15. @@ -1,59 +0,0 @@
  16. -/*
  17. -* Copyright (c) 2005, TUBITAK/UEKAE
  18. -*
  19. -* This program is free software; you can redistribute it and/or modify it
  20. -* under the terms of the GNU General Public License as published by the
  21. -* Free Software Foundation; either version 2 of the License, or (at your
  22. -* option) any later version. Please read the COPYING file.
  23. -*/
  24. -
  25. -#include <Python.h>
  26. -#include <X11/Xlib.h>
  27. -
  28. -
  29. -PyDoc_STRVAR(isOn__doc__,
  30. -"isOn()\n"
  31. -"\n"
  32. -"method checked if CapsLock is on\n");
  33. -
  34. -PyObject*
  35. -capslock_isOn(PyObject *self, PyObject *args)
  36. -{
  37. - int capsLocked;
  38. - unsigned int lmask;
  39. - Window dummy1, dummy2;
  40. - int dummy3, dummy4, dummy5, dummy6;
  41. - Display *display;
  42. -
  43. - display = XOpenDisplay(0);
  44. - XQueryPointer(display, DefaultRootWindow(display),
  45. - &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, &dummy6,
  46. - &lmask);
  47. - capsLocked = lmask & LockMask;
  48. - XCloseDisplay(display);
  49. -
  50. - if (capsLocked)
  51. - {
  52. - Py_INCREF(Py_True);
  53. - return Py_True;
  54. - }
  55. -
  56. - Py_INCREF(Py_False);
  57. - return Py_False;
  58. -}
  59. -
  60. -static PyMethodDef capslock_methods[] = {
  61. - {"isOn", (PyCFunction)capslock_isOn, METH_NOARGS, isOn__doc__},
  62. - {NULL, NULL}
  63. -};
  64. -
  65. -PyMODINIT_FUNC
  66. -initcapslock(void)
  67. -{
  68. - PyObject *m;
  69. -
  70. - m = Py_InitModule("capslock", capslock_methods);
  71. -
  72. - return;
  73. -}
  74. -
  75. diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/__init__.py pardus-python-0.4.8/pardus/xorg/__init__.py
  76. --- pardus-python-0.4.8.orig/pardus/xorg/__init__.py 2010-12-09 14:47:32.000000000 +0200
  77. +++ pardus-python-0.4.8/pardus/xorg/__init__.py 1970-01-01 02:00:00.000000000 +0200
  78. @@ -1,6 +0,0 @@
  79. -# -*- coding: utf-8 -*-
  80. -
  81. -import capslock
  82. -import xterm
  83. -
  84. -__all__ = ["capslock", "xterm"]
  85. diff -Nuar pardus-python-0.4.8.orig/pardus/xorg/xterm.py pardus-python-0.4.8/pardus/xorg/xterm.py
  86. --- pardus-python-0.4.8.orig/pardus/xorg/xterm.py 2010-12-09 14:47:32.000000000 +0200
  87. +++ pardus-python-0.4.8/pardus/xorg/xterm.py 1970-01-01 02:00:00.000000000 +0200
  88. @@ -1,31 +0,0 @@
  89. -# -*- coding: utf-8 -*-
  90. -#
  91. -# Copyright (C) 2006, TUBITAK/UEKAE
  92. -#
  93. -# This program is free software; you can redistribute it and/or modify it under
  94. -# the terms of the GNU General Public License as published by the Free
  95. -# Software Foundation; either version 2 of the License, or (at your option)
  96. -# any later version.
  97. -#
  98. -# Please read the COPYING file.
  99. -#
  100. -
  101. -import sys
  102. -import os
  103. -
  104. -
  105. -def set_title(message):
  106. - """Set message as console window title."""
  107. - if os.environ.has_key("TERM") and sys.stderr.isatty():
  108. - terminalType = os.environ["TERM"]
  109. - for term in ["xterm", "Eterm", "aterm", "rxvt", "screen", "kterm", "rxvt-unicode"]:
  110. - if terminalType.startswith(term):
  111. - sys.stderr.write("\x1b]2;"+str(message)+"\x07")
  112. - sys.stderr.flush()
  113. - break
  114. -
  115. -
  116. -def reset_title():
  117. - """Reset console window title."""
  118. - if os.environ.has_key("TERM"):
  119. - set_title("")
  120. diff -Nuar pardus-python-0.4.8.orig/setup.py pardus-python-0.4.8/setup.py
  121. --- pardus-python-0.4.8.orig/setup.py 2010-12-09 14:47:32.000000000 +0200
  122. +++ pardus-python-0.4.8/setup.py 2015-03-06 17:50:11.000000000 +0200
  123. @@ -15,8 +15,6 @@
  124. setup.py
  125. pardus/*.py
  126. pardus/*.c
  127. - pardus/xorg/*.py
  128. - pardus/xorg/*.c
  129. po/*.po
  130. po/*.pot
  131. tools/*.py
  132. @@ -82,11 +80,8 @@
  133. author="Pardus Developers",
  134. author_email="info@pardus.org.tr",
  135. url="http://www.pardus.org.tr/",
  136. - packages = ['pardus', 'pardus.xorg'],
  137. - ext_modules = [Extension('pardus.xorg.capslock',
  138. - sources=['pardus/xorg/capslock.c'],
  139. - libraries=['X11']),
  140. - Extension('pardus.csapi',
  141. + packages = ['pardus'],
  142. + ext_modules = [Extension('pardus.csapi',
  143. sources=['pardus/csapi.c'],
  144. libraries=[]),
  145. ],