Skip to content

Commit

Permalink
Enable common image formats
Browse files Browse the repository at this point in the history
  • Loading branch information
tjammer committed Feb 26, 2024
1 parent 62e1109 commit 8876ad9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/c/dune
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,15 @@
(= %{system} linux_elf)
(= %{system} elf)))
(deps
(source_tree vendor/raylib))
(source_tree vendor/raylib)
enable_jpg.patch)
(action
(no-infer
(progn
(run chmod +w vendor/raylib/src/config.h)
(with-stdin-from
enable_jpg.patch
(run patch -sp1))
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=STATIC -j 8)
(copy vendor/raylib/src/libraylib.a libraylib.a)
(run make -C vendor/raylib/src clean)
Expand All @@ -91,10 +96,15 @@
(enabled_if
(= %{system} macosx))
(deps
(source_tree vendor/raylib))
(source_tree vendor/raylib)
enable_jpg.patch)
(action
(no-infer
(progn
(run chmod +w vendor/raylib/src/config.h)
(with-stdin-from
enable_jpg.patch
(run patch -sp1))
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=STATIC -j 8)
(copy vendor/raylib/src/libraylib.a libraylib.a)
(run make -C vendor/raylib/src clean)
Expand All @@ -108,10 +118,16 @@
(= %{system} mingw64))
(deps
(source_tree vendor/raylib)
enable_jpg.patch
mingw64.patch)
(action
(no-infer
(progn
(run chmod +w vendor/raylib/src/config.h)
(run unix2dos vendor/raylib/src/Makefile)
(with-stdin-from
enable_jpg.patch
(run patch -sp1))
(run chmod +w vendor/raylib/src/Makefile)
(run unix2dos vendor/raylib/src/Makefile)
(with-stdin-from
Expand All @@ -135,10 +151,15 @@
(= %{system} bsd_elf)))
(deps
(source_tree vendor/raylib)
enable_jpg.patch
freebsd.patch)
(action
(no-infer
(progn
(run chmod +w vendor/raylib/src/config.h)
(with-stdin-from
enable_jpg.patch
(run patch -sp1))
(run chmod +w vendor/raylib/src/Makefile)
(with-stdin-from
freebsd.patch
Expand Down
15 changes: 15 additions & 0 deletions src/c/enable_jpg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -u a/vendor/raylib/src/config.h b/vendor/raylib/src/config.h
--- a/vendor/raylib/src/config.h
+++ b/vendor/raylib/src/config.h
@@ -148,9 +148,9 @@
//------------------------------------------------------------------------------------
// Selecte desired fileformats to be supported for image data loading
#define SUPPORT_FILEFORMAT_PNG 1
-//#define SUPPORT_FILEFORMAT_BMP 1
+#define SUPPORT_FILEFORMAT_BMP 1
//#define SUPPORT_FILEFORMAT_TGA 1
-//#define SUPPORT_FILEFORMAT_JPG 1
+#define SUPPORT_FILEFORMAT_JPG 1
#define SUPPORT_FILEFORMAT_GIF 1
#define SUPPORT_FILEFORMAT_QOI 1
//#define SUPPORT_FILEFORMAT_PSD 1

0 comments on commit 8876ad9

Please sign in to comment.