Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2021 14:03:52 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d3075220ff33 - main - games/ivan: update to 0.58
Message-ID:  <202106101403.15AE3q4N093380@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3075220ff33a967619f9965893b601e5fb702ca

commit d3075220ff33a967619f9965893b601e5fb702ca
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-06-07 10:11:17 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-06-10 14:00:43 +0000

    games/ivan: update to 0.58
---
 games/ivan/Makefile                              | 49 ++++++-------
 games/ivan/distinfo                              |  5 +-
 games/ivan/files/patch-CMakeLists.txt            | 13 ++++
 games/ivan/files/patch-FeLib-Include-festring.h  | 20 ------
 games/ivan/files/patch-FeLib-Source-bitmap.cpp   | 20 ------
 games/ivan/files/patch-FeLib-Source-festring.cpp | 91 ------------------------
 games/ivan/files/patch-Makefile.in               | 19 -----
 games/ivan/files/patch-audio_CMakeLists.txt      | 21 ++++++
 games/ivan/pkg-descr                             | 15 ++--
 games/ivan/pkg-plist                             |  4 --
 10 files changed, 66 insertions(+), 191 deletions(-)

diff --git a/games/ivan/Makefile b/games/ivan/Makefile
index 4ae13bc2c06c..7a1a0ac67a49 100644
--- a/games/ivan/Makefile
+++ b/games/ivan/Makefile
@@ -1,44 +1,39 @@
 PORTNAME=	ivan
-PORTVERSION=	0.50
-PORTREVISION=	7
+PORTVERSION=	0.58
 CATEGORIES=	games
-MASTER_SITES=	SF/${PORTNAME}/IVAN/IVAN%20${PORTVERSION}
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Graphical roguelike game
 
-LICENSE=	GPLv2
+LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_armv6=		fails to compile: use of overloaded operator '<<' is ambiguous
-BROKEN_armv7=		fails to compile: use of overloaded operator '<<' is ambiguous
+LIB_DEPENDS=	libpng.so:graphics/png \
+		libpcre.so:devel/pcre
 
