From 5323a4fcdfce768fc56a2d36d0c5029b5a32ba51 Mon Sep 17 00:00:00 2001 From: filux Date: Fri, 25 Aug 2017 22:06:08 +0200 Subject: [PATCH] let's try static curl also for mac OS --- .gitignore | 1 - data/glest_game | 2 +- mk/cmake/Modules/CurlGetConfig.cmake | 3 ++- mk/linux/build-mg.sh | 6 ++++-- mk/linux/makedeps_folder.sh | 3 ++- mk/macos/build-mg.sh | 8 +++++--- source/glest_game/CMakeLists.txt | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 13d310bb..345be39f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ Session.vim *.orig # Emacs \#*\# -.\# ## macOS *.DS_Store diff --git a/data/glest_game b/data/glest_game index 6d34443c..d1444655 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 6d34443cef0afaf3db6b0ac677205e96475620a7 +Subproject commit d1444655692f738552915fba55bf21424cdb8a7f diff --git a/mk/cmake/Modules/CurlGetConfig.cmake b/mk/cmake/Modules/CurlGetConfig.cmake index 2d3df7d5..baaaead7 100644 --- a/mk/cmake/Modules/CurlGetConfig.cmake +++ b/mk/cmake/Modules/CurlGetConfig.cmake @@ -5,7 +5,8 @@ # IF(CURL_FOUND) - IF(UNIX AND NOT APPLE) + #IF(UNIX AND NOT APPLE) + IF(UNIX) FIND_PROGRAM( CMAKE_CURL_CONFIG curl-config) MARK_AS_ADVANCED(CMAKE_CURL_CONFIG) diff --git a/mk/linux/build-mg.sh b/mk/linux/build-mg.sh index b0ef97fe..5979940c 100755 --- a/mk/linux/build-mg.sh +++ b/mk/linux/build-mg.sh @@ -164,7 +164,6 @@ echo 'We have detected the following system:' echo ' [ '"$distribution"' ] [ '"$release"' ] [ '"$codename"' ] [ '"$architecture"' ]' if [ "$release" = "rolling" ] && [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then - echo 'Turning ON dynamic LIBS ...' WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=OFF" fi @@ -258,12 +257,15 @@ case $distribution in Arch) if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then - echo 'Turning ON dynamic LIBS ...' WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=OFF" fi ;; esac +if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then + echo 'Turning ON dynamic LIBS ...' +fi + # If, in the configuration section on top of this script, the user has # indicated they want to use clang in favor of the default of GCC, use clang. if [ $CLANG_FORCED = 1 ]; then diff --git a/mk/linux/makedeps_folder.sh b/mk/linux/makedeps_folder.sh index 0c378a65..47a27d0b 100755 --- a/mk/linux/makedeps_folder.sh +++ b/mk/linux/makedeps_folder.sh @@ -22,13 +22,14 @@ sync_support_libs(){ local _cp="/bin/cp" #local skip_deps="libm.so libpthread.so libstdc++.so libgcc_s.so libc.so libdl.so libX11.so libpulse libfusion libdirect libnvidia libXext librt libxcb libICE libSM libXtst libwrap libdbus libXau libXdmcp libnsl libFLAC libGL" local skip_deps="" - local keep_deps="libcurl libgnu libgcrypt libnghttp libidn libpsl libunistring librtmp libssh libnettle libicu liblua libjpeg libpng libvorbis libogg libircclient libminiupnpc libwx_ libGLEW libftgl libfreetype libvlc libopenal libSDL2-" + local keep_deps="libcurl libgnu libgcrypt libnghttp libidn libpsl libunistring librtmp libssh libnettle libicu liblua libjpeg libpng libvorbis libogg libircclient libminiupnpc libwx_ libGLEW libftgl libfreetype libfribidi libvlc libopenal libSDL2-" # libwx_ - recommended to keep always just because API/ABI compatibility, huge impact for map editor # libGLEW - most likely safe to keep embedded everywhere, its version matters with tools # libopenal - safe to keep but if any version is available locally then should be replaced # libSDL2 - safe to keep on .deb family only and even there, if any version is available locally then should be replaced # liblber & libldap_r - aren't safe to keep, very nasty secondary dependencies # libunistring - is it enough popular to not be necessary there? not sure + # libfribidi - not enough popular to be installed by default on the "every fresh OS" local scan_via_skiplist=1 diff --git a/mk/macos/build-mg.sh b/mk/macos/build-mg.sh index d024c01d..8ee93d86 100755 --- a/mk/macos/build-mg.sh +++ b/mk/macos/build-mg.sh @@ -74,7 +74,8 @@ cd ${SCRIPTDIR} if [ "$BUILD_BUNDLE" -eq "1" ] && [ -d "p7zip" ]; then rm -rf "p7zip"; fi if [ -e ".p7zip.zip" ] && [ "$(find ./ -name ".p7zip.zip" -mtime +90)" ]; then rm ".p7zip.zip"; rm -rf "p7zip"; fi if [ ! -e ".p7zip.zip" ]; then - curl -L -o .p7zip.zip https://github.com/MegaGlest/megaglest-source/releases/download/3.2.3/p7zip.zip 2>/dev/null + curl -L -o .p7zip.zip https://github.com/MegaGlest/megaglest-source/releases/download/3.3.0/p7zip.zip 2>/dev/null + # ^sha256: 20ac3b0377054f8196c10e569bd6ec7c6ed06d519fa39e781ee6d27d7887588b if [ -e ".p7zip.zip" ]; then touch -m ".p7zip.zip"; fi fi if [ ! -d "p7zip" ]; then unzip .p7zip.zip >/dev/null; fi @@ -195,9 +196,10 @@ if [ "$MAKE_ONLY" -eq "0" ]; then EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBREAKPAD_ROOT=$BREAKPAD_ROOT" if [ "$BUILD_BUNDLE" -ne "1" ]; then EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=''" - if [ "$GCC_FORCED" -ne "1" ] || [ "$USE_XCODE" -eq "1" ]; then + if [ "$GCC_FORCED" -ne "1" ] || [ "$USE_XCODE" -eq "1" ]; then : #^ Remove this condition when it V will start working on gcc - EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MEGAGLEST_TESTS=ON" + #EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MEGAGLEST_TESTS=ON" + #^ Uncomment when it will start working on clang else rm -f ../megaglest_tests fi diff --git a/source/glest_game/CMakeLists.txt b/source/glest_game/CMakeLists.txt index b1c634c6..a2237ed0 100644 --- a/source/glest_game/CMakeLists.txt +++ b/source/glest_game/CMakeLists.txt @@ -345,7 +345,7 @@ IF(BUILD_MEGAGLEST) ENDIF() IF(UNIX) - INSTALL(FILES + INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/mk/linux/start_megaglest_gameserver" DESTINATION ${MEGAGLEST_INI_INSTALL_PATH}) ENDIF()