pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/minetest/patches



Module Name:    pkgsrc
Committed By:   pin
Date:           Fri Aug 18 10:51:52 UTC 2023

Added Files:
        pkgsrc/games/minetest/patches:
            patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp
            patch-lib_irrlichtmt_source_Irrlicht_os.cpp
Removed Files:
        pkgsrc/games/minetest/patches: patch-CMakeLists.txt
            patch-src_util_string.cpp

Log Message:
games/minetest: fix messed-up patches


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/games/minetest/patches/patch-CMakeLists.txt
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp \
    pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_os.cpp
cvs rdiff -u -r1.4 -r0 \
    pkgsrc/games/minetest/patches/patch-src_util_string.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp
diff -u /dev/null pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp:1.1
--- /dev/null   Fri Aug 18 10:51:52 2023
+++ pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp      Fri Aug 18 10:51:52 2023
@@ -0,0 +1,42 @@
+$NetBSD: patch-lib_irrlichtmt_source_Irrlicht_CIrrDeviceLinux.cpp,v 1.1 2023/08/18 10:51:52 pin Exp $
+
+Use FreeBSD's support for NetBSD
+
+--- lib/irrlichtmt/source/Irrlicht/CIrrDeviceLinux.cpp.orig    2023-03-05 20:45:09.000000000 +0000
++++ lib/irrlichtmt/source/Irrlicht/CIrrDeviceLinux.cpp
+@@ -47,7 +47,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ 
+-#ifdef __FreeBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+ #include <sys/joystick.h>
+ #else
+ 
+@@ -1578,7 +1578,7 @@ bool CIrrDeviceLinux::activateJoysticks(
+               if (-1 == info.fd)
+                       continue;
+ 
+-#ifdef __FreeBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+               info.axes=2;
+               info.buttons=2;
+ #else
+@@ -1602,7 +1602,7 @@ bool CIrrDeviceLinux::activateJoysticks(
+               returnInfo.Axes = info.axes;
+               returnInfo.Buttons = info.buttons;
+ 
+-#ifndef __FreeBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+               char name[80];
+               ioctl( info.fd, JSIOCGNAME(80), name);
+               returnInfo.Name = name;
+@@ -1637,7 +1637,7 @@ void CIrrDeviceLinux::pollJoysticks()
+       {
+               JoystickInfo & info =  ActiveJoysticks[j];
+ 
+-#ifdef __FreeBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__)
+               struct joystick js;
+               if (read(info.fd, &js, sizeof(js)) == sizeof(js))
+               {
Index: pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_os.cpp
diff -u /dev/null pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_os.cpp:1.1
--- /dev/null   Fri Aug 18 10:51:52 2023
+++ pkgsrc/games/minetest/patches/patch-lib_irrlichtmt_source_Irrlicht_os.cpp   Fri Aug 18 10:51:52 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-lib_irrlichtmt_source_Irrlicht_os.cpp,v 1.1 2023/08/18 10:51:52 pin Exp $
+
+Add NetBSD's endian functions
+
+--- lib/irrlichtmt/source/Irrlicht/os.cpp.orig 2023-03-05 20:45:09.000000000 +0000
++++ lib/irrlichtmt/source/Irrlicht/os.cpp
+@@ -33,6 +33,11 @@
+       #define bswap_16(X) letoh16(X)
+       #define bswap_32(X) letoh32(X)
+       #define bswap_64(X) letoh64(X)
++#elif defined(__NetBSD__)
++      #include <endian.h>
++      #define bswap_16(X) htole16(X)
++      #define bswap_32(X) htole32(X)
++      #define bswap_64(X) htole64(X)
+ #elif !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__PPC__) && !defined(_IRR_WINDOWS_API_)
+       #include <byteswap.h>
+ #else



Home | Main Index | Thread Index | Old Index