Please find attached a patch that fixes debian bug 622583: deng: FTBFS everywhere
It detects and links to libm on Linux. It should work under other *NIX eg FreeBSD but this is untested (and would be trivial to fix if it doesn't). This probably should be pushed upstream, but given upstream has been steadily removing and rewriting my contributions out of doomsday, it will require someone with more motivation and energy than myself to do so. Best regards, Yagisan -- Jamie Jones Email: jamie_jones...@yahoo.com.au GPG/PGP signed mail preferred. PGP Key ID 0x4B6E7209 Fingerprint E1FD 9D7E 6BB4 1BD4 AEB9 3091 0027 CEFA 4B6E 7209
diff -rNd -c3 deng-1.9.0-beta6.9+dfsg1/doomsday/build/cmake/Findlibm.cmake deng-1.9.0-beta6.9+dfsg1-fixed/doomsday/build/cmake/Findlibm.cmake *** deng-1.9.0-beta6.9+dfsg1/doomsday/build/cmake/Findlibm.cmake 1970-01-01 10:00:00.000000000 +1000 --- deng-1.9.0-beta6.9+dfsg1-fixed/doomsday/build/cmake/Findlibm.cmake 2011-04-20 19:26:06.758284631 +1000 *************** *** 0 **** --- 1,67 ---- + # - Try to find LIBM + # Once done this will define + # + # LIBM_FOUND - system has LIBM + # LIBM_INCLUDE_DIRS - the LIBM include directory + # LIBM_LIBRARIES - Link these to use LIBM + # LIBM_DEFINITIONS - Compiler switches required for using LIBM + # + # Copyright (c) 2011 Jamie Jones <jamie_jones...@yahoo.com.au> + # + # Redistribution and use is allowed according to the terms of the + # GNU GPL v3 + # + + + if (LIBM_LIBRARIES AND LIBM_INCLUDE_DIRS) + # in cache already + set(LIBM_FOUND TRUE) + else (LIBM_LIBRARIES AND LIBM_INCLUDE_DIRS) + find_path(LIBM_INCLUDE_DIR + NAMES + math.h + PATHS + $ENV{LIBMDIR}/include + /usr/include + /usr/local/include + /opt/local/include + /sw/include + ) + + find_library(LIBM_LIBRARY + NAMES + m + PATHS + $ENV{LIBMDIR}/libs + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + + set(LIBM_INCLUDE_DIRS + ${LIBM_INCLUDE_DIR} + ) + set(LIBM_LIBRARIES + ${LIBM_LIBRARY} + ) + + if (LIBM_INCLUDE_DIRS AND LIBM_LIBRARIES) + set(LIBM_FOUND TRUE) + endif (LIBM_INCLUDE_DIRS AND LIBM_LIBRARIES) + + if (LIBM_FOUND) + if (NOT LIBM_FIND_QUIETLY) + message(STATUS "Found LIBM: ${LIBM_LIBRARIES}") + endif (NOT LIBM_FIND_QUIETLY) + else (LIBM_FOUND) + if (LIBM_FIND_REQUIRED) + message(FATAL_ERROR "Could not find LIBM") + endif (LIBM_FIND_REQUIRED) + endif (LIBM_FOUND) + + # show the LIBM_INCLUDE_DIRS and LIBM_LIBRARIES variables only in the advanced view + mark_as_advanced(LIBM_INCLUDE_DIRS LIBM_LIBRARIES) + + endif (LIBM_LIBRARIES AND LIBM_INCLUDE_DIRS) + diff -rNd -c3 deng-1.9.0-beta6.9+dfsg1/doomsday/CMakeLists.txt deng-1.9.0-beta6.9+dfsg1-fixed/doomsday/CMakeLists.txt *** deng-1.9.0-beta6.9+dfsg1/doomsday/CMakeLists.txt 2011-04-20 19:29:40.000000000 +1000 --- deng-1.9.0-beta6.9+dfsg1-fixed/doomsday/CMakeLists.txt 2011-04-20 19:26:55.218284638 +1000 *************** *** 1,4 **** ! ## Copyright (c) 2006 - 2008 Jamie Jones <jamie_jones...@yahoo.com.au> ## Copyright (c) 2007 - 2008 Daniel Swanson <da...@dengine.net> ## Copyright (c) 2008 - 2009 Jaakko Keränen <jaakko.kera...@iki.fi> ## --- 1,4 ---- ! ## Copyright (c) 2006 - 2011 Jamie Jones <jamie_jones...@yahoo.com.au> ## Copyright (c) 2007 - 2008 Daniel Swanson <da...@dengine.net> ## Copyright (c) 2008 - 2009 Jaakko Keränen <jaakko.kera...@iki.fi> ## *************** *** 277,282 **** --- 277,289 ---- INCLUDE(TestBigEndian) + IF (UNIX) + IF (NOT APPLE) + FIND_PACKAGE(libm REQUIRED) + ENDIF (NOT APPLE) + ENDIF (UNIX) + + ################################################################################ ######################## Cpack - Generate packages and source tarballs ######## *************** *** 647,653 **** IF (NOT WIN32) TARGET_LINK_LIBRARIES (doomsday dl) IF (NOT APPLE) ! TARGET_LINK_LIBRARIES (doomsday ${X11_LIBRARIES}) ENDIF (NOT APPLE) ENDIF (NOT WIN32) ENDIF (UNIX) --- 654,660 ---- IF (NOT WIN32) TARGET_LINK_LIBRARIES (doomsday dl) IF (NOT APPLE) ! TARGET_LINK_LIBRARIES (doomsday ${X11_LIBRARIES} ${LIBM_LIBRARIES}) ENDIF (NOT APPLE) ENDIF (NOT WIN32) ENDIF (UNIX)
signature.asc
Description: This is a digitally signed message part.