diff options
author | dbaio <dbaio@FreeBSD.org> | 2017-06-28 10:37:53 +0800 |
---|---|---|
committer | dbaio <dbaio@FreeBSD.org> | 2017-06-28 10:37:53 +0800 |
commit | f838c9285461300c9b4697b08b3b45572fab97ca (patch) | |
tree | d2b4ddfd03e7b70d56574342bf5a5d811bb76dc0 /lang/python36 | |
parent | 759c687a0669acff0184ad178288997c00a750bf (diff) | |
download | freebsd-ports-gnome-f838c9285461300c9b4697b08b3b45572fab97ca.tar.gz freebsd-ports-gnome-f838c9285461300c9b4697b08b3b45572fab97ca.tar.zst freebsd-ports-gnome-f838c9285461300c9b4697b08b3b45572fab97ca.zip |
lang/python{27,33,34,35,36}: Make Python curses module work with Unicode
Use readline from ports (USES= readline:port) and patch
setup.py to ignore readline from base. The patch is necessary for
FreeBSD < 1100000, as after this the readline library became an
INTERNALLIB, see base r268461 [1]
Link devel/readline against termcapw instead of termcap is part of
this change, see ports r444463 [2]
Note that this is the **ports** approach for getting Python curses
module working with Unicode. The other way is splitting libncurses
into separate libncurses and libtinfo in base, for which an open
issue exists [3].
Apart from Python language ports, at least www/rtv and
sysutils/py-ranger ports have been tested to work correctly
(display Unicode) after this change.
[1] https://svnweb.freebsd.org/changeset/base/268461
[2] https://svnweb.freebsd.org/changeset/ports/444463
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197317
PR: 171246, 197317
Reported by: Vitaly Magerya <vmagerya gmail com>
Reviewed by: garga, koobs, miwi, sunpoet
Approved by: garga (mentor), sunpoet (python, with hat)
Differential Revision: https://reviews.freebsd.org/D11127
Diffstat (limited to 'lang/python36')
-rw-r--r-- | lang/python36/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lang/python36/Makefile b/lang/python36/Makefile index 79bf5bd09fbc..cf0a8bac59ee 100644 --- a/lang/python36/Makefile +++ b/lang/python36/Makefile @@ -3,7 +3,7 @@ PORTNAME= python PORTVERSION= ${PYTHON_PORTVERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PYTHON_PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -15,7 +15,7 @@ COMMENT= Interpreted object-oriented programming language LICENSE= PSFL -USES= cpe ncurses pathfix pkgconfig readline ssl tar:xz shebangfix +USES= cpe ncurses pathfix pkgconfig readline:port ssl tar:xz shebangfix PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes GNU_CONFIGURE= yes @@ -124,6 +124,13 @@ PLIST_SUB+= NO_NIS="" .endif post-patch: +# readline shared library is present on base before FreeBSD 11 - r268461 +# force setup.py ignore base and use readline from ports +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 + ${REINPLACE_CMD} -e \ + "s|lib_dirs,\ \'readline\'|[\'${LOCALBASE}/lib\',\ \'.\'],\ \'readline\'|" \ + ${WRKSRC}/setup.py +.endif ${REINPLACE_CMD} -e 's|/usr/local/bin/python|${python_CMD}|' \ ${WRKSRC}/Lib/cgi.py |