Files
haikuports/dev-python/pyenet/patches/pyenet-20221216.patchset
2023-07-02 11:10:36 +02:00

95 lines
2.6 KiB
Plaintext

From b541b5d8083442c80c51ce8da8b2556a312aac7d Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 24 Oct 2015 20:47:49 +0000
Subject: Declare availability of get{addr|name}info(), link libnetwork.
diff --git a/setup.py b/setup.py
index 691917b..19e6fff 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,11 @@ if sys.platform == 'win32':
define_macros.extend([('WIN32', None)])
libraries.extend(['ws2_32', 'Winmm'])
-if sys.platform != 'darwin':
+if sys.platform == 'haiku1':
+ define_macros.extend([('HAS_GETADDRINFO', None), ('HAS_GETNAMEINFO', None)])
+ libraries.extend(['network'])
+
+elif sys.platform != 'darwin':
define_macros.extend([('HAS_GETHOSTBYNAME_R', None), ('HAS_GETHOSTBYADDR_R', None)])
ext_modules = [
--
2.37.3
From bdedba029b7c3f03a02aab752142eb98573c0116 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 24 Oct 2015 21:12:27 +0000
Subject: Disable strict aliasing as the wrapper is not aliasing clean.
diff --git a/setup.py b/setup.py
index 19e6fff..e14de6f 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ elif sys.platform != 'darwin':
ext_modules = [
Extension(
"enet",
- extra_compile_args=["-O3"],
+ extra_compile_args=['-O3', '-fno-strict-aliasing'],
sources=source_files,
include_dirs=["enet/include/"],
define_macros=define_macros,
--
2.37.3
From edfe6d399e502d89ad1c6dd1bcc61a56ec31553f Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Sun, 2 Jul 2023 08:32:26 +0000
Subject: Use system libenet
diff --git a/setup.py b/setup.py
index e14de6f..1329e91 100644
--- a/setup.py
+++ b/setup.py
@@ -7,22 +7,22 @@ import sys
source_files = ["enet.pyx"]
-_enet_files = glob.glob("enet/*.c")
+# _enet_files = glob.glob("enet/*.c")
-if not _enet_files:
- print("You need to download and extract the enet 1.3 source to enet/")
- print("Download the source from: http://enet.bespin.org/Downloads.html")
- print("See the README for more instructions")
- sys.exit(1)
+# if not _enet_files:
+# print("You need to download and extract the enet 1.3 source to enet/")
+# print("Download the source from: http://enet.bespin.org/Downloads.html")
+# print("See the README for more instructions")
+# sys.exit(1)
-source_files.extend(_enet_files)
+# source_files.extend(_enet_files)
define_macros = [('HAS_POLL', None),
('HAS_FCNTL', None),
('HAS_MSGHDR_FLAGS', None),
('HAS_SOCKLEN_T', None) ]
-libraries = []
+libraries = ['enet']
if sys.platform == 'win32':
define_macros.extend([('WIN32', None)])
--
2.37.3