Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minetest-devel: new port in games #17080

Closed
wants to merge 2 commits into from
Closed

minetest-devel: new port in games #17080

wants to merge 2 commits into from

Conversation

Zweihorn
Copy link
Contributor

@Zweihorn Zweihorn commented Dec 27, 2022

This PR became obsolete by #17077 and was closed.

MT 5.6.1 minetest-devel derived from minetest

  • Portfile derived from minetest port
  • updates and additions to 'depends_lib-append'
  • updates and additions to 'configure.args-append'
  • includes all diffs from minetest (i.e. the original files without any changes)
  • adds new maintainer (Zweihorn)
  • license EUPL-1.2 <--- changed back to LGPL to resolve conversation
  • adds 'conflicts minetest'

Ref https://trac.macports.org/ticket/66562

Description

MT 5.6.1 minetest-devel provides better compatibility with other ports and greatly improves the internal performance of the Minetest App by providing particular options to the build of the port.

The Portfile Depends.Lib were improved for compatibility in general. The two more particular additions were:

port:sqlite3 		<-- # better compatibility, ensures for 'state of the art' SQLite3 by MacPorts

port:zstd  		<-- # better compatibility, ensures for fast lossless compression by MacPorts zstd

SQLite3 was made the default database back-end by the MT project since 0.4.17 or earlier. Accordingly, the a.m. dependency avoids a default at the legacy sqlite3 from the OS by Apple.

The Portfile Config.Args were improved on particular CMake options for the MT build:

ENABLE_SPATIAL=ON          - Build with LibSpatial; Speeds up AreaStores

ENABLE_SYSTEM_GMP=ON       - Use GMP from system (much faster than bundled mini-gmp)

VERSION_EXTRA=             - Text to append to version (e.g. VERSION_EXTRA=MacPorts -> Minetest 5.6.1-MacPorts)

Apparently, these options were missed in establishing the legacy minetest port definitions in the past.

Further Improvements to the Portfile and the Verification output can be found in the Addendum below.

  1. This PR makes to former draft PR minetest-devel: first ideas and poor man's DRAFT (closed) #17061 obsolete.
  2. My additional application as new maintainer to the minetest port at: minetest: new maintainer & new Portfile #17077

However, I decline to publicly distributing my personal email address.
Needs further application on 7.6. MacPorts Membership for my macports.org:Zweihorn email by your kind approval.

Please be aware, my work and/or contribution to Open Source Endeavour is always published under the EUPL-1.2 license. This fits my legal requirement as an European citizen thus outside U.S. jurisdiction. Furthermore, the Open Source Initiative (OSI) approves of EUPL-1.2 and agrees, that public domain doesn't exist in Europe.

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 11.7.2 20G1020 x86_64
Command Line Tools 13.2.0.0.1.1638488800

Verification

We have successfully verified as follows:

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint --nitpick? - for output see below
  • tried existing tests with sudo port test? - for output see below
  • tried a full install with sudo port -vst install? - for output see below
  • tested basic functionality of all binary files? -

Addendum

Minetest 5.6.1 minetest-devel results and improvements to Portfile

Portfile check

Acceptable results.

% port lint --nitpick
--->  Verifying Portfile for minetest-devel
Warning: Line 15 seems to hardcode the version number, consider using ${version} instead
--->  0 errors and 1 warnings found.

The warning derives from the set game_version 5.6.1 which cannot be avoided due to technical reasons.
There is the need to give both the MT core and the MT game a version number each respectively as these may differ.

NO existing tests

There were no tests turned on.

% sudo port test

. . .
--->  Attempting to fetch 5.6.1.tar.gz from https://github.com/minetest/minetest_game/archive/
--->  Verifying checksums for minetest-devel
--->  Extracting minetest-devel
--->  Applying patches to minetest-devel
--->  Configuring minetest-devel
--->  Building minetest-devel                            
--->  Testing minetest-devel                             
Error: Failed to test minetest-devel: minetest-devel has no tests turned on. see 'test.run' in portfile(7)
Error: See /opt/local/var/macports/logs/_usr_local_macports_ports_games_minetest-devel/minetest-devel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

