]> Pileus Git - ~andy/sunrise/blob - dev-games/gigi/files/gigi-0.8.0_pre1074-libtool.patch
dev-games/gigi: New Ebuild for bug 349367 thanks to all
[~andy/sunrise] / dev-games / gigi / files / gigi-0.8.0_pre1074-libtool.patch
1 From: hasufell <julian.ospald@googlemail.com>
2 Date: Sun Apr 22 23:09:06 UTC 2012
3
4 use system ltdl header and link against libltdl
5
6 --- GG/CMakeLists.txt
7 +++ GG/CMakeLists.txt
8 @@ -228,36 +228,6 @@
9  ########################################
10  # Header Generation                    #
11  ########################################
12 -if (NOT EXISTS ${CMAKE_HOME_DIRECTORY}/libltdl/config.h)
13 -    if (UNIX)
14 -        message("-- Configuring libltdl using \"libltdl/configure\" ...")
15 -        execute_process(
16 -            COMMAND ${CMAKE_HOME_DIRECTORY}/libltdl/configure
17 -            WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/libltdl
18 -            OUTPUT_QUIET
19 -        )
20 -    else ()
21 -        file(WRITE ${CMAKE_HOME_DIRECTORY}/libltdl/config.h
22 -             "/* WARNING: Generated by GG's build system.  All local changes will be lost! */
23 -#define error_t int
24 -#define HAVE_STDIO_H 1
25 -#define HAVE_STDLIB_H 1
26 -#define HAVE_STRING_H 1
27 -#define HAVE_CTYPE_H 1
28 -#define HAVE_MEMORY_H 1
29 -#define HAVE_ERRNO_H 1
30 -#define __WIN32__
31 -#define HAVE_MEMCPY 1
32 -#define HAVE_MEMMOVE 1
33 -#define LTDL_OBJDIR \".libs\"
34 -#define LTDL_DLOPEN_DEPLIBS 1
35 -#define LTDL_SHLIBPATH_VAR \"PATH\"
36 -#define LTDL_SHLIB_EXT \".dll\"
37 -"
38 -        )
39 -    endif ()
40 -endif ()
41 -
42  configure_file(
43      ${CMAKE_HOME_DIRECTORY}/cmake/Config.h.in
44      ${CMAKE_HOME_DIRECTORY}/GG/Config.h
45 --- GG/src/CMakeLists.txt
46 +++ GG/src/CMakeLists.txt
47 @@ -49,8 +49,6 @@
48      dialogs/ColorDlg.cpp
49      dialogs/FileDlg.cpp
50      dialogs/ThreeButtonDlg.cpp
51 -
52 -    ../libltdl/ltdl.c
53  
54      adobe/adam.cpp
55      adobe/adam_evaluate.cpp
56 @@ -162,14 +160,21 @@
57      )
58  endif ()
59  
60 -set_source_files_properties(${CMAKE_HOME_DIRECTORY}/libltdl/ltdl.c PROPERTIES COMPILE_DEFINITIONS HAVE_CONFIG_H=1)
61 -execute_process(
62 -    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_HOME_DIRECTORY}/libltdl/ltdl.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl.h
63 -    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_HOME_DIRECTORY}/libltdl/config.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl_config.h
64 -)
65 -set_source_files_properties(${CMAKE_HOME_DIRECTORY}/GG/ltdl.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl_config.h PROPERTIES GENERATED true)
66 -
67 -set(THIS_LIB_LINK_LIBS ${Boost_LIBRARIES} ${OPENGL_LIBRARIES} ${FREETYPE_LIBRARIES})
68 +find_library(LIBTOOL_LIB ltdl)
69 +if (LIBTOOL_LIB)
70 +       MESSAGE(STATUS "  libtool-libraries : ${LIBTOOL_LIB}")
71 +else (LIBTOOL_LIB)
72 +       MESSAGE(FATAL_ERROR "libtool library not found!")
73 +endif (LIBTOOL_LIB)
74 +
75 +find_file(LIBTOOL_HEADER ltdl.h PATHS ${CMAKE_INCLUDE_PATH})
76 +if (LIBTOOL_HEADER)
77 +       MESSAGE(STATUS "  libtool-header : ${LIBTOOL_HEADER}")
78 +else (LIBTOOL_HEADER)
79 +       MESSAGE(FATAL_ERROR "libtool header not found!")
80 +endif (LIBTOOL_HEADER)
81 +
82 +set(THIS_LIB_LINK_LIBS ${Boost_LIBRARIES} ${OPENGL_LIBRARIES} ${FREETYPE_LIBRARIES} ${LIBTOOL_LIB})
83  if (USE_DEVIL)
84      list(APPEND THIS_LIB_LINK_LIBS ${IL_LIBRARY} ${ILUT_LIBRARY})
85  else ()
86 --- GG/GG/PluginInterface.h
87 +++ GG/GG/PluginInterface.h
88 @@ -35,7 +35,7 @@
89  #if defined(__APPLE__) && defined(__MACH__)
90  # include "../libltdl/ltdl.h"
91  #else
92 -# include <GG/ltdl.h>
93 +# include <ltdl.h>
94  #endif
95  
96  #include <string>