pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/py-ICU py-ICU: get it to build on NetBSD
details: https://anonhg.NetBSD.org/pkgsrc/rev/2381eb29ec61
branches: trunk
changeset: 413678:2381eb29ec61
user: gutteridge <gutteridge%pkgsrc.org@localhost>
date: Sat Mar 21 17:02:14 2020 +0000
description:
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:
textproc/py-ICU/Makefile | 7 ++-
textproc/py-ICU/distinfo | 3 +-
textproc/py-ICU/patches/patch-setup.py | 79 ++++++++++++++++++++++++++++++++++
3 files changed, 87 insertions(+), 2 deletions(-)
diffs (118 lines):
diff -r c72acc7d6750 -r 2381eb29ec61 textproc/py-ICU/Makefile
--- a/textproc/py-ICU/Makefile Sat Mar 21 17:01:39 2020 +0000
+++ b/textproc/py-ICU/Makefile Sat Mar 21 17:02:14 2020 +0000
@@ -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 @@
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 -r c72acc7d6750 -r 2381eb29ec61 textproc/py-ICU/distinfo
--- a/textproc/py-ICU/distinfo Sat Mar 21 17:01:39 2020 +0000
+++ b/textproc/py-ICU/distinfo Sat Mar 21 17:02:14 2020 +0000
@@ -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 -r c72acc7d6750 -r 2381eb29ec61 textproc/py-ICU/patches/patch-setup.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-ICU/patches/patch-setup.py Sat Mar 21 17:02:14 2020 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index