IMO the errors can be neglected due to tests turned off obviously. No bug.

Full install
% sudo port -vst install

. . .
x ./Applications/MacPorts/minetest.app/Contents/Resources/textures/base/pack/minimap_overlay_square.png
x ./Applications/MacPorts/minetest.app/Contents/MacOS/minetestserver
x ./Applications/MacPorts/minetest.app/Contents/MacOS/minetest
--->  Cleaning minetest-devel
--->  Removing work directory for minetest-devel
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.
Tested basic functionality

Minetest 5.6.1 minetest-devel was started via the MT App from the LaunchPad successfully.

  • App starts and presenting the MT GUI by Irrlicht as expected.
  • Setup accordingly to MT Get Started was functioning.
  • World Map builds and player is spawned, world view is as expected.
  • No errors in 'debug.txt' log found.
% tail debug.txt

2022-12-27 18:17:17: [Main]: Automatically selecting world at [/Users/XXX/Library/Application Support/minetest/worlds/test561]
2022-12-27 18:17:35: ACTION[Main]: World at [/Users/XXX/Library/Application Support/minetest/worlds/test561]
2022-12-27 18:17:35: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:56218.
2022-12-27 18:17:36: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
2022-12-27 18:18:27: ACTION[Main]: Server: Shutting down

Minetest 5.6.1 minetest-devel was started and uses SQLite3 as default Database Back-end.

  • All files needed as default to a MT World folder were found.
  • SQLite3 Database Back-ends for
    • Authentication
    • World Map
    • MT Mod Storage
    • Players Inventory
  • MT GUI Setup stores configuration in World.MT as expected.
% ls -1 /Users/XXX/Library/Application\ Support/minetest/worlds/test561 
auth.sqlite
env_meta.txt
force_loaded.txt
ipban.txt
map.sqlite
map_meta.txt
mod_storage.sqlite
players.sqlite
world.mt

NOTE: For the MT graphical world view see the PNG in the attach.

Improvements to the Portfile

This is a Diff-file amended by inline commentary for explanations.

Particular POIs are marked with <-- # better compatibility or similar comment inline.

--- ../GitHub/macports-ports/games/minetest/Portfile	2022-12-26 11:21:24.000000000 +0100
+++ ../GitHub/macports-ports/games/minetest-devel/Portfile	2022-12-27 18:50:08.000000000 +0100
@@ -7,10 +7,11 @@
 compiler.cxx_standard   2011
 compiler.thread_local_storage   yes
 
+name                    minetest-devel
 github.setup            minetest minetest 5.6.1
 revision                0
 
-# the game version could be different than the minetest version
+# the game version could be different to the minetest version
 set game_version        5.6.1
 
 # to add on more files to a github portgroup download
@@ -23,7 +24,7 @@
 
 distfiles               ${main_distfile}:main \
                         ${game_distfile}:game
-                        
+
 master_sites            ${github.master_sites}:main \
                         ${game_mastersite}:game
 
@@ -44,27 +45,46 @@
     }
 }
 
-license                 LGPL-2.1+
+license                 EUPL-1.2
 categories              games
 platforms               darwin
-maintainers             nomaintainer
+maintainers             {macports.org:Zweihorn @Zweihorn}
 description             open source infinite-world block sandbox game with survival and crafting
-long_description        ${description}.
+long_description        - ${description} - \
+                         \
+                        Minetest (usually abbreviated as MT) is an open source voxel game \
+                        engine. Play one of our many games, mod a game to your liking, make your \
+                        own game, or play on a multiplayer server. \
+                         \
+                        Available for Windows, macOS, GNU/Linux, FreeBSD, OpenBSD, DragonFly \
+                        BSD, and Android. \
+                         \
+                        * More information at <https://www.minetest.net> \
+                        * More MT mod expansions at <https://content.minetest.net/> \
+                        * More on MT DB Backends at <https://wiki.minetest.net/Database_backends> \
+                         \
+                        This ${name} port provides a cutting edge Minetest (stable).
+
+homepage                https://www.minetest.net
+
+conflicts               minetest			<-- # conflicts w/ port
 
