git: db9cfcf3e8f1 - main - games/chromono: add port: Circular color puzzle

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Tue, 24 Jan 2023 18:20:01 UTC
The branch main has been updated by amdmi3:

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

commit db9cfcf3e8f1f073ab8d25615a9e7c27d0611ff2
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2023-01-24 17:40:52 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2023-01-24 18:19:56 +0000

    games/chromono: add port: Circular color puzzle
    
    All those half-colored spheres could really need some help. And
    with that, we obviously mean your help, otherwise this would probably
    not be a game, but a movie or something. Grab those fully-colored
    spheres and share the color (and the correct one at that) to bring
    the world order back to normal. Sounds easy? It is. Up until the
    third level or so. Then it gets tricky. But you'll figure it out,
    I'm sure.
---
 games/Makefile                            |  1 +
 games/chromono/Makefile                   | 19 +++++++++++++++++++
 games/chromono/distinfo                   |  3 +++
 games/chromono/files/patch-CMakeLists.txt | 29 +++++++++++++++++++++++++++++
 games/chromono/pkg-descr                  |  7 +++++++
 games/chromono/pkg-plist                  |  3 +++
 6 files changed, 62 insertions(+)

diff --git a/games/Makefile b/games/Makefile
index 3daced2914ac..a43b7b6710f8 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -152,6 +152,7 @@
     SUBDIR += chocolate-doom
     SUBDIR += chroma
     SUBDIR += chromium-bsu
+    SUBDIR += chromono
     SUBDIR += circuslinux
     SUBDIR += cmatrix
     SUBDIR += cockatrice
diff --git a/games/chromono/Makefile b/games/chromono/Makefile
new file mode 100644
index 000000000000..7b23b56b0f58
--- /dev/null
+++ b/games/chromono/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	chromono
+PORTVERSION=	1.1.1
+CATEGORIES=	games
+MASTER_SITES=	https://thp.io/2013/chromono/
+
+MAINTAINER=	amdmi3@FreeBSD.org
+COMMENT=	Circular color puzzle
+WWW=		https://thp.io/2013/chromono/
+
+LICENSE=	GPLv2+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis
+
+USES=		compiler:c++11-lang cmake gl pkgconfig sdl python:build
+USE_SDL=	sdl2
+USE_GL=		gl glu opengl
+
+.include <bsd.port.mk>
diff --git a/games/chromono/distinfo b/games/chromono/distinfo
new file mode 100644
index 000000000000..21f223c3f57a
--- /dev/null
+++ b/games/chromono/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1674579923
+SHA256 (chromono-1.1.1.tar.gz) = 3ed741e4bdc8ae7fa0019bd9643241856e5b49f6364048c6b3913f5948693afc
+SIZE (chromono-1.1.1.tar.gz) = 628083
diff --git a/games/chromono/files/patch-CMakeLists.txt b/games/chromono/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..10f63dd41feb
--- /dev/null
+++ b/games/chromono/files/patch-CMakeLists.txt
@@ -0,0 +1,29 @@
+--- CMakeLists.txt.orig	2021-08-18 06:43:26 UTC
++++ CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13)
+ 
+ project(chromono)
+ 
+-add_definitions(-Wall -Werror)
++add_definitions(-Wall)
+ 
+ set(CMAKE_CXX_STANDARD 11)
+ 
+@@ -33,6 +33,8 @@ find_package(OpenGL REQUIRED)
+ list(APPEND LIBRARIES ${OPENGL_LIBRARIES})
+ include_directories(${OPENGL_INCLUDE_DIRS})
+ 
++find_package(PythonInterp)
++
+ file(GLOB CORE_SOURCES "${chromono_SOURCE_DIR}/src/*.cpp")
+ file(GLOB RENDERER_SOURCES "${chromono_SOURCE_DIR}/src/renderer/*.cpp")
+ file(GLOB CIRCLE1D_SOURCES "${chromono_SOURCE_DIR}/src/circle1d/*.cpp")
+@@ -55,7 +57,7 @@ set(RESOURCE_PACKER "${chromono_SOURCE_DIR}/packer.py"
+ 
+ add_custom_command(
+     OUTPUT ${RE_SOURCES} resources.h
+-    COMMAND python3 ${RESOURCE_PACKER} ${RESOURCES} ${RE_SOURCES}
++    COMMAND ${PYTHON_EXECUTABLE} ${RESOURCE_PACKER} ${RESOURCES} ${RE_SOURCES}
+     DEPENDS ${RESOURCES} ${RESOURCE_PACKER}
+ )
+ 
diff --git a/games/chromono/pkg-descr b/games/chromono/pkg-descr
new file mode 100644
index 000000000000..06862a32eeeb
--- /dev/null
+++ b/games/chromono/pkg-descr
@@ -0,0 +1,7 @@
+All those half-colored spheres could really need some help. And
+with that, we obviously mean your help, otherwise this would probably
+not be a game, but a movie or something. Grab those fully-colored
+spheres and share the color (and the correct one at that) to bring
+the world order back to normal. Sounds easy? It is. Up until the
+third level or so. Then it gets tricky. But you'll figure it out,
+I'm sure.
diff --git a/games/chromono/pkg-plist b/games/chromono/pkg-plist
new file mode 100644
index 000000000000..80565a641cab
--- /dev/null
+++ b/games/chromono/pkg-plist
@@ -0,0 +1,3 @@
+bin/chromono
+share/applications/chromono.desktop
+share/pixmaps/chromono.png