void-packages/srcpkgs/wm2/patches/fix-compile.patch
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

92 lines
2.3 KiB
Diff

diff -ur Client.C Client.C
--- a/Client.C 1997-03-21 12:12:30.000000000 +0100
+++ b/Client.C 2007-06-30 16:56:10.000000000 +0200
@@ -400,7 +400,7 @@
}
-int Client::getAtomProperty(Atom a, Atom type)
+uintptr_t Client::getAtomProperty(Atom a, Atom type)
{
char **p, *x;
if (getProperty_aux(display(), m_window, a, type, 1L,
@@ -410,7 +410,7 @@
x = *p;
XFree((void *)p);
- return (int)x;
+ return (uintptr_t)x;
}
diff -ur Client.h Client.h
--- a/Client.h 1997-03-21 12:12:30.000000000 +0100
+++ b/Client.h 2007-06-30 16:56:10.000000000 +0200
@@ -2,6 +2,8 @@
#ifndef _CLIENT_H_
#define _CLIENT_H_
+#include <inttypes.h>
+
#include "General.h"
#include "Manager.h"
#include "Border.h"
@@ -125,7 +127,7 @@
WindowManager *const m_windowManager;
char *getProperty(Atom);
- int getAtomProperty(Atom, Atom);
+ uintptr_t getAtomProperty(Atom, Atom);
int getIntegerProperty(Atom);
// accessors
diff -ur General.h General.h
--- a/General.h 1997-03-21 12:12:30.000000000 +0100
+++ b/General.h 2007-06-30 16:56:10.000000000 +0200
@@ -32,7 +32,7 @@
#define NewString(x) (strcpy((char *)malloc(strlen(x)+1),(x)))
#ifndef SIGNAL_CALLBACK_TYPE
-#define SIGNAL_CALLBACK_TYPE (void (*)(...))
+#define SIGNAL_CALLBACK_TYPE (void (*)(int))
#endif
#define signal(x,y) \
diff -ur Makefile Makefile
--- a/Makefile 1997-03-21 12:12:30.000000000 +0100
+++ b/Makefile 2007-06-30 16:56:10.000000000 +0200
@@ -1,8 +1,6 @@
-LIBS = -L/usr/X11/lib -lXext -lX11 -lXmu -lm
+LIBS = -L/usr/X11R6/lib -lXext -lX11 -lXmu -lm
-CC = gcc
-CCC = gcc
-CFLAGS = -O2
+CCC = $(CXX)
OBJECTS = Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o
diff -ur Manager.C Manager.C
--- a/Manager.C 1997-03-21 12:12:30.000000000 +0100
+++ b/Manager.C 2007-06-30 16:56:10.000000000 +0200
@@ -368,7 +368,7 @@
return m_currentTime;
}
-void WindowManager::sigHandler()
+void WindowManager::sigHandler(int n)
{
m_signalled = True;
}
diff -ur Manager.h Manager.h
--- a/Manager.h 1997-03-21 12:12:30.000000000 +0100
+++ b/Manager.h 2007-06-30 16:56:10.000000000 +0200
@@ -85,7 +85,7 @@
static Boolean m_initialising;
static int errorHandler(Display *, XErrorEvent *);
- static void sigHandler();
+ static void sigHandler(int);
static int m_signalled;
void initialiseScreen();