Date: Fri, 3 Dec 2021 19:00:50 GMT From: Max Brazhnikov <makc@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: db2de4925fb3 - main - games/colobot: improve port Message-ID: <202112031900.1B3J0okZ014515@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=db2de4925fb3b44e532599d144058d50f7f91ff0 commit db2de4925fb3b44e532599d144058d50f7f91ff0 Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2021-11-21 21:43:12 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2021-12-03 18:59:21 +0000 games/colobot: improve port Install desktop files and manpage. Remove extra flags to fix build on package cluster. --- games/colobot/Makefile | 33 +++++++++++++++++++------------- games/colobot/files/patch-CMakeLists.txt | 31 ++++++++++++++++++++++++++++++ games/colobot/pkg-plist | 10 ++++++++++ 3 files changed, 61 insertions(+), 13 deletions(-) diff --git a/games/colobot/Makefile b/games/colobot/Makefile index 2e5e50a07ac2..80d6403dc73a 100644 --- a/games/colobot/Makefile +++ b/games/colobot/Makefile @@ -2,7 +2,7 @@ PORTNAME= colobot DISTVERSIONPREFIX= ${PORTNAME}-gold- DISTVERSION= 0.1.12 DISTVERSIONSUFFIX= -alpha -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= games education MASTER_SITES= https://colobot.info/files/music/:music DISTFILES= colobot-music_ogg_0.1.12-alpha.tar.gz:music @@ -13,6 +13,7 @@ COMMENT= Educational game aiming to teach programming to kids LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt +BUILD_DEPENDS= ${LOCALBASE}/bin/xml:textproc/xmlstarlet LIB_DEPENDS= libpng.so:graphics/png \ libsndfile.so:audio/libsndfile \ libvorbis.so:audio/libvorbis \ @@ -21,32 +22,38 @@ LIB_DEPENDS= libpng.so:graphics/png \ libphysfs.so:devel/physfs \ libboost_system.so:devel/boost-libs -USES= cmake compiler:c++11-lang gl gettext-runtime \ - gettext-tools:build localbase:ldflags openal python:build \ - sdl shebangfix -USE_SDL= image2 ttf2 +USES= cmake compiler:c++11-lang gettext-runtime gettext-tools:build \ + gl gnome localbase:ldflags openal perl5 python:build sdl \ + shebangfix USE_GL= gl glew glu +USE_GNOME= librsvg2:build +USE_PERL5= build +USE_SDL= image2 ttf2 USE_LDCONFIG= yes USE_GITHUB= yes GH_TUPLE= colobot:colobot-data:c467bd9:data +CMAKE_ON= PLATFORM_BSD LDFLAGS_i386= -Wl,-znotext SHEBANG_FILES= data/i18n-tools/scripts/process_translations.py +BINARY_ALIAS= xmlstarlet=${LOCALBASE}/bin/xml + post-extract: @${MV} ${WRKDIR}/colobot-data-c467bd9/* ${WRKSRC}/data @${MV} ${WRKDIR}/*.ogg ${WRKDIR}/LICENSE.txt ${WRKSRC}/data/music/ - @${REINPLACE_CMD} 's|$${CMAKE_INSTALL_PREFIX}/games|$${CMAKE_INSTALL_PREFIX}/bin|g' ${WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} 's|PLATFORM_MACOSX|PLATFORM_MACOSX OR PLATFORM_OTHER|g' ${WRKSRC}/src/CMakeLists.txt post-patch: - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cmake/FindGLEW.cmake - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cmake/FindPhysFS.cmake - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cmake/FindSDL2.cmake - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cmake/FindSDL2_image.cmake - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cmake/FindSDL2_ttf.cmake - @${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/tools/check-levels.sh + ${REINPLACE_CMD} '/COLOBOT_INSTALL_BIN_DIR/s|games|bin|' \ + ${WRKSRC}/CMakeLists.txt + ${REINPLACE_CMD} 's|PLATFORM_GNU|PLATFORM_GNU OR PLATFORM_BSD|g' \ + ${WRKSRC}/desktop/CMakeLists.txt + ${REINPLACE_CMD} 's|PLATFORM_MACOSX|PLATFORM_MACOSX OR PLATFORM_BSD|g' \ + ${WRKSRC}/src/CMakeLists.txt + ${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' \ + ${WRKSRC}/cmake/Find*.cmake \ + ${WRKSRC}/tools/check-levels.sh ${REINPLACE_CMD} 's|python|${PYTHON_CMD}|' ${WRKSRC}/data/tools/*.sh .include <bsd.port.mk> diff --git a/games/colobot/files/patch-CMakeLists.txt b/games/colobot/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..2e7b482c273c --- /dev/null +++ b/games/colobot/files/patch-CMakeLists.txt @@ -0,0 +1,31 @@ +--- CMakeLists.txt.orig 2021-12-03 18:38:49 UTC ++++ CMakeLists.txt +@@ -135,15 +135,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + + message(STATUS "Detected GCC version 4.7+") + +- set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors -Wmissing-declarations") +- set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 ++ set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 + +- if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) +- set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wsuggest-override") +- endif() +- +- set(RELEASE_CXX_FLAGS "-O2") +- set(DEBUG_CXX_FLAGS "-g -O0") + set(TEST_CXX_FLAGS "-pthread") + add_definitions(-DNOEXCEPT=noexcept -DHAVE_DEMANGLE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") +@@ -153,10 +146,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + + message(STATUS "Detected Clang version 3.1+") + +- set(NORMAL_CXX_FLAGS "-std=c++11 -Wall -Werror -Wold-style-cast -pedantic-errors -Wmissing-prototypes") +- set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 +- set(RELEASE_CXX_FLAGS "-O2") +- set(DEBUG_CXX_FLAGS "-g -O0") ++ set(NORMAL_CXX_FLAGS "-std=c++11 -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 + set(TEST_CXX_FLAGS "-pthread") + add_definitions(-DNOEXCEPT=noexcept -DHAVE_DEMANGLE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") diff --git a/games/colobot/pkg-plist b/games/colobot/pkg-plist index e85ddcd5ab40..41eb8ac3eb26 100644 --- a/games/colobot/pkg-plist +++ b/games/colobot/pkg-plist @@ -1,5 +1,6 @@ bin/colobot lib/colobot/libCBot.so +share/applications/colobot.desktop share/games/colobot/ai/ant01.txt share/games/colobot/ai/ant02.txt share/games/colobot/ai/ant03.txt @@ -3664,10 +3665,19 @@ share/games/colobot/textures/rocb2.png share/games/colobot/textures/terra002.png share/games/colobot/textures/water12.png share/games/colobot/textures/water16.png +share/icons/hicolor/128x128/apps/colobot.png +share/icons/hicolor/16x16/apps/colobot.png +share/icons/hicolor/256x256/apps/colobot.png +share/icons/hicolor/32x32/apps/colobot.png +share/icons/hicolor/48x48/apps/colobot.png +share/icons/hicolor/512x512/apps/colobot.png +share/icons/hicolor/scalable/apps/colobot.svg share/locale/cs/LC_MESSAGES/colobot.mo share/locale/de/LC_MESSAGES/colobot.mo share/locale/fr/LC_MESSAGES/colobot.mo share/locale/pl/LC_MESSAGES/colobot.mo share/locale/pt/LC_MESSAGES/colobot.mo share/locale/ru/LC_MESSAGES/colobot.mo +share/man/man6/colobot.6.gz +share/metainfo/info.colobot.Colobot.appdata.xml @dir share/games/colobot/mods
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112031900.1B3J0okZ014515>