From: Daniel Dickman Subject: games/vegastrike and Python 2 To: Pascal Stumpf Cc: ports@openbsd.org Date: Thu, 18 Jun 2026 22:31:38 -0400 Hi Pascal, ports@ -- This game has been broken for a while and depends on Python 2. I've managed to revamp it so it can be moved to Python 3. The complete diff is attached as a gzip diff and a separate attachment is there for the new utcs port. The new port utcs (Upon The Coldest Sea) is the game pack that merges all the data from the 4 previous game pack ports (data, extra, music, speech). I've updated devel/quirks in the attached to reflect that change and also added @pkgpath markers to games/vegastrike/utcs/pkg/PLIST: $ head -4 games/vegastrike/utcs/pkg/PLIST @pkgpath games/vegastrike/data/vegastrike-data @pkgpath games/vegastrike/extra/vegastrike-extra @pkgpath games/vegastrike/music/vegastrike-music @pkgpath games/vegastrike/speech/vegastrike-speech The complete diff is large, so it's attached, but I pasted the diff for just the engine in-line below for convenience. Note that while the game does launch now, there are still a few warts because it targets Python 3.11. However I'd like to get it in anyway so we can remove Python 2 from this port. ok? Index: Makefile =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/Makefile,v diff -u -p -u -r1.20 Makefile --- Makefile 6 Mar 2023 13:37:15 -0000 1.20 +++ Makefile 19 Jun 2026 02:20:45 -0000 @@ -1,57 +1,39 @@ COMMENT = 3D space simulator -DISTNAME = vegastrike-src-${V} +DISTNAME = Vega-Strike_v${V}-Source PKGNAME = vegastrike-${V} -REVISION = 9 -WANTLIB += GL GLU OgreMain SDL X11 Xcomposite Xcursor Xdamage -WANTLIB += Xext Xfixes Xi Xinerama Xmu Xrandr Xrender atk-1.0 -WANTLIB += boost_python${MODPY_VERSION:C/\.//g} boost_thread-mt c cairo expat fontconfig -WANTLIB += freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 -WANTLIB += glut gobject-2.0 gtk-x11-2.0 iconv intl jpeg m ogg openal pango-1.0 -WANTLIB += pangocairo-1.0 pangoft2-1.0 png pthread ${COMPILER_LIBCXX} util -WANTLIB += vorbis vorbisfile z ${MODPY_WANTLIB} harfbuzz +WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB} GL GLU SDL Xi Xmu +WANTLIB += boost_atomic-mt boost_chrono-mt boost_date_time-mt +WANTLIB += boost_filesystem-mt boost_log-mt boost_log_setup-mt +WANTLIB += boost_python314-mt boost_thread-mt c expat glut jpeg +WANTLIB += m ogg openal png util vorbis vorbisfile z COMPILER = base-clang ports-gcc base-gcc FIX_CRLF_FILES = src/cmd/unit_jump.h src/cmd/unit_physics.h -MODULES = lang/python -MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2} -RUN_DEPENDS = games/vegastrike/data>=${V} -LIB_DEPENDS = x11/gtk+2 \ +MODULES = lang/python \ + devel/cmake + +#BUILD_DEPENDS = devel/boost + +RUN_DEPENDS = games/vegastrike/utcs>=${V} + +LIB_DEPENDS = x11/gtk+3 \ audio/openal \ devel/boost \ audio/libvorbis \ - x11/ogre \ graphics/freeglut \ + graphics/jpeg \ + graphics/png \ devel/sdl - -CONFIGURE_STYLE = gnu -CONFIGURE_ARGS += --with-python-version=${MODPY_VERSION} \ - --with-png-libs="${LOCALBASE}/lib" \ - --with-png-inc="${LOCALBASE}/include/libpng" \ - --with-jpeg-libs="${LOCALBASE}/lib" \ - --with-openal-libs="${LOCALBASE}/lib" \ - --with-al-inc="${LOCALBASE}/include" \ - --with-vorbis-libs="${LOCALBASE}/lib" \ - --with-vorbis-inc="${LOCALBASE}/include/vorbis" \ - --with-boost=system \ - --disable-cegui \ - --disable-ffmpeg \ - --with-data-dir="${TRUEPREFIX}/share/vegastrike" - -CXXFLAGS += -Wno-undefined-var-template -Wno-unused-volatile-lvalue \ - -Wno-narrowing - -CONFIGURE_ENV = \ - CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng" \ - LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" +CONFIGURE_ARGS = -DDISABLE_OGRE=ON post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/vegastrike - mv ${PREFIX}/objconv ${PREFIX}/share/vegastrike - mv ${PREFIX}/bin/replace ${PREFIX}/bin/vsreplace +# mv ${PREFIX}/objconv ${PREFIX}/share/vegastrike +# mv ${PREFIX}/bin/replace ${PREFIX}/bin/vsreplace .include Index: distinfo =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/distinfo,v diff -u -p -u -r1.1.1.1 distinfo --- distinfo 18 Apr 2014 15:14:09 -0000 1.1.1.1 +++ distinfo 19 Jun 2026 02:20:45 -0000 @@ -1,2 +1,2 @@ -SHA256 (vegastrike-src-0.5.1.r1.tar.bz2) = Xvi8SQZ0YYPzsT/nBU+jfe52cs9XSdEETqURqF0q8SU= -SIZE (vegastrike-src-0.5.1.r1.tar.bz2) = 10875771 +SHA256 (Vega-Strike_v0.8.0-Source.tar.bz2) = rdAgGrVqQCv1INfthYP91Fxdf+y1FZF7W8hK9wj+Nqw= +SIZE (Vega-Strike_v0.8.0-Source.tar.bz2) = 1860270 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: patches/patch-CMakeLists_txt diff -N patches/patch-CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-CMakeLists_txt 19 Jun 2026 02:20:45 -0000 @@ -0,0 +1,65 @@ +- don't disable PIE on OpenBSD +- look for Python 3.14 +- disable a few things that don't fully work + +Index: CMakeLists.txt +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -298,11 +298,11 @@ IF (ENABLE_PIE) + ADD_COMPILE_OPTIONS("-fpie") + LINK_LIBRARIES("-pie") + ELSE (ENABLE_PIE) +- MESSAGE("++ Disabling Position Independent Executables/Shared Libraries (Recommended on Ubuntu/Mint)") +- IF (NOT MSVC) ++ IF (NOT MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") ++ MESSAGE("++ Disabling Position Independent Executables/Shared Libraries (Recommended on Ubuntu/Mint)") + ADD_COMPILE_OPTIONS("-fno-pie") + LINK_LIBRARIES("-no-pie") +- ENDIF (NOT MSVC) ++ ENDIF () + ENDIF (ENABLE_PIE) + + IF (MSVC) +@@ -434,7 +434,7 @@ FIND_PACKAGE(LinuxDistro REQUIRED) + OPTION(USE_PYTHON_3 "Use Python 3 or Python 2.7 (default is 3)" ON) + IF (USE_PYTHON_3) + # We want at least Python 3.4, but we prefer newer versions +- SET(Python_ADDITIONAL_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4) ++ SET(Python_ADDITIONAL_VERSIONS 3.14 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4) + ELSE (USE_PYTHON_3) + MESSAGE("++ Adding python 2.7 variant") + SET(Python_ADDITIONAL_VERSIONS 2.7) +@@ -503,7 +503,8 @@ IF (USE_SYSTEM_BOOST) + + UNSET(Boost_${BOOST_PYTHON_COMPONENT}_FOUND) + MESSAGE("++ Looking for System Boost::python") +- FIND_PACKAGE(Boost COMPONENTS ${BOOST_PYTHON_COMPONENT} log log_setup date_time system filesystem thread chrono atomic REQUIRED) ++ SET(Boost_NO_BOOST_CMAKE ON) ++ FIND_PACKAGE(Boost COMPONENTS ${BOOST_PYTHON_COMPONENT} log log_setup date_time filesystem thread chrono atomic REQUIRED) + IF (Boost_python3_FOUND) + MESSAGE("++ Found System Boost::python3 : ${Boost_PYTHON3_LIBRARY}") + ELSEIF (Boost_python_FOUND) +@@ -1252,7 +1253,7 @@ IF (NOT DISABLE_CLIENT) + ENDIF (NOT DISABLE_CLIENT) + + # Vssetup Sub build file +-ADD_SUBDIRECTORY(setup) ++# ADD_SUBDIRECTORY(setup) + + # Add other utilies here + ADD_SUBDIRECTORY(objconv) +@@ -1333,8 +1334,6 @@ INSTALL(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/vegastri + ENDIF (WIN32) + + +-ADD_SUBDIRECTORY("../doc" "./doc") +- + # As per https://braintrekking.wordpress.com/2013/04/27/dll-hell-how-to-include-microsoft-redistributable-runtime-libraries-in-your-cmakecpack-project/ + INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT Libraries) + +@@ -1733,5 +1732,3 @@ ELSE () + # Unknown Platform --> Just do the various compressed tarballs + SET(CPACK_GENERATOR "TBZ2" "TGZ" "TXZ") + ENDIF (WIN32 AND NOT UNIX) +- +-INCLUDE(CPack) Index: patches/patch-Makefile_in =================================================================== RCS file: patches/patch-Makefile_in diff -N patches/patch-Makefile_in --- patches/patch-Makefile_in 11 Mar 2022 19:05:07 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@ -explicitly pass -Wno-#warnings as it's a bitch to pass thru configure - -Index: Makefile.in ---- Makefile.in.orig -+++ Makefile.in -@@ -711,7 +711,7 @@ CPPFLAGS = @CPPFLAGS@ - CXX = @CXX@ - CXXCPP = @CXXCPP@ - CXXDEPMODE = @CXXDEPMODE@ --CXXFLAGS = @CXXFLAGS@ -+CXXFLAGS = @CXXFLAGS@ '-Wno-\#warnings' - CYGPATH_W = @CYGPATH_W@ - DEFS = @DEFS@ - DEPDIR = @DEPDIR@ -@@ -1532,7 +1532,7 @@ vegastrike_LDADD_1 = $(noinst_LIBRARIES) \ - - @BOOSTSYSTEM_FALSE@vegastrike_LDADD = $(vegastrike_LDADD_1) - @BOOSTSYSTEM_TRUE@vegastrike_LDADD = $(vegastrike_LDADD_1) \ --@BOOSTSYSTEM_TRUE@ -lboost_python -+@BOOSTSYSTEM_TRUE@ -lboost_python27 - - vegastrike_DEPENDENCIES = $(noinst_LIBRARIES) - vegaserver_LDADD_1 = $(noinst_LIBRARIES) \ -@@ -1540,7 +1540,7 @@ vegaserver_LDADD_1 = $(noinst_LIBRARIES) \ - - @BOOSTSYSTEM_FALSE@vegaserver_LDADD = $(vegaserver_LDADD_1) - @BOOSTSYSTEM_TRUE@vegaserver_LDADD = $(vegaserver_LDADD_1) \ --@BOOSTSYSTEM_TRUE@ -lboost_python -+@BOOSTSYSTEM_TRUE@ -lboost_python27 - - vegaserver_DEPENDENCIES = $(noinst_LIBRARIES) - librootclient = \ -@@ -1894,7 +1894,7 @@ base_maker_SOURCES = \ - src/xml_support.h - - @BOOSTSYSTEM_FALSE@@HAVE_OGRE_TRUE@MESHER_BOOST_LIBS = --@BOOSTSYSTEM_TRUE@@HAVE_OGRE_TRUE@MESHER_BOOST_LIBS = -lboost_thread -+@BOOSTSYSTEM_TRUE@@HAVE_OGRE_TRUE@MESHER_BOOST_LIBS = -lboost_thread-mt - @HAVE_OGRE_FALSE@MESHER_BOOST_LIBS = - mesher_CXXFLAGS = $(OGRE_CFLAGS) -I../../src -I../.. - mesher_LDADD = $(OGRE_LIBS) -lexpat $(MESHER_BOOST_LIBS) Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- patches/patch-configure 11 Mar 2022 19:05:07 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -Bogus python lib, doesn't link too well with clang. - - -Index: configure ---- configure.orig -+++ configure -@@ -10520,10 +10520,6 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ex - fi - DEBUG_NOOPT="-O0 -g" - CUBEMAP_FLAGS="-DNV_CUBE_MAP" --# Remove these flags beforehand... this should not remove functionality. --CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g[^[:space:]]*//g' | sed -e 's/-O[^[:space:]]//g'`" --CFLAGS="`echo $CFLAGS | sed -e 's/-g[^[:space:]]*//g' | sed -e 's/-O[^[:space:]]//g'`" --VS_CXXFLAGS="`echo $VS_CXXFLAGS | sed -e 's/-g[^[:space:]]*//g' | sed -e 's/-O[^[:space:]]//g'`" - - # Check whether --enable-permissive or --disable-permissive was given. - if test "${enable_permissive+set}" = set; then -@@ -10980,7 +10976,8 @@ then - if test "x$is_macosx" = "xyes" ; then - PYTHON_LIBS="$i/libpython${PYTHON_SHORT}.a" - else -- PYTHON_LIBS="$i/libpython${PYTHON_SHORT}.a" -+ PYTHON_LIBS="-L$i -lpython${PYTHON_SHORT}" -+ #PYTHON_LIBS="$i/libpython${PYTHON_SHORT}.a" - fi - FOUND_LIBPYTHON_SO=yes - break Index: patches/patch-objconv_basemaker_base_maker_cpp =================================================================== RCS file: patches/patch-objconv_basemaker_base_maker_cpp diff -N patches/patch-objconv_basemaker_base_maker_cpp --- patches/patch-objconv_basemaker_base_maker_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: objconv/basemaker/base_maker.cpp ---- objconv/basemaker/base_maker.cpp.orig -+++ objconv/basemaker/base_maker.cpp -@@ -2060,7 +2060,7 @@ void Base::DrawWin() - int main( int argc, char **argv ) - { - printf( "Loading...\n" ); -- Base::CurrentBase = false; -+ Base::CurrentBase = NULL; - glutInit( &argc, argv ); - glutInitWindowSize( 800, 600 ); - g_game.x_resolution = 800; Index: patches/patch-setup_src_include_central_cpp =================================================================== RCS file: patches/patch-setup_src_include_central_cpp diff -N patches/patch-setup_src_include_central_cpp --- patches/patch-setup_src_include_central_cpp 11 Mar 2022 19:05:07 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,59 +0,0 @@ -Index: setup/src/include/central.cpp ---- setup/src/include/central.cpp.orig -+++ setup/src/include/central.cpp -@@ -34,7 +34,7 @@ void SetGroup(char *group, char *setting) { - do { - if (CURRENT->name == NULL) { continue; } - if (strcmp(group, CURRENT->name) == 0) { CURRENT->setting = NewString(setting); return; } -- } while ((CURRENT = CURRENT->next) > 0); -+ } while ((CURRENT = CURRENT->next) != 0); - } - void SetInfo(char *catagory, char *info) { - struct catagory *CURRENT; -@@ -42,7 +42,7 @@ void SetInfo(char *catagory, char *info) { - do { - if (CURRENT->name == NULL) { continue; } - if (strcmp(catagory, CURRENT->name) == 0) { CURRENT->info = NewString(info); return; } -- } while ((CURRENT = CURRENT->next) > 0); -+ } while ((CURRENT = CURRENT->next) != 0); - } - - char *GetInfo(char *catagory) { -@@ -54,7 +54,7 @@ char *GetInfo(char *catagory) { - if (CURRENT->info) { return CURRENT->info; } - else { return catagory; } - } -- } while ((CURRENT = CURRENT->next) > 0); -+ } while ((CURRENT = CURRENT->next) != 0); - return catagory; - } - -@@ -64,8 +64,8 @@ char *GetSetting(char *group) { - do { - if (CUR->name == NULL) { continue; } - if (strcmp(CUR->name, group) == 0) { return CUR->setting; } -- } while ((CUR = CUR->next) > 0); -- return '\0'; -+ } while ((CUR = CUR->next) != 0); -+ return NULL; - } - - struct catagory *GetCatStruct(char *name) { -@@ -74,7 +74,7 @@ struct catagory *GetCatStruct(char *name) { - do { - if (CUR->name == NULL) { continue; } - if (strcmp(CUR->name, name) == 0) { return CUR; } -- } while ((CUR = CUR->next) > 0); -+ } while ((CUR = CUR->next) != 0); - return 0; - } - -@@ -84,7 +84,7 @@ struct group *GetGroupStruct(char *name) { - do { - if (CUR->name == NULL) { continue; } - if (strcmp(CUR->name, name) == 0) { return CUR; } -- } while ((CUR = CUR->next) > 0); -+ } while ((CUR = CUR->next) != 0); - return 0; - } - Index: patches/patch-setup_src_include_display_gtk_cpp =================================================================== RCS file: patches/patch-setup_src_include_display_gtk_cpp diff -N patches/patch-setup_src_include_display_gtk_cpp --- patches/patch-setup_src_include_display_gtk_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@ -Index: setup/src/include/display_gtk.cpp ---- setup/src/include/display_gtk.cpp.orig -+++ setup/src/include/display_gtk.cpp -@@ -109,7 +109,7 @@ void ShowMain(void) { - break; - } - i++; -- } while ((NEWCUR = NEWCUR->next) > 0); -+ } while ((NEWCUR = NEWCUR->next) != 0); - // printf("\n\n"); - gtk_widget_show (menu); - gtk_container_add(GTK_CONTAINER(vbox), menu); -@@ -124,7 +124,7 @@ void ShowMain(void) { - gtk_widget_show(hbox); - } - column++; -- } while ((CURRENT = CURRENT->next) > 0); -+ } while ((CURRENT = CURRENT->next) != 0); - if (column != 1) { - gtk_container_add(GTK_CONTAINER(main_vbox), hbox); - gtk_widget_show(hbox); -@@ -180,7 +180,7 @@ void AddCats(GtkWidget *vbox, char *group, char *def) - // gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ClickButton), CUR); - #endif - CUR->button = button; -- } while ((CUR = CUR->next) > 0); -+ } while ((CUR = CUR->next) != 0); - } - - void ClickButton(GtkWidget *w, struct catagory *CUR) { Index: patches/patch-setup_src_include_file_cpp =================================================================== RCS file: patches/patch-setup_src_include_file_cpp diff -N patches/patch-setup_src_include_file_cpp --- patches/patch-setup_src_include_file_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@ -Index: setup/src/include/file.cpp ---- setup/src/include/file.cpp.orig -+++ setup/src/include/file.cpp -@@ -167,7 +167,7 @@ void LoadConfig( void ) - n_parm = next_parm( parm ); //next_parm is a line splitter included with general.c - if (strcmp( "groups", parm ) == 0) { - parm = n_parm; -- while ( ( n_parm = next_parm( parm ) ) > 0 ) { -+ while ( ( n_parm = next_parm( parm ) ) != 0 ) { - G_CURRENT->name = NewString( parm ); - G_NEXT = (struct group*) malloc( sizeof (struct group) ); - if (G_NEXT == 0) { -@@ -188,7 +188,7 @@ void LoadConfig( void ) - n_parm = next_parm( parm ); - group = NewString( parm ); - parm = n_parm; -- while ( ( n_parm = next_parm( parm ) ) > 0 ) { -+ while ( ( n_parm = next_parm( parm ) ) != 0 ) { - C_CURRENT->name = NewString( parm ); - C_NEXT = (struct catagory*) malloc( sizeof (struct catagory) ); - if (C_NEXT == 0) { -@@ -318,7 +318,7 @@ void Modconfig( int setting, char *name, char *group ) - parm++; - if (strcmp( name, parm ) == 0) {commenting = setting; } else { - parm = n_parm; -- while ( ( n_parm = next_parm( parm ) ) > 0 ) { -+ while ( ( n_parm = next_parm( parm ) ) != 0 ) { - if (parm[0] == '<') break; - if (strcmp( name, parm ) == 0) { - commenting = setting; Index: patches/patch-setup_src_include_general_cpp =================================================================== RCS file: patches/patch-setup_src_include_general_cpp diff -N patches/patch-setup_src_include_general_cpp --- patches/patch-setup_src_include_general_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: setup/src/include/general.cpp ---- setup/src/include/general.cpp.orig -+++ setup/src/include/general.cpp -@@ -121,7 +121,7 @@ char *replace(char *line, char *search, char *replace, - if (calc > LENGTH) { return line; } - length = strlen(line); - strcpy(current, line); -- while ((location = strstr(current, search)) > 0) { -+ while ((location = strstr(current, search)) != 0) { - chr_new[0] = '\0'; - calc = strlen(current) - strlen(search) + strlen(replace); - if (calc > LENGTH) { strcpy(line, current); free(current); free(chr_new); return line; } Index: patches/patch-src_audio_Exceptions_h =================================================================== RCS file: patches/patch-src_audio_Exceptions_h diff -N patches/patch-src_audio_Exceptions_h --- patches/patch-src_audio_Exceptions_h 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -order of initialization matters. - -Index: src/audio/Exceptions.h ---- src/audio/Exceptions.h.orig -+++ src/audio/Exceptions.h -@@ -87,7 +87,7 @@ namespace Audio { - public: - CorruptStreamException(const CorruptStreamException &other) : Exception(other) {} - explicit CorruptStreamException(bool _fatal) -- : Exception(fatal ? "Fatal corruption on stream" : "Recoverable corruption on stream"), -+ : Exception(_fatal ? "Fatal corruption on stream" : "Recoverable corruption on stream"), - fatal(_fatal) - {} - Index: patches/patch-src_cmd_basecomputer_cpp =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_cmd_basecomputer_cpp,v diff -u -p -u -r1.2 patch-src_cmd_basecomputer_cpp --- patches/patch-src_cmd_basecomputer_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ patches/patch-src_cmd_basecomputer_cpp 19 Jun 2026 02:20:45 -0000 @@ -1,6 +1,7 @@ ---- src/cmd/basecomputer.cpp.orig.port Mon Mar 19 09:20:14 2012 -+++ src/cmd/basecomputer.cpp Mon Aug 26 18:45:59 2013 -@@ -3047,7 +3047,7 @@ static int datesort( const void *v1, const void *v2 ) +Index: src/cmd/basecomputer.cpp +--- src/cmd/basecomputer.cpp.orig ++++ src/cmd/basecomputer.cpp +@@ -2877,7 +2877,7 @@ static int datesort( const void *v1, const void *v2 ) return s1.st_mtime-s2.st_mtime; } @@ -9,7 +10,7 @@ typedef int (*scancompare)( const struct dirent **v1, const struct dirent **v2 ); #else typedef int (*scancompare)( const void *v1, const void *v2 ); -@@ -4750,7 +4750,7 @@ bool BaseComputer::showPlayerInfo( const EventCommandI +@@ -4574,7 +4574,7 @@ bool BaseComputer::showPlayerInfo( const EventCommandI void prettyPrintFloat( char *buffer, float f, int digitsBefore, int digitsAfter, int bufferLen ) { int bufferPos = 0; Index: patches/patch-src_cmd_collide2_opcodetypes_h =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_cmd_collide2_opcodetypes_h,v diff -u -p -u -r1.2 patch-src_cmd_collide2_opcodetypes_h --- patches/patch-src_cmd_collide2_opcodetypes_h 11 Mar 2022 19:05:07 -0000 1.2 +++ patches/patch-src_cmd_collide2_opcodetypes_h 19 Jun 2026 02:20:45 -0000 @@ -1,6 +1,7 @@ ---- src/cmd/collide2/opcodetypes.h.orig.port Sat Sep 18 00:29:19 2010 -+++ src/cmd/collide2/opcodetypes.h Sat May 26 16:32:35 2012 -@@ -196,7 +196,7 @@ typedef uint64 uintmax_t; +Index: src/cmd/collide2/opcodetypes.h +--- src/cmd/collide2/opcodetypes.h.orig ++++ src/cmd/collide2/opcodetypes.h +@@ -195,7 +195,7 @@ typedef uint64 uintmax_t; #if defined(HAVE_WCTYPE_H) #include #endif Index: patches/patch-src_cmd_collide_map_h =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_cmd_collide_map_h,v diff -u -p -u -r1.2 patch-src_cmd_collide_map_h --- patches/patch-src_cmd_collide_map_h 11 Mar 2022 19:05:07 -0000 1.2 +++ patches/patch-src_cmd_collide_map_h 19 Jun 2026 02:20:45 -0000 @@ -1,6 +1,7 @@ ---- src/cmd/collide_map.h.orig.port Mon Mar 19 09:20:14 2012 -+++ src/cmd/collide_map.h Sat May 26 16:32:35 2012 -@@ -7,6 +7,7 @@ +Index: src/cmd/collide_map.h +--- src/cmd/collide_map.h.orig ++++ src/cmd/collide_map.h +@@ -33,6 +33,7 @@ #include #endif #include @@ -8,7 +9,7 @@ /* Arbitrarily use Set for ALL PLATFORMS -hellcatv */ class Unit; class Bolt; -@@ -35,7 +36,7 @@ class Collidable (public) +@@ -61,7 +62,7 @@ class Collidable (public) position = QVector( 0, 0, 0 ); //hack for now #else @@ -17,7 +18,7 @@ position = QVector( 0, 0, 0 ); //hack for now #endif } -@@ -76,7 +77,7 @@ class Collidable (public) +@@ -102,7 +103,7 @@ class Collidable (public) #ifdef __APPLE__ !FINITE( radius ) #else @@ -26,7 +27,7 @@ #endif || radius >= -FLT_MIN) radius = -FLT_MIN*2; this->SetPosition( p ); -@@ -176,7 +177,7 @@ inline void init_null_collide_iter() +@@ -202,7 +203,7 @@ inline void init_null_collide_iter() inline bool is_null( const CollideMap::iterator &it ) { Index: patches/patch-src_cmd_unit_generic_cpp =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_cmd_unit_generic_cpp,v diff -u -p -u -r1.3 patch-src_cmd_unit_generic_cpp --- patches/patch-src_cmd_unit_generic_cpp 11 Mar 2022 19:05:07 -0000 1.3 +++ patches/patch-src_cmd_unit_generic_cpp 19 Jun 2026 02:20:45 -0000 @@ -1,7 +1,7 @@ Index: src/cmd/unit_generic.cpp --- src/cmd/unit_generic.cpp.orig +++ src/cmd/unit_generic.cpp -@@ -47,6 +47,7 @@ +@@ -78,6 +78,7 @@ #include "unit_find.h" #include "pilot.h" @@ -9,45 +9,30 @@ Index: src/cmd/unit_generic.cpp #include "vsfilesystem.h" #include -@@ -630,14 +631,6 @@ void Unit::DeactivateJumpDrive() - jump.drive = -1; - } - --float copysign( float x, float y ) --{ -- if (y > 0) -- return x; -- else -- return -x; --} -- - float rand01() - { - return (float) rand()/(float) RAND_MAX; -@@ -3303,7 +3296,7 @@ Vector Unit::ClampTorque( const Vector &amt1 ) +@@ -1931,7 +1932,7 @@ Vector Unit::ClampTorque( const Vector &amt1 ) //HACK this forces the reaction to be Li-6+D fusion with efficiency governed by the getFuelUsage function - fuel -= GetFuelUsage( false )*SIMULATION_ATOM*Res.Magnitude()*FMEC_exit_vel_inverse/Lithium6constant; + fuel -= Energetic::getFuelUsage( false ) * simulation_atom_var * Res.Magnitude()*FMEC_exit_vel_inverse/Lithium6constant; #ifndef __APPLE__ - if ( ISNAN( fuel ) ) { + if ( std::isnan( fuel ) ) { - fprintf( stderr, "FUEL is NAN\n" ); + BOOST_LOG_TRIVIAL(error) << "FUEL is NAN"; fuel = 0; } -@@ -3468,7 +3461,7 @@ Vector Unit::ClampThrust( const Vector &amt1, bool aft - && finegrainedFuelEfficiency) ? afterburnenergy : GetFuelUsage( afterburn ) )*SIMULATION_ATOM*Res.Magnitude() +@@ -2085,7 +2086,7 @@ Vector Unit::ClampThrust( const Vector &amt1, bool aft + && finegrainedFuelEfficiency) ? afterburnenergy : Energetic::getFuelUsage( afterburn ) ) * simulation_atom_var * Res.Magnitude() *FMEC_exit_vel_inverse/Lithium6constant; #ifndef __APPLE__ - if ( ISNAN( fuel ) ) { + if ( std::isnan( fuel ) ) { - fprintf( stderr, "Fuel is NAN A\n" ); + BOOST_LOG_TRIVIAL(error) << "Fuel is NAN A"; fuel = 0; } -@@ -3479,7 +3472,7 @@ Vector Unit::ClampThrust( const Vector &amt1, bool aft +@@ -2096,7 +2097,7 @@ Vector Unit::ClampThrust( const Vector &amt1, bool aft //HACK this forces the reaction to be Li-6+Li-6 fusion with efficiency governed by the getFuelUsage function - fuel -= GetFuelUsage( false )*SIMULATION_ATOM*Res.Magnitude()*FMEC_exit_vel_inverse/Lithium6constant; + fuel -= getFuelUsage( false ) * simulation_atom_var * Res.Magnitude()*FMEC_exit_vel_inverse/Lithium6constant; #ifndef __APPLE__ - if ( ISNAN( fuel ) ) { + if ( std::isnan( fuel ) ) { - fprintf( stderr, "Fuel is NAN B\n" ); + BOOST_LOG_TRIVIAL(error) << "Fuel is NAN B"; fuel = 0; } Index: patches/patch-src_cmd_unit_jump_h =================================================================== RCS file: patches/patch-src_cmd_unit_jump_h diff -N patches/patch-src_cmd_unit_jump_h --- patches/patch-src_cmd_unit_jump_h 11 Mar 2022 19:05:07 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/cmd/unit_jump.h ---- src/cmd/unit_jump.h.orig -+++ src/cmd/unit_jump.h -@@ -108,7 +108,7 @@ bool GameUnit< UnitType >::TransferUnitToSystem( unsig - (tester = *i) != NULL; ++i) - if (tester->isUnit() == UNITPTR && tester != this) - if ( ( this->LocalPosition()-tester->LocalPosition() ).Magnitude() < this->rSize()+tester->rSize() ) -- SetCurPosition( this->LocalPosition()+this->cumulative_transformation_matrix.getR() -+ this->SetCurPosition( this->LocalPosition()+this->cumulative_transformation_matrix.getR() - *( 4*( this->rSize()+tester->rSize() ) ) ); - DealPossibleJumpDamage( this ); - static int jumparrive = AUDCreateSound( vs_config->getVariable( "unitaudio", "jumparrive", "sfx43.wav" ), false ); Index: patches/patch-src_cmd_unit_physics_h =================================================================== RCS file: patches/patch-src_cmd_unit_physics_h diff -N patches/patch-src_cmd_unit_physics_h --- patches/patch-src_cmd_unit_physics_h 11 Mar 2022 19:05:07 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/cmd/unit_physics.h ---- src/cmd/unit_physics.h.orig -+++ src/cmd/unit_physics.h -@@ -41,8 +41,6 @@ - #include "networking/lowlevel/vsnet_clientstate.h" - #include "networking/netclient.h" - --extern float copysign( float x, float y ); -- - extern unsigned int apply_float_to_unsigned_int( float tmp ); //short fix - - template < class UnitType > Index: patches/patch-src_endianness_h =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_endianness_h,v diff -u -p -u -r1.2 patch-src_endianness_h --- patches/patch-src_endianness_h 11 Mar 2022 19:05:07 -0000 1.2 +++ patches/patch-src_endianness_h 19 Jun 2026 02:20:45 -0000 @@ -1,6 +1,7 @@ ---- src/endianness.h.orig.port Tue Sep 21 17:24:32 2010 -+++ src/endianness.h Sat May 26 16:32:35 2012 -@@ -7,6 +7,7 @@ double DONTUSE__NXSwapBigDoubleToLittleEndian( double +Index: src/endianness.h +--- src/endianness.h.orig ++++ src/endianness.h +@@ -31,6 +31,7 @@ double DONTUSE__NXSwapBigDoubleToLittleEndian( double #if defined (__HAIKU__) //For unknow reasons, Haiku don't fit into any case below #include #elif defined (__APPLE__) || defined (MACOSX) || defined (BSD) || defined (__FreeBSD__) Index: patches/patch-src_gfx_aligned_h =================================================================== RCS file: patches/patch-src_gfx_aligned_h diff -N patches/patch-src_gfx_aligned_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_gfx_aligned_h 19 Jun 2026 02:20:45 -0000 @@ -0,0 +1,50 @@ +Index: src/gfx/aligned.h +--- src/gfx/aligned.h.orig ++++ src/gfx/aligned.h +@@ -61,6 +61,11 @@ template class aligned_allo + typedef typename std::allocator::difference_type difference_type; + + static const int _OVERHEAD = (sizeof(T) + ALIGN-1) / ALIGN + sizeof(size_t); ++ ++ template ++ struct rebind { ++ typedef aligned_allocator other; ++ }; + + aligned_allocator() {} + template explicit aligned_allocator(const A &other) : std::allocator(other) {} +@@ -83,10 +88,10 @@ template class aligned_allo + } + } + +- typename std::allocator::pointer _align (typename std::allocator::const_pointer p) ++ typename std::allocator::pointer _align (const void *p) + { + if (p == 0) +- return p; ++ return (pointer)p; + + char *vrv; + +@@ -99,10 +104,10 @@ template class aligned_allo + // Store offset + *((size_t*)vrv - 1) = vrv - (char*)p; + +- return __alpn(vrv, ALIGN); ++ return (pointer)__alpn(vrv, ALIGN); + } + +- void _dealign (typename std::allocator::pointer p) ++ typename std::allocator::pointer _dealign (typename std::allocator::pointer p) + { + if (p == 0) + return p; +@@ -115,7 +120,7 @@ template class aligned_allo + + typename std::allocator::pointer allocate (typename std::allocator::size_type n, typename std::allocator::const_pointer hint=0) + { +- return __alpn(_align(std::allocator::allocate(n+_OVERHEAD, _dealign(hint))), ALIGN); ++ return __alpn(_align(std::allocator::allocate(n+_OVERHEAD, hint)), ALIGN); + } + + void deallocate (typename std::allocator::pointer p, typename std::allocator::size_type n) Index: patches/patch-src_gfx_cockpit_xml_cpp =================================================================== RCS file: patches/patch-src_gfx_cockpit_xml_cpp diff -N patches/patch-src_gfx_cockpit_xml_cpp --- patches/patch-src_gfx_cockpit_xml_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/gfx/cockpit_xml.cpp ---- src/gfx/cockpit_xml.cpp.orig -+++ src/gfx/cockpit_xml.cpp -@@ -315,7 +315,7 @@ void GameCockpit::beginElement( const string &name, co - for (counter = 0; counter < 4; ++counter) - if (!replaced[counter]) { - delete Pit[counter]; -- Pit[counter] = false; -+ Pit[counter] = NULL; - } - break; - case UnitImages< void >::SHIELD4: Index: patches/patch-src_gldrv_hashtable_3d_h =================================================================== RCS file: patches/patch-src_gldrv_hashtable_3d_h diff -N patches/patch-src_gldrv_hashtable_3d_h --- patches/patch-src_gldrv_hashtable_3d_h 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/gldrv/hashtable_3d.h ---- src/gldrv/hashtable_3d.h.orig -+++ src/gldrv/hashtable_3d.h -@@ -37,7 +37,7 @@ class Hashtable3d - } - public: - ///Hashes a single value to a value on the collide table truncated to all 3d constraints. Consider using a swizzle -- int hash_int( const double aye ) -+ static int hash_int( const double aye ) - { - return ( (int) ( ( (aye < 0) ? (aye - -COLLIDETABLEACCURACY) : aye ) Index: patches/patch-src_gui_text_area_cpp =================================================================== RCS file: patches/patch-src_gui_text_area_cpp diff -N patches/patch-src_gui_text_area_cpp --- patches/patch-src_gui_text_area_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/gui/text_area.cpp ---- src/gui/text_area.cpp.orig -+++ src/gui/text_area.cpp -@@ -316,7 +316,7 @@ char* TextArea::GetSelectedItem( int type ) - { - TextAreaItem *search; - search = ItemList->FindCount( cur_selected, 0 ); -- if (search == 0) return '\0'; -+ if (search == 0) return NULL; - if (type == 1) return search->name; - - else return search->description; Index: patches/patch-src_gui_textinputdisplay_h =================================================================== RCS file: patches/patch-src_gui_textinputdisplay_h diff -N patches/patch-src_gui_textinputdisplay_h --- patches/patch-src_gui_textinputdisplay_h 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/gui/textinputdisplay.h ---- src/gui/textinputdisplay.h.orig -+++ src/gui/textinputdisplay.h -@@ -20,7 +20,7 @@ - */ - - #ifndef __TEXTINPUTDISPLAY_H__ --#define __TEXTINPUTISPLAY_H__ -+#define __TEXTINPUTDISPLAY_H__ - - #include "staticdisplay.h" - #include Index: patches/patch-src_networking_lowlevel_packetmem_cpp =================================================================== RCS file: patches/patch-src_networking_lowlevel_packetmem_cpp diff -N patches/patch-src_networking_lowlevel_packetmem_cpp --- patches/patch-src_networking_lowlevel_packetmem_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -http://sourceforge.net/p/vegastrike/code/13530/ - ---- src/networking/lowlevel/packetmem.cpp.orig.port Mon Aug 26 14:41:08 2013 -+++ src/networking/lowlevel/packetmem.cpp Mon Aug 26 14:45:12 2013 -@@ -102,7 +102,7 @@ void PacketMem::inner_set( void* buffer, size_t size, - } - else - { -- _buffer.reset( 0 ); -+ _buffer.reset(); - _len = 0; - } - } Index: patches/patch-src_physics_h =================================================================== RCS file: patches/patch-src_physics_h diff -N patches/patch-src_physics_h --- patches/patch-src_physics_h 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ -Index: src/physics.h ---- src/physics.h.orig -+++ src/physics.h -@@ -27,7 +27,6 @@ - static const float oocc = (float) 0.0000000000000000111265005605; //1/c^2 - static const float c = (float) 299792458.0; - static const float co10 = (float) 29979245.8; --float copysign( float x, float y ); - - struct Force - { Index: patches/patch-src_pk3_cpp =================================================================== RCS file: patches/patch-src_pk3_cpp diff -N patches/patch-src_pk3_cpp --- patches/patch-src_pk3_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: src/pk3.cpp ---- src/pk3.cpp.orig -+++ src/pk3.cpp -@@ -356,7 +356,7 @@ char* CPK3::ExtractFile( const char *lpname, int *file - } - //if the file isn't in the archive - if (index == -1) -- return false; -+ return NULL; - int flength = GetFileLen( index ); - - buffer = new char[flength]; Index: patches/patch-src_posh_h =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/patches/patch-src_posh_h,v diff -u -p -u -r1.2 patch-src_posh_h --- patches/patch-src_posh_h 11 Mar 2022 19:05:07 -0000 1.2 +++ patches/patch-src_posh_h 19 Jun 2026 02:20:45 -0000 @@ -1,6 +1,7 @@ ---- src/posh.h.orig.port Thu Feb 24 23:35:06 2011 -+++ src/posh.h Sat May 26 16:32:35 2012 -@@ -1022,7 +1022,7 @@ POSH_COMPILE_TIME_ASSERT( posh_i64_t, sizeof (posh_i64 +Index: src/posh.h +--- src/posh.h.orig ++++ src/posh.h +@@ -1058,7 +1058,7 @@ POSH_COMPILE_TIME_ASSERT( posh_i64_t, sizeof (posh_i64 #endif /* defined FORCE_DOXYGEN */ Index: patches/patch-src_python_init_cpp =================================================================== RCS file: patches/patch-src_python_init_cpp diff -N patches/patch-src_python_init_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_python_init_cpp 19 Jun 2026 02:20:45 -0000 @@ -0,0 +1,11 @@ +Index: src/python/init.cpp +--- src/python/init.cpp.orig ++++ src/python/init.cpp +@@ -38,7 +38,6 @@ + #include + #include + #include +-#include + #include + #include + Index: patches/patch-src_python_python_class_h =================================================================== RCS file: patches/patch-src_python_python_class_h diff -N patches/patch-src_python_python_class_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_python_python_class_h 19 Jun 2026 02:20:45 -0000 @@ -0,0 +1,11 @@ +Index: src/python/python_class.h +--- src/python/python_class.h.orig ++++ src/python/python_class.h +@@ -49,7 +49,6 @@ + #include "init.h" + #include "cmd/script/pythonmission.h" + #include +-#include + #include "python/python_compile.h" + #include "cmd/ai/fire.h" + #include Index: patches/patch-src_python_python_compile_cpp =================================================================== RCS file: patches/patch-src_python_python_compile_cpp diff -N patches/patch-src_python_python_compile_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_python_python_compile_cpp 19 Jun 2026 02:20:45 -0000 @@ -0,0 +1,11 @@ +Index: src/python/python_compile.cpp +--- src/python/python_compile.cpp.orig ++++ src/python/python_compile.cpp +@@ -27,7 +27,6 @@ + #include "cmd/unit_generic.h" + #include "python_compile.h" + #include +-#include + #include "configxml.h" + #include "vs_globals.h" + #include "vsfilesystem.h" Index: patches/patch-src_ship_commands_cpp =================================================================== RCS file: patches/patch-src_ship_commands_cpp diff -N patches/patch-src_ship_commands_cpp --- patches/patch-src_ship_commands_cpp 11 Mar 2022 19:05:07 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,19 +0,0 @@ -Index: src/ship_commands.cpp ---- src/ship_commands.cpp.orig -+++ src/ship_commands.cpp -@@ -5,15 +5,6 @@ - #include "universe_util.h" - #include "gldrv/winsys.h" - --static inline float fmin( float a, float b ) --{ -- return (a < b) ? a : b; --} --static inline float fmax( float a, float b ) --{ -- return (a > b) ? a : b; --} -- - class ShipCommands - { - Functor< ShipCommands > *csetkps; Index: pkg/DESCR =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/pkg/DESCR,v diff -u -p -u -r1.1.1.1 DESCR --- pkg/DESCR 18 Apr 2014 15:14:09 -0000 1.1.1.1 +++ pkg/DESCR 19 Jun 2026 02:20:45 -0000 @@ -1,8 +1,5 @@ -Vega Strike is an OpenSource 3d Space Simulator. Work is proceeding -on both the Vega Strike game engine and a Vega Strike Universe game -data set. Both engine and data are in a playable state, but still -under development. Each release serves as a beta for both engine -and data. - -The Vega Strike engine serves as the foundation for the Privateer -Gemini Gold, Privateer Remake, Vega Trek, and Pi Armada projects. +Vega Strike is a Space Flight Simulator that allows a player to +explore, trade, and fight in the vast openness of space. You start +in an old beat up cargo ship, with endless possibilities in front +of you and just enough cash to scrape together a life. Yet danger +lurks in the space beyond. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/games/vegastrike/engine/pkg/PLIST,v diff -u -p -u -r1.2 PLIST --- pkg/PLIST 11 Mar 2022 19:05:07 -0000 1.2 +++ pkg/PLIST 19 Jun 2026 02:20:45 -0000 @@ -1,16 +1,3 @@ -@bin bin/asteroidgen -@bin bin/base_maker -@bin bin/mesh_xml -@bin bin/mesher -@bin bin/tempgen -@bin bin/trisort -@bin bin/vegaserver +@bin bin/vega-meshtool @bin bin/vegastrike -@bin bin/vsreplace -@bin bin/vsrextract -@bin bin/vsrmake -@bin bin/vssetup -share/vegastrike/objconv/ -share/vegastrike/objconv/3ds2xml -share/vegastrike/objconv/obj2xml -share/vegastrike/objconv/wcp2xml +@bin bin/vegastrike-engine