-USES=		gmake sdl
-USE_SDL=	sdl
-USE_CXXSTD=	c++98
-GNU_CONFIGURE=	yes
+USES=		cmake pkgconfig sdl
+USE_SDL=	sdl2 mixer2
+USE_GITHUB=	yes
+GH_ACCOUNT=	Attnam
+GH_TAGNAME=	v${PORTVERSION:C/\.//}
 
-CONFIGURE_ARGS=	--localstatedir=/var/games
+CFLAGS+=	-DNOSOUND=1
+CXXFLAGS+=	-DNOSOUND=1
+
+PLIST_FILES=	bin/ivan
 
 PORTSCOUT=	skipv:0.301,0.310,0.311,0.401,0.410,0.420,0.430
 
 PORTDATA=	*
+PORTDOCS=	*
+
+OPTIONS_DEFINE=	WIZARD DOCS
+
+WIZARD_DESC=	Enable Wizard mode
+WIZARD_CMAKE_BOOL=	WIZARD
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|IvanSave|.IvanSave|g' ${WRKSRC}/Main/Source/game.cpp
-	@${REINPLACE_CMD} -Ee 's|(fearray<type>::~?fearray)<type>|\1|' \
-		${WRKSRC}/FeLib/Include/fearray.h
-	@${REINPLACE_CMD} -Ee 's|([a-z]+<[a-z ,]+>::~?[a-z]+)<[a-z ,]+>|\1|' \
-		${WRKSRC}/Main/Source/script.cpp
-	@${REINPLACE_CMD} -e 's|truth(|bool(|' ${WRKSRC}/Main/Source/fluid.cpp \
-		${WRKSRC}/Main/Include/char.h ${WRKSRC}/Main/Include/lsquare.h \
-		${WRKSRC}/FeLib/Include/save.h ${WRKSRC}/Main/Include/lsquare.h \
-		${WRKSRC}/Main/Include/human.h ${WRKSRC}/Main/Source/command.cpp \
-		${WRKSRC}/Main/Include/stack.h ${WRKSRC}/Main/Source/lsquare.cpp \
-		${WRKSRC}/Main/Source/lterras.cpp
-
-post-install:
-	${MKDIR} ${STAGEDIR}/var/games/ivan/Bones
-	${TOUCH} ${STAGEDIR}/var/games/ivan/ivan-highscore.scores.sample
+post-install-DOCS-on:
+	@cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md Doc MANUAL" \
+		${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>
diff --git a/games/ivan/distinfo b/games/ivan/distinfo
index cbf107f3a2e0..fb4d7e23321d 100644
--- a/games/ivan/distinfo
+++ b/games/ivan/distinfo
@@ -1,2 +1,3 @@
-SHA256 (ivan-0.50.tar.gz) = d8bc588ad902f27906ab34c2f8a9cace03867b45ff6a57025e046931f36ad480
-SIZE (ivan-0.50.tar.gz) = 803651
+TIMESTAMP = 1622830286
+SHA256 (Attnam-ivan-0.58-v058_GH0.tar.gz) = ee2e7a4ec26f8a08fceddebbcbb03af1f42ec95be69f54a84b72e5ea4595cb59
+SIZE (Attnam-ivan-0.58-v058_GH0.tar.gz) = 30393481
diff --git a/games/ivan/files/patch-CMakeLists.txt b/games/ivan/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..19cc3194fab4
--- /dev/null
+++ b/games/ivan/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+TODO: On FreeBSD, libexecinfo needs to be linked
+
+--- CMakeLists.txt.orig	2020-03-16 02:04:05 UTC
++++ CMakeLists.txt
+@@ -65,7 +65,7 @@ endif()
+ 
+ find_path(EXECINFO_INCLUDE_DIR NAMES execinfo.h)
+ if(NOT EXECINFO_INCLUDE_DIR MATCHES "-NOTFOUND$")
+-  add_definitions(-DBACKTRACE)
++	#add_definitions(-DBACKTRACE)
+ endif()
+ 
+ add_subdirectory(FeLib)
diff --git a/games/ivan/files/patch-FeLib-Include-festring.h b/games/ivan/files/patch-FeLib-Include-festring.h
deleted file mode 100644
index e788eed7ee58..000000000000
--- a/games/ivan/files/patch-FeLib-Include-festring.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- FeLib/Include/festring.h.orig	2004-10-26 19:35:44 UTC
-+++ FeLib/Include/festring.h
-@@ -142,7 +142,7 @@ inline festring::festring(const festring
- inline festring::festring(sizetype N)
- : Size(N), OwnsData(true), Reserved(N|FESTRING_PAGE)
- {
--  char* Ptr = 4 + new char[Reserved + 5];
-+  char* Ptr = sizeof(ulong) + new char[Reserved + 5];
-   REFS(Ptr) = 0;
-   Data = Ptr;
- }
-@@ -150,7 +150,7 @@ inline festring::festring(sizetype N)
- inline festring::festring(sizetype N, char C)
- : Size(N), OwnsData(true), Reserved(N|FESTRING_PAGE)
- {
--  char* Ptr = 4 + new char[Reserved + 5];
-+  char* Ptr = sizeof(ulong) + new char[Reserved + 5];
-   REFS(Ptr) = 0;
-   Data = Ptr;
-   memset(Ptr, C, N);
diff --git a/games/ivan/files/patch-FeLib-Source-bitmap.cpp b/games/ivan/files/patch-FeLib-Source-bitmap.cpp
deleted file mode 100644
index 32e23cb144ac..000000000000
--- a/games/ivan/files/patch-FeLib-Source-bitmap.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- FeLib/Source/bitmap.cpp.orig	2004-10-26 19:35:47 UTC
-+++ FeLib/Source/bitmap.cpp
-@@ -873,12 +873,12 @@ void bitmap::DrawLine(int OrigFromX, int
-   static const int PointY[] = { 0, -1, 0, 0, 1 };
-   const int Times = Wide ? 5 : 1;
- 
--  for(int c = 0; c < Times; ++c)
-+  for(int t = 0; t < Times; ++t)
-   {
--    const int X1 = OrigFromX + PointX[c];
--    const int Y1 = OrigFromY + PointY[c];
--    const int X2 = OrigToX + PointX[c];
--    const int Y2 = OrigToY + PointY[c];
-+    const int X1 = OrigFromX + PointX[t];
-+    const int Y1 = OrigFromY + PointY[t];
-+    const int X2 = OrigToX + PointX[t];
-+    const int Y2 = OrigToY + PointY[t];
-     const int DeltaX = abs(X2 - X1);
-     const int DeltaY = abs(Y2 - Y1);
-     int x, c;
diff --git a/games/ivan/files/patch-FeLib-Source-festring.cpp b/games/ivan/files/patch-FeLib-Source-festring.cpp
deleted file mode 100644
index c6eef62d0da9..000000000000
--- a/games/ivan/files/patch-FeLib-Source-festring.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
---- FeLib/Source/festring.cpp.orig	2004-11-11 17:27:44 UTC
-+++ FeLib/Source/festring.cpp
-@@ -11,6 +11,7 @@
-  */
- 
- #include <cctype>
-+#include <cstdlib>
- 
- #include "festring.h"
- #include "allocate.h"
-@@ -116,7 +117,7 @@ void festring::CreateOwnData(const char*
- {
-   Size = N;
-   Reserved = N|FESTRING_PAGE;
--  char* Ptr = 4 + new char[Reserved + 5];
-+  char* Ptr = sizeof(ulong) + new char[Reserved + 5];
-   REFS(Ptr) = 0;
-   Data = Ptr;
-   memcpy(Ptr, CStr, N);
-@@ -137,7 +138,7 @@ void festring::SlowAppend(char Char)
-       DeletePtr = &REFS(OldPtr);
- 
-     Reserved = NewSize|FESTRING_PAGE;
--    char* NewPtr = 4 + new char[Reserved + 5];
-+    char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
-     REFS(NewPtr) = 0;
-     Data = NewPtr;
-     memcpy(NewPtr, OldPtr, OldSize);
-@@ -150,7 +151,7 @@ void festring::SlowAppend(char Char)
-   {
-     Size = 1;
-     Reserved = FESTRING_PAGE;
--    char* Ptr = 4 + new char[FESTRING_PAGE + 5];
-+    char* Ptr = sizeof(ulong) + new char[FESTRING_PAGE + 5];
-     REFS(Ptr) = 0;
-     Ptr[0] = Char;
-     Data = Ptr;
-@@ -174,7 +175,7 @@ void festring::SlowAppend(const char* CS
-       DeletePtr = &REFS(OldPtr);
- 
-     Reserved = NewSize|FESTRING_PAGE;
--    char* NewPtr = 4 + new char[Reserved + 5];
-+    char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
-     REFS(NewPtr) = 0;
-     Data = NewPtr;
-     memcpy(NewPtr, OldPtr, OldSize);
-@@ -205,7 +206,7 @@ void festring::Assign(sizetype N, char C
-   }
- 
-   Reserved = N|FESTRING_PAGE;
--  Ptr = 4 + new char[Reserved + 5];
-+  Ptr = sizeof(ulong) + new char[Reserved + 5];
-   REFS(Ptr) = 0;
-   Data = Ptr;
-   memset(Ptr, C, N);
-@@ -240,7 +241,7 @@ void festring::Resize(sizetype N, char C
-     }
- 
-     Reserved = N|FESTRING_PAGE;
--    NewPtr = 4 + new char[Reserved + 5];
-+    NewPtr = sizeof(ulong) + new char[Reserved + 5];
-     REFS(NewPtr) = 0;
-     Data = NewPtr;
-     memcpy(NewPtr, OldPtr, OldSize);
-@@ -259,7 +260,7 @@ void festring::Resize(sizetype N, char C
- 	--REFS(OldPtr);
- 
-     Reserved = N|FESTRING_PAGE;
--    NewPtr = 4 + new char[Reserved + 5];
-+    NewPtr = sizeof(ulong) + new char[Reserved + 5];
-     REFS(NewPtr) = 0;
-     Data = NewPtr;
-     memcpy(NewPtr, OldPtr, N);
-@@ -362,7 +363,7 @@ void festring::Erase(sizetype Pos, sizet
-       sizetype NewSize = MoveReq ? OldSize - Length : Pos;
-       Size = NewSize;
-       Reserved = NewSize|FESTRING_PAGE;
--      char* Ptr = 4 + new char[Reserved + 5];
-+      char* Ptr = sizeof(ulong) + new char[Reserved + 5];
-       REFS(Ptr) = 0;
-       Data = Ptr;
-       OwnsData = true;
-@@ -411,7 +412,7 @@ void festring::Insert(sizetype Pos, cons
-       }
- 
-       Reserved = NewSize|FESTRING_PAGE;
--      char* NewPtr = 4 + new char[Reserved + 5];
-+      char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
-       REFS(NewPtr) = 0;
-       Data = NewPtr;
-       memcpy(NewPtr, OldPtr, Pos);
diff --git a/games/ivan/files/patch-Makefile.in b/games/ivan/files/patch-Makefile.in
deleted file mode 100644
index 8ecb6f1dbe20..000000000000
--- a/games/ivan/files/patch-Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
---- Makefile.in.orig	2004-12-10 21:34:29 UTC
-+++ Makefile.in
-@@ -338,16 +338,6 @@ maintainer-clean-generic clean mostlycle
- 
- 
- install-data-local:
--	-./mkinstalldirs -p $(localstatedir) $(bindir) $(datadir)/ivan/Script/ $(datadir)/ivan/Graphics/ $(localstatedir)/ivan/Bones/
--	-touch $(localstatedir)/ivan/ivan-highscore.scores
--	-chown games.games $(localstatedir)/ivan/ivan-highscore.scores
--	-chmod 664 $(localstatedir)/ivan/ivan-highscore.scores
--	-chown -R games.games $(localstatedir)/ivan/Bones/
--	-chmod -R u=rwx $(localstatedir)/ivan/Bones/
--	-chmod -R g=rwx $(localstatedir)/ivan/Bones/
--	-chmod -R o=r $(localstatedir)/ivan/Bones/
--	-chgrp games $(bindir)/ivan 
--	-chmod 2111 $(bindir)/ivan
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/games/ivan/files/patch-audio_CMakeLists.txt b/games/ivan/files/patch-audio_CMakeLists.txt
new file mode 100644
index 000000000000..4aab803833e0
--- /dev/null
+++ b/games/ivan/files/patch-audio_CMakeLists.txt
@@ -0,0 +1,21 @@
+--- audio/CMakeLists.txt.orig	2020-03-16 02:04:05 UTC
++++ audio/CMakeLists.txt
+@@ -10,9 +10,10 @@ if(WIN32)
+ endif()
+ 
+ # Add RtMidi dependencies on Linux
+-if(UNIX AND NOT APPLE)
++if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+   add_definitions(-D__LINUX_ALSA__)
+   find_package(ALSA)
++  set(RTMIDI_INCLUDES ${ALSA_INCLUDE_DIRS})
+   set(RTMIDI_DEPENDENCIES ${ALSA_LIBRARY} pthread)
+ endif()
+ 
+@@ -30,5 +31,5 @@ target_link_libraries(FeAudio ${RTMIDI_DEPENDENCIES})
+ 
+ find_package(SDL2 REQUIRED)
+ 
+-target_include_directories(FeAudio SYSTEM PUBLIC ${SDL2_mixer_INCLUDE_DIR})
++target_include_directories(FeAudio SYSTEM PUBLIC ${SDL2_mixer_INCLUDE_DIR} ${RTMIDI_INCLUDES})
+ target_link_libraries(FeAudio ${SDL2_mixer_LIBRARY})
diff --git a/games/ivan/pkg-descr b/games/ivan/pkg-descr
index 9ff626df07e7..57cf788db32d 100644
--- a/games/ivan/pkg-descr
+++ b/games/ivan/pkg-descr
@@ -1,11 +1,8 @@
-Iter Vehemens ad Necem (IVAN) is a graphical roguelike game, which
-currently runs in Linux, Windows, and DOS. It features advanced
-bodypart and material handling, multi-colored lighting and, above
-all, deep gameplay.
+Iter Vehemens ad Necem (IVAN) is a graphical roguelike game. It
+features advanced bodypart and material handling, multi-colored
+lighting and, above all, deep gameplay.
 
-From developer's website:
-
-Fellow adventurer, turn back while you can! For here begins the
+"Fellow adventurer, turn back while you can! For here begins the
 roguelike Iter Vehemens ad Necem, a Violent Road to Death. If you
 choose to travel along it, you will dive into countless exciting
 adventures to gain items of great magic, attain powerful equipment
@@ -16,6 +13,8 @@ catch numerous diseases, lose several limbs and transform into
 manifold different kinds of pitiful creatures in the darkest depths
 of hostile dungeons. And, at the end of the road, you are bound to
 perish in a most gruesome and painful way. Don't say we didn't warn
-you.
+you."
 
+WWW: https://attnam.com/
+WWW: https://github.com/Attnam/ivan
 WWW: http://ivan.sourceforge.net/
diff --git a/games/ivan/pkg-plist b/games/ivan/pkg-plist
deleted file mode 100644
index 499d0079211a..000000000000
--- a/games/ivan/pkg-plist
+++ /dev/null
@@ -1,4 +0,0 @@
-@(,games,2555) bin/ivan
-@sample(,games,664) /var/games/ivan/ivan-highscore.scores.sample
-@dir(,games,775) /var/games/ivan/Bones
-@dir(,games,775) /var/games/ivan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106101403.15AE3q4N093380>