Skip to content

Commit 20d897f

Browse files
committed
Enable common image formats
Fixes #40
1 parent 62e1109 commit 20d897f

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

src/c/dune

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@
7575
(= %{system} linux_elf)
7676
(= %{system} elf)))
7777
(deps
78-
(source_tree vendor/raylib))
78+
(source_tree vendor/raylib)
79+
enable_jpg.patch)
7980
(action
8081
(no-infer
8182
(progn
83+
(run chmod +w vendor/raylib/src/config.h)
84+
(with-stdin-from
85+
enable_jpg.patch
86+
(run patch -sp1))
8287
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=STATIC -j 8)
8388
(copy vendor/raylib/src/libraylib.a libraylib.a)
8489
(run make -C vendor/raylib/src clean)
@@ -91,10 +96,15 @@
9196
(enabled_if
9297
(= %{system} macosx))
9398
(deps
94-
(source_tree vendor/raylib))
99+
(source_tree vendor/raylib)
100+
enable_jpg.patch)
95101
(action
96102
(no-infer
97103
(progn
104+
(run chmod +w vendor/raylib/src/config.h)
105+
(with-stdin-from
106+
enable_jpg.patch
107+
(run patch -sp1))
98108
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=STATIC -j 8)
99109
(copy vendor/raylib/src/libraylib.a libraylib.a)
100110
(run make -C vendor/raylib/src clean)
@@ -108,10 +118,16 @@
108118
(= %{system} mingw64))
109119
(deps
110120
(source_tree vendor/raylib)
121+
enable_jpg.patch
111122
mingw64.patch)
112123
(action
113124
(no-infer
114125
(progn
126+
(run chmod +w vendor/raylib/src/config.h)
127+
(run unix2dos vendor/raylib/src/config.h)
128+
(with-stdin-from
129+
enable_jpg.patch
130+
(run patch --binary -sp1))
115131
(run chmod +w vendor/raylib/src/Makefile)
116132
(run unix2dos vendor/raylib/src/Makefile)
117133
(with-stdin-from
@@ -135,10 +151,15 @@
135151
(= %{system} bsd_elf)))
136152
(deps
137153
(source_tree vendor/raylib)
154+
enable_jpg.patch
138155
freebsd.patch)
139156
(action
140157
(no-infer
141158
(progn
159+
(run chmod +w vendor/raylib/src/config.h)
160+
(with-stdin-from
161+
enable_jpg.patch
162+
(run patch -sp1))
142163
(run chmod +w vendor/raylib/src/Makefile)
143164
(with-stdin-from
144165
freebsd.patch

src/c/enable_jpg.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff -u a/vendor/raylib/src/config.h b/vendor/raylib/src/config.h
2+
--- a/vendor/raylib/src/config.h
3+
+++ b/vendor/raylib/src/config.h
4+
@@ -148,9 +148,9 @@
5+
//------------------------------------------------------------------------------------
6+
// Selecte desired fileformats to be supported for image data loading
7+
#define SUPPORT_FILEFORMAT_PNG 1
8+
-//#define SUPPORT_FILEFORMAT_BMP 1
9+
+#define SUPPORT_FILEFORMAT_BMP 1
10+
//#define SUPPORT_FILEFORMAT_TGA 1
11+
-//#define SUPPORT_FILEFORMAT_JPG 1
12+
+#define SUPPORT_FILEFORMAT_JPG 1
13+
#define SUPPORT_FILEFORMAT_GIF 1
14+
#define SUPPORT_FILEFORMAT_QOI 1
15+
//#define SUPPORT_FILEFORMAT_PSD 1

0 commit comments

Comments
 (0)