]> Pileus Git - ~andy/sunrise/blobdiff - 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
diff --git a/dev-games/gigi/files/gigi-0.8.0_pre1074-libtool.patch b/dev-games/gigi/files/gigi-0.8.0_pre1074-libtool.patch
new file mode 100644 (file)
index 0000000..8bbf3e6
--- /dev/null
@@ -0,0 +1,96 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Sun Apr 22 23:09:06 UTC 2012
+
+use system ltdl header and link against libltdl
+
+--- GG/CMakeLists.txt
++++ GG/CMakeLists.txt
+@@ -228,36 +228,6 @@
+ ########################################
+ # Header Generation                    #
+ ########################################
+-if (NOT EXISTS ${CMAKE_HOME_DIRECTORY}/libltdl/config.h)
+-    if (UNIX)
+-        message("-- Configuring libltdl using \"libltdl/configure\" ...")
+-        execute_process(
+-            COMMAND ${CMAKE_HOME_DIRECTORY}/libltdl/configure
+-            WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/libltdl
+-            OUTPUT_QUIET
+-        )
+-    else ()
+-        file(WRITE ${CMAKE_HOME_DIRECTORY}/libltdl/config.h
+-             "/* WARNING: Generated by GG's build system.  All local changes will be lost! */
+-#define error_t int
+-#define HAVE_STDIO_H 1
+-#define HAVE_STDLIB_H 1
+-#define HAVE_STRING_H 1
+-#define HAVE_CTYPE_H 1
+-#define HAVE_MEMORY_H 1
+-#define HAVE_ERRNO_H 1
+-#define __WIN32__
+-#define HAVE_MEMCPY 1
+-#define HAVE_MEMMOVE 1
+-#define LTDL_OBJDIR \".libs\"
+-#define LTDL_DLOPEN_DEPLIBS 1
+-#define LTDL_SHLIBPATH_VAR \"PATH\"
+-#define LTDL_SHLIB_EXT \".dll\"
+-"
+-        )
+-    endif ()
+-endif ()
+-
+ configure_file(
+     ${CMAKE_HOME_DIRECTORY}/cmake/Config.h.in
+     ${CMAKE_HOME_DIRECTORY}/GG/Config.h
+--- GG/src/CMakeLists.txt
++++ GG/src/CMakeLists.txt
+@@ -49,8 +49,6 @@
+     dialogs/ColorDlg.cpp
+     dialogs/FileDlg.cpp
+     dialogs/ThreeButtonDlg.cpp
+-
+-    ../libltdl/ltdl.c
+     adobe/adam.cpp
+     adobe/adam_evaluate.cpp
+@@ -162,14 +160,21 @@
+     )
+ endif ()
+-set_source_files_properties(${CMAKE_HOME_DIRECTORY}/libltdl/ltdl.c PROPERTIES COMPILE_DEFINITIONS HAVE_CONFIG_H=1)
+-execute_process(
+-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_HOME_DIRECTORY}/libltdl/ltdl.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl.h
+-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_HOME_DIRECTORY}/libltdl/config.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl_config.h
+-)
+-set_source_files_properties(${CMAKE_HOME_DIRECTORY}/GG/ltdl.h ${CMAKE_HOME_DIRECTORY}/GG/ltdl_config.h PROPERTIES GENERATED true)
+-
+-set(THIS_LIB_LINK_LIBS ${Boost_LIBRARIES} ${OPENGL_LIBRARIES} ${FREETYPE_LIBRARIES})
++find_library(LIBTOOL_LIB ltdl)
++if (LIBTOOL_LIB)
++      MESSAGE(STATUS "  libtool-libraries : ${LIBTOOL_LIB}")
++else (LIBTOOL_LIB)
++      MESSAGE(FATAL_ERROR "libtool library not found!")
++endif (LIBTOOL_LIB)
++
++find_file(LIBTOOL_HEADER ltdl.h PATHS ${CMAKE_INCLUDE_PATH})
++if (LIBTOOL_HEADER)
++      MESSAGE(STATUS "  libtool-header : ${LIBTOOL_HEADER}")
++else (LIBTOOL_HEADER)
++      MESSAGE(FATAL_ERROR "libtool header not found!")
++endif (LIBTOOL_HEADER)
++
++set(THIS_LIB_LINK_LIBS ${Boost_LIBRARIES} ${OPENGL_LIBRARIES} ${FREETYPE_LIBRARIES} ${LIBTOOL_LIB})
+ if (USE_DEVIL)
+     list(APPEND THIS_LIB_LINK_LIBS ${IL_LIBRARY} ${ILUT_LIBRARY})
+ else ()
+--- GG/GG/PluginInterface.h
++++ GG/GG/PluginInterface.h
+@@ -35,7 +35,7 @@
+ #if defined(__APPLE__) && defined(__MACH__)
+ # include "../libltdl/ltdl.h"
+ #else
+-# include <GG/ltdl.h>
++# include <ltdl.h>
+ #endif
+ #include <string>