* dev-python/cython-python2 * dev-python/setuptools-python2 * dev-python/certifi-python2mhiretskiy
parent
21f8d1c3d0
commit
2997157e8b
@ -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>
|
@ -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>
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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…
Reference in new issue