]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add support for disabling libavw
authorSimon McVittie <smcv@debian.org>
Fri, 17 May 2013 23:36:31 +0000 (00:36 +0100)
committernyov <nyov@nexnode.net>
Thu, 27 Nov 2014 10:45:19 +0000 (10:45 +0000)
As with all the other dlopen()'d libraries, if we're going to use them,
we should link them properly so dpkg-shlibdeps can pick up the
right versioned dependencies. Xonotic 0.7.0 doesn't seem to ship
this one so we can probably just omit it.

Origin: vendor, Debian
Forwarded: no

cl_video_libavw.c
makefile
makefile.inc

index 7924127a1def8d555c00a471188a458e0545f608..6ccdb548ccaf01829f27539f6d64b930ad59654c 100644 (file)
 // LordHavoc: for some reason this is being #include'd rather than treated as its own file...
 // LordHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t.
 
+#ifdef DISABLE_AVW
+
+static qboolean LibAvW_OpenLibrary(void)
+{
+       return false;
+}
+
+static void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring)
+{
+       return NULL;
+}
+
+
+static void LibAvW_CloseLibrary(void)
+{
+}
+
+#else /* !DISABLE_AVW */
+
 // scaler type
 #define LIBAVW_SCALER_BILINEAR  0
 #define LIBAVW_SCALER_BICUBIC   1
@@ -384,3 +403,4 @@ static void LibAvW_CloseLibrary(void)
        Sys_UnloadLibrary(&libavw_dll);
 }
 
+#endif /* !DISABLE_AVW */
index 341e8262037255e6e0baf74550c3fb17d0aa99db..01e379fdfd284eee24857c9b081f55c71b655b52 100644 (file)
--- a/makefile
+++ b/makefile
@@ -319,6 +319,10 @@ else
        CFLAGS_FS=
 endif
 
+ifdef DISABLE_AVW
+CFLAGS_AVW=-DDISABLE_AVW
+endif
+
 ifdef LINK_TO_CURL
 CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl`
 LIB_CURL=`pkg-config --libs libcurl`
index e233ff58826a5682001137a4a66241eff88447d5..fcfe1ebd54195186a5b41793c8798e3ea5e2525b 100644 (file)
@@ -194,6 +194,7 @@ CFLAGS_COMMON=\
        $(CFLAGS_PRELOAD) \
        $(CFLAGS_FS) \
        $(CFLAGS_WARNINGS) \
+       $(CFLAGS_AVW) \
        $(CFLAGS_CURL) \
        $(CFLAGS_FREETYPE2) \
        $(CFLAGS_LIBJPEG) \