diff options
author | gutteridge <gutteridge@pkgsrc.org> | 2020-03-21 17:02:14 +0000 |
---|---|---|
committer | gutteridge <gutteridge@pkgsrc.org> | 2020-03-21 17:02:14 +0000 |
commit | 80355852ff9bd4285e94a8640503d4d9d9f8a24a (patch) | |
tree | fa821975ba9f90cb4db3fab671e5420686436166 /textproc | |
parent | 0fa78881cc31733cd0e5a06c9e9310a6ca16506e (diff) | |
download | pkgsrc-80355852ff9bd4285e94a8640503d4d9d9f8a24a.tar.gz |
py-ICU: get it to build on NetBSD
There's more than one way to address the home-brewed build configuration
in use. For now, play along and add NetBSD to all the places that want
OS-specific entries. (Another way would be to populate all the
environment variables setup.py uses for alternate configuration sourcing
via the pkgsrc make file. Then we wouldn't have to patch setup.py at all.)
While here, also add TEST_DEPENDS entries.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/py-ICU/Makefile | 7 | ||||
-rw-r--r-- | textproc/py-ICU/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-ICU/patches/patch-setup.py | 79 |
3 files changed, 87 insertions, 2 deletions
diff --git a/textproc/py-ICU/Makefile b/textproc/py-ICU/Makefile index 4ef6c232c48..3652e2df6af 100644 --- a/textproc/py-ICU/Makefile +++ b/textproc/py-ICU/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2020/03/20 09:26:21 adam Exp $ +# $NetBSD: Makefile,v 1.4 2020/03/21 17:02:14 gutteridge Exp $ DISTNAME= PyICU-2.4.3 +PKGREVISION= 1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/PyICU/ICU/} CATEGORIES= textproc python MASTER_SITES= ${MASTER_SITE_PYPI:=P/PyICU/} @@ -11,6 +12,10 @@ COMMENT= Python extension wrapping the ICU C++ libraries LICENSE= modified-bsd USE_LANGUAGES= c c++ +USE_TOOLS+= pkg-config + +TEST_DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six +TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test .include "../../lang/python/egg.mk" .include "../../textproc/icu/buildlink3.mk" diff --git a/textproc/py-ICU/distinfo b/textproc/py-ICU/distinfo index 38a72ad2022..5b27ac2a23b 100644 --- a/textproc/py-ICU/distinfo +++ b/textproc/py-ICU/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.2 2020/03/20 09:26:21 adam Exp $ +$NetBSD: distinfo,v 1.3 2020/03/21 17:02:14 gutteridge Exp $ SHA1 (PyICU-2.4.3.tar.gz) = 594c97ce83744f4173d20b7d465e9149ba83cc09 RMD160 (PyICU-2.4.3.tar.gz) = b2b7a4a739f081193865795be156e338637524ec SHA512 (PyICU-2.4.3.tar.gz) = 77b81b0e9a17972696967ebc0421d05c1119a43c7e853f8d939390dddefa4a2a35dd316e08c10c10a283472bb64738016e47c5f45c7c6191d9dba296057740a0 Size (PyICU-2.4.3.tar.gz) = 219819 bytes +SHA1 (patch-setup.py) = 8a9c83d128c2cf95f3094abaeb0d9f85b2eb4840 diff --git a/textproc/py-ICU/patches/patch-setup.py b/textproc/py-ICU/patches/patch-setup.py new file mode 100644 index 00000000000..adf3c402f64 --- /dev/null +++ b/textproc/py-ICU/patches/patch-setup.py @@ -0,0 +1,79 @@ +$NetBSD: patch-setup.py,v 1.1 2020/03/21 17:02:14 gutteridge Exp $ + +Add NetBSD support. + +--- setup.py.orig 2020-03-19 20:58:31.000000000 +0000 ++++ setup.py +@@ -85,6 +85,7 @@ CONFIGURE_WITH_ICU_CONFIG = { + 'win32': False, # no icu-config + 'sunos5': False, # not tested + 'cygwin': False, # not tested ++ 'netbsd': False, + } + + CONFIGURE_WITH_PKG_CONFIG = { +@@ -94,6 +95,7 @@ CONFIGURE_WITH_PKG_CONFIG = { + 'win32': False, # no pkg-config ? + 'sunos5': False, # not tested + 'cygwin': False, # not tested ++ 'netbsd': True, + } + + INCLUDES = { +@@ -103,6 +105,7 @@ INCLUDES = { + 'win32': ['c:/icu/include'], + 'sunos5': [], + 'cygwin': [], ++ 'netbsd': [], + } + + VER_FLAGS = { +@@ -112,6 +115,7 @@ VER_FLAGS = { + 'win32': ['/DPYICU_VER=\\"%s\\"' %(VERSION)], + 'sunos5': ['-DPYICU_VER="%s"' %(VERSION)], + 'cygwin': ['-DPYICU_VER="%s"' %(VERSION)], ++ 'netbsd': ['-DPYICU_VER="%s"' %(VERSION)], + } + + CFLAGS = { +@@ -121,6 +125,7 @@ CFLAGS = { + 'win32': ['/Zc:wchar_t', '/EHsc'], + 'sunos5': ['-std=c++11'], + 'cygwin': ['-D_GNU_SOURCE=1', '-std=c++11'], ++ 'netbsd': [], + } + + # added to CFLAGS when setup is invoked with --debug +@@ -131,6 +136,7 @@ DEBUG_CFLAGS = { + 'win32': ['/Od', '/DDEBUG'], + 'sunos5': ['-DDEBUG'], + 'cygwin': ['-Og', '-g', '-DDEBUG'], ++ 'netbsd': ['-O0', '-g', '-DDEBUG'], + } + + LFLAGS = { +@@ -140,6 +146,7 @@ LFLAGS = { + 'win32': ['/LIBPATH:c:/icu/lib'], + 'sunos5': [], + 'cygwin': [], ++ 'netbsd': [], + } + + LIBRARIES = { +@@ -149,6 +156,7 @@ LIBRARIES = { + 'win32': ['icuin', 'icuuc', 'icudt'], + 'sunos5': ['icui18n', 'icuuc', 'icudata'], + 'cygwin': ['icui18n', 'icuuc', 'icudata'], ++ 'netbsd': [], + } + + platform = sys.platform +@@ -156,6 +164,8 @@ if platform.startswith(('linux', 'gnu')) + platform = 'linux' + elif platform.startswith('freebsd'): + platform = 'freebsd' ++elif platform.startswith('netbsd'): ++ platform = 'netbsd' + + if 'PYICU_INCLUDES' in os.environ: + _includes = os.environ['PYICU_INCLUDES'].split(os.pathsep) |