aboutsummaryrefslogtreecommitdiff
path: root/games/opensonic/loggcompat.diff
blob: 86c41a741a401143947c45f3608e5dd341799a03 (plain)
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
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,12 +82,6 @@ IF(NOT LJPGALLEG)
   MESSAGE(FATAL_ERROR "Fatal error: libjpgalleg not found! ${RTFM}")
 ENDIF(NOT LJPGALLEG)
 
-# LOGG: liblogg, libogg, libvorbis, libvorbisfile
-FIND_LIBRARY(LLOGG NAMES logg PATH "${CMAKE_LIBRARY_PATH}")
-IF(NOT LLOGG)
-  MESSAGE(FATAL_ERROR "Fatal error: liblogg not found! ${RTFM}")
-ENDIF(NOT LLOGG)
-
 FIND_LIBRARY(LOGG NAMES ogg PATH "${CMAKE_LIBRARY_PATH}")
 IF(NOT LOGG)
   MESSAGE(FATAL_ERROR "Fatal error: libogg not found! ${RTFM}")
@@ -150,6 +144,7 @@ SET(
   src/core/util.c
   src/core/v2d.c
   src/core/video.c
+  loggcompat-4.4.2/logg-4.4.2.c
 
   src/scenes/util/editorgrp.c
   src/scenes/util/grouptree.c
  
--- a/src/core/audio.c
+++ b/src/core/audio.c
@@ -18,7 +18,7 @@
  */
 
 #include <allegro.h>
-#include <logg.h>
+#include <logg-4.4.2.h>
 #include <stdlib.h>
 #include "audio.h"
 #include "osspec.h"

diff -up opensnc-src-0.1.4/CMakeLists.txt.orig opensnc-src-0.1.4/CMakeLists.txt
--- opensnc-src-0.1.4/CMakeLists.txt.orig	2022-03-04 19:42:19.045690020 -0600
+++ opensnc-src-0.1.4/CMakeLists.txt	2022-03-04 19:43:04.941859343 -0600
@@ -250,7 +250,8 @@ IF(UNIX)
   SET(GAME_SRCS ${GAME_SRCS} src/misc/iconlin.c)
   ADD_EXECUTABLE(${GAME_UNIXNAME} ${GAME_SRCS})
   SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES LINK_FLAGS ${ALLEGRO_UNIX_LIBS})
-  TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m logg vorbisfile vorbis ogg jpgalleg z png loadpng)
+  INCLUDE_DIRECTORIES(loggcompat-4.4.2)
+  TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m vorbisfile vorbis ogg jpgalleg z png loadpng ${ALLEGRO_UNIX_LIBS})
   SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall -O2 ${CFLAGS} ${CFLAGS_EXTRA}")
 ENDIF(UNIX)