Files
haikuports/dev-python/pyenet/patches/pyenet-20141025.patchset
Michael Lotz afd1448d80 Add recipe and patch for pyenet.
Note that due to the way that cython extensions are built, this actually
uses the enet sources. They are pulled in via a second source archive
and then symlinked into place for the pyenet build to pick them up.
2015-10-25 13:56:13 +00:00

58 lines
1.5 KiB
Plaintext

From 0d76ac64d30acd2a26ef8d662a3a00940ba98a57 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 24 Oct 2015 20:47:49 +0000
Subject: [PATCH 1/2] Declare availability of get{addr|name}info(), link
libnetwork.
---
setup.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 95d55e8..7a2642f 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.2.2
From 224a284bb15f6a06b41a6743fd33d9d94140fe77 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 24 Oct 2015 21:12:27 +0000
Subject: [PATCH 2/2] Disable strict aliasing as the wrapper is not aliasing
clean.
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 7a2642f..9521285 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.2.2