openbsd-ports/games/barony/patches/patch-CMakeLists_txt
solene 38aab78e4b Import barony 3.1.4
Barony is a 3D, first-person roguelike. The goal of the game is to descend to
the bottom of a dark dungeon known as the Devil's Bastion and destroy an undead
lich named Baron Herx, who terrorized the peaceful town of Hamlet in life and is
now harboring a curse against the land from beyond the grave. To aid you in your
quest are friendly humans who have been eeking out a rough life within the
dungeon for generations, as well as any friends you can bring with you in real
life: Barony is the first of its kind as a first-person roguelike in that it
fully supports cooperative multiplayer for up to four players.

Port by David Carlier (maintainer)
Ported to OpenBSD by thfr@, bcallah@ and David Carlier
Help from sthen@, danj@, bcallah@, solene@

ok sthen@, danj@, bcallah@
2018-05-04 22:30:08 +00:00

117 lines
5.7 KiB
Plaintext

$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2018/05/04 22:30:08 solene Exp $
Remove hardcoded -O3
Rename binary to barony-bin because we are invoking the
game via a wrapper script, which is named barony.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -58,14 +58,14 @@ if( NOT WIN32 )
if(PANDORA)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall ")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
else()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pg -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover -Wreturn-type -Werror=return-type")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pg")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ")
endif()
if (APPLE)
set (Apple 1)
@@ -253,7 +253,7 @@ message("${CMAKE_CXX_FLAGS_DEBUG}")
message("Release flags: ")
message("${CMAKE_C_FLAGS_RELEASE}")
message("${CMAKE_CXX_FLAGS_RELEASE}")
-#-O3 -DNDEBUG -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing
+# -DNDEBUG -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing
message("***************************")
@@ -290,7 +290,7 @@ SET_SOURCE_FILES_PROPERTIES(${MACOSX_BUNDLE_ICON_FILE}
set_source_files_properties(${GAME_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++")
#set_source_files_properties(${GAME_SOURCES} PROPERTIES COMPILE_FLAGS "-stdlib=libc++")
else()
-add_executable(barony ${GAME_SOURCES})
+add_executable(barony-bin ${GAME_SOURCES})
endif()
if(WIN32)
@@ -307,9 +307,9 @@ if(WIN32)
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
# 64 bit
- target_link_libraries(barony -L/usr/lib64 -lstdc++)
+ target_link_libraries(barony-bin -L/usr/lib64 -lstdc++)
endif()
- target_link_libraries(barony ${SDL2_LIBRARIES} ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY})
+ target_link_libraries(barony-bin ${SDL2_LIBRARIES} ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY})
if (STEAMWORKS_ENABLED)
target_link_libraries(barony ${STEAMWORKS_LIBRARY})
#target_link_libraries(barony ${STEAMWORKS_CWRAPPER_LIBRARIES} -lstdc++)
@@ -322,15 +322,15 @@ else()
find_path(EXECINFO_INC NAMES execinfo.h)
find_library(EXECINFO_LIB NAMES execinfo)
include_directories(${EXECINFO_INC})
- target_link_libraries(barony ${EXECINFO_LIB})
+ target_link_libraries(barony-bin ${EXECINFO_LIB})
endif()
endif()
-target_link_libraries(barony ${OPENGL_LIBRARIES})
-target_link_libraries(barony ${THREADS_LIBRARIES})
-target_link_libraries(barony -lm)
+target_link_libraries(barony-bin ${OPENGL_LIBRARIES})
+target_link_libraries(barony-bin ${THREADS_LIBRARIES})
+target_link_libraries(barony-bin -lm)
if( NOT WIN32 AND NOT APPLE)
#Remember, Windows and Mac aren't using find_package for FMOD and PNG.
- target_link_libraries(barony ${PNG_LIBRARY})
+ target_link_libraries(barony-bin ${PNG_LIBRARY})
if (FMOD_FOUND)
target_link_libraries(barony ${FMOD_LIBRARY})
endif()
@@ -345,14 +345,14 @@ if(APPLE)
target_link_libraries(barony -lfmodex) #Finally manually link fmod for mac.
endif()
endif()
-target_link_libraries(barony ${EXTRA_LIBS}) #Apple needs this for OpenGL to work.
+target_link_libraries(barony-bin ${EXTRA_LIBS}) #Apple needs this for OpenGL to work.
if (OPENAL)
- target_link_libraries(barony ${OPENAL_LIBRARY})
+ target_link_libraries(barony-bin ${OPENAL_LIBRARY})
if(TREMOR_ENABLED)
- target_link_libraries(barony ${TREMOR_LIBRARY})
+ target_link_libraries(barony-bin ${TREMOR_LIBRARY})
else()
- target_link_libraries(barony ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
+ target_link_libraries(barony-bin ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
endif()
endif()
@@ -365,7 +365,7 @@ if (NOT APPLE AND UNIX)
endif()
message(STATUS "Base data directory ${BASE_DATA_DIR}")
- install(TARGETS barony
+ install(TARGETS barony-bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT Runtime
)
@@ -445,7 +445,7 @@ if (NOT APPLE AND UNIX)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lang DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/barony)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lang DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/barony)
if (EXISTS books)
install(DIRECTORY