git: 46da85496acc - main - games/pipewalker: update 0.9.4 → 1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Apr 2024 00:09:55 UTC
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=46da85496accdb2d06f67adf070fdcfce31641d9 commit 46da85496accdb2d06f67adf070fdcfce31641d9 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2024-04-05 20:33:14 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2024-04-09 00:08:47 +0000 games/pipewalker: update 0.9.4 → 1.0 --- games/pipewalker/Makefile | 33 ++++++++++------------------- games/pipewalker/distinfo | 6 +++--- games/pipewalker/files/patch-meson.build | 11 ++++++++++ games/pipewalker/files/patch-src_layout.cpp | 11 ++++++++++ games/pipewalker/files/patch-src_level.cpp | 33 +++++++++++++++++++++++++++++ games/pipewalker/pkg-plist | 4 ++++ 6 files changed, 73 insertions(+), 25 deletions(-) diff --git a/games/pipewalker/Makefile b/games/pipewalker/Makefile index bfdd5261b225..dfb993dbe0d7 100644 --- a/games/pipewalker/Makefile +++ b/games/pipewalker/Makefile @@ -1,36 +1,25 @@ PORTNAME= pipewalker -PORTVERSION= 0.9.4 -PORTREVISION= 2 +DISTVERSIONPREFIX=v +DISTVERSION= 1.0 CATEGORIES= games -MASTER_SITES= SF MAINTAINER= amdmi3@FreeBSD.org COMMENT= Clone of the NetWalk game WWW= https://github.com/artemsen/pipewalker -LICENSE= GPLv3+ -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libpng.so:graphics/png +USES= meson sdl pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= artemsen +MESON_ARGS= -Dversion=${DISTVERSION} +USE_SDL= sdl2 image2 -USES= desktop-file-utils gl localbase sdl -GNU_CONFIGURE= yes -USE_SDL= sdl -USE_GL= gl glu - -PLIST_FILES= bin/${PORTNAME} \ - share/applications/${PORTNAME}.desktop \ - share/pixmaps/${PORTNAME}.xpm -PORTDOCS= * PORTDATA= * -OPTIONS_DEFINE= DOCS - post-patch: - @${CHMOD} a+x ${WRKSRC}/install-sh - @${REINPLACE_CMD} -e 's|(datadir)/games|(datadir)|' \ - ${WRKSRC}/data/Makefile.in ${WRKSRC}/src/Makefile.in - @${REINPLACE_CMD} -e '/^install-data-am/ s|install-pkgmenudataDATA||' \ - ${WRKSRC}/extra/Makefile.in + @${REINPLACE_CMD} -e 's|/usr/share/games/pipewalker|${DATADIR}|' \ + ${WRKSRC}/extra/pipewalker.6 .include <bsd.port.mk> diff --git a/games/pipewalker/distinfo b/games/pipewalker/distinfo index 6d1319ea4760..d3637d91f15a 100644 --- a/games/pipewalker/distinfo +++ b/games/pipewalker/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1473636653 -SHA256 (pipewalker-0.9.4.tar.gz) = d6d7717f1f333847cc4a2e9d83e97b971b3bfb539d99d4ae30a5140de6e386f4 -SIZE (pipewalker-0.9.4.tar.gz) = 948399 +TIMESTAMP = 1712343984 +SHA256 (artemsen-pipewalker-v1.0_GH0.tar.gz) = 24232fdf71c7146f1621c461601b60bd6237d801e6403a5695be4d57419e1a21 +SIZE (artemsen-pipewalker-v1.0_GH0.tar.gz) = 878256 diff --git a/games/pipewalker/files/patch-meson.build b/games/pipewalker/files/patch-meson.build new file mode 100644 index 000000000000..c63adf2d8603 --- /dev/null +++ b/games/pipewalker/files/patch-meson.build @@ -0,0 +1,11 @@ +--- meson.build.orig 2024-01-14 09:10:02 UTC ++++ meson.build +@@ -33,7 +33,7 @@ else + data_dir = join_paths(meson.current_source_dir(), 'data') + else + data_dir = join_paths(get_option('prefix'), get_option('datadir'), +- 'games', meson.project_name()) ++ meson.project_name()) + endif + + # installation diff --git a/games/pipewalker/files/patch-src_layout.cpp b/games/pipewalker/files/patch-src_layout.cpp new file mode 100644 index 000000000000..17689791fc11 --- /dev/null +++ b/games/pipewalker/files/patch-src_layout.cpp @@ -0,0 +1,11 @@ +--- src/layout.cpp.orig 2024-01-14 09:10:02 UTC ++++ src/layout.cpp +@@ -43,7 +43,7 @@ void Layout::update(size_t width, size_t height) + level_height = height; + + // size of header and footer +- size_t header_h = std::min(64ul, static_cast<size_t>(window.h) / 10); ++ size_t header_h = std::min((size_t)64, static_cast<size_t>(window.h) / 10); + + // size of a single puzzle cell + const int max_wnd_w = window.w - padding * 2; diff --git a/games/pipewalker/files/patch-src_level.cpp b/games/pipewalker/files/patch-src_level.cpp new file mode 100644 index 000000000000..d915d86299dc --- /dev/null +++ b/games/pipewalker/files/patch-src_level.cpp @@ -0,0 +1,33 @@ +--- src/level.cpp.orig 2024-01-14 09:10:02 UTC ++++ src/level.cpp +@@ -15,8 +15,8 @@ void Level::generate() + std::fill(cells.begin(), cells.end(), Cell {}); + + // install sender (server) +- sender.x = mtrand::get(1ul, width - 1); +- sender.y = mtrand::get(1ul, height - 1); ++ sender.x = mtrand::get((size_t)1, width - 1); ++ sender.y = mtrand::get((size_t)1, height - 1); + get_cell(sender).object = Cell::Sender; + + const size_t max_recievers = cells.size() / 5; +@@ -146,7 +146,7 @@ void Level::add_reciever() + } + + // get random position +- const size_t free_index = mtrand::get(0ul, free_cells.size()); ++ const size_t free_index = mtrand::get((size_t)0, free_cells.size()); + const Position& reciever = free_cells[free_index]; + + // find path from receiver to sender +@@ -176,8 +176,8 @@ bool Level::find_path(const Position& from, std::set<P + sides.push_back(Side::Top); + sides.push_back(Side::Bottom); + for (size_t i = 0; i < 4; ++i) { +- const size_t index0 = mtrand::get(0ul, sides.size()); +- const size_t index1 = mtrand::get(0ul, sides.size()); ++ const size_t index0 = mtrand::get((size_t)0, sides.size()); ++ const size_t index1 = mtrand::get((size_t)0, sides.size()); + std::iter_swap(sides.begin() + index0, sides.begin() + index1); + } + } else { diff --git a/games/pipewalker/pkg-plist b/games/pipewalker/pkg-plist new file mode 100644 index 000000000000..9f539ac7cd55 --- /dev/null +++ b/games/pipewalker/pkg-plist @@ -0,0 +1,4 @@ +bin/pipewalker +share/applications/pipewalker.desktop +share/icons/hicolor/64x64/apps/pipewalker.png +share/man/man6/pipewalker.6.gz