python38: Solaris 10 fixes, from pekdon via IRC.

This commit is contained in:
jperkin 2022-01-20 11:52:28 +00:00
parent 7a700f786d
commit 7a4a989924
3 changed files with 27 additions and 8 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.23 2022/01/12 08:49:01 wiz Exp $
# $NetBSD: Makefile,v 1.24 2022/01/20 11:52:28 jperkin Exp $
PKGREVISION= 3
.include "dist.mk"
@ -44,8 +44,18 @@ PKG_CC= clang
PKG_CXX= clang++
.endif
# fdatasync()
LIBS.SunOS+= -lrt
# Used in socketmodule.c to determine if a sethostname declaration is required
CPPFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=${OPSYS_VERSION}
.if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100
SUBST_CLASSES+= setup
SUBST_MESSAGE.setup= Replacing crypt with crypt_i
SUBST_STAGE.setup= pre-configure
SUBST_FILES.setup= setup.py
SUBST_SED.setup= -e "s,'crypt','crypt_i',"
.endif
LIBS.SunOS+= -lrt # fdatasync()
PY_VER_SUFFIX= 3.8

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.25 2022/01/12 08:49:01 wiz Exp $
$NetBSD: distinfo,v 1.26 2022/01/20 11:52:28 jperkin Exp $
BLAKE2s (Python-3.8.12.tar.xz) = f8a4544d78160cb58e9da8b3624bda7e7e0c0c90df702ac309fe3f6f768bcf89
SHA512 (Python-3.8.12.tar.xz) = 2f93fe5ff83f470c7b6a1b7f29f499a2a010fabd649e9fe65ad3fbfa21b6e1966e77c9b7ac012d978159bc3fe63fec2d64bc6982fc2ee1714d3fa0e47631f279
@ -12,7 +12,7 @@ SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8
SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
SHA1 (patch-Modules_posixmodule.c) = ea24a1aa19b596b5d4457a4eff761e516406145f
SHA1 (patch-Modules_socketmodule.c) = e99fd9e30e3feafef1747a2f52446d8fec543362
SHA1 (patch-Modules_socketmodule.c) = 7adfdd0b6feaadb079c600093352fc023a8c4357
SHA1 (patch-Modules_socketmodule.h) = 9ba713069aeb4e262d0bf621e3873002a11f97bb
SHA1 (patch-Modules_timemodule.c) = 10dc2769432bbfd4360f90fedfa6504d8b6f6347
SHA1 (patch-Python_bootstrap__hash.c) = 2e7d24ded1369624b2983b15784988517a9697a5

View file

@ -1,10 +1,19 @@
$NetBSD: patch-Modules_socketmodule.c,v 1.1 2019/10/15 16:50:11 adam Exp $
$NetBSD: patch-Modules_socketmodule.c,v 1.2 2022/01/20 11:52:28 jperkin Exp $
Support NetBSD's socketcan implementation
--- Modules/socketmodule.c.orig 2019-09-06 08:21:57.000000000 +0000
--- Modules/socketmodule.c.orig 2021-08-30 14:26:41.000000000 +0000
+++ Modules/socketmodule.c
@@ -7709,6 +7709,20 @@ PyInit__socket(void)
@@ -5409,7 +5409,7 @@ socket_sethostname(PyObject *self, PyObj
Py_buffer buf;
int res, flag = 0;
-#ifdef _AIX
+#if defined(_AIX) || (defined(__sun) && PKGSRC_OPSYS_VERSION < 051100)
/* issue #18259, not declared in any useful header file */
extern int sethostname(const char *, size_t);
#endif
@@ -7701,6 +7701,20 @@ PyInit__socket(void)
PyModule_AddIntConstant(m, "CAN_BCM_CAN_FD_FRAME", CAN_FD_FRAME);
#endif
#endif