aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch24
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch214
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch114
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch170
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch87
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch24
-rw-r--r--recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch57
-rw-r--r--recipes-graphics/raspidmx/raspidmx_git.bb30
8 files changed, 720 insertions, 0 deletions
diff --git a/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch b/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch
new file mode 100644
index 0000000..de9d5c3
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0001-gitignore-add-archives-from-lib-directory.patch
@@ -0,0 +1,24 @@
+From 070b114fd54b6ad38b4eff04279fe89ccaaef61b Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 01:39:30 -0500
+Subject: [PATCH] gitignore: add archives from lib directory
+
+The build creates two *.a files in the lib directory, add these to .gitignore.
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ .gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/.gitignore b/.gitignore
+index 633f325..4a1ca0c 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -21,5 +21,6 @@ test_pattern/test_pattern
+ worms/worms
+
+ # other directories
++lib/*.a
+
+ *_/
diff --git a/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch b/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch
new file mode 100644
index 0000000..c02a767
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0002-add-install-targets-to-Makefiles.patch
@@ -0,0 +1,214 @@
+From 3b60fa1598385fb36fef1c47f59cb08d3a6fba35 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 01:54:37 -0500
+Subject: [PATCH] add "install" targets to Makefiles
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ Makefile | 3 +++
+ game/Makefile | 4 ++++
+ lib/Makefile | 1 +
+ life/Makefile | 4 ++++
+ mandelbrot/Makefile | 4 ++++
+ offscreen/Makefile | 4 ++++
+ pngview/Makefile | 4 ++++
+ radar_sweep/Makefile | 4 ++++
+ radar_sweep_alpha/Makefile | 4 ++++
+ rgb_triangle/Makefile | 4 ++++
+ spriteview/Makefile | 4 ++++
+ test_pattern/Makefile | 4 ++++
+ worms/Makefile | 4 ++++
+ 13 files changed, 48 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 4e14e18..4a06de9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,6 +16,9 @@ default :all
+ all:
+ for target in $(TARGETS); do ($(MAKE) -C $$target); done
+
++install:
++ for target in $(TARGETS); do ($(MAKE) -C $$target install); done
++
+ clean:
+ for target in $(TARGETS); do ($(MAKE) -C $$target clean); done
+
+diff --git a/game/Makefile b/game/Makefile
+index ced9cce..6da6a6d 100644
+--- a/game/Makefile
++++ b/game/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/lib/Makefile b/lib/Makefile
+index 15d7c37..2765c91 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -29,6 +29,7 @@ $(LIB): $(OBJS)
+ $(LIBPNG): $(OBJSPNG)
+ $(AR) rcs lib$(LIBPNG).a $(OBJSPNG)
+
++install:
+
+ clean:
+ @rm -f $(OBJS)
+diff --git a/life/Makefile b/life/Makefile
+index 2fcb034..44f1edb 100644
+--- a/life/Makefile
++++ b/life/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
+index e61beb3..a6e6735 100644
+--- a/mandelbrot/Makefile
++++ b/mandelbrot/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/offscreen/Makefile b/offscreen/Makefile
+index 2bc81b9..8d23354 100644
+--- a/offscreen/Makefile
++++ b/offscreen/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/pngview/Makefile b/pngview/Makefile
+index f947320..8c037ec 100644
+--- a/pngview/Makefile
++++ b/pngview/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile
+index 3a46150..5f814b7 100644
+--- a/radar_sweep/Makefile
++++ b/radar_sweep/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile
+index 5680b9b..f66c338 100644
+--- a/radar_sweep_alpha/Makefile
++++ b/radar_sweep_alpha/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile
+index 2017956..2ce779d 100644
+--- a/rgb_triangle/Makefile
++++ b/rgb_triangle/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/spriteview/Makefile b/spriteview/Makefile
+index 2713936..ada9277 100644
+--- a/spriteview/Makefile
++++ b/spriteview/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/test_pattern/Makefile b/test_pattern/Makefile
+index be434d9..1e02b0a 100644
+--- a/test_pattern/Makefile
++++ b/test_pattern/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
+diff --git a/worms/Makefile b/worms/Makefile
+index 2a21a4b..c249c8c 100644
+--- a/worms/Makefile
++++ b/worms/Makefile
+@@ -15,6 +15,10 @@ all: $(BIN)
+ $(BIN): $(OBJS)
+ $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+
++install: $(BIN)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++
+ clean:
+ @rm -f $(OBJS)
+ @rm -f $(BIN)
diff --git a/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch b/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch
new file mode 100644
index 0000000..7adb12b
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch
@@ -0,0 +1,114 @@
+From 314fbde187e9187b1b3e18e50dd937c070e93633 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 01:58:59 -0500
+Subject: [PATCH] switch to "pkg-config"
+
+I get a build error saying:
+
+ ERROR: /usr/bin/libpng16-config should not be used, use an alternative such as pkg-config
+
+Therefore switch to the more common and more generic "pkg-config" instead of
+using a libpng-specific tool for flags and libraries.
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ game/Makefile | 4 ++--
+ lib/Makefile | 4 ++--
+ mandelbrot/Makefile | 4 ++--
+ offscreen/Makefile | 4 ++--
+ pngview/Makefile | 4 ++--
+ spriteview/Makefile | 4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/game/Makefile b/game/Makefile
+index 6da6a6d..0a90a38 100644
+--- a/game/Makefile
++++ b/game/Makefile
+@@ -1,8 +1,8 @@
+ OBJS=main.o
+ BIN=game
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 2765c91..1e8c759 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -11,9 +11,9 @@ OBJS=../common/backgroundLayer.o ../common/imageGraphics.o ../common/key.o \
+
+ OBJSPNG=../common/spriteLayer.o ../common/loadpng.o ../common/savepng.o ../common/scrollingLayer.o
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+ LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm
+-LDFLAGSPNG=${LDFLAGS} $(shell libpng-config --ldflags)
++LDFLAGSPNG=${LDFLAGS} $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
+index a6e6735..82910bb 100644
+--- a/mandelbrot/Makefile
++++ b/mandelbrot/Makefile
+@@ -1,8 +1,8 @@
+ OBJS=main.o mandelbrot.o info.o
+ BIN=mandelbrot
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/offscreen/Makefile b/offscreen/Makefile
+index 8d23354..0120796 100644
+--- a/offscreen/Makefile
++++ b/offscreen/Makefile
+@@ -1,8 +1,8 @@
+ OBJS=pngresize.o resizeDispmanX.o
+ BIN=pngresize
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/pngview/Makefile b/pngview/Makefile
+index 8c037ec..71a5d76 100644
+--- a/pngview/Makefile
++++ b/pngview/Makefile
+@@ -1,8 +1,8 @@
+ OBJS=pngview.o
+ BIN=pngview
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/spriteview/Makefile b/spriteview/Makefile
+index ada9277..904c1e8 100644
+--- a/spriteview/Makefile
++++ b/spriteview/Makefile
+@@ -1,8 +1,8 @@
+ OBJS=spriteview.o
+ BIN=spriteview
+
+-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
++CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
++LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
diff --git a/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch b/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch
new file mode 100644
index 0000000..908be62
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0004-add-libvchostif-to-link.patch
@@ -0,0 +1,170 @@
+From bde71fc22bde61ef8fe319c60f478ec370f5bc5d Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 02:13:39 -0500
+Subject: [PATCH] add libvchostif to link
+
+I end up with link errors of the type:
+
+ libvchostif.so: error adding symbols: DSO missing from command line
+
+Which is caused by not having -lvchostif in the link.
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ game/Makefile | 2 +-
+ life/Makefile | 2 +-
+ mandelbrot/Makefile | 2 +-
+ offscreen/Makefile | 2 +-
+ pngview/Makefile | 2 +-
+ radar_sweep/Makefile | 2 +-
+ radar_sweep_alpha/Makefile | 2 +-
+ rgb_triangle/Makefile | 2 +-
+ spriteview/Makefile | 2 +-
+ test_pattern/Makefile | 2 +-
+ worms/Makefile | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/game/Makefile b/game/Makefile
+index 0a90a38..b756fa2 100644
+--- a/game/Makefile
++++ b/game/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o
+ BIN=game
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/life/Makefile b/life/Makefile
+index 44f1edb..2addf69 100644
+--- a/life/Makefile
++++ b/life/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o life.o info.o
+ BIN=life
+
+ CFLAGS+=-Wall -g -O3 -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
+index 82910bb..31097f2 100644
+--- a/mandelbrot/Makefile
++++ b/mandelbrot/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o
+ BIN=mandelbrot
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/offscreen/Makefile b/offscreen/Makefile
+index 0120796..4f13fd0 100644
+--- a/offscreen/Makefile
++++ b/offscreen/Makefile
+@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o
+ BIN=pngresize
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/pngview/Makefile b/pngview/Makefile
+index 71a5d76..cce8d63 100644
+--- a/pngview/Makefile
++++ b/pngview/Makefile
+@@ -2,7 +2,7 @@ OBJS=pngview.o
+ BIN=pngview
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile
+index 5f814b7..aa1d32c 100644
+--- a/radar_sweep/Makefile
++++ b/radar_sweep/Makefile
+@@ -2,7 +2,7 @@ OBJS=radar_sweep.o
+ BIN=radar_sweep
+
+ CFLAGS+=-Wall -O3 -g -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile
+index f66c338..571d47b 100644
+--- a/radar_sweep_alpha/Makefile
++++ b/radar_sweep_alpha/Makefile
+@@ -2,7 +2,7 @@ OBJS=radar_sweep_alpha.o
+ BIN=radar_sweep_alpha
+
+ CFLAGS+=-Wall -O3 -g -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile
+index 2ce779d..0266715 100644
+--- a/rgb_triangle/Makefile
++++ b/rgb_triangle/Makefile
+@@ -2,7 +2,7 @@ OBJS=rgb_triangle.o
+ BIN=rgb_triangle
+
+ CFLAGS+=-Wall -O3 -g -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/spriteview/Makefile b/spriteview/Makefile
+index 904c1e8..d2fb3c8 100644
+--- a/spriteview/Makefile
++++ b/spriteview/Makefile
+@@ -2,7 +2,7 @@ OBJS=spriteview.o
+ BIN=spriteview
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/test_pattern/Makefile b/test_pattern/Makefile
+index 1e02b0a..c231fb6 100644
+--- a/test_pattern/Makefile
++++ b/test_pattern/Makefile
+@@ -2,7 +2,7 @@ OBJS=test_pattern.o
+ BIN=test_pattern
+
+ CFLAGS+=-Wall -g -O3 -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/worms/Makefile b/worms/Makefile
+index c249c8c..3b6c830 100644
+--- a/worms/Makefile
++++ b/worms/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o worms.o
+ BIN=worms
+
+ CFLAGS+=-Wall -g -O3 -I../common
+-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
diff --git a/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch b/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch
new file mode 100644
index 0000000..ceefd03
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0005-change-library-linking-order.patch
@@ -0,0 +1,87 @@
+From 07e7b727b7df7fc5bf0e1f296ba136e0653202ea Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 03:25:08 -0500
+Subject: [PATCH] change library linking order
+
+Since -lraspidmxPng requires the png library (libpng), re-arrange the order of
+linking so that it succeeds. Otherwise I get errors like the following:
+
+ undefined reference to `png_create_write_struct'
+
+...as well as undefined references to various other libpng objects.
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ game/Makefile | 2 +-
+ mandelbrot/Makefile | 2 +-
+ offscreen/Makefile | 2 +-
+ pngview/Makefile | 2 +-
+ spriteview/Makefile | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/game/Makefile b/game/Makefile
+index b756fa2..f33916d 100644
+--- a/game/Makefile
++++ b/game/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o
+ BIN=game
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
+index 31097f2..08d1113 100644
+--- a/mandelbrot/Makefile
++++ b/mandelbrot/Makefile
+@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o
+ BIN=mandelbrot
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/offscreen/Makefile b/offscreen/Makefile
+index 4f13fd0..49fc744 100644
+--- a/offscreen/Makefile
++++ b/offscreen/Makefile
+@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o
+ BIN=pngresize
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/pngview/Makefile b/pngview/Makefile
+index cce8d63..bd6c154 100644
+--- a/pngview/Makefile
++++ b/pngview/Makefile
+@@ -2,7 +2,7 @@ OBJS=pngview.o
+ BIN=pngview
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
+diff --git a/spriteview/Makefile b/spriteview/Makefile
+index d2fb3c8..89d9e01 100644
+--- a/spriteview/Makefile
++++ b/spriteview/Makefile
+@@ -2,7 +2,7 @@ OBJS=spriteview.o
+ BIN=spriteview
+
+ CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
++LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
+
+ INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
+
diff --git a/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch b/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch
new file mode 100644
index 0000000..dae847d
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0006-game-Makefile-install-sample-png-files.patch
@@ -0,0 +1,24 @@
+From 1868a111450be0053ab124df501cfcb7542f5e77 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 03:47:17 -0500
+Subject: [PATCH] game/Makefile: install sample png files
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ game/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/game/Makefile b/game/Makefile
+index f33916d..d007972 100644
+--- a/game/Makefile
++++ b/game/Makefile
+@@ -18,6 +18,8 @@ $(BIN): $(OBJS)
+ install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
++ install -d $(DESTDIR)/usr/share/raspidmx
++ install -m 444 spotlight.png sprite.png texture.png $(DESTDIR)/usr/share/raspidmx
+
+ clean:
+ @rm -f $(OBJS)
diff --git a/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch b/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch
new file mode 100644
index 0000000..b5c743e
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx/0007-Makefile-reorganize.patch
@@ -0,0 +1,57 @@
+From f195ffffb133c9cda88d5eac41c0f584fd4540c9 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Fri, 4 Dec 2020 03:48:36 -0500
+Subject: [PATCH] Makefile: reorganize
+
+Reorganize the main Makefile in order to:
+1. be able to build in parallel
+2. have build failures in subdirectories stop the build
+
+Now the "-j <#threads>" option can be used with 'make'.
+
+Also, if a build failure occurs in a subdirectory, this new arrangement will
+cause the build to stop and fail instead of silently ignoring it.
+
+To build simply invoke 'make' with or without a -j option.
+To install simply invoke: make TARGET=install
+To clean simply invoke: make TARGET=clean
+
+Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ Makefile | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a06de9..1f9f7c4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,4 @@
+-TARGETS=lib \
+- life \
++TARGETS=life \
+ mandelbrot \
+ offscreen \
+ pngview \
+@@ -10,15 +9,11 @@ TARGETS=lib \
+ spriteview \
+ test_pattern \
+ worms
++.PHONY: all lib install clean $(TARGETS)
+
+-default :all
+-
+-all:
+- for target in $(TARGETS); do ($(MAKE) -C $$target); done
+-
+-install:
+- for target in $(TARGETS); do ($(MAKE) -C $$target install); done
+-
+-clean:
+- for target in $(TARGETS); do ($(MAKE) -C $$target clean); done
++all: $(TARGETS)
+
++$(TARGETS): lib
++ $(MAKE) -C $@ $(TARGET)
++lib:
++ $(MAKE) -C $@ $(TARGET)
diff --git a/recipes-graphics/raspidmx/raspidmx_git.bb b/recipes-graphics/raspidmx/raspidmx_git.bb
new file mode 100644
index 0000000..ffe305a
--- /dev/null
+++ b/recipes-graphics/raspidmx/raspidmx_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Some examples using the DispmanX API on the Raspberry Pi"
+HOMEPAGE = "https://github.com/AndrewFromMelbourne/raspidmx"
+SECTION = "graphics"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=52962875ab02c36df6cde47b1f463024"
+
+COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
+
+SRC_URI = "git://github.com/AndrewFromMelbourne/raspidmx;protocol=https \
+ file://0001-gitignore-add-archives-from-lib-directory.patch \
+ file://0002-add-install-targets-to-Makefiles.patch \
+ file://0003-switch-to-pkg-config.patch \
+ file://0004-add-libvchostif-to-link.patch \
+ file://0005-change-library-linking-order.patch \
+ file://0006-game-Makefile-install-sample-png-files.patch \
+ file://0007-Makefile-reorganize.patch \
+ "
+
+PV = "0.0+git${SRCPV}"
+SRCREV = "e2ee6faa0d01a5ece06bcc74a47f37d7e6837310"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+DEPENDS += "libpng userland"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' 'TARGET=install'
+}