On 2018/04/21 11:39, mazoc...@disroot.org wrote: > Hi! > > I am running Minetest from branch backport-0.4, I had to patch it make > it compile and run. Since I am ignorant I have questions about patch > for src/CMakeLists.txt (I've just compiled this game without patching > this file and game runs fine) > > @@ -61,6 +61,8 @@ set(USE_GETTEXT FALSE) > > if(ENABLE_GETTEXT) > find_package(GettextLib) > + find_package(Iconv) > + find_package(Intl) > if(GETTEXT_FOUND) > if(WIN32) > message(STATUS "GetText library: ${GETTEXT_LIBRARY}") > > These two lines are not required, why add them?
They may have been needed in the past. If it's happy without them then maybe they can be removed. > @@ -550,7 +555,8 @@ if(BUILD_CLIENT) > ${BZIP2_LIBRARIES} > ${PNG_LIBRARIES} > ${X11_LIBRARIES} > - ${GETTEXT_LIBRARY} > + ${ICONV_LIBRARIES} > + ${Intl_LIBRARIES} > ${SOUND_LIBRARIES} > ${SQLITE3_LIBRARY} > ${LUA_LIBRARY} > @@ -612,7 +618,8 @@ if(BUILD_SERVER) > ${ZLIB_LIBRARIES} > ${SQLITE3_LIBRARY} > ${JSON_LIBRARY} > - ${GETTEXT_LIBRARY} > + ${ICONV_LIBRARIES} > + ${Intl_LIBRARIES} > ${LUA_LIBRARY} > ${GMP_LIBRARY} > ${PLATFORM_LIBS} > > Why remove ${GETTEXT_LIBRARY} lines? Also is that patch worth for > if(BUILD_SERVER) if server is not actually built (I checked plist)? > > @@ -682,14 +689,12 @@ else() > set(OTHER_FLAGS "-mthreads -fexceptions") > endif() > > - set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} > ${WARNING_FLAGS} ${OTHER_FLAGS} -ffast-math -Wall -pipe -funroll-loops") > > > + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} > ${WARNING_FLAGS} ${OTHER_FLAGS}") > if(APPLE) > set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os") > - else() > - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 > -fomit-frame-pointer") > endif(APPLE) > set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} > ${OTHER_FLAGS}") > - set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} > ${OTHER_FLAGS}") > + set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wabi ${WARNING_FLAGS} > ${OTHER_FLAGS}") > > if(USE_GPROF) > set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg") > > Is that -Wall flag removed to make compilation faster? I don't see a removed -Wall in what you sent? > What's wrong about -O0 coming after -g? Optimizer flags are controlled by ports or the user, not the ported software. > And why not remove -O1 for > semi-debug in that case? Presumably "semi-debug" is not reached by any usual port builds ("debug" is, when MODCMAKE_DEBUG is set). > And what's wrong with those optimisations? (see above) > Let me guess, this game doesn't compile/run because of old GCC on some > architectures, does it? No idea, check the packages directories on ftp.