-depends_build-append    path:bin/doxygen:doxygen \
-                        port:mesa
+depends_build-append    port:doxygen
 
 depends_lib-append      port:irrlichtmt \
-                        path:include/turbojpeg.h:libjpeg-turbo \
+                        port:libjpeg-turbo \	<-- # better compatibility
                         port:libogg \
                         port:libvorbis \
                         port:freetype \
                         port:gettext \
                         port:leveldb \
-                        port:hiredis \		<-- # was exotic / not used
+                        port:sqlite3 \		<-- # better compatibility
+                        port:zstd \		<-- # improved performance
+                        port:luajit \		<-- # better compatibility
+                        port:gmp \		<-- # improved performance
                         port:curl \
-                        path:lib/libluajit-5.1.2.dylib:luajit \
                         port:jsoncpp \
+                        port:spatialindex \	<-- # improved performance
                         port:xorg-libX11 \
                         port:xorg-libXxf86vm
 
@@ -85,20 +105,22 @@
 
 configure.args-append   -DCMAKE_BUILD_TYPE=Release \
                         -DCMAKE_INSTALL_PREFIX:PATH=${applications_dir} \
-                        -DBUILD_CLIENT=1 \
-                        -DENABLE_SOUND=1 \
-                        -DENABLE_REDIS=1 \
-                        -DENABLE_POSTGRESQL:BOOL=OFF \
-                        -DENABLE_LEVELDB=1 \
-                        -DENABLE_FREETYPE=1 \
-                        -DENABLE_CURL=1 \
-                        -DENABLE_GETTEXT=1 \
-                        -DENABLE_SYSTEM_JSONCPP=1 \
-                        -DENABLE_UPDATE_CHECKER=0 \
+                        -DBUILD_UNITTESTS=OFF \
+                        -DBUILD_CLIENT=ON \		<-- # consistant to MT install
+                        -DBUILD_SERVER=ON \		<-- # consistant to MT install
+                        -DENABLE_SOUND=ON \
+                        -DENABLE_REDIS=OFF \		<-- # was exotic / not used
+                        -DENABLE_POSTGRESQL=OFF \	<-- # ON for dedicated MT server (future?)
+                        -DENABLE_LEVELDB=ON \
+                        -DENABLE_FREETYPE=ON \
+                        -DENABLE_CURL=ON \
+                        -DENABLE_GETTEXT=ON \
+                        -DENABLE_SPATIAL=ON \		<-- # improves performance
+                        -DENABLE_SYSTEM_GMP=ON \	<-- # improves performance
+                        -DENABLE_SYSTEM_JSONCPP=ON \
                         -DCURSES_INCLUDE_PATH:FILEPATH=${prefix}/include \
                         -DENABLE_LUAJIT=ON \		<-- # better compatibility
