summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-26 12:31:21 -0700
committerMichael Forney <mforney@mforney.org>2016-06-26 13:27:49 -0700
commit043af3766e4b75dfa5c1c76d49b4f706a0a3f8f9 (patch)
treec03d7940fd1e946083d41d717a599476fd60d1cf
parent2867db6f027f3aad48814ca074ec34aeb8890de6 (diff)
Add wayland 1.11.0
-rw-r--r--.gitmodules4
-rw-r--r--LICENSE1
-rw-r--r--desktop/gen.rc3
-rw-r--r--desktop/wayland/config.h17
-rw-r--r--desktop/wayland/gen.rc52
-rw-r--r--desktop/wayland/patch/0001-scanner-Use-int-rather-than-uint-for-loop-index.patch27
m---------desktop/wayland/src0
-rwxr-xr-xfetch.rc1
8 files changed, 105 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 23e22585..6817dcce 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -77,6 +77,10 @@
[submodule "desktop/plan9fonts/src"]
path = desktop/plan9fonts/src
url = https://github.com/rtrn/plan9fonts
+[submodule "desktop/wayland/src"]
+ path = desktop/wayland/src
+ url = https://anongit.freedesktop.org/git/wayland/wayland.git
+ ignore = all
[submodule "devel/cparser/src"]
path = devel/cparser/src
url = http://pp.ipd.kit.edu/git/cparser.git
diff --git a/LICENSE b/LICENSE
index 4ed9d87d..0a7827a8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -31,6 +31,7 @@ desktop/expat/expat_config.h
desktop/libdrm/config.h
desktop/libffi/fficonfig.h
desktop/libpciaccess/config.h
+desktop/wayland/config.h
devel/make/config.h
devel/mc/config.h
extra/hostap/config.h
diff --git a/desktop/gen.rc b/desktop/gen.rc
index 7eadfaae..a4a0b9f9 100644
--- a/desktop/gen.rc
+++ b/desktop/gen.rc
@@ -1,5 +1,8 @@
+rule wayland_proto 'wayland-scanner $type $in $out.tmp && mv $out.tmp $out'
+
subgen expat
subgen libdrm
subgen libffi
subgen libpciaccess
subgen plan9fonts
+subgen wayland
diff --git a/desktop/wayland/config.h b/desktop/wayland/config.h
new file mode 100644
index 00000000..1559974f
--- /dev/null
+++ b/desktop/wayland/config.h
@@ -0,0 +1,17 @@
+#include <config-posix.h>
+
+#define HAVE_ACCEPT4 1
+/* #undef HAVE_EXECINFO_H */
+/* #undef HAVE_EXPAT_H */
+/* #undef HAVE_LIBXML */
+#define HAVE_MEMORY_H 1
+#define HAVE_MKOSTEMP 1
+#define LT_OBJDIR ".libs/"
+#define PACKAGE "wayland"
+#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.11.0"
+#define PACKAGE_NAME "wayland"
+#define PACKAGE_STRING "wayland 1.11.0"
+#define PACKAGE_TARNAME "wayland"
+#define PACKAGE_URL "http://wayland.freedesktop.org/"
+#define PACKAGE_VERSION "1.11.0"
+#define VERSION "1.11.0"
diff --git a/desktop/wayland/gen.rc b/desktop/wayland/gen.rc
new file mode 100644
index 00000000..c45eb3e4
--- /dev/null
+++ b/desktop/wayland/gen.rc
@@ -0,0 +1,52 @@
+cflags\
+ -isystem '$builddir'/desktop/expat/include\
+ -isystem '$builddir'/desktop/libffi/include\
+ -I include\
+ -I '$dir' \
+ -I '$outdir'/include \
+ -I '$srcdir'/src
+
+exprs=(\
+ -e s,@WAYLAND_VERSION_MAJOR@,1,\
+ -e s,@WAYLAND_VERSION_MINOR@,11,\
+ -e s,@WAYLAND_VERSION_MICRO@,0,\
+ -e s,@WAYLAND_VERSION@,1.11.0,\
+) let expr $"exprs -- build '$outdir'/wayland-version.h sed '$srcdir'/src/wayland-version.h.in
+
+cc src/wayland-util.c
+cc src/wayland-os.c
+cc src/connection.c '||' phony/desktop/libffi/headers
+
+exe wayland-scanner -d phony/desktop/expat/headers\
+ src/^(scanner.c wayland-util.c.o)\
+ '$builddir'/desktop/expat/libexpat.a
+
+for(type in client server) {
+ let type $type-header -- build '$outdir'/include/wayland-$type-protocol.h\
+ wayland_proto '$srcdir'/protocol/wayland.xml
+}
+hdrs=wayland-^(client-core client egl-core egl server-core server util version)^.h
+for(hdr in $hdrs) build '$outdir'/include/$hdr copy '$srcdir'/src/$hdr
+build '$outdir'/include/wayland-cursor.h copy '$srcdir'/cursor/wayland-cursor.h
+
+phony headers include/^($hdrs wayland-^(cursor.h (client server)^-protocol.h))
+
+let type code -- build '$outdir'/wayland-protocol.c\
+ wayland_proto '$srcdir'/protocol/wayland.xml
+cc '$outdir'/wayland-protocol.c
+
+lib libwayland-server.a -d 'phony/$dir/headers' src/^(\
+ connection.c.o\
+ wayland-os.c.o\
+ wayland-server.c\
+ wayland-shm.c\
+ wayland-util.c.o\
+ event-loop.c\
+) wayland-protocol.c.o
+
+lib libwayland-client.a -d 'phony/$dir/headers' src/^(\
+ connection.c.o\
+ wayland-os.c.o\
+ wayland-client.c\
+ wayland-util.c.o\
+) wayland-protocol.c.o
diff --git a/desktop/wayland/patch/0001-scanner-Use-int-rather-than-uint-for-loop-index.patch b/desktop/wayland/patch/0001-scanner-Use-int-rather-than-uint-for-loop-index.patch
new file mode 100644
index 00000000..3fef6cb9
--- /dev/null
+++ b/desktop/wayland/patch/0001-scanner-Use-int-rather-than-uint-for-loop-index.patch
@@ -0,0 +1,27 @@
+From 04baf9967a84adb6856fdb69fda80553719a4bfa Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sun, 26 Jun 2016 12:11:13 -0700
+Subject: [PATCH] scanner: Use int rather than uint for loop index
+
+uint requires including sys/types.h and defining _GNU_SOURCE. We could use
+unsigned instead, but there is no reason not to use just int instead.
+---
+ src/scanner.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/scanner.c b/src/scanner.c
+index 5f06e8e..836a181 100644
+--- a/src/scanner.c
++++ b/src/scanner.c
+@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protocol,
+ struct interface *i;
+ struct enumeration *e;
+ char *enum_name;
+- uint idx = 0, j;
++ int idx = 0, j;
+
+ for (j = 0; j + 1 < strlen(enum_attribute); j++) {
+ if (enum_attribute[j] == '.') {
+--
+2.9.0
+
diff --git a/desktop/wayland/src b/desktop/wayland/src
new file mode 160000
+Subproject 47163797f810373c81b6e13b7a8a245eb987778
diff --git a/fetch.rc b/fetch.rc
index 6370259d..d5090cae 100755
--- a/fetch.rc
+++ b/fetch.rc
@@ -96,6 +96,7 @@ fetch desktop/libpciaccess git
fetch desktop/libdrm git
fetch desktop/libffi git
fetch desktop/plan9fonts git
+fetch desktop/wayland git
fetch devel/cparser git
fetch devel/libfirm git
fetch devel/make git