File: system-libchdr.patch

package info (click to toggle)
genesisplusgx 1.7.4%2Bgit20260226-2
  • links: PTS, VCS
  • area: non-free
  • in suites: sid
  • size: 18,612 kB
  • sloc: ansic: 115,097; makefile: 244; xml: 170; sh: 2
file content (50 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Description: build against system libchdr
Origin: vendor
Forwarded: TODO
--- a/libretro/Makefile.common
+++ b/libretro/Makefile.common
@@ -23,6 +23,10 @@ ifeq ($(HOOK_CPU), 1)
 endif
 
 ifeq ($(HAVE_CHD), 1)
+  ifeq ($(SYSTEM_LIBCHDR), 1)
+   INCFLAGS += $(shell pkg-config --cflags libchdr)
+   LIBS += $(shell pkg-config --libs libchdr)
+  else
    FLAGS += -DZ7_ST -DZSTD_DISABLE_ASM
    INCFLAGS += -I$(CHDLIBDIR)/src \
 					-I$(CHDLIBDIR)/include \
@@ -53,6 +57,7 @@ ifeq ($(HAVE_CHD), 1)
    ifeq ($(platform), win)
        FLAGS += -DHAVE_FSEEKO
    endif
+  endif
 endif
 
 SOURCES_C += $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c))
@@ -65,12 +70,6 @@ SOURCES_C += \
 				 $(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
 				 $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
 				 $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c
-
-SOURCES_C += $(CHDLIBDIR)/deps/zlib-1.3.1/adler32.c \
-				 $(CHDLIBDIR)/deps/zlib-1.3.1/inffast.c \
-				 $(CHDLIBDIR)/deps/zlib-1.3.1/inflate.c \
-				 $(CHDLIBDIR)/deps/zlib-1.3.1/inftrees.c \
-				 $(CHDLIBDIR)/deps/zlib-1.3.1/zutil.c
 endif
 
 ifeq ($(SHARED_LIBVORBIS),)
--- a/core/cd_hw/cdd.h
+++ b/core/cd_hw/cdd.h
@@ -47,8 +47,8 @@
 #endif
 
 #if defined(USE_LIBCHDR)
-#include "libchdr/include/libchdr/chd.h"
-#include "libchdr/include/libchdr/cdrom.h"
+#include <libchdr/chd.h>
+#include <libchdr/cdrom.h>
 #endif
 
 #define cdd scd.cdd_hw