-                        -DLUA_INCLUDE_DIR:PATH=${prefix}/include/luajit-2.1 \
-                        -DLUA_LIBRARY:FILEPATH=${prefix}/lib/libluajit-5.1.dylib
+                        -DVERSION_EXTRA=MacPorts	<-- # adds advertising to GUI
 
 post-destroot {
     move ${workpath}/minetest_game-${game_version}   ${destroot}${applications_dir}/minetest.app/Contents/Resources/games/minetest_game

Last not least this Portfile was implemented as a local port definition on may Mac for years and greatly improving my user experience as a MT player together with the MT server even for several Multi-Player events. The code build can be called stable, I presume.

Hope this helps.

Licence

@Zweihorn - 2022-12-27
This work is derived from work under the LGPL-1.2+ from 'minetest' on MacPorts ports.

Licensed under the EUPL-1.2-or-later

The text of the European Union Public Licence (EUPL) version 1.2,
published in Official Journal of 19 May 2017 and available in 23
official languages of the European Union (SPDX identifier EUPL-1.2),
is to be found at:

The a.m. page contains all the official versions of the European Union
Public Licence (EUPL-1.2). The preamble written for v 1.0, explaining
the purpose of this Free/Open Source Software Licence, together with
links to further information on the licence is valid for later versions.

The Joinup Licensing Assistant (JLA) may be worth a visit to find and
compare software licenses with:

The JLA is linked to SPDX (for Software Package Data Exchange), an
initiative of the LINUX foundation that attempts to standardize the way
in which organizations refer to software licenses: each licence is
identified by a full name, such as "European Union Public Licence 1.2"
and a shorter identifier, here "EUPL-1.2".

MT graphical world view

screenshot_20221227_181754

MT 5.6.1 minetest-devel derived from minetest

* Portfile derived from minetest port
* updates and additions to 'depends_lib-append'
* updates and additions to 'configure.args-append'
* includes all diiffs from minetest
* adds new maintainer
+ license EUPL-1.2
* adds 'conflicts minetest'

Ref https://trac.macports.org/ticket/66562
@Zweihorn
Copy link
Contributor Author

The rationale why to establish a new minetest-devel port parallel to the minetest legacy port.

(F) In the future both ports minetest and minetest-devel should continue, as a new MT 5.6.2 may be understood stable but a new MT 5.7.0 would be work in progress. AFAIK on top of that it is tradition with Minetest players to stick with an older version as long as possible.

IMO this should be sufficient. There may be more reasons in addition.

Please note I volunteer in becoming maintainer to both ports.

Hope this helps.
🌻

@Zweihorn Zweihorn changed the title establish minetest-devel (new port) minetest-devel: new port in games Dec 27, 2022
Copy link
Contributor

@reneeotten reneeotten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the submission @Zweihorn. A few comments below - in addition I wonder whether this can be just a subport of the "minetest" Portfile as presumably both ports will share many of the same content.

games/minetest-devel/Portfile Outdated Show resolved Hide resolved
games/minetest-devel/Portfile Outdated Show resolved Hide resolved
@Zweihorn
Copy link
Contributor Author

Zweihorn commented Dec 28, 2022

in addition I wonder whether this can be just a subport of the "minetest" Portfile as presumably both ports will share many of the same content.

@reneeotten - Please see #17080 (comment) which reads above in this PR obviously.

Additionally, I would fear that most MT users just want to be MT players and I want to avoid any intro barriers for them. The concept of variants might be clear to experts but I learned of so many innocence in the MT forums recently that I would fear to drive people away.

So let me stick with this approach of two parallel ports for the near future please.

However, after some months (while getting some more awareness and replies from MT players after the implementation of the minetest-devel first) in better establishing myself as maintainer I will be happy to re-consider your proposal.

What do you think of this? Deal?

* license is `LGPL`now

* new maintainer by GitHub only
@Zweihorn
Copy link
Contributor Author

@reneeotten - THX

Again I highly appreciate your commitment in guiding me through this.

@Zweihorn
Copy link
Contributor Author

Zweihorn commented Dec 28, 2022

Addendum:

I reconsidered your proposal to keep with one port only and found a loop-hole in my thinking.

  • There is no need for minetest-devel when I can push my new Portfile to minetest anyway.
  • The effort to advertise for a new minetest-devel would be the same as minetest --devel variant advertisement obviously. In extent to this the MT project took almost a year to implement my proposal of a basic MacPorts download info in addition to Homebrew on their web-page before already.
  • Advertising a new minetest --devel variant would come from the port update itself and would be no entry barrier. Thus my above concern was without proof.
  • The time to establish a new variant minetest --devel or similar will be when a MT development version (e.g., MT 5.7.0) becomes available upstream. There is no need to press for a parallel new port.

@reneeotten - Change of mind: I happily agree to maintain just the minetest port and any new ideas can become new vraiants to this port anyway.

@Zweihorn
Copy link
Contributor Author

Zweihorn commented Dec 28, 2022

Oopsy. Now there is the need in moving the content of the improved Portfile from this PR to minetest by new commit to #17077 obviously,

Stay tuned . . .

@Zweihorn
Copy link
Contributor Author

This PR was made obsolete by #17077 and thus will be closed accordingly.

@Zweihorn Zweihorn closed this Dec 29, 2022
@Zweihorn Zweihorn deleted the minetest-devel_001 branch December 29, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants