Python2: перенос пакетов в -python2

* dev-python/cython-python2
* dev-python/setuptools-python2
* dev-python/certifi-python2
mhiretskiy
parent 21f8d1c3d0
commit 2997157e8b

@ -11,11 +11,8 @@ HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
MY_PN=sip
MY_P=${MY_PN}-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
else
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz"
fi
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/${MY_PN}/${MY_P}.tar.gz
http://mirror.yandex.ru/calculate/source/${MY_PN}/${MY_P}.tar.gz"
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
SLOT="0/12"

@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python2_7 python3_{6..9} pypy3 )
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
@ -21,8 +21,11 @@ S=${WORKDIR}/${MY_P}
LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
RDEPEND="app-misc/ca-certificates"
RDEPEND="
!dev-python/certifi[python_targets_python2_7]
app-misc/ca-certificates"
distutils_enable_tests unittest
@ -30,3 +33,9 @@ src_prepare() {
sed -i -e "s^/etc^${EPREFIX}/etc^" certifi/core.py || die
distutils-r1_src_prepare
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">certifi</remote-id>
</upstream>
</pkgmetadata>

@ -5,9 +5,9 @@ EAPI=7
# DO NOT ADD pypy to PYTHON_COMPAT
# pypy bundles a modified version of cffi. Use python_gen_cond_dep instead.
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 toolchain-funcs
MY_PN=cffi
MY_P=$MY_PN-$PV
@ -27,6 +27,7 @@ RDEPEND="${DEPEND}
!dev-python/cffi[python_targets_python2_7]
dev-python/pycparser-python2[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
virtual/pkgconfig"
distutils_enable_sphinx doc/source

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 flag-o-matic
MY_PN=cryptography
MY_P=$MY_PN-$PV
@ -32,18 +33,14 @@ RDEPEND="
!libressl? ( >=dev-libs/openssl-1.0.2o-r6:0= )
libressl? ( >=dev-libs/libressl-2.8:0= )
idna? ( >=dev-python/idna-2.1[${PYTHON_USEDEP}] )
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-python/six-python2-1.4.1[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/enum34[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
' -2)
$(python_gen_cond_dep '
>=dev-python/cffi-python2-1.8:=[${PYTHON_USEDEP}]
' 'python*')
"
dev-python/enum34[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
>=dev-python/cffi-python2-1.8:=[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
>=dev-python/setuptools-python2-1.0[${PYTHON_USEDEP}]"
S="${WORKDIR}/${MY_PN}-${PV}"

@ -0,0 +1 @@
DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679

@ -0,0 +1,78 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 toolchain-funcs elisp-common
MY_PN=cython
MY_P=$MY_PN-$PV
DESCRIPTION="A Python to C compiler"
HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
https://github.com/cython/cython"
SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${MY_P}.gh.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
IUSE="emacs"
RESTRICT="test"
RDEPEND="
emacs? ( >=app-editors/emacs-23.1:* )
"
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
${RDEPEND}"
PATCHES=(
"${FILESDIR}/cython-0.29.14-sphinx-update.patch"
)
S="${WORKDIR}/${MY_PN}-${PV}"
SITEFILE=50cython-gentoo.el
python_compile() {
# Python gets confused when it is in sys.path before build.
local -x PYTHONPATH=
distutils-r1_python_compile
}
python_compile_all() {
use emacs && elisp-compile Tools/cython-mode.el
}
python_test() {
tc-export CC
# https://github.com/cython/cython/issues/1911
local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
"${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
|| die "Tests fail with ${EPYTHON}"
}
python_install_all() {
local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
distutils-r1_python_install_all
if use emacs; then
elisp-install ${PN} Tools/cython-mode.*
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
rm -r ${D}/usr/share
rm -r ${D}/usr/bin
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}

@ -0,0 +1,11 @@
;;; site-lisp configuration for cython-mode
(add-to-list 'load-path "@SITELISP@")
(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t)
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode))

@ -0,0 +1,13 @@
diff --git a/docs/conf.py b/docs/conf.py
index 10662e28c..a84e0b928 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -41,7 +41,7 @@ highlight_language = 'cython'
extensions = [
'ipython_console_highlighting',
'cython_highlighting',
- 'sphinx.ext.pngmath',
+ 'sphinx.ext.imgmath',
'sphinx.ext.todo',
'sphinx.ext.intersphinx',
'sphinx.ext.autodoc'

@ -0,0 +1,29 @@
Needed to prevent a loop while calling cythonize on macOS - or any platform
defaulting to the 'spawn' method, as Python 3.8 does on Darwin.
https://github.com/cython/cython/pull/3263
From 15ae78bb74a856836dd64828326f4f0812d36520 Mon Sep 17 00:00:00 2001
From: Marcel Bargull <marcel.bargull@udo.edu>
Date: Fri, 6 Dec 2019 18:21:19 +0100
Subject: [PATCH] Disable parallel cythonization for "spawn" start method.
---
Cython/Build/Dependencies.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 593e00a6ef..f9b9c15bc5 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -1073,6 +1073,11 @@ def copy_to_build_dir(filepath, root=os.getcwd()):
if N <= 1:
nthreads = 0
+ if nthreads:
+ import multiprocessing
+ if multiprocessing.get_start_method() == 'spawn':
+ print('Disabling parallel cythonization for "spawn" process start method.')
+ nthreads = 0
if nthreads:
import multiprocessing
pool = multiprocessing.Pool(

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<longdescription lang="en">
Cython is a language that makes writing C extensions for the Python
language as easy as Python itself. It's based on Pyrex, but supports
more cutting edge functionality and optimizations.
</longdescription>
<upstream>
<remote-id type="pypi">Cython</remote-id>
<remote-id type="github">cython/cython</remote-id>
</upstream>
</pkgmetadata>

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit autotools python-r1
MY_PN=dbus-python
MY_P=$MY_PN-$PV
@ -30,6 +31,7 @@ RDEPEND="${PYTHON_DEPS}
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
virtual/pkgconfig
"
S="${WORKDIR}/${MY_PN}-${PV}"

@ -5,6 +5,7 @@ EAPI=5
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
DESCRIPTION="Python 3.4 Enum backported"
@ -16,7 +17,7 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_test() {
"${PYTHON}" enum/test.py || die "Tests failed under ${EPYTHON}"

@ -5,6 +5,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=faulthandler
@ -19,7 +20,7 @@ KEYWORDS="amd64 ppc ppc64 x86"
IUSE=""
RESTRICT="test"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
DESCRIPTION="IPv4/IPv6 manipulation library, backport of the ipaddress module"
@ -16,7 +17,7 @@ LICENSE="PSF-2"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
BDEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_prepare_all() {
sed -i 's:unittest.main():unittest.main(verbosity=2):' \

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 optfeature toolchain-funcs
MY_PN=lxml
MY_P=$MY_PN-$PV
@ -28,8 +29,8 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
dev-python/cython[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/cython-python2[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
DISTUTILS_IN_SOURCE_BUILD=1

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 toolchain-funcs
MY_PN="M2Crypto"
@ -28,7 +29,7 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-lang/swig-2.0.9
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"

@ -3,7 +3,7 @@
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} pypy )
PYTHON_COMPAT=( python{3_7,3_8,3_9} pypy )
inherit distutils-r1

@ -0,0 +1,4 @@
DIST numpy-1.16.6.zip 5143340 BLAKE2B 2c31473551aaf00e7d3175ce37463ce0f14ff3e77bdeb71c9f85ede634880e014d4a941b1f1c1bb107f1b01217d6a68cc71d188b7ae3edf833a6fd6a9a746acb SHA512 c219841cc804c194a38b8e046b83265b8b7a35be8f33d68561ef17b085465dd11bd1e84fe1baea809af0efb09a9b13283f13728d125fcdd2221c30ec23fd0a50
DIST numpy-html-1.16.6.zip 12190671 BLAKE2B c24586a40bb05fdb2f2f092778e01f7c60b17d2c695d0fb8577e988778ad80b711edf7e067a20c699946344a50febc152ab586f4653b80bcbeb489650dafbd1b SHA512 ad25e7b91b992af78a6748f12d6fcbe153d96cb8667d5dc4a6b6b2a6105e24a11c32cbf63dd3314ed4aa9b65a55ec5b3a51cd7763af5dfdd133510ddd6e4ed16
DIST numpy-ref-1.16.6.pdf 5183393 BLAKE2B e92a8a7a32ab45d2fdfd6760e62d8d9b5b3f89e202a29e18ef1b6ce49ec56bbfea0e48e0c47b4c35cad02783fa1db33726a0f4fed4a50b0d8ed84babced8b79e SHA512 66dbb684f4140874d19826b479c781e16e7992a7cec46137f785f9a8fa071911966fbb3932cbcdcd040bbb5fbefac8c96d511ef623a57fc268aac9331aae8d22
DIST numpy-user-1.16.6.pdf 621980 BLAKE2B ec735ff7057935d3a7f33f291792b74618f5dc10ee091c434f49c77e58f683821af9cce46286564ac9b8cb0111498f9d1b657d0c343e0a4313c3f895982dca8b SHA512 ff03719c91707a39b4bc388558838f72d4412f34dd0b07f2a0b2cf8fedac6811e8789985013cf1f23c7a650f115655f71e9cadc51ef4e7ae6e49d7552752409a

@ -0,0 +1,76 @@
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 65d7de316..a85640d30 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -364,29 +364,7 @@ def get_info(name, notfound_action=0):
1 - display warning message
2 - raise error
"""
- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
- 'atlas_threads': atlas_threads_info, # ditto
- 'atlas_blas': atlas_blas_info,
- 'atlas_blas_threads': atlas_blas_threads_info,
- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
- 'atlas_3_10_blas': atlas_3_10_blas_info,
- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
- 'mkl': mkl_info,
- # openblas which may or may not have embedded lapack
- 'openblas': openblas_info, # use blas_opt instead
- # openblas with embedded lapack
- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead
- 'blis': blis_info, # use blas_opt instead
- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
- 'blas_mkl': blas_mkl_info, # use blas_opt instead
- 'accelerate': accelerate_info, # use blas_opt instead
- 'x11': x11_info,
+ cl = {'x11': x11_info,
'fft_opt': fft_opt_info,
'fftw': fftw_info,
'fftw2': fftw2_info,
@@ -731,10 +709,7 @@ class system_info(object):
return [b for b in [a.strip() for a in libs.split(',')] if b]
def get_libraries(self, key='libraries'):
- if hasattr(self, '_lib_names'):
- return self.get_libs(key, default=self._lib_names)
- else:
- return self.get_libs(key, '')
+ return self.get_libs(key, '')
def library_extensions(self):
c = customized_ccompiler()
@@ -1685,7 +1660,7 @@ class blas_info(system_info):
lib = self.has_cblas(info)
if lib is not None:
info['language'] = 'c'
- info['libraries'] = [lib]
+ info['libraries'] = lib
info['define_macros'] = [('HAVE_CBLAS', None)]
self.set_info(**info)
@@ -1717,16 +1692,16 @@ class blas_info(system_info):
# check for cblas lib, and if not present check for blas lib.
try:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
- libraries=["cblas"],
+ libraries=info["libraries"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "cblas"
+ res = info["libraries"]
except distutils.ccompiler.LinkError:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
libraries=["blas"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "blas"
+ res = ["blas"]
except distutils.ccompiler.CompileError:
res = None
finally:

@ -0,0 +1,23 @@
From b8e741c66f71071c3406e592e1537570731bcb35 Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Sun, 26 May 2019 08:55:53 +0300
Subject: [PATCH] BUG: setup.py install --skip-build fails
---
numpy/distutils/command/install_clib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/numpy/distutils/command/install_clib.py b/numpy/distutils/command/install_clib.py
index 662aa00bda9..6a73f7e3308 100644
--- a/numpy/distutils/command/install_clib.py
+++ b/numpy/distutils/command/install_clib.py
@@ -19,6 +19,9 @@ def finalize_options(self):
def run (self):
build_clib_cmd = get_cmd("build_clib")
+ if not build_clib_cmd.build_clib:
+ # can happen if the user specified `--skip-build`
+ build_clib_cmd.finalize_options()
build_dir = build_clib_cmd.build_clib
# We need the compiler to get the library name -> filename association

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>sci@gentoo.org</email>
<name>Gentoo Science Project</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
</pkgmetadata>

@ -0,0 +1,158 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs
MY_PN="numpy"
DOC_PV="1.16.6"
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="https://www.numpy.org"
SRC_URI="
mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.zip
doc? (
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-html.zip -> numpy-html-${DOC_PV}.zip
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-ref.pdf -> numpy-ref-${DOC_PV}.pdf
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-user.pdf -> numpy-user-${DOC_PV}.pdf
)"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc lapack"
RESTRICT="test"
RDEPEND="
!<dev-python/numpy-1.17
lapack? (
virtual/cblas
virtual/lapack
)
"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/unzip
dev-python/setuptools-python2
lapack? ( virtual/pkgconfig )
"
S="${WORKDIR}/${MY_PN}-${PV}"
PATCHES=(
"${FILESDIR}"/${MY_PN}-1.15.4-no-hardcode-blas.patch
"${FILESDIR}"/numpy-1.16.5-setup.py-install-skip-build-fails.patch
)
src_unpack() {
default
if use doc; then
unzip -qo "${DISTDIR}"/numpy-html-${DOC_PV}.zip -d html || die
fi
}
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libdir() {
$(tc-getPKG_CONFIG) --libs-only-L $@ | \
sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libs() {
$(tc-getPKG_CONFIG) --libs-only-l $@ | \
sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
-e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
| tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
}
python_prepare_all() {
if use lapack; then
append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
local incdir="${EPREFIX}"/usr/include
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF || die
[blas]
include_dirs = $(pc_incdir cblas):${incdir}
library_dirs = $(pc_libdir cblas blas):${libdir}
blas_libs = $(pc_libs cblas blas)
[lapack]
library_dirs = $(pc_libdir lapack):${libdir}
lapack_libs = $(pc_libs lapack)
EOF
else
export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
fi
export CC="$(tc-getCC) ${CFLAGS}"
append-flags -fno-strict-aliasing
# See progress in http://projects.scipy.org/scipy/numpy/ticket/573
# with the subtle difference that we don't want to break Darwin where
# -shared is not a valid linker argument
if [[ ${CHOST} != *-darwin* ]]; then
append-ldflags -shared
fi
# only one fortran to link with:
# linking with cblas and lapack library will force
# autodetecting and linking to all available fortran compilers
append-fflags -fPIC
if use lapack; then
NUMPY_FCONFIG="config_fc --noopt --noarch"
# workaround bug 335908
[[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
fi
# don't version f2py, we will handle it.
sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
# disable fuzzed tests
find numpy/*/tests -name '*.py' -exec sed -i \
-e 's:def \(.*_fuzz\):def _\1:' {} + || die
# very memory- and disk-hungry
sed -i -e 's:test_large_zip:_&:' numpy/lib/tests/test_io.py || die
distutils-r1_python_prepare_all
}
python_compile() {
export MAKEOPTS=-j1 #660754
local python_makeopts_jobs=""
python_is_python3 || python_makeopts_jobs="-j $(makeopts_jobs)"
distutils-r1_python_compile \
${python_makeopts_jobs} \
${NUMPY_FCONFIG}
}
python_install() {
# https://github.com/numpy/numpy/issues/16005
local mydistutilsargs=( build_src )
distutils-r1_python_install ${NUMPY_FCONFIG}
python_optimize
}
python_install_all() {
local DOCS=( THANKS.txt )
if use doc; then
local HTML_DOCS=( "${WORKDIR}"/html/. )
DOCS+=( "${DISTDIR}"/${MY_PN}-{user,ref}-${DOC_PV}.pdf )
fi
distutils-r1_python_install_all
# Let latest version to provide f2py link
rm "${ED}"/usr/bin/f2py || die
}

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pexpect
@ -24,7 +25,9 @@ RESTRICT="test"
RDEPEND="
!dev-python/pexpect[python_targets_python2_7]
>=dev-python/ptyprocess-python2-0.5[${PYTHON_USEDEP}]"
DEPEND=""
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install() {

@ -5,6 +5,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=ply
@ -21,6 +22,7 @@ RESTRICT="test"
PATCHES=( "${FILESDIR}/3.6-picklefile-IOError.patch" )
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/ply[python_targets_python2_7]
"

@ -20,6 +20,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
RESTRICT="test"
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/ptyprocess[python_targets_python2_7]
"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_P="${PN#py-}-${PV}"
@ -17,4 +18,8 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ia64 ppc sparc x86"
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_P}"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pyasn1-modules
@ -21,7 +22,9 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sp
RDEPEND="
!dev-python/pyasn1-modules[python_targets_python2_7]
>=dev-python/pyasn1-python2-0.4.6"
DEPEND="${RDEPEND}"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
RESTRICT="test"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pyasn1
MY_P=$MY_PN-$PV
@ -22,6 +23,7 @@ RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/pyasn1[python_targets_python2_7]
"

@ -6,6 +6,7 @@ EAPI="7"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pycairo
@ -22,6 +23,7 @@ RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=x11-libs/cairo-1.13.1[svg]
"
DEPEND="${RDEPEND}"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pycparser
@ -23,7 +24,7 @@ RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/ply-python2:=[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_prepare_all() {
# remove the original files to guarantee their regen

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pyinotify
@ -26,6 +27,7 @@ RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"

@ -9,6 +9,7 @@ PYTHON_REQ_USE="threads(+)"
MY_PN=pymilter
MY_P=$MY_PN-$PV
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
SRC_URI="http://downloads.sourceforge.net/project/${MY_PN}/${MY_PN}/${MY_P}/${MY_P}.tar.gz"
@ -22,7 +23,9 @@ IUSE=""
DEPEND="
!dev-python/pymilter[python_targets_python2_7]
mail-filter/libmilter"
RDEPEND="${DEPEND}"
RDEPEND="${DEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
RESTRICT="test"

@ -4,6 +4,7 @@
EAPI=5
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
ORIG_PN=pyopengl
@ -28,6 +29,6 @@ RDEPEND="
x11-libs/libXi
x11-libs/libXmu"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
dev-python/setuptools-python2[${PYTHON_USEDEP}]"
S="${WORKDIR}/${MY_P}"

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 flag-o-matic
MY_PN=pyOpenSSL
@ -28,6 +29,7 @@ RESTRICT="test"
RDEPEND="
!dev-python/pyopenssl[python_targets_python2_7]
>=dev-python/six-python2-1.5.2[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
dev-python/cryptography-python2"
DEPEND="${RDEPEND}"

@ -4,6 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=python-ldap
@ -37,6 +38,7 @@ RDEPEND="
# We do not link against cyrus-sasl but we use some
# of its headers during the build.
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>net-nds/openldap-2.4.11:=[sasl?,ssl?]
sasl? ( >=dev-libs/cyrus-sasl-2.1 )
"

@ -6,6 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=pytz
MY_P=$MY_PN-$PV
@ -23,6 +24,7 @@ RDEPEND="
!dev-python/pytz[python_targets_python2_7]
|| ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
app-arch/unzip"
PATCHES=(

@ -1,72 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 eutils
DESCRIPTION="Python interface to xattr"
HOMEPAGE="https://pyxattr.k1024.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
https://pyxattr.k1024.org/downloads/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="2.7"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="doc test"
RESTRICT="!test? ( test )"
RDEPEND="sys-apps/attr
!dev-python/pyxattr:0[python_targets_python2_7]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}] )
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
PATCHES=(
"${FILESDIR}/${PN}-0.6.0-xattr_header.patch"
)
python_prepare_all() {
sed -i -e 's:, "-Werror"::' setup.py || die
# Bug 548486
sed -e "s:html_theme = 'default':html_theme = 'classic':" \
-i doc/conf.py || die
distutils-r1_python_prepare_all
}
python_compile_all() {
use doc && emake doc
}
src_test() {
# Perform the tests in /var/tmp; that location is more likely
# to have xattr support than /tmp which is often tmpfs.
local -x TEST_DIR="${TEST_DIR:-/var/tmp}"
# Ignore selinux attributes by default, bug #503946.
local -x TEST_IGNORE_XATTRS="${TEST_IGNORE_XATTRS:-security.selinux}"
einfo "Please note that the tests fail if xattrs are not supported"
einfo "by the filesystem used for ${TEST_DIR}."
einfo
einfo "The location for tests can be overriden using TEST_DIR variable:"
einfo " $ export TEST_DIR=/my/test/place"
einfo
einfo "Additionally, TEST_IGNORE_XATTRS can be set to control which"
einfo "external attributes are ignored by the tests."
einfo "See https://bugs.gentoo.org/503946 for details."
einfo
distutils-r1_src_test
}
python_test() {
nosetests -v || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
use doc && local HTML_DOCS=( doc/html/. )
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,42 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
DESCRIPTION="Python interface to xattr"
HOMEPAGE="https://pyxattr.k1024.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
https://pyxattr.k1024.org/downloads/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="2.7"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
RDEPEND="sys-apps/attr
!dev-python/pyxattr:0[python_targets_python2_7]"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}/${PN}-0.6.0-xattr_header.patch"
)
python_prepare_all() {
sed -i -e 's:, "-Werror"::' setup.py || die
# Bug 548486
sed -e "s:html_theme = 'default':html_theme = 'classic':" \
-i doc/conf.py || die
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -4,6 +4,7 @@
EAPI=5
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
MY_P=${P/pyxml/PyXML}
@ -20,7 +21,9 @@ SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc examples"
DEPEND=">=dev-libs/expat-1.95.6"
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-libs/expat-1.95.6"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"

@ -4,41 +4,37 @@
EAPI=7
# Set to 'manual' to avoid triggering install QA check
DISTUTILS_USE_SETUPTOOLS=manual
PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1
MY_PN=setuptools
MY_P=$MY_PN-$PV
DESCRIPTION="Collection of extensions to Distutils"
HOMEPAGE="https://github.com/pypa/setuptools https://pypi.org/project/setuptools/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RESTRICT="!test? ( test )"
RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
"
BDEPEND="
app-arch/unzip
test? (
$(python_gen_cond_dep '
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pip[${PYTHON_USEDEP}]
>=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
' -3)
)
"
# installing plugins apparently breaks stuff at runtime, so let's pull
# it early
PDEPEND="
>=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/setuptools_scm[${PYTHON_USEDEP}]
' -3)"
dev-python/certifi-python2
"
S="${WORKDIR}/${MY_PN}-${PV}"
# Force in-source build because build system modifies sources.
DISTUTILS_IN_SOURCE_BUILD=1
@ -83,3 +79,8 @@ python_install() {
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
distutils-r1_python_install
}
python_install_all() {
rm -r ${D}/usr/share/doc
rm -r ${D}/usr/bin
}

@ -11,11 +11,8 @@ HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
MY_PN=sip
MY_P=${MY_PN}-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
else
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz"
fi
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/${MY_PN}/${MY_P}.tar.gz
http://mirror.yandex.ru/calculate/source/${MY_PN}/${MY_P}.tar.gz"
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
SLOT="0/12"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=six
@ -20,6 +21,10 @@ RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
RDEPEND="
!dev-python/six[python_targets_python2_7]
"

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=(python2_7)
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils python-r1
DESCRIPTION="A simple library for writing soap web services."
@ -21,7 +22,7 @@ RDEPEND="
dev-python/pytz-python2
"
DEPEND="${RDEPEND}
dev-python/setuptools
dev-python/setuptools-python2
"
S="${WORKDIR}/soaplib-soaplib-2801978"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
DESCRIPTION="Lightweight SOAP client - Czech NIC labs fork"
@ -16,5 +17,5 @@ SLOT="0"
KEYWORDS="amd64 x86"
IUSE="doc"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"

@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
MY_PN=typing
@ -19,7 +20,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd6
IUSE=""
RESTRICT="test"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
RDEPEND="!dev-python/${MY_PN}[python_targets_python2_7]"
S="${WORKDIR}/${MY_PN}-${PV}"

@ -6,6 +6,7 @@ EAPI=5
PYTHON_COMPAT=( python2_7 )
WX_GTK_VER="3.0"
DISTUTILS_USE_SETUPTOOLS=manual
inherit alternatives distutils-r1 eutils flag-o-matic wxwidgets
ORIG_PN="wxpython"
@ -27,7 +28,7 @@ RDEPEND="
dev-lang/python-exec:2[${PYTHON_USEDEP}]
>=x11-libs/wxGTK-${PV}:${WX_GTK_VER}=[libnotify=,opengl?,tiff,X]
dev-libs/glib:2
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
media-libs/libpng:0=
media-libs/tiff:0
virtual/jpeg

@ -13,6 +13,7 @@
PYTHON_COMPAT=(python2_7)
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
EXPORTED_FUNCTIONS="src_compile src_install pkg_preinst"
@ -251,7 +252,9 @@ RDEPEND="
backup? ( !sys-apps/calculate-server )
"
DEPEND="sys-devel/gettext"
DEPEND="
dev-python/setuptools-python2
sys-devel/gettext"
REQUIRED_USE="client? ( desktop )"

@ -0,0 +1 @@
DIST DisplayCAL-3.8.9.3.tar.gz 10639277 BLAKE2B b99d2a39eb707654799b089a8f14891b257a27cb209511ed04ea6e2de7ec4bc3e68db884ebc460e25325495645d1a851b936f91632c571a385e009ea6b9cd6d2 SHA512 cece09605c12be6a154d8d8b088005e527a9e6674a89ec2787b0687a92b7f424749681f149a07bb798df6729c9f4c37e8760abeec115a014c06f94f25fc2f904

@ -0,0 +1,67 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 gnome2-utils xdg
MY_PN="DisplayCAL"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Display calibration and characterization powered by Argyll CMS"
HOMEPAGE="https://displaycal.net/"
SRC_URI="mirror://sourceforge/dispcalgui/${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND="
>=media-gfx/argyllcms-1.1.0
dev-python/wxpython2:3.0[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=x11-libs/libX11-1.3.3
>=x11-apps/xrandr-1.3.2
>=x11-libs/libXxf86vm-1.1.0
>=x11-libs/libXinerama-1.1
"
RDEPEND="${DEPEND}
dev-python/faulthandler-python2[${PYTHON_USEDEP}]
dev-python/numpy-python2[${PYTHON_USEDEP}]
dev-python/dbus-python2[${PYTHON_USEDEP}]
"
# Just in case someone renames the ebuild
S="${WORKDIR}/${MY_P}"
src_prepare() {
# Do not generate udev/hotplug files
sed -e '/if os.path.isdir/s#/etc/udev/rules.d\|/etc/hotplug#\0-non-existant#' \
-i DisplayCAL/setup.py || die
# Prohibit setup from running xdg-* programs, resulting to sandbox violation
sed -e '/if which/s#xdg-icon-resource#\0-non-existant#' \
-e '/if which/s#xdg-desktop-menu#\0-non-existant#' \
-i DisplayCAL/postinstall.py || die
# Remove deprecated Encoding key from .desktop file
sed -e '/Encoding=UTF-8/d' -i misc/*.desktop || die
# Remove x-world Media Type
sed -e 's/x\-world\/x\-vrml\;//g' \
-i misc/displaycal-vrml-to-x3d-converter.desktop || die
distutils-r1_src_prepare
}
pkg_postinst() {
xdg_pkg_postinst
gnome2_icon_cache_update
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_icon_cache_update
}

@ -1 +0,0 @@
DIST speedtest-cli-2.1.1.tar.gz 24380 BLAKE2B ea6f5fc3127246ad4cf90dee4b53529fa9f3b9b9558c9ebb92661380663a5e5950490e91cda97f9207b26c23464026b91c8faa50ef5a515b817b0f84fcb2e13b SHA512 afc1fc0264d5124efe5afc9b0583b2b37ae50eac229e6971656a906b9a7a78d44158485d5c2e44c3430694fd7355926f578a54a196cc9b9baf6cfbc357a789d1

@ -1,27 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
inherit distutils-r1
DESCRIPTION="Command line interface for testing internet bandwidth using speedtest.net"
HOMEPAGE="https://github.com/sivel/speedtest-cli"
SRC_URI="https://github.com/sivel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
DOCS=( CONTRIBUTING.md README.rst )
python_install_all() {
doman ${PN}.1
distutils-r1_python_install_all
}

@ -5,6 +5,7 @@ EAPI=5
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1
DESCRIPTION="Library to access Czech eGov system \"Datove schranky\""
@ -22,5 +23,5 @@ RDEPEND="
>=dev-python/sudsds-1.0.1[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/calculate2/${PN}/${P}.tar.bz2
@ -19,6 +20,7 @@ IUSE=""
DEPEND="!<sys-apps/calculate-client-2.1.12
!<sys-apps/calculate-server-2.1.11
>=dev-python/python2-ldap-2.0[ssl]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-python/pyxml-0.8"
RDEPEND="${DEPEND}"

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=(python2_7)
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 git-r3
EGIT_REPO_URI="git://git.calculate-linux.org/calculate-2.1/calculate-lib.git"
@ -17,5 +18,6 @@ KEYWORDS=""
IUSE=""
DEPEND=">=dev-python/python2-ldap-2.0[ssl]
>=dev-python/pyxml-0.8"
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-python/pyxml-0.8"
RDEPEND="${DEPEND}"

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=(python{2_6,2_7})
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/calculate2/${PN}/${P}.tar.bz2
@ -24,7 +25,8 @@ calculate_nonamed
calculate_nosamba
calculate_noproxy"
DEPEND="=sys-apps/calculate-lib-2.1.12-r5
DEPEND="=sys-apps/calculate-lib-2.1.12-r6
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=net-nds/openldap-2.3[-minimal]
>=sys-auth/pam_ldap-180[ssl]
>=sys-auth/nss_ldap-239

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=(python{2_6,2_7})
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 eutils
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/calculate2/${PN}/${P}.tar.bz2
@ -24,7 +25,8 @@ calculate_nonamed
calculate_nosamba
calculate_noproxy"
DEPEND="=sys-apps/calculate-lib-2.1.12-r5
DEPEND="=sys-apps/calculate-lib-2.1.12-r6
dev-python/setuptools-python2
>=net-nds/openldap-2.3[-minimal]
>=sys-auth/pam_ldap-180[ssl]
>=sys-auth/nss_ldap-239

@ -5,6 +5,7 @@
EAPI="5"
PYTHON_COMPAT=(python2_7)
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils-r1 git-r3
EGIT_REPO_URI="git://git.calculate-linux.org/calculate-2.1/calculate-server.git"
@ -35,6 +36,7 @@ DEPEND="=sys-apps/calculate-lib-9999
>=net-misc/dhcp-3.1.2_p1
|| ( media-gfx/imagemagick
media-gfx/graphicsmagick )
dev-python/setuptools-python2
dev-python/pymilter-python2"
RDEPEND="${DEPEND}"

@ -1 +0,0 @@
DIST file-5.37.tar.gz 887682 BLAKE2B c5635e5de879af31cbef1c988275ab8620133909d146769b27a2f8eefa90871fad5fa75e66b9e1d77a6261e5d6dec315fb5a8ad587d8c214eaa0bc2e5a929fe7 SHA512 bf153c15aebdd00329806231d20f295077b8b99efd0181d01279bcf3734a1718567df38cf75bc929eb8015ac98d29bb4bf1228d7ece8bfdfe14dd976391dd06d

@ -1,128 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
DISTUTILS_OPTIONAL=1
inherit distutils-r1 libtool toolchain-funcs multilib-minimal
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/glensc/file.git"
inherit autotools git-r3
else
SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="identify a file's format by scanning binary data for patterns"
HOMEPAGE="https://www.darwinsys.com/file/"
LICENSE="BSD-2"
SLOT="0"
IUSE="python static-libs zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DEPEND="
python? (
${PYTHON_DEPS}
dev-python/setuptools[${PYTHON_USEDEP}]
)
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
RDEPEND="${DEPEND}
python? ( !dev-python/python-magic )"
PATCHES=( "${FILESDIR}"/${P}-CVE-2019-18218.patch )
src_prepare() {
default
[[ ${PV} == "9999" ]] && eautoreconf
elibtoolize
# don't let python README kill main README #60043
mv python/README.md python/README.python.md || die
sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
}
multilib_src_configure() {
local myeconfargs=(
--disable-libseccomp
--enable-fsect-man5
$(use_enable static-libs static)
$(use_enable zlib)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
src_configure() {
# when cross-compiling, we need to build up our own file
# because people often don't keep matching host/target
# file versions #362941
if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
mkdir -p "${WORKDIR}"/build || die
cd "${WORKDIR}"/build || die
tc-export_build_env BUILD_C{C,XX}
ECONF_SOURCE="${S}" \
ac_cv_header_zlib_h=no \
ac_cv_lib_z_gzopen=no \
CHOST=${CBUILD} \
CFLAGS=${BUILD_CFLAGS} \
CXXFLAGS=${BUILD_CXXFLAGS} \
CPPFLAGS=${BUILD_CPPFLAGS} \
LDFLAGS="${BUILD_LDFLAGS} -static" \
CC=${BUILD_CC} \
CXX=${BUILD_CXX} \
econf --disable-shared --disable-libseccomp
fi
multilib-minimal_src_configure
}
multilib_src_compile() {
if multilib_is_native_abi ; then
emake
else
cd src || die
emake magic.h #586444
emake libmagic.la
fi
}
src_compile() {
if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
emake -C "${WORKDIR}"/build/src magic.h #586444
emake -C "${WORKDIR}"/build/src file
PATH="${WORKDIR}/build/src:${PATH}"
fi
multilib-minimal_src_compile
if use python ; then
cd python || die
distutils-r1_src_compile
fi
}
multilib_src_install() {
if multilib_is_native_abi ; then
default
else
emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
fi
}
multilib_src_install_all() {
dodoc ChangeLog MAINT README
# Required for `file -C`
dodir /usr/share/misc/magic
insinto /usr/share/misc/magic
doins -r magic/Magdir/*
if use python ; then
cd python || die
distutils-r1_src_install
fi
find "${ED}" -type f -name "*.la" -delete || die
}

@ -1,36 +0,0 @@
CVE-2019-18218
https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
goto out;
}
nelements = CDF_GETUINT32(q, 1);
- if (nelements == 0) {
- DPRINTF(("CDF_VECTOR with nelements == 0\n"));
+ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
+ DPRINTF(("CDF_VECTOR with nelements == %"
+ SIZE_T_FORMAT "u\n", nelements));
goto out;
}
slen = 2;
@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
goto out;
inp += nelem;
}
- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
- nelements));
for (j = 0; j < nelements && i < sh.sh_properties;
j++, i++)
{
--- a/src/cdf.h
+++ b/src/cdf.h
@@ -48,6 +48,7 @@
typedef int32_t cdf_secid_t;
#define CDF_LOOP_LIMIT 10000
+#define CDF_ELEMENT_LIMIT 100000
#define CDF_SECID_NULL 0
#define CDF_SECID_FREE -1
Loading…
Cancel
Save