diff --git a/hedgewars-0.9.18-no-dyn-haskell.patch b/hedgewars-0.9.18-no-dyn-haskell.patch deleted file mode 100644 index d4413f5..0000000 --- a/hedgewars-0.9.18-no-dyn-haskell.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up hedgewars-src-0.9.18/CMakeLists.txt~ hedgewars-src-0.9.18/CMakeLists.txt ---- hedgewars-src-0.9.18/CMakeLists.txt~ 2013-08-09 08:42:46.000000000 +0200 -+++ hedgewars-src-0.9.18/CMakeLists.txt 2013-08-09 10:44:33.716924021 +0200 -@@ -185,11 +185,11 @@ set(haskell_flags "-O2" ${ghflags_parsed - if(CMAKE_BUILD_TYPE MATCHES "DEBUG") - message(STATUS "Building Debug flavour") - set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags}) -- set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags}) -+ set(haskell_flags ${CFLAGS} ${haskell_flags}) - else() - message(STATUS "Building Release flavour") - set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags}) -- set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags}) -+ set(haskell_flags ${CFLAGS} ${haskell_flags}) - endif() - - diff --git a/hedgewars-compiler-opts.patch b/hedgewars-compiler-opts.patch deleted file mode 100644 index eb1aa0b..0000000 --- a/hedgewars-compiler-opts.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up hedgewars-src-0.9.18/CMakeLists.txt~ hedgewars-src-0.9.18/CMakeLists.txt ---- hedgewars-src-0.9.18/CMakeLists.txt~ 2012-10-31 21:48:12.000000000 +0100 -+++ hedgewars-src-0.9.18/CMakeLists.txt 2012-11-01 21:09:58.058213117 +0100 -@@ -158,9 +158,9 @@ endif (CMAKE_BUILD_TYPE) - - - #set default flags values for all projects --set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}") --set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}") --set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}") -+set(CMAKE_C_FLAGS ${CFLAGS}) -+set(CMAKE_C_FLAGS_RELEASE ${CFLAGS}) -+set(CMAKE_C_FLAGS_DEBUG ${CFLAGS}) - set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) - set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) - set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) -@@ -182,13 +182,12 @@ set(haskell_flags "-O2" ${ghflags_parsed - #get BUILD_TYPE and enable/disable optimisation - if(CMAKE_BUILD_TYPE MATCHES "DEBUG") - message(STATUS "Building Debug flavour") -- set(pascal_flags "-O-" "-g" "-gl" "-gv" ${pascal_flags}) -- set(haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_flags}) -+ set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags}) -+ set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags}) - else() - message(STATUS "Building Release flavour") --# set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags}) -- set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags}) -- set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags}) -+ set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags}) -+ set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags}) - endif() - - -@@ -274,7 +273,7 @@ if(WIN32 AND NOT UNIX) - set(CPACK_GENERATOR "ZIP;NSIS") - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars") - else(WIN32 AND NOT UNIX) -- set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine") -+ set(CPACK_STRIP_FILES "") - endif(WIN32 AND NOT UNIX) - - set(CPACK_SOURCE_IGNORE_FILES diff --git a/hedgewars.spec b/hedgewars.spec index 5de15d5..3c197dd 100644 --- a/hedgewars.spec +++ b/hedgewars.spec @@ -9,16 +9,14 @@ URL: http://www.hedgewars.org/ Source0: http://download.gna.org/hedgewars/hedgewars-src-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.appdata.xml -Patch0: hedgewars-compiler-opts.patch # Text.Show.ByteString currently isn't available in Fedora and for the # the time being we need to use a patch to have hedgewars-server not # use that function. -# The patch below is a trimmed version of the patch Debian is using +# The patch below is based on a version of the patch Debian is using # avoid the same issue. The original patch is available from: # https://launchpadlibrarian.net/85736468/hedgewars_0.9.17-1~maverick0.1.debdiff Patch1: hedgewars-no-bytestring.patch # ghc does not support -dynamic on arm -#Patch4: hedgewars-0.9.18-no-dyn-haskell.patch BuildRequires: fpc qt4-devel SDL_mixer-devel SDL_net-devel SDL_image-devel BuildRequires: SDL_ttf-devel openssl-devel cmake desktop-file-utils BuildRequires: libpng-devel @@ -58,21 +56,27 @@ A standalone server that can be used for LAN play or a private internet server. %prep %setup -q -n %{name}-src-%{version} -#%patch0 -p1 %patch1 -p0 -%ifarch %{arm} -# ghc does not support -dynamic on arm -#%patch4 -p1 -%endif + # Make sure that we don't use bundled libraries rm -r misc/liblua misc/libphysfs %build +# -DMINIMAL_FLAGS=1 uses distro complie flags as much as possible + # -DNOVIDEOREC=1 disables video recording which for now needs # things Fedora can't provide. -%cmake -DWITH_SERVER=1 -DNOVIDEOREC=1 . +# -DGHFLAGS=-dynamic uses dynamic linking for Haskell, but this isn't +# available on arm. + +%ifarch %{arm} +%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 . +%else +%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 -DGHFLAGS=-dynamic . +%endif + make %{?_smp_mflags} VERBOSE=1