Commit graph

53 commits

Author SHA1 Message Date
Sunpoet Po-Chuan Hsieh
eb247033a0 Mark BROKEN_SSL=openssl-devel
We backported an upstream patch for NPN detection (bpo-30622) in r461919 but it is not enough.
This port still fails to build with OpenSSL 1.1.0.

Tested by:	brnrd, sunpoet (myself)
2018-02-22 19:50:59 +00:00
Sunpoet Po-Chuan Hsieh
68c368d3c4 Fix build with OpenSSL 1.1.0 (security/openssl-devel)
Reference:	https://bugs.python.org/issue30622
		b2d096bd2a
PR:		225882
Submitted by:	brnrd
MFH:		2018Q1
2018-02-15 12:48:20 +00:00
Sunpoet Po-Chuan Hsieh
9807704ea6 Silence patch messages 2018-02-12 19:03:53 +00:00
Sunpoet Po-Chuan Hsieh
a8d6759329 Update to 3.4.8
- Set PORTNAME to python and add PKGNAMESUFFIX
- Update Makefile and PLIST to be similar with python36
- Sort USES
- Remove CPE_*: all of them are default values
- Update PLIST_FILES: do not use %%
- Fix shebang:
  - Update SHEBANG_FILES
  - Remove over-patched shebang fix of Lib/cgi.py
- Update http:// links in Makefile comments and patch files

Changes:	https://docs.python.org/3.4/whatsnew/changelog.html
Security:	0fe70bcd-2ce3-46c9-a64b-4a7da097db07
MFH:		2018Q1
2018-02-11 16:52:42 +00:00
Mathieu Arnold
551be3c723 Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored.  They will
  automatically get flavors (py27, py34, py35, py36) depending on what
  versions they support.

  There is also a USE_PYTHON=flavors for ports that do not use distutils
  but need FLAVORS to be set.  A USE_PYTHON=noflavors can be set if
  using distutils but flavors are not wanted.

  A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
  added to cope with Python ports that did not have the Python
  PKGNAMEPREFIX but are flavored.

  USES=python now also exports a PY_FLAVOR variable that contains the
  current python flavor.  It can be used in dependency lines when the
  port itself is not python flavored.  For example, deskutils/calibre.

  By default, all the flavors are generated.  To only generate flavors
  for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
  BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.

  In all the ports with Python dependencies, the *_DEPENDS entries MUST
  end with the flavor so that the framework knows which to build/use.
  This is done by appending '@${PY_FLAVOR}' after the origin (or
  @${FLAVOR} if in a Python module with Python flavors, as the content
  will be the same).  For example:

    RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}

PR:		223071
Reviewed by:	portmgr, python
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12464
2017-11-30 15:50:30 +00:00
Sunpoet Po-Chuan Hsieh
ceb92db919 Update to 3.4.7
Changes:	https://docs.python.org/3.4/whatsnew/changelog.html
MFH:		2017Q3
2017-08-09 19:36:01 +00:00
Sean Bruno
443e649d72 Pointyhat to me.
A stray '.' somehow made it past my testing.

Do *not* bump portrevision as this only affects the packaging/stage
of these ports on mips/armv6 or other cross compiled targets.

PR:		221202
Reported by:	antoine
2017-08-08 01:39:37 +00:00
Sean Bruno
e6f4295f5c Add a code block for the qemu-user enabled cross build environment. When using
this environment in poudriere, CC is not set to the default of /usr/bin/cc and
a cross-compile toolchain is used.  We need to hand edit this so that the run
time configuration for python matches what the FreeBSD base system provides.

PR:		208282
Submitted by:	manu
Approved by:	portmgr (mat)
2017-08-02 17:58:03 +00:00
Danilo G. Baio
a4046066e9 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
2017-06-28 02:37:53 +00:00
Sunpoet Po-Chuan Hsieh
cb037d3c98 Update devel/readline to 7.0 patch 3
- Bump PORTREVISION for shlib change

Changes:	https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES
		https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
		https://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html
Differential Revision:	https://reviews.freebsd.org/D11172
PR:		219947
Exp-run by:	antoine
2017-06-27 13:46:53 +00:00
Kubilay Kocak
2f6fe8dcec lang/python{27,33,34,35,36}: Install GDB debugging script
Users with a GDB that supports [1] Python extensions will automatically
load the extra debugging extensions when debugging programs that are
linked with libpythonX.Y.so.foo.

This enables extensions like 'py-bt' and 'py-frame' as described in
the Fedora Wiki Article: Easier Python Debugging [2], which can be
useful for debugging Python program state from crashes in C extensions,
for example.

[1] PYTHON option enabled in devel/gdb
[2] https://fedoraproject.org/wiki/Features/EasierPythonDebugging

PR:		203021
Submitted by:	cem
Reviewed by:	mat, koobs (python)
Approved by:	koobs (python)
Differential Revision: D10398
2017-06-06 12:56:47 +00:00
Sunpoet Po-Chuan Hsieh
be33cc43f0 Fix indent and update WWW 2017-04-16 11:08:34 +00:00
Martin Wilke
d69a0b0f5d - Fix shebang
Thanks to: amdmi3
2017-04-14 18:07:08 +00:00
Wen Heping
08bbe03abc - Update to 3.4.6 2017-01-20 03:03:29 +00:00
Tijl Coosemans
0d2a64d2f9 Remove no-op patch.
This patch was submitted to upstream libffi and from there to upstream
libtool, but it doesn't do anything.  The original patch committed in
r158131 did do something but when it was no longer needed it was changed
into something that doesn't make sense in r221521 instead of being removed.
Remove it now before it causes more confusion.
2016-11-02 14:51:48 +00:00
Mathieu Arnold
a0bcd2cf68 Use USES=pathfix where applicable.
PR:		213195
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D8093
2016-10-21 15:21:13 +00:00
Bernard Spil
f1c0818850 lang/python3*: Backport upstream issue 24557
- Add backport of patch for EGD issue [1]
  - Change USE_OPENSSL to USES= ssl
  - Don't set CPE_VERSION to the default PORTVERSION

PR:		205960 [1], 199050 [1]
Reviewed by:	koobs (python)
Approved by:	python (koobs)
Obtained from:	https://hg.python.org/cpython/rev/7c0432cf1f2e [1]
MFH:		2016Q3
2016-07-08 19:07:41 +00:00
Wen Heping
91ca14e1fa - Update to 3.4.5 2016-06-29 14:00:33 +00:00
Ruslan Makhmatkhanov
5643ed620a lang/python[xx]: backport upstream fix for CVE-2016-5636
Add patch for integer overflow in zipimport module to all our python ports.

While I'm here, get rid of -f flag in ${RM} invocation, because ${RM} already
expands to rm -f, so in result we are getting something like:

/bin/rm -f -f /wrkdirs/usr/ports/lang/python35/work/stage/usr/local/lib/libpython3.so

PR:		210325
Submitted by:	 Vladimir Krstulja <vlad-fbsd@acheronmedia.com>
Security:	1d0f6852-33d8-11e6-a671-60a44ce6887b
With hat:	python
2016-06-17 17:09:04 +00:00
Dmitry Marakasov
c86e9d9724 Remove NLS, DOCS, EXAMPLES and IPV6 from OPTIONS_DEFAULT, they are enabled by default anyway and don't need to be listed
Approved by:	portmgr blanket
2016-05-23 20:35:01 +00:00
Dimitry Andric
3ab35818fc For the various lang/python* ports, improve the __FreeBSD_version
check in pyport.h for working around a very old ctype issue.

If the workaround for this issue is enabled, pyport.h redefines
toupper() and some other ctype macros, and this wreaks havoc when
including newer libc++ headers (or any other system header which tries
to declare those functions).

Approved by:	portmgr (antoine)
PR:		208486
MFH:		2016Q2
2016-04-25 20:22:19 +00:00
Mathieu Arnold
a9dcad2fff Remove ${PORTSDIR}/ from dependencies, categories h, i, j, k, and l.
With hat:	portmgr
Sponsored by:	Absolight
2016-04-01 14:08:37 +00:00
Kubilay Kocak
474ff0ec6a lang/python{27,3*}: Backport patch in upstream issue20397
In certain situations, file references (.py[co]) for Python files that
fail to compile with compileall() are still added to distutils --record
output.

This output is used for pkg-plist generation and must only contain
references to files that will be installed.

One example of a failure condition is when a Python 2/3 compatible
package containing a file containing Python 3.x only code is built with
Python 2.x, such as Gunicorn's _gaiohttp.py [1]

This change backports patches submitted against upstream issue 20397 [2]
that has not yet been committed.

 - For Python 2.7 and 3.5, backport both install_lib and test
 - For Python 3.2, 3.3 and 3.4, only backport install_lib

[1] https://svnweb.freebsd.org/changeset/ports/404558
[2] https://bugs.python.org/issue20397

Thank you to Brendan Molloy for producing and submitting the patches
against upstream sources.

Reviewed by:		sbz (python)
MFH:			2016Q1
Differential Revision:	D4832
2016-01-08 16:45:09 +00:00
Martin Wilke
54fea61b98 - Update to 3.4.4
- Sort plist

Changelog:
        https://docs.python.org/3.4/whatsnew/changelog.html#python-3-4-4
2016-01-02 16:47:46 +00:00
John Marino
6256117d69 lang/python27(3*), Mk/Uses/python.mk: remove make spawn
There are some inefficiencies in python.mk that significantly slow down
full tree scanning.  The use of bmake to obtain the current version of
a specific python is responsible for the majority of the slow done.

This commit splits out the PYTHON_PORTVERSION definition (which is the
same as the lang/python* PORTVERSION) into separate files.  With this
change, python.mk can simple include the makefile fragment instead of
spawning a new instance of make.

Different Revision:	https://reviews.freebsd.org/D4660
Approved by:		antoine (python), mva (python)
2015-12-29 12:03:09 +00:00
Martin Wilke
b05bb8a6fb - Switch regression-test to TEST_TARGED
Discussed in:   D4695
Reviewed by:	koobs
2015-12-24 11:39:53 +00:00
Li-Wen Hsu
4c536e83f0 Add version specified ports of separated standard Python modules for
non-default Python versions:

- Add pyXY-{sqlite3,gdbm,tkinter} ports for generating binary packages
- Improve/add pkg-message to point users to install respective packages of
  separated Python standard modules
- Add COMMENT to explicitly show the Python version that package should be
  used with
- Simplify version-related PYTHON_* for lang/python35

Reviewed by:	koobs
Differential Revision:	https://reviews.freebsd.org/D4170
2015-11-19 01:28:38 +00:00
Kubilay Kocak
63e4144b8e lang/python{27,32,33,34}: Mark MAKE_JOBS_UNSAFE
Parser/pgen code intermittently and non-deterministically fails
at build time causing errors including, among others:

 * Parser/pgen.o: file not recognized: File truncated
 * pgenmain.c:(.text+0x244): undefined reference to `_Py_pgen'

This is apparently due to incorrect uses of recursive make [1] which
was fixed in the upstream Python 'default' (3.5) branch [2].

This change marks all Python port versions as MAKE_JOBS_UNSANFE until
the the original changeset [1] and the resulting regression in
cross-builds [3], whos fix is still pending, can be backported.

[1] https://bugs.python.org/issue22359
[2] https://hg.python.org/cpython/rev/c2a53aa27cad
[3] https://bugs.python.org/issue22625

PR:		200622
Reported by:	marino
MFH:		2015Q3
2015-07-30 03:31:55 +00:00
Mathieu Arnold
60d1a83c2a MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
  of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
  no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.

While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.

Also, replace some EXTRACT_SUFX occurences with USES=tar:*.

Checked by:	make fetch-urlall-list
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:15:04 +00:00
Bryan Drewery
412afd34ba Force a rebuild/upgrade to chase head r280306 which removed SSLv2 support.
This fixes head package users so they have working SSL support. There was
already a built-time fix for this.
2015-04-06 16:58:36 +00:00
John Marino
d945d5ea98 lang category: Remove $PTHREAD_LIBS
Note: ecl did not pass check-plist (pre-existing), PR 198897 submitted.

approved by:	PTHREAD blanket
2015-03-25 12:58:33 +00:00
Dmitry Sivachenko
17b4ebc8d6 Update to version 3.4.3.
https://reviews.freebsd.org/D1991
2015-03-03 13:49:32 +00:00
Kubilay Kocak
1d929848ed lang/python34: BROKEN on i386 without LIBFFI
As per lang/python27 (r377581):

- Add BROKEN for i386 without LIBFFI option, and add upstream
  issue references.

While I'm here, clean up after the LIBFFI option addition:

- Sort options variables: OPTIONS_* and *_DESC
- Use OPTIONS helpers
- Reduce diffs between lang/python* ports
2015-02-11 08:23:13 +00:00
Marcus von Appen
21c90c5467 - Revert the previous NIS check, since it does not help at all
PR:		196195
Submitted by:	ache@
With hat:	python@
2014-12-22 16:45:41 +00:00
Marcus von Appen
4a19da7af9 - Python 3.x: try to improve the NIS detection for FreeBSD
PR:		193650
With hat:	python
2014-12-22 09:47:36 +00:00
Dmitry Sivachenko
2824b8d0af Rename option PORT_FFI --> LIBFFI.
Suggested by:	koobs
2014-11-04 07:33:33 +00:00
Dmitry Sivachenko
7c43785504 Add a reference to python issue regarding i386 compilation failure with
bundled libffi
2014-11-03 09:12:38 +00:00
Dmitry Sivachenko
6610a597d0 Add an option to use libffi from ports instead of bundled one.
Submitted by:	cy

Require this option for i386, this fixes build error.
2014-10-29 13:21:21 +00:00
Baptiste Daroussin
77cba41a62 Cleanup plist 2014-10-27 15:23:30 +00:00
Dmitry Sivachenko
00d3a6976f Update to version 3.4.2.
Two deleted patches were integrated upstream.

Reviewed by:	koobs in D967
2014-10-27 12:54:04 +00:00
Antoine Brodin
228ab58873 Change INSTALL_DATA to install with mode 644
Remove patches and hacks that were used to work around the previous
situation
This allows to stage more ports as a regular user

Differential Revision:	https://reviews.freebsd.org/D703
Reviewed by and discussed with:	bapt
With hat:	portmgr
2014-09-04 19:26:24 +00:00
Kubilay Kocak
c0cd7bc6cc lang/python34: Fix build when semaphores are not enabled
Backport fix [1] for upstream Python Issue #21704 [2]: Fix build error for
_multiprocessing when semaphores are not available.

The symptom was originally reported by RedPorts 8.4-QAT/i386,
ultimately resulting in a packaging error:

  ...
  checking for sem_open... yes
  checking for sem_timedwait... yes
  checking for sem_getvalue... yes
  checking for sem_unlink... yes
  ...
  checking whether POSIX semaphores are enabled... no
  checking for broken sem_getvalue... yes
  ...

  *** WARNING: renaming "_multiprocessing" since importing it failed:
  build/lib.freebsd-8.4-RELEASE-i386-3.4/_multiprocessing.so: Undefined
  symbol "_PyMp_sem_unlink"

  ...

  pkg-static: lstat(/work/a/ports/lang/python34/work/stage/usr/local/lib/
  python3.4/lib-dynload/_multiprocessing.so): No such file or directory

Something is funny for Jail-based systems when it comes to host/jail
semaphore detection. A config.log would be handy to help determine why.

[1] http://hg.python.org/cpython/rev/f618f6739200
[2] http://bugs.python.org/issue21704
2014-08-25 07:59:45 +00:00
Kubilay Kocak
0d6e53966b lang/python{27,33,34}: Bump PORTREVISION, sanitizes builds.
Bump PORTREVISION, as prior to the previous change that fixed upstream Issue
#21166, Python builds could be potentially polluted by the host environment
which could caused runtime issues because of ABI differences.
2014-08-23 05:19:50 +00:00
Kubilay Kocak
3e8425cb1e lang/python{27,33,34}: Backport fix for upstream Issue #21166
Backport fix for upstream Issue #21166:

Prevent possible segfaults and other random failures of python
--generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances. [1]

This changeset has been committed for release in 2.7.9, 3.4.2, and 3.5.0.

A HUGE thank you to Ned Deily from the Python Core Development Team
for helping to identify the underlying cause, produce a fix and
wonderfully document the explanation.

[1] http://bugs.python.org/issue21166
2014-08-23 03:53:25 +00:00
Marcus von Appen
600af559c2 - Add USE_OPENSSL, since all lang/python ports build the _ssl module, which
requires a working OpenSSL implementation

Phabric:		D569
Reviewed by:	wg@
With hat:	python@
2014-08-10 18:36:27 +00:00
Marcus von Appen
91097651ff - Remove everything related to USE_PYTHON and bsd.python.mk. This is a
preparatory step to convert bsd.python.mk into a USES file.
- Use NLS_LIBS instead of NLS_LDFLAGS as done for lang/python27 (r357486)
- Use buildbottest in the regression-test: target

Phabric:		D409
Reviewed by:	koobs, sbz
With hat:		python@
2014-08-01 15:52:42 +00:00
Jung-uk Kim
a2b38dd4eb Fix plist without THREADS option. 2014-07-15 20:42:06 +00:00
Sofian Brabez
b5d9bfb7a4 - Add CPE entries for python
- Remove NOPORTDATA as it's deprecated since r359061
2014-07-11 18:09:01 +00:00
Antoine Brodin
53857e7276 - Create symlinks for non-ABI-suffixed python*-config and ABI-suffixed python-*.pc
- Fix DISABLED_EXTENSIONS extension patch, autoconf is not used so configure has to be patched

Phabric:	D225
Reviewed by:	koobs
2014-06-16 17:46:41 +00:00
Dmitry Sivachenko
0e33c724df Update python34 port 3.4.0 --> 3.4.1.
Reviewed by:	koobs
2014-06-02 12:36:51 +00:00