Python config leaks _NETBSD_SOURCE into the build, so ensure it is

provided consistently to undo damage. Spell C++11 mode canonically.
This commit is contained in:
joerg 2020-05-30 20:46:09 +00:00
parent aec578801e
commit 020ad1a061
3 changed files with 29 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.47 2020/05/19 12:09:08 nia Exp $
# $NetBSD: Makefile,v 1.48 2020/05/30 20:46:09 joerg Exp $
DISTNAME= mypaint-2.0.0
PKGREVISION= 4
@ -18,7 +18,6 @@ TOOL_DEPENDS+= swig3-[0-9]*:../../devel/swig3
EGG_NAME= MyPaint-${PKGVERSION_NOREV}a0
USE_LANGUAGES= c c++
USE_TOOLS+= bash:run msgfmt pkg-config

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.10 2020/03/04 13:51:51 wiz Exp $
$NetBSD: distinfo,v 1.11 2020/05/30 20:46:09 joerg Exp $
SHA1 (mypaint-2.0.0.tar.xz) = 334fa13893d20c80805092de665dbbcf03b92ece
RMD160 (mypaint-2.0.0.tar.xz) = 894b276a4f6139a717d8fdfcf8618ecef00222dd
SHA512 (mypaint-2.0.0.tar.xz) = 118d905f4d7ce6adb9779b59d6b3f51b94a9937778b8fe3ed1b31c9b5b77d63110134bdc74849a91d8095e905664227ff43ffe183ad9c7c7ba18fa954ade8a84
Size (mypaint-2.0.0.tar.xz) = 7316680 bytes
SHA1 (patch-lib_meta.py) = 1c8832ff06154255d7ea14037dc728d1fa0ba50e
SHA1 (patch-setup.py) = 55b5c2ef1ef8612999c1630b2259f7f54a5cf264

View file

@ -0,0 +1,26 @@
$NetBSD: patch-setup.py,v 1.1 2020/05/30 20:46:09 joerg Exp $
Don't force pure standard mode as it depends on various extensions
anyway. Explicitly set _NETBSD_SOURCE since Python's config.h pollutes
the namespace with it.
--- setup.py.orig 2020-02-15 15:05:23.000000000 +0000
+++ setup.py
@@ -801,7 +801,7 @@ def get_ext_modules():
import numpy
extra_compile_args = [
- '--std=c++11',
+ '-std=gnu++11',
'-Wall',
'-Wno-sign-compare',
'-Wno-write-strings',
@@ -821,6 +821,8 @@ def get_ext_modules():
# Look up libraries dependencies relative to the library.
extra_link_args.append('-Wl,-z,origin')
extra_link_args.append('-Wl,-rpath,$ORIGIN')
+ if sys.platform.startswith("netbsd"):
+ extra_compile_args.append("-D_NETBSD_SOURCE")
initial_deps = ["libmypaint >= 1.5"]
remaining_deps = [