parent
ea5a5bc922
commit
658adefda2
Binary file not shown.
Binary file not shown.
@ -0,0 +1,58 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{7..9} )
|
||||||
|
|
||||||
|
inherit bash-completion-r1 distutils-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||||
|
HOMEPAGE="https://pypi.org/project/awscli/"
|
||||||
|
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||||
|
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/aws-cli-${PV}"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||||
|
|
||||||
|
# botocore is x.(y+1).z
|
||||||
|
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
|
||||||
|
RDEPEND="
|
||||||
|
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||||
|
dev-python/colorama[${PYTHON_USEDEP}]
|
||||||
|
dev-python/docutils[${PYTHON_USEDEP}]
|
||||||
|
dev-python/rsa[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
test? (
|
||||||
|
dev-python/mock[${PYTHON_USEDEP}]
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
distutils_enable_tests --install nose
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/awscli-1.19.47-py39.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
distutils_install_for_testing
|
||||||
|
# integration tests require AWS credentials and Internet access
|
||||||
|
nosetests -v tests/{functional,unit} ||
|
||||||
|
die "Tests failed for ${EPYTHON}"
|
||||||
|
}
|
||||||
|
|
||||||
|
python_install_all() {
|
||||||
|
newbashcomp bin/aws_bash_completer aws
|
||||||
|
|
||||||
|
insinto /usr/share/zsh/site-functions
|
||||||
|
newins bin/aws_zsh_completer.sh _aws
|
||||||
|
|
||||||
|
distutils-r1_python_install_all
|
||||||
|
|
||||||
|
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST aflplusplus-3.12c.tar.gz 2065569 BLAKE2B ff7a87eb02f7731b5ce8e1a3016239c6fd1cd1bfeb0b9c0fb69f72bdbf079e7700cdb32abe64f64853e5ff82f1c0ecd86d2cadb892e7c40be6bb2a7b089f7387 SHA512 a814d61298b60d99388289e742dbedf2ed1ab454a5e1ea20d48bb2f18b36c01553ab1f097a06f733439d67e804d48cb823a82ff249c404fb0b83a281564f3040
|
DIST aflplusplus-3.12c.tar.gz 2065569 BLAKE2B ff7a87eb02f7731b5ce8e1a3016239c6fd1cd1bfeb0b9c0fb69f72bdbf079e7700cdb32abe64f64853e5ff82f1c0ecd86d2cadb892e7c40be6bb2a7b089f7387 SHA512 a814d61298b60d99388289e742dbedf2ed1ab454a5e1ea20d48bb2f18b36c01553ab1f097a06f733439d67e804d48cb823a82ff249c404fb0b83a281564f3040
|
||||||
|
DIST aflplusplus-3.13c.tar.gz 2128787 BLAKE2B 40fa65654468dc1de7f6e1b63d2266915a40d145b7cb91b8b95488bc975804f70887bc1c3718fbd12c76872a0126f3bcc36134eb55ef729060b5efcf93dad424 SHA512 916a714deaf67969c9ac6e90bd2d8015a1e5188c8a8122f4d5d64ce4b841822de65458e469a47d4244358fab5e31ef4e52b8ec1432dcbd60d29aedf15e4c36fe
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||||
|
LLVM_MAX_SLOT=12
|
||||||
|
inherit toolchain-funcs llvm optfeature python-single-r1
|
||||||
|
|
||||||
|
DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer"
|
||||||
|
HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus"
|
||||||
|
SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
S="${WORKDIR}/AFLplusplus-${PV}"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm64"
|
||||||
|
IUSE="test"
|
||||||
|
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||||
|
|
||||||
|
# Tests involve heavy use of LD_PRELOAD in some cases
|
||||||
|
# This isn't compatible with sandbox
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
# It turns out we need Clang too
|
||||||
|
RDEPEND="
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
>=sys-devel/llvm-10:=
|
||||||
|
|| (
|
||||||
|
sys-devel/clang:10
|
||||||
|
sys-devel/clang:11
|
||||||
|
sys-devel/clang:12
|
||||||
|
)
|
||||||
|
"
|
||||||
|
DEPEND="
|
||||||
|
${RDEPEND}
|
||||||
|
test? ( dev-util/cmocka )
|
||||||
|
"
|
||||||
|
|
||||||
|
QA_PREBUILT="/usr/share/afl/testcases/others/elf/small_exec.elf"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-3.0c-LDFLAGS.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.13c-CFLAGS.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
llvm_check_deps() {
|
||||||
|
has_version -b "sys-devel/clang:${LLVM_SLOT}" && \
|
||||||
|
has_version -b "sys-devel/llvm:${LLVM_SLOT}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
llvm_pkg_setup
|
||||||
|
python-single-r1_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i -e 's/-O3 -fno-unroll-loops//' GNUmakefile || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake \
|
||||||
|
CC="$(tc-getCC)" \
|
||||||
|
CXX="$(tc-getCXX)" \
|
||||||
|
CFLAGS_FLTO="" \
|
||||||
|
PREFIX="${EPREFIX}/usr" \
|
||||||
|
HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
|
||||||
|
DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
|
||||||
|
MAN_PATH="${EPREFIX}/usr/share/man/man8"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
emake \
|
||||||
|
CC="$(tc-getCC)" \
|
||||||
|
CXX="$(tc-getCXX)"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake \
|
||||||
|
CC="$(tc-getCC)" \
|
||||||
|
CXX="$(tc-getCXX)" \
|
||||||
|
DESTDIR="${D}" \
|
||||||
|
PREFIX="${EPREFIX}/usr" \
|
||||||
|
HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
|
||||||
|
DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
|
||||||
|
MAN_PATH="${EPREFIX}/usr/share/man/man8" \
|
||||||
|
install
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
# TODO: Any others?
|
||||||
|
optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan]
|
||||||
|
optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan]
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
--- a/GNUmakefile.gcc_plugin
|
||||||
|
+++ b/GNUmakefile.gcc_plugin
|
||||||
|
@@ -28,14 +28,14 @@ MAN_PATH ?= $(PREFIX)/share/man/man8
|
||||||
|
|
||||||
|
VERSION = $(shell grep '^$(HASH)define VERSION ' ./config.h | cut -d '"' -f2)
|
||||||
|
|
||||||
|
-CFLAGS ?= -O3 -g -funroll-loops -D_FORTIFY_SOURCE=2
|
||||||
|
+CFLAGS ?= -D_FORTIFY_SOURCE=2
|
||||||
|
CFLAGS_SAFE := -Wall -Iinclude -Wno-pointer-sign \
|
||||||
|
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
||||||
|
-DGCC_VERSION=\"$(GCCVER)\" -DGCC_BINDIR=\"$(GCCBINDIR)\" \
|
||||||
|
-Wno-unused-function
|
||||||
|
override CFLAGS += $(CFLAGS_SAFE)
|
||||||
|
|
||||||
|
-CXXFLAGS ?= -O3 -g -funroll-loops -D_FORTIFY_SOURCE=2
|
||||||
|
+CXXFLAGS ?= -D_FORTIFY_SOURCE=2
|
||||||
|
CXXEFLAGS := $(CXXFLAGS) -Wall -std=c++11
|
||||||
|
|
||||||
|
CC ?= gcc
|
||||||
|
--- a/GNUmakefile.llvm
|
||||||
|
+++ b/GNUmakefile.llvm
|
||||||
|
@@ -237,7 +237,7 @@ else
|
||||||
|
AFL_CLANG_DEBUG_PREFIX =
|
||||||
|
endif
|
||||||
|
|
||||||
|
-CFLAGS ?= -O3 -funroll-loops -fPIC -D_FORTIFY_SOURCE=2
|
||||||
|
+CFLAGS ?= -fPIC -D_FORTIFY_SOURCE=2
|
||||||
|
CFLAGS_SAFE := -Wall -g -Wno-cast-qual -Wno-variadic-macros -Wno-pointer-sign -I ./include/ -I ./instrumentation/ \
|
||||||
|
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
||||||
|
-DLLVM_BINDIR=\"$(LLVM_BINDIR)\" -DVERSION=\"$(VERSION)\" \
|
||||||
|
@@ -254,7 +254,7 @@ ifdef AFL_TRACE_PC
|
||||||
|
$(info Compile option AFL_TRACE_PC is deprecated, just set AFL_LLVM_INSTRUMENT=PCGUARD to activate when compiling targets )
|
||||||
|
endif
|
||||||
|
|
||||||
|
-CXXFLAGS ?= -O3 -funroll-loops -fPIC -D_FORTIFY_SOURCE=2
|
||||||
|
+CXXFLAGS ?= -fPIC -D_FORTIFY_SOURCE=2
|
||||||
|
override CXXFLAGS += -Wall -g -I ./include/ \
|
||||||
|
-DVERSION=\"$(VERSION)\" -Wno-variadic-macros \
|
||||||
|
-DLLVM_MINOR=$(LLVM_MINOR) -DLLVM_MAJOR=$(LLVM_MAJOR)
|
||||||
|
@@ -434,20 +434,20 @@ afl-llvm-dict2file.so: instrumentation/afl-llvm-dict2file.so.cc instrumentation/
|
||||||
|
|
||||||
|
.PHONY: document
|
||||||
|
document:
|
||||||
|
- $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
|
||||||
|
- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
||||||
|
- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
||||||
|
+ $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
|
||||||
|
+ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
||||||
|
+ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
||||||
|
|
||||||
|
./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
|
||||||
|
- $(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
|
||||||
|
+ $(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@
|
||||||
|
|
||||||
|
./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
|
||||||
|
@printf "[*] Building 32-bit variant of the runtime (-m32)... "
|
||||||
|
- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi
|
||||||
|
+ @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi
|
||||||
|
|
||||||
|
./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
|
||||||
|
@printf "[*] Building 64-bit variant of the runtime (-m64)... "
|
||||||
|
- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi
|
||||||
|
+ @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi
|
||||||
|
|
||||||
|
.PHONY: test_build
|
||||||
|
test_build: $(PROGS)
|
||||||
|
--- a/unicorn_mode/samples/c/Makefile
|
||||||
|
+++ b/unicorn_mode/samples/c/Makefile
|
||||||
|
@@ -35,7 +35,7 @@ clean:
|
||||||
|
rm -rf *.o harness harness-debug
|
||||||
|
|
||||||
|
harness.o: harness.c ../../unicornafl/include/unicorn/*.h
|
||||||
|
- ${MYCC} ${CFLAGS} -O3 -c harness.c
|
||||||
|
+ ${MYCC} ${CFLAGS} -c harness.c
|
||||||
|
|
||||||
|
harness-debug.o: harness.c ../../unicornafl/include/unicorn/*.h
|
||||||
|
${MYCC} ${CFLAGS} -g -c harness.c -o $@
|
||||||
|
--- a/unicorn_mode/samples/persistent/Makefile
|
||||||
|
+++ b/unicorn_mode/samples/persistent/Makefile
|
||||||
|
@@ -35,7 +35,7 @@ clean:
|
||||||
|
rm -rf *.o harness harness-debug
|
||||||
|
|
||||||
|
harness.o: harness.c ../../unicornafl/include/unicorn/*.h
|
||||||
|
- ${MYCC} ${CFLAGS} -O3 -c harness.c
|
||||||
|
+ ${MYCC} ${CFLAGS} -c harness.c
|
||||||
|
|
||||||
|
harness-debug.o: harness.c ../../unicornafl/include/unicorn/*.h
|
||||||
|
${MYCC} ${CFLAGS} -DAFL_DEBUG=1 -g -c harness.c -o $@
|
||||||
|
--- a/utils/afl_untracer/Makefile
|
||||||
|
+++ b/utils/afl_untracer/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
ifdef DEBUG
|
||||||
|
OPT=-O0
|
||||||
|
else
|
||||||
|
- OPT=-O3
|
||||||
|
+ OPT?=-O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: afl-untracer libtestinstr.so
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
DIST filebus-0.0.4.tar.gz 6528 BLAKE2B 047b3f04105da03785868aa32fdb5fb53b2aa57b0aea81f65440c57ade8d0571327782ed2c4019be576abab5a44781ab454f0d47ea795cf39c4d0a34bf8db85d SHA512 0cb313ea81b93708a09e89a62f33f9e7b4bbb1254e74a6b0757e898c9cb6ffebdfec107a780acff25da31c8761c515826ae6e19fccbc4e0ce6326e4909f1cfd2
|
DIST filebus-0.0.5.tar.gz 7030 BLAKE2B 93b9918295800e572894406178d3ceaedc4e8b259a8cd91a87be9f9aab93a7a3476d826adbd6bf996bac3a80d4aca08ab002cd2df482a016ae6fc67e44d60480 SHA512 68f9e3f95621da4ccf0cc30bcd969220622ff5c54bef2db5b2a7cdddc68be6f6af1b63a3a95692e32b6ce44f26f391966af1ad369fd18a40474f265695591520
|
||||||
|
@ -1 +1,2 @@
|
|||||||
DIST grc-1.11.3.tar.gz 45205 BLAKE2B 852f58145fe11ceab3e6222b61c18cdb18a09f0666f28df4b8b8a8bc42a22dd01ae7e2bcf6232a6aa0d1f42ac233148f694a0eafbd995fbd5d147e06480f7abf SHA512 abc756a21e039c136bbf9be1ef7c1890aa2415ac21e87fb7377c90ced1def2dcaf9ce5cce22edeac68db20f6d6ccea31a2ec57044a37ba200ff79273bf11d8cf
|
DIST grc-1.11.3.tar.gz 45205 BLAKE2B 852f58145fe11ceab3e6222b61c18cdb18a09f0666f28df4b8b8a8bc42a22dd01ae7e2bcf6232a6aa0d1f42ac233148f694a0eafbd995fbd5d147e06480f7abf SHA512 abc756a21e039c136bbf9be1ef7c1890aa2415ac21e87fb7377c90ced1def2dcaf9ce5cce22edeac68db20f6d6ccea31a2ec57044a37ba200ff79273bf11d8cf
|
||||||
|
DIST grc-1.12.tar.gz 48744 BLAKE2B dd7ab01739dfe637c4bf8b1d877e606869f9d11fed33112b499f72714ebb383e7dcbf80f160ac87d07bdc079ff7d589b9ad10b2f005c801fd13bb305466f1f8c SHA512 37ada5c7293bd0240c18b60cd7c60990e26e91b93fe9fb3ba1198c9d665647570191e985ab29de2b6554166ef703d81f449b486e83178b35df302836b5abb8c7
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{3..10} )
|
||||||
|
inherit python-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Generic Colouriser beautifies your logfiles or output of commands"
|
||||||
|
HOMEPAGE="http://kassiopeia.juls.savba.sk/~garabik/software/grc.html"
|
||||||
|
SRC_URI="https://github.com/garabik/grc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~ppc ~x86"
|
||||||
|
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||||
|
|
||||||
|
RDEPEND="${PYTHON_DEPS}"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
DOCS=( README.markdown INSTALL TODO debian/changelog CREDITS Regexp.txt )
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
sed \
|
||||||
|
-e 's:#! :#!:g' \
|
||||||
|
-e 's:3$::g' \
|
||||||
|
-i grc grcat || die
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
python_foreach_impl python_doscript grc grcat
|
||||||
|
|
||||||
|
einstalldocs
|
||||||
|
|
||||||
|
insinto /usr/share/grc
|
||||||
|
doins \
|
||||||
|
contrib/mrsmith/conf.* \
|
||||||
|
colourfiles/conf.* \
|
||||||
|
grc.sh \
|
||||||
|
grc.fish \
|
||||||
|
grc.zsh
|
||||||
|
|
||||||
|
insinto /etc
|
||||||
|
doins grc.conf
|
||||||
|
doman *.1
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
elog
|
||||||
|
elog "Shell specific configurations can be found in ${ROOT}/usr/share/grc"
|
||||||
|
elog "Be sure to symlink one to use grc globally:"
|
||||||
|
elog
|
||||||
|
elog " ln -s ${ROOT}/usr/share/grc/grc.SHELL ${ROOT}/etc/profile.d/grc.sh"
|
||||||
|
elog
|
||||||
|
elog "Replace 'SHELL' in the above command with one of: bashrc, fish, zsh."
|
||||||
|
elog "Afterwards, use '. ${ROOT}/etc/profile' to activate grc in existing"
|
||||||
|
elog "shell sessions."
|
||||||
|
elog
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,84 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{8..9} )
|
||||||
|
DISTUTILS_SINGLE_IMPL=1
|
||||||
|
DISTUTILS_USE_SETUPTOOLS=no
|
||||||
|
|
||||||
|
inherit distutils-r1 bash-completion-r1 vcs-snapshot prefix
|
||||||
|
|
||||||
|
DESCRIPTION="change directory command that learns"
|
||||||
|
HOMEPAGE="https://github.com/wting/autojump"
|
||||||
|
SRC_URI="https://github.com/wting/${PN}/archive/release-v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x64-macos"
|
||||||
|
IUSE="ipython test"
|
||||||
|
REQUIRED_USE="ipython? ( ${PYTHON_REQUIRED_USE} )"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
RDEPEND="ipython? ( ${PYTHON_DEPS} )"
|
||||||
|
DEPEND="${PYTHON_DEPS}
|
||||||
|
test? (
|
||||||
|
>=dev-vcs/pre-commit-0.7.0[${PYTHON_SINGLE_USEDEP}]
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
distutils_enable_tests pytest
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
eapply_user
|
||||||
|
sed -e "s:/usr/local/share:/usr/share:" \
|
||||||
|
-i bin/autojump.sh || die
|
||||||
|
|
||||||
|
# autojump_argparse is only there for Python 2.6 compatibility
|
||||||
|
sed -e "s:autojump_argparse:argparse:" \
|
||||||
|
-i bin/autojump || die
|
||||||
|
|
||||||
|
hprefixify -q '"' -w '/usr\/share/' bin/autojump.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin bin/"${PN}"
|
||||||
|
python_doscript "${ED}"/usr/bin/"${PN}"
|
||||||
|
|
||||||
|
insinto /etc/profile.d
|
||||||
|
doins bin/"${PN}".sh
|
||||||
|
|
||||||
|
insinto /usr/share/"${PN}"/
|
||||||
|
doins bin/"${PN}.bash"
|
||||||
|
doins bin/"${PN}.zsh"
|
||||||
|
doins bin/"${PN}.fish"
|
||||||
|
insinto /usr/share/zsh/site-functions
|
||||||
|
doins bin/_j
|
||||||
|
|
||||||
|
python_domodule bin/autojump_argparse.py bin/autojump_data.py \
|
||||||
|
bin/autojump_match.py bin/autojump_utils.py
|
||||||
|
if use ipython; then
|
||||||
|
python_domodule tools/autojump_ipython.py
|
||||||
|
fi
|
||||||
|
|
||||||
|
doman docs/"${PN}.1"
|
||||||
|
einstalldocs
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if use ipython; then
|
||||||
|
elog 'This tool provides "j" for ipython, please add'
|
||||||
|
elog '"import autojump_ipython" to your ipy_user_conf.py.'
|
||||||
|
elog
|
||||||
|
fi
|
||||||
|
|
||||||
|
elog 'If you use app-shells/fish, add the following code to your'
|
||||||
|
elog 'config.fish to get autojump support:'
|
||||||
|
elog 'if test -f /usr/share/autojump/autojump.fish'
|
||||||
|
elog ' source /usr/share/autojump/autojump.fish'
|
||||||
|
elog 'end'
|
||||||
|
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST recode-3.7.6.tar.gz 2210564 BLAKE2B 8c99b6d2eb93482785fe7e36063514e4c153516cc8059a9b98fc9f1b08704314b7933390a5fd7921525648ef58e9f995242182b8de23b7db33cbf94383e28f29 SHA512 ababefc445fcc47b6bf9ed640b767aed374bb8ce93cdccb641dd1ba5d298360583dd79070a0bb458f1190a8d6f1ddeb3b04eec34a61305b69def0963cec5843f
|
DIST recode-3.7.6.tar.gz 2210564 BLAKE2B 8c99b6d2eb93482785fe7e36063514e4c153516cc8059a9b98fc9f1b08704314b7933390a5fd7921525648ef58e9f995242182b8de23b7db33cbf94383e28f29 SHA512 ababefc445fcc47b6bf9ed640b767aed374bb8ce93cdccb641dd1ba5d298360583dd79070a0bb458f1190a8d6f1ddeb3b04eec34a61305b69def0963cec5843f
|
||||||
DIST recode-3.7.8.tar.gz 2230154 BLAKE2B 853a53d86a3a3600e5d70a8dc67bab9b0fa7a9dfab79e3f4ae8611f54c955802862689077774f7b21ce360f2d91c65ee238406ffa137a84545157e3a70853f42 SHA512 e6cd9c7d3eb5c179d3f62804018d1d19b71a3fae72b0d76aec730c36e64c50a571cbfda5340ac50244a16ccdd9265f5610deadb8908067c3866fa68cbbf0ac70
|
DIST recode-3.7.8.tar.gz 2230154 BLAKE2B 853a53d86a3a3600e5d70a8dc67bab9b0fa7a9dfab79e3f4ae8611f54c955802862689077774f7b21ce360f2d91c65ee238406ffa137a84545157e3a70853f42 SHA512 e6cd9c7d3eb5c179d3f62804018d1d19b71a3fae72b0d76aec730c36e64c50a571cbfda5340ac50244a16ccdd9265f5610deadb8908067c3866fa68cbbf0ac70
|
||||||
|
DIST recode-3.7.9.tar.gz 2230259 BLAKE2B 36039ba9e62c5113231764dfa9cffa73b7ff5cd91bab622a0daf0a48a73ab8a62afd16132cec2590eed14623ce5b86ad057e8ca8454cf8185869f0780b3523e7 SHA512 277074dee63cdc7f1a1be2acca67481b8fb816bd4319fe8e882696e42d15309750b930fa9e8d6286e714132a976f0eaf87f718560d6cb86eeaa79b86f0700a6c
|
||||||
|
@ -0,0 +1,58 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{7..9} )
|
||||||
|
|
||||||
|
inherit flag-o-matic python-any-r1 toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="Convert files between various character sets"
|
||||||
|
HOMEPAGE="https://github.com/rrthomas/recode"
|
||||||
|
SRC_URI="https://github.com/rrthomas/recode/releases/download/v${PV}/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
# librecode soname version
|
||||||
|
SLOT="0/3"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
|
||||||
|
IUSE="nls test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
RDEPEND="virtual/libiconv"
|
||||||
|
DEPEND="
|
||||||
|
${RDEPEND}
|
||||||
|
sys-devel/flex
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
nls? ( sys-devel/gettext )
|
||||||
|
test? (
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
$(python_gen_any_dep '
|
||||||
|
dev-python/cython[${PYTHON_USEDEP}]
|
||||||
|
')
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
python_check_deps() {
|
||||||
|
if use test ; then
|
||||||
|
has_version -b "dev-python/cython[${PYTHON_USEDEP}]" || return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
tc-export CC LD
|
||||||
|
|
||||||
|
# on solaris -lintl is needed to compile
|
||||||
|
[[ ${CHOST} == *-solaris* ]] && append-libs "-lintl"
|
||||||
|
|
||||||
|
# --without-included-gettext means we always use system headers
|
||||||
|
# and library
|
||||||
|
econf \
|
||||||
|
$(use_enable nls) \
|
||||||
|
--disable-static
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
find "${ED}" -name '*.la' -delete || die
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
|||||||
DIST aunit-2019-20190429-18B77-src.tar.gz 624683 BLAKE2B 455c3566ed46138116f258b175e883a59102dc334b41040cd6a332175fc4138d7ccdab1357c5b8886f14e551e3a6f4f4aa73eb755ade4a7a1663ac2d999973ca SHA512 9b1834ebacb9dbaa7a01f702455a44921a26a8d8d00f55ecc2fc8ddf2d884ef2ef2bba0f62551421f5a47d558d0fba88cbd57671459bba0c9f90c6310d714b19
|
|
||||||
DIST aunit-2020-20200429-19B6C-src.tar.gz 615443 BLAKE2B b7d31dc8e198b3ceb94d043d701dceadbc1e20596a71a4f25a140bdd3f9ad54f7d7e4d4bfb587fbc31b9a6a046407c2d0dbd77dd2d045878e9aa2da3954d2964 SHA512 2d61db882cd7eaf66be101ffabafafdab1834578df162f0ef1947b517265033285cef3d84a76a3b0f1cb05d0adf12a1910b652bfbaeb56fc022157f44b34de86
|
DIST aunit-2020-20200429-19B6C-src.tar.gz 615443 BLAKE2B b7d31dc8e198b3ceb94d043d701dceadbc1e20596a71a4f25a140bdd3f9ad54f7d7e4d4bfb587fbc31b9a6a046407c2d0dbd77dd2d045878e9aa2da3954d2964 SHA512 2d61db882cd7eaf66be101ffabafafdab1834578df162f0ef1947b517265033285cef3d84a76a3b0f1cb05d0adf12a1910b652bfbaeb56fc022157f44b34de86
|
||||||
|
DIST aunit-2021-20210518-19DC5-src.tar.gz 625153 BLAKE2B 385478bcc889d5f764a3498d98915928671a546c7345d8ca3e4f092d85a92c7b196d2a3f7a81f2199237f472f691d30b05b2f3308f063c509d8e9f3e834d620e SHA512 c365ed5ffe4ff60413969e92989396c6d2849a1f16ceb4b8b3fd666153f6cb480f4d74c42362fb751c522a29a555996e3bc5fdd0e80ba2e817940599f8be4798
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
|
|
||||||
ADA_COMPAT=( gnat_201{6,7,8,9} )
|
ADA_COMPAT=( gnat_201{6..9} gnat_202{0..1} )
|
||||||
inherit ada multiprocessing
|
inherit ada multiprocessing
|
||||||
|
|
||||||
MYP=${P}-20190429-18B77-src
|
MYP=${P}-20200429-19B6C-src
|
||||||
|
|
||||||
DESCRIPTION="Ada unit testing framework"
|
DESCRIPTION="Ada unit testing framework"
|
||||||
HOMEPAGE="http://libre.adacore.com/tools/aunit/"
|
HOMEPAGE="http://libre.adacore.com/tools/aunit/"
|
||||||
SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf859431e87aa2cdf16b18
|
SRC_URI="https://community.download.adacore.com/v1/6c8702d4a3c4a39f5da077716e44bef980377ba8?filename=${MYP}.tar.gz
|
||||||
-> ${MYP}.tar.gz"
|
-> ${MYP}.tar.gz"
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
LICENSE="GPL-3"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="amd64 x86"
|
KEYWORDS="~amd64 ~x86"
|
||||||
IUSE=""
|
IUSE=""
|
||||||
|
|
||||||
RDEPEND="${ADA_DEPS}"
|
RDEPEND="${ADA_DEPS}"
|
@ -0,0 +1,48 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
ADA_COMPAT=( gnat_201{6..9} gnat_202{0..1} )
|
||||||
|
inherit ada multiprocessing
|
||||||
|
|
||||||
|
MYP=${P}-${PV}0518-19DC5-src
|
||||||
|
ID=c8eadafc40c016859e127cd0e82411fcd8f3e749
|
||||||
|
ADAMIRROR=https://community.download.adacore.com/v1
|
||||||
|
|
||||||
|
DESCRIPTION="Ada unit testing framework"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/tools/aunit/"
|
||||||
|
SRC_URI="${ADAMIRROR}/${ID}?filename=${MYP}.tar.gz -> ${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
RDEPEND="${ADA_DEPS}"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-ada/gprbuild[${ADA_USEDEP}]"
|
||||||
|
|
||||||
|
REQUIRED_USE="${ADA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}"/${PN}-2016-gentoo.patch )
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake GPRBUILD="gprbuild -j$(makeopts_jobs) -v"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake INSTALL="${D}"/usr install
|
||||||
|
einstalldocs
|
||||||
|
mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/ || die
|
||||||
|
rmdir "${D}"/usr/share/doc/${PN} || die
|
||||||
|
mv "${D}"/usr/share/examples/${PN} "${D}"/usr/share/doc/${PF}/examples || die
|
||||||
|
rmdir "${D}"/usr/share/examples || die
|
||||||
|
rm -r "${D}"/usr/share/gpr/manifests || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
emake PROJECT_PATH_ARG="ADA_PROJECT_PATH=$(pwd)/lib/gnat" -C test
|
||||||
|
}
|
@ -1,2 +1,3 @@
|
|||||||
DIST gnatmem-2019-20190429-19745-src.tar.gz 80136 BLAKE2B 8ae3b41827416f951abb0d0a1fe533946fad2ac8d67ae6aad2b14495a3c068718befbbbf11800c1864f3becaa0ca6dfb838aeec3b3d715b250d4436ccee93c69 SHA512 4354a30efcf95a013f481b3519a79a22f85348840f074c734013d6c73e00fd771118b84eec416260983c383484f7a404217a32c012ca0bd7c37253ba17f2eb85
|
DIST gnatmem-2019-20190429-19745-src.tar.gz 80136 BLAKE2B 8ae3b41827416f951abb0d0a1fe533946fad2ac8d67ae6aad2b14495a3c068718befbbbf11800c1864f3becaa0ca6dfb838aeec3b3d715b250d4436ccee93c69 SHA512 4354a30efcf95a013f481b3519a79a22f85348840f074c734013d6c73e00fd771118b84eec416260983c383484f7a404217a32c012ca0bd7c37253ba17f2eb85
|
||||||
DIST gnatmem-2020-20200429-19911-src.tar.gz 80400 BLAKE2B 0367e4b40a3d0cde1002b49a330db3b5c27a08074bf9687699d0fe6b3f046562c4758865fd30a3f99703d209e24b0b5b72902cc4bcd4fd1c54576a0aa082b0fa SHA512 9d5e2bfab73ff2f9b6864bd8b1f2844587a21352a782f1dd52a17eb911d4791d93806a423c702979636dd402e372ed7954ffd33d3882c8703d0f6e8fc056babc
|
DIST gnatmem-2020-20200429-19911-src.tar.gz 80400 BLAKE2B 0367e4b40a3d0cde1002b49a330db3b5c27a08074bf9687699d0fe6b3f046562c4758865fd30a3f99703d209e24b0b5b72902cc4bcd4fd1c54576a0aa082b0fa SHA512 9d5e2bfab73ff2f9b6864bd8b1f2844587a21352a782f1dd52a17eb911d4791d93806a423c702979636dd402e372ed7954ffd33d3882c8703d0f6e8fc056babc
|
||||||
|
DIST gnatmem-2021-20210518-19F7B-src.tar.gz 81001 BLAKE2B 618c5e0fc300e1ea53456b776372a06603ce6b71269ddbed8cbd0bceefd957f726ceac8a045f12f2a50e0f4ebdf47d4c60ef65716ba4bcc9eb6fc220a3670bff SHA512 ef938cb7c2b6cda12a68a874218d47acdee214530534114da6490475dd08e21dc4043c9a3f164074a8010e50d0a9c91b4fbabffdc8329700629407644fec46d4
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
ADA_COMPAT=( gnat_201{6..9} gnat_202{0..1} )
|
||||||
|
inherit ada multiprocessing autotools
|
||||||
|
|
||||||
|
MYP=${P}-${PV}0518-19F7B-src
|
||||||
|
ID=3ddb98c0c8854dc7631bebd673ac7bc53038d4b7
|
||||||
|
ADAMIRROR=https://community.download.adacore.com/v1
|
||||||
|
|
||||||
|
DESCRIPTION="Monitors dynamic allocation and deallocation activity in a program"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/"
|
||||||
|
SRC_URI="${ADAMIRROR}/${ID}?filename=${MYP}.tar.gz -> ${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
RDEPEND="${ADA_DEPS}"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-ada/gprbuild[${ADA_USEDEP}]
|
||||||
|
sys-libs/binutils-libs:="
|
||||||
|
|
||||||
|
REQUIRED_USE="${ADA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-2018-gentoo.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
mv configure.in configure.ac
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
gprbuild -v -p -Pgnatmem.gpr -j$(makeopts_jobs) \
|
||||||
|
-cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
|
||||||
|
-largs ${LDFLAGS} \
|
||||||
|
|| die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin obj/gnatmem
|
||||||
|
}
|
@ -1,2 +1,3 @@
|
|||||||
DIST gnatsymbolize-2019-20190429-19761-src.tar.gz 14297 BLAKE2B 8ea689266abc485632c04a696c0d30632fdfcc123153ae006158700514ebedd6d067124e59e519a0ebe35569eb0e2fad8dd48a33d49551ba608e14d3ec73d636 SHA512 68e8c9bb2880738160722a2c413c6146c86efd0822236019ca5824eed4a2b392252676d0f96c035830b80068b82344b44953006fc96ea208f6bde6618190336c
|
DIST gnatsymbolize-2019-20190429-19761-src.tar.gz 14297 BLAKE2B 8ea689266abc485632c04a696c0d30632fdfcc123153ae006158700514ebedd6d067124e59e519a0ebe35569eb0e2fad8dd48a33d49551ba608e14d3ec73d636 SHA512 68e8c9bb2880738160722a2c413c6146c86efd0822236019ca5824eed4a2b392252676d0f96c035830b80068b82344b44953006fc96ea208f6bde6618190336c
|
||||||
DIST gnatsymbolize-2020-20200429-19987-src.tar.gz 14121 BLAKE2B f67e3735cacc56eacf9f7c9972f9108f95b3fbc3dbac14043356dd3da5dbd9548b1b41063465e025c9616bc059c39021999b1790b8f2cda2b9199ffd8154943b SHA512 839ac0ca514123261e8dc379484195eda3c0bed3509aecc9919ed9710c3fe3478b398697483085de69d0435728b9bf1dc60e6c7c1a51252f5629ed9e1b222739
|
DIST gnatsymbolize-2020-20200429-19987-src.tar.gz 14121 BLAKE2B f67e3735cacc56eacf9f7c9972f9108f95b3fbc3dbac14043356dd3da5dbd9548b1b41063465e025c9616bc059c39021999b1790b8f2cda2b9199ffd8154943b SHA512 839ac0ca514123261e8dc379484195eda3c0bed3509aecc9919ed9710c3fe3478b398697483085de69d0435728b9bf1dc60e6c7c1a51252f5629ed9e1b222739
|
||||||
|
DIST gnatsymbolize-2021-20210518-19D3B-src.tar.gz 14263 BLAKE2B b5f8c1829e42f9b2dee4cf3c74287a5c11eab90f1a1d2575cd42fe4ad2078b99a46c641ebbf747b02ed8f22dfcc83e76c60ebf07eb45e561175f480a5a056ca2 SHA512 c94b569733c596679f1422660af51b3c0ad5b6955727f6dc6a4b076b39b19fc13fb779b5610667a4c2c16abab08d2633785e184ad5e15037e66cd1c8e249c159
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
ADA_COMPAT=( gnat_201{8,9} gnat_202{0..1} )
|
||||||
|
inherit ada multiprocessing autotools
|
||||||
|
|
||||||
|
MYP=${P}-${PV}0518-19D3B-src
|
||||||
|
ID=884f3b229457c995ddebb46a16a7cc50ed837c90
|
||||||
|
ADAMIRROR=https://community.download.adacore.com/v1
|
||||||
|
|
||||||
|
DESCRIPTION="Translates addresses into filename, line number, and function names"
|
||||||
|
HOMEPAGE="http://libre.adacore.com/"
|
||||||
|
SRC_URI="${ADAMIRROR}/${ID}?filename=${MYP}.tar.gz -> ${MYP}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
RDEPEND="${ADA_DEPS}"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
REQUIRED_USE="${ADA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
S="${WORKDIR}"/${MYP}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
gnatmake -v gnatsymbolize -cargs ${ADAFLAGS} || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin gnatsymbolize
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,26 @@
|
|||||||
|
https://sourceforge.net/p/htmlcxx/patches/8/
|
||||||
|
|
||||||
|
diff --color -Naur a/html/CharsetConverter.cc b/html/CharsetConverter.cc
|
||||||
|
--- a/html/CharsetConverter.cc 2018-12-29 03:13:56.000000000 +0000
|
||||||
|
+++ b/html/CharsetConverter.cc 2021-05-31 23:03:10.705334580 +0100
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
using namespace std;
|
||||||
|
using namespace htmlcxx;
|
||||||
|
|
||||||
|
-CharsetConverter::CharsetConverter(const string &from, const string &to) throw (Exception)
|
||||||
|
+CharsetConverter::CharsetConverter(const string &from, const string &to)
|
||||||
|
{
|
||||||
|
mIconvDescriptor = iconv_open(to.c_str(), from.c_str());
|
||||||
|
if (mIconvDescriptor == (iconv_t)(-1))
|
||||||
|
diff --color -Naur a/html/CharsetConverter.h b/html/CharsetConverter.h
|
||||||
|
--- a/html/CharsetConverter.h 2018-12-29 03:13:56.000000000 +0000
|
||||||
|
+++ b/html/CharsetConverter.h 2021-05-31 23:03:19.042574598 +0100
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
: std::runtime_error(arg) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
- CharsetConverter(const std::string &from, const std::string &to) throw (Exception);
|
||||||
|
+ CharsetConverter(const std::string &from, const std::string &to);
|
||||||
|
~CharsetConverter();
|
||||||
|
|
||||||
|
std::string convert(const std::string &input);
|
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
DIST redis-5.0.12.tar.gz 1995069 BLAKE2B 03bb5956fb1206ecfa7f621b22b3101d1ebad62c40ce52157fb802ecfa5c32ca493ff03a1cf909a1b0f1acdac83b3a939ab2042fbf092fea983cabe35d00f4c3 SHA512 f0ab161762006926064ba2176ea63bb2fa416fa386b44ca55a8edad9169627fcd1c4bd9c699fec585aefc68506deb0796f6a89844c21e74d2bdb19ca1638bbe7
|
DIST redis-5.0.12.tar.gz 1995069 BLAKE2B 03bb5956fb1206ecfa7f621b22b3101d1ebad62c40ce52157fb802ecfa5c32ca493ff03a1cf909a1b0f1acdac83b3a939ab2042fbf092fea983cabe35d00f4c3 SHA512 f0ab161762006926064ba2176ea63bb2fa416fa386b44ca55a8edad9169627fcd1c4bd9c699fec585aefc68506deb0796f6a89844c21e74d2bdb19ca1638bbe7
|
||||||
DIST redis-6.0.12.tar.gz 2276349 BLAKE2B ab49b0278420c65fc995a90e850130971ccaf3df34a08a5cc10a8c211239eba8449b87fe67684189c71816cf259a70a23a77935ec61e8baa787daa61cb994201 SHA512 9dd8e3bed51e1356470e1bf08892f771744c0c9418ff874c16ea932ad1f471a908ffd8479efe1f32531d7f63cd7af5224273ce50f2fe7aa26c47716e0e78330b
|
DIST redis-6.0.12.tar.gz 2276349 BLAKE2B ab49b0278420c65fc995a90e850130971ccaf3df34a08a5cc10a8c211239eba8449b87fe67684189c71816cf259a70a23a77935ec61e8baa787daa61cb994201 SHA512 9dd8e3bed51e1356470e1bf08892f771744c0c9418ff874c16ea932ad1f471a908ffd8479efe1f32531d7f63cd7af5224273ce50f2fe7aa26c47716e0e78330b
|
||||||
DIST redis-6.0.13.tar.gz 2276777 BLAKE2B 735ebc7068b26e7e424e5ce701bb80cfbdf09f65734cbdd5760b75d78141ff542d1a91f2f58f7ef97ea4a1e9e225e96189736384e1dd0c8195e4ca651da75492 SHA512 5053cd60df354c8a00e5864179c6354db6b0243d56717d5dc44954405908ad8b3b09ba9f069312825705dd8abc83d533dd7a5a60485a30e8f4adf166fa058549
|
DIST redis-6.0.13.tar.gz 2276777 BLAKE2B 735ebc7068b26e7e424e5ce701bb80cfbdf09f65734cbdd5760b75d78141ff542d1a91f2f58f7ef97ea4a1e9e225e96189736384e1dd0c8195e4ca651da75492 SHA512 5053cd60df354c8a00e5864179c6354db6b0243d56717d5dc44954405908ad8b3b09ba9f069312825705dd8abc83d533dd7a5a60485a30e8f4adf166fa058549
|
||||||
|
DIST redis-6.0.14.tar.gz 2277029 BLAKE2B 1eeeae5243ca380e354dfe5c8ad5b869669dc94b9570c8151033f89a23025bf027267eea00549f411e019b3c79ffa5d2e29eacff660e9f4b614953b023824c04 SHA512 a1de2131420bc11f831ff48607be2cf4a7775702fcc4fc777e09ebdc36277f1b468b22a1d35758338c0b44f9b3ae7b119139a79eb2419d40acbbf49d8c4a7e77
|
||||||
DIST redis-6.2.1.tar.gz 2438367 BLAKE2B 8717630771eafaf8a15dd371d46475f81f15bbcdc9a4fabd8f270ab6e09fbfb3ee2a1cddddb6c7778922d3552bcf5ee475eec7ba0623147ec36a5c5422cb0de0 SHA512 7c339cc360fc3125bb67c5748bb4fe940977faa937e3a86294829bde472479a811df8ea0ce4961d8128ec8d4ffba5d5a943c2957589c8da0cfc3f109f82e4af6
|
DIST redis-6.2.1.tar.gz 2438367 BLAKE2B 8717630771eafaf8a15dd371d46475f81f15bbcdc9a4fabd8f270ab6e09fbfb3ee2a1cddddb6c7778922d3552bcf5ee475eec7ba0623147ec36a5c5422cb0de0 SHA512 7c339cc360fc3125bb67c5748bb4fe940977faa937e3a86294829bde472479a811df8ea0ce4961d8128ec8d4ffba5d5a943c2957589c8da0cfc3f109f82e4af6
|
||||||
DIST redis-6.2.3.tar.gz 2456050 BLAKE2B f41096c790a373bdfbe2b9af0be867fdf4c9cdcf5b76e92c50786de917d9e52bd65e65bd43127fd5ad040bc3fed50fda9caa145cd261f79bcfa16ddf369315e9 SHA512 0a020aaa5664ed419a30e85d3b5c79fe69353067b755421c702f89ca923f1ba7794b4792f4a44049e38936f221363153c9ffcfb6fa232731b224d20c2982ac68
|
DIST redis-6.2.3.tar.gz 2456050 BLAKE2B f41096c790a373bdfbe2b9af0be867fdf4c9cdcf5b76e92c50786de917d9e52bd65e65bd43127fd5ad040bc3fed50fda9caa145cd261f79bcfa16ddf369315e9 SHA512 0a020aaa5664ed419a30e85d3b5c79fe69353067b755421c702f89ca923f1ba7794b4792f4a44049e38936f221363153c9ffcfb6fa232731b224d20c2982ac68
|
||||||
|
DIST redis-6.2.4.tar.gz 2457940 BLAKE2B 3e89e404a624db6f739fdab72b8b7f7f92b6e96b01e33c63b6f5fa2f80fc72d8b8eaca4ecb7c57cdaf127956ba1a580ec851012b57426ebe7bb4cba890e1dcae SHA512 22db5b64de20a4823fd219b559c05f329e37fc86ce32099c64655dc50e60228706c99bffeae8d7080d8689910879318ec6621388bde23bf1486aefb881f33cb0
|
||||||
|
@ -0,0 +1,187 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# Redis does NOT build with Lua 5.2 or newer at this time:
|
||||||
|
# - 5.3 and 5.4 give:
|
||||||
|
# lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
|
||||||
|
# - 5.2 fails with:
|
||||||
|
# scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
|
||||||
|
# because lua_open became lua_newstate in 5.2
|
||||||
|
LUA_COMPAT=( lua5-1 luajit )
|
||||||
|
|
||||||
|
inherit autotools flag-o-matic lua-single systemd toolchain-funcs tmpfiles
|
||||||
|
|
||||||
|
DESCRIPTION="A persistent caching system, key-value and data structures database"
|
||||||
|
HOMEPAGE="https://redis.io"
|
||||||
|
SRC_URI="https://download.redis.io/releases/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
|
||||||
|
IUSE="+jemalloc ssl systemd tcmalloc test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
SLOT="0"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
${LUA_DEPS}
|
||||||
|
jemalloc? ( >=dev-libs/jemalloc-5.1:= )
|
||||||
|
ssl? ( dev-libs/openssl:0= )
|
||||||
|
systemd? ( sys-apps/systemd:= )
|
||||||
|
tcmalloc? ( dev-util/google-perftools )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
acct-group/redis
|
||||||
|
acct-user/redis
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
# Tcl is only needed in the CHOST test env
|
||||||
|
DEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
test? (
|
||||||
|
dev-lang/tcl:0=
|
||||||
|
ssl? ( dev-tcltk/tls )
|
||||||
|
)"
|
||||||
|
|
||||||
|
REQUIRED_USE="?? ( jemalloc tcmalloc )
|
||||||
|
${LUA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-3.2.3-config.patch
|
||||||
|
"${FILESDIR}"/${PN}-5.0-shared.patch
|
||||||
|
"${FILESDIR}"/${PN}-6.0.12-sharedlua.patch
|
||||||
|
"${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch
|
||||||
|
"${FILESDIR}"/${PN}-sentinel-5.0-config.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# unstable on jemalloc
|
||||||
|
> tests/unit/memefficiency.tcl || die
|
||||||
|
|
||||||
|
# Copy lua modules into build dir
|
||||||
|
cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
|
||||||
|
cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
|
||||||
|
# Append cflag for lua_cjson
|
||||||
|
# https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
|
||||||
|
append-cflags "-DENABLE_CJSON_GLOBAL"
|
||||||
|
|
||||||
|
# now we will rewrite present Makefiles
|
||||||
|
local makefiles="" MKF
|
||||||
|
for MKF in $(find -name 'Makefile' | cut -b 3-); do
|
||||||
|
mv "${MKF}" "${MKF}.in"
|
||||||
|
sed -i -e 's:$(CC):@CC@:g' \
|
||||||
|
-e 's:$(CFLAGS):@AM_CFLAGS@:g' \
|
||||||
|
-e 's: $(DEBUG)::g' \
|
||||||
|
-e 's:$(OBJARCH)::g' \
|
||||||
|
-e 's:ARCH:TARCH:g' \
|
||||||
|
-e '/^CCOPT=/s:$: $(LDFLAGS):g' \
|
||||||
|
"${MKF}.in" \
|
||||||
|
|| die "Sed failed for ${MKF}"
|
||||||
|
makefiles+=" ${MKF}"
|
||||||
|
done
|
||||||
|
# autodetection of compiler and settings; generates the modified Makefiles
|
||||||
|
cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
|
||||||
|
|
||||||
|
# Use the correct pkgconfig name for Lua.
|
||||||
|
# The upstream configure script handles luajit specially, and is not
|
||||||
|
# effected by these changes.
|
||||||
|
sed -i \
|
||||||
|
-e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
|
||||||
|
-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
|
||||||
|
-e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${ELUA},g" \
|
||||||
|
configure.ac || die "Sed failed for configure.ac"
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf $(use_with lua_single_target_luajit luajit)
|
||||||
|
|
||||||
|
# Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
|
||||||
|
# also, don't define ANSI/c99 for lua twice
|
||||||
|
sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local myconf=""
|
||||||
|
|
||||||
|
if use jemalloc; then
|
||||||
|
myconf+="MALLOC=jemalloc"
|
||||||
|
elif use tcmalloc; then
|
||||||
|
myconf+="MALLOC=tcmalloc"
|
||||||
|
else
|
||||||
|
myconf+="MALLOC=libc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use ssl; then
|
||||||
|
myconf+=" BUILD_TLS=yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export USE_SYSTEMD=$(usex systemd)
|
||||||
|
|
||||||
|
tc-export AR CC RANLIB
|
||||||
|
emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Known to fail with FEATURES=usersandbox
|
||||||
|
if has usersandbox ${FEATURES}; then
|
||||||
|
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
|
||||||
|
"Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use ssl; then
|
||||||
|
./utils/gen-test-certs.sh
|
||||||
|
./runtest --tls
|
||||||
|
else
|
||||||
|
./runtest
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto /etc/redis
|
||||||
|
doins redis.conf sentinel.conf
|
||||||
|
use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf
|
||||||
|
fperms 0750 /etc/redis
|
||||||
|
fperms 0644 /etc/redis/{redis,sentinel}.conf
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/redis.confd-r2" redis
|
||||||
|
newinitd "${FILESDIR}/redis.initd-6" redis
|
||||||
|
|
||||||
|
systemd_newunit "${FILESDIR}/redis.service-4" redis.service
|
||||||
|
newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel
|
||||||
|
newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d/
|
||||||
|
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||||
|
|
||||||
|
dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
|
||||||
|
|
||||||
|
dobin src/redis-cli
|
||||||
|
dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
|
||||||
|
fperms 0750 /usr/sbin/redis-benchmark
|
||||||
|
dosym redis-server /usr/sbin/redis-sentinel
|
||||||
|
|
||||||
|
if use prefix; then
|
||||||
|
diropts -m0750
|
||||||
|
else
|
||||||
|
diropts -m0750 -o redis -g redis
|
||||||
|
fi
|
||||||
|
keepdir /var/{log,lib}/redis
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
ewarn "The default redis configuration file location changed to:"
|
||||||
|
ewarn " /etc/redis/{redis,sentinel}.conf"
|
||||||
|
ewarn "Please apply your changes to the new configuration files."
|
||||||
|
}
|
@ -0,0 +1,187 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# Redis does NOT build with Lua 5.2 or newer at this time:
|
||||||
|
# - 5.3 and 5.4 give:
|
||||||
|
# lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
|
||||||
|
# - 5.2 fails with:
|
||||||
|
# scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
|
||||||
|
# because lua_open became lua_newstate in 5.2
|
||||||
|
LUA_COMPAT=( lua5-1 luajit )
|
||||||
|
|
||||||
|
inherit autotools flag-o-matic lua-single systemd toolchain-funcs tmpfiles
|
||||||
|
|
||||||
|
DESCRIPTION="A persistent caching system, key-value and data structures database"
|
||||||
|
HOMEPAGE="https://redis.io"
|
||||||
|
SRC_URI="https://download.redis.io/releases/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
|
||||||
|
IUSE="+jemalloc ssl systemd tcmalloc test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
SLOT="0"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
${LUA_DEPS}
|
||||||
|
jemalloc? ( >=dev-libs/jemalloc-5.1:= )
|
||||||
|
ssl? ( dev-libs/openssl:0= )
|
||||||
|
systemd? ( sys-apps/systemd:= )
|
||||||
|
tcmalloc? ( dev-util/google-perftools )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
acct-group/redis
|
||||||
|
acct-user/redis
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
# Tcl is only needed in the CHOST test env
|
||||||
|
DEPEND="
|
||||||
|
${COMMON_DEPEND}
|
||||||
|
test? (
|
||||||
|
dev-lang/tcl:0=
|
||||||
|
ssl? ( dev-tcltk/tls )
|
||||||
|
)"
|
||||||
|
|
||||||
|
REQUIRED_USE="?? ( jemalloc tcmalloc )
|
||||||
|
${LUA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-6.2.1-config.patch
|
||||||
|
"${FILESDIR}"/${PN}-5.0-shared.patch
|
||||||
|
"${FILESDIR}"/${PN}-6.2.1-sharedlua.patch
|
||||||
|
"${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
|
||||||
|
"${FILESDIR}"/${PN}-sentinel-5.0-config.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# unstable on jemalloc
|
||||||
|
> tests/unit/memefficiency.tcl || die
|
||||||
|
|
||||||
|
# Copy lua modules into build dir
|
||||||
|
cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
|
||||||
|
cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
|
||||||
|
# Append cflag for lua_cjson
|
||||||
|
# https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
|
||||||
|
append-cflags "-DENABLE_CJSON_GLOBAL"
|
||||||
|
|
||||||
|
# now we will rewrite present Makefiles
|
||||||
|
local makefiles="" MKF
|
||||||
|
for MKF in $(find -name 'Makefile' | cut -b 3-); do
|
||||||
|
mv "${MKF}" "${MKF}.in"
|
||||||
|
sed -i -e 's:$(CC):@CC@:g' \
|
||||||
|
-e 's:$(CFLAGS):@AM_CFLAGS@:g' \
|
||||||
|
-e 's: $(DEBUG)::g' \
|
||||||
|
-e 's:$(OBJARCH)::g' \
|
||||||
|
-e 's:ARCH:TARCH:g' \
|
||||||
|
-e '/^CCOPT=/s:$: $(LDFLAGS):g' \
|
||||||
|
"${MKF}.in" \
|
||||||
|
|| die "Sed failed for ${MKF}"
|
||||||
|
makefiles+=" ${MKF}"
|
||||||
|
done
|
||||||
|
# autodetection of compiler and settings; generates the modified Makefiles
|
||||||
|
cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
|
||||||
|
|
||||||
|
# Use the correct pkgconfig name for Lua.
|
||||||
|
# The upstream configure script handles luajit specially, and is not
|
||||||
|
# effected by these changes.
|
||||||
|
sed -i \
|
||||||
|
-e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
|
||||||
|
-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
|
||||||
|
-e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${ELUA},g" \
|
||||||
|
configure.ac || die "Sed failed for configure.ac"
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf $(use_with lua_single_target_luajit luajit)
|
||||||
|
|
||||||
|
# Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
|
||||||
|
# also, don't define ANSI/c99 for lua twice
|
||||||
|
sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local myconf=""
|
||||||
|
|
||||||
|
if use jemalloc; then
|
||||||
|
myconf+="MALLOC=jemalloc"
|
||||||
|
elif use tcmalloc; then
|
||||||
|
myconf+="MALLOC=tcmalloc"
|
||||||
|
else
|
||||||
|
myconf+="MALLOC=libc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use ssl; then
|
||||||
|
myconf+=" BUILD_TLS=yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export USE_SYSTEMD=$(usex systemd)
|
||||||
|
|
||||||
|
tc-export AR CC RANLIB
|
||||||
|
emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Known to fail with FEATURES=usersandbox
|
||||||
|
if has usersandbox ${FEATURES}; then
|
||||||
|
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
|
||||||
|
"Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use ssl; then
|
||||||
|
./utils/gen-test-certs.sh
|
||||||
|
./runtest --tls
|
||||||
|
else
|
||||||
|
./runtest
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto /etc/redis
|
||||||
|
doins redis.conf sentinel.conf
|
||||||
|
use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf
|
||||||
|
fperms 0750 /etc/redis
|
||||||
|
fperms 0644 /etc/redis/{redis,sentinel}.conf
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/redis.confd-r2" redis
|
||||||
|
newinitd "${FILESDIR}/redis.initd-6" redis
|
||||||
|
|
||||||
|
systemd_newunit "${FILESDIR}/redis.service-4" redis.service
|
||||||
|
newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel
|
||||||
|
newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d/
|
||||||
|
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||||
|
|
||||||
|
dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
|
||||||
|
|
||||||
|
dobin src/redis-cli
|
||||||
|
dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
|
||||||
|
fperms 0750 /usr/sbin/redis-benchmark
|
||||||
|
dosym redis-server /usr/sbin/redis-sentinel
|
||||||
|
|
||||||
|
if use prefix; then
|
||||||
|
diropts -m0750
|
||||||
|
else
|
||||||
|
diropts -m0750 -o redis -g redis
|
||||||
|
fi
|
||||||
|
keepdir /var/{log,lib}/redis
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
ewarn "The default redis configuration file location changed to:"
|
||||||
|
ewarn " /etc/redis/{redis,sentinel}.conf"
|
||||||
|
ewarn "Please apply your changes to the new configuration files."
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
DIST sqlcl-20.4.2.35.2359.zip 36343222 BLAKE2B 138b4867a785e3b76dfb0e9eae51bab80d64d5136ed8ecc582e2bb119a8818c7cf442019311221cc02440643acf3ffe8e36658a3b1622e71badd49e2f4e3db7c SHA512 9e3887c7c59d489567a761c9b81c4ed6fced4cc1a23286ae39c956e4280996b12fc6e9ebd69c32fdfe3f0c2755dc087d5e18f99a2175d9de8d474c41ee8a17ed
|
DIST sqlcl-21.1.1.113.1704.zip 36960602 BLAKE2B b44d5679a92dbc74d42da3c00f9e37ec4fe5a9bc1e803bb32cdd3f88d2adaeecee05b8264de2a39ea8ee999b301f0ec3d2e56e5243326fb9bc9b8fc837453c7d SHA512 ae42c2ac9e13d6dbe4a3fc7653fae765a24ef7e80c06a1eb2213b2cd0df92774a7dd39f74b8f04bf188e4b8c5bd11001f5db3b9f5a78f1e5c847ad2df0c6256d
|
||||||
|
Binary file not shown.
@ -0,0 +1,338 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
WANT_LIBTOOL="none"
|
||||||
|
|
||||||
|
inherit autotools flag-o-matic multiprocessing pax-utils \
|
||||||
|
python-utils-r1 toolchain-funcs verify-sig
|
||||||
|
|
||||||
|
MY_P="Python-${PV%_p*}"
|
||||||
|
PYVER=$(ver_cut 1-2)
|
||||||
|
PATCHSET="python-gentoo-patches-${PV}"
|
||||||
|
|
||||||
|
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||||
|
HOMEPAGE="https://www.python.org/"
|
||||||
|
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||||
|
verify-sig? (
|
||||||
|
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
|
||||||
|
)"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
LICENSE="PSF-2"
|
||||||
|
SLOT="${PYVER}/${PYVER}m"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||||
|
IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||||
|
# If you need to apply a patch which requires python for bootstrapping, please
|
||||||
|
# run the bootstrap code on your dev box and include the results in the
|
||||||
|
# patchset. See bug 447752.
|
||||||
|
|
||||||
|
RDEPEND="app-arch/bzip2:=
|
||||||
|
app-arch/xz-utils:=
|
||||||
|
dev-libs/libffi:=
|
||||||
|
>=sys-libs/zlib-1.1.3:=
|
||||||
|
virtual/libcrypt:=
|
||||||
|
virtual/libintl
|
||||||
|
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||||
|
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||||
|
readline? ( >=sys-libs/readline-4.1:= )
|
||||||
|
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||||
|
ssl? ( dev-libs/openssl:= )
|
||||||
|
tk? (
|
||||||
|
>=dev-lang/tcl-8.0:=
|
||||||
|
>=dev-lang/tk-8.0:=
|
||||||
|
dev-tcltk/blt:=
|
||||||
|
dev-tcltk/tix
|
||||||
|
)
|
||||||
|
xml? ( >=dev-libs/expat-2.1:= )"
|
||||||
|
# bluetooth requires headers from bluez
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
verify-sig? ( app-crypt/openpgp-keys-python )
|
||||||
|
!sys-devel/gcc[libffi(-)]"
|
||||||
|
PDEPEND="app-eselect/eselect-python"
|
||||||
|
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||||
|
fi
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||||
|
rm -fr Modules/expat || die
|
||||||
|
rm -fr Modules/_ctypes/libffi* || die
|
||||||
|
rm -fr Modules/zlib || die
|
||||||
|
|
||||||
|
local PATCHES=(
|
||||||
|
"${WORKDIR}/${PATCHSET}"
|
||||||
|
)
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||||
|
Lib/distutils/command/install.py \
|
||||||
|
Lib/distutils/sysconfig.py \
|
||||||
|
Lib/site.py \
|
||||||
|
Lib/sysconfig.py \
|
||||||
|
Lib/test/test_site.py \
|
||||||
|
Makefile.pre.in \
|
||||||
|
Modules/Setup.dist \
|
||||||
|
Modules/getpath.c \
|
||||||
|
configure.ac \
|
||||||
|
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||||
|
|
||||||
|
# force correct number of jobs
|
||||||
|
# https://bugs.gentoo.org/737660
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local disable
|
||||||
|
# disable automagic bluetooth headers detection
|
||||||
|
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||||
|
use gdbm || disable+=" gdbm"
|
||||||
|
use ncurses || disable+=" _curses _curses_panel"
|
||||||
|
use readline || disable+=" readline"
|
||||||
|
use sqlite || disable+=" _sqlite3"
|
||||||
|
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||||
|
use tk || disable+=" _tkinter"
|
||||||
|
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||||
|
export PYTHON_DISABLE_MODULES="${disable}"
|
||||||
|
|
||||||
|
if ! use xml; then
|
||||||
|
ewarn "You have configured Python without XML support."
|
||||||
|
ewarn "This is NOT a recommended configuration as you"
|
||||||
|
ewarn "may face problems parsing any XML documents."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||||
|
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||||
|
append-flags -fwrapv
|
||||||
|
fi
|
||||||
|
|
||||||
|
filter-flags -malign-double
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||||
|
if is-flagq -O3; then
|
||||||
|
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||||
|
use hardened && replace-flags -O3 -O2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||||
|
tc-export CXX
|
||||||
|
|
||||||
|
local dbmliborder
|
||||||
|
if use gdbm; then
|
||||||
|
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local myeconfargs=(
|
||||||
|
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||||
|
# Python on glibc upgrade, remove it proactively to give
|
||||||
|
# a chance for users rebuilding python before glibc
|
||||||
|
ac_cv_header_stropts_h=no
|
||||||
|
|
||||||
|
--with-fpectl
|
||||||
|
--enable-shared
|
||||||
|
$(use_enable ipv6)
|
||||||
|
$(use_with threads)
|
||||||
|
--infodir='${prefix}/share/info'
|
||||||
|
--mandir='${prefix}/share/man'
|
||||||
|
--with-computed-gotos
|
||||||
|
--with-dbmliborder="${dbmliborder}"
|
||||||
|
--with-libc=
|
||||||
|
--enable-loadable-sqlite-extensions
|
||||||
|
--without-ensurepip
|
||||||
|
--with-system-expat
|
||||||
|
--with-system-ffi
|
||||||
|
)
|
||||||
|
|
||||||
|
OPT="" econf "${myeconfargs[@]}"
|
||||||
|
|
||||||
|
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||||
|
eerror "configure has detected that the sem_open function is broken."
|
||||||
|
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||||
|
die "Broken sem_open function (bug 496328)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Ensure sed works as expected
|
||||||
|
# https://bugs.gentoo.org/594768
|
||||||
|
local -x LC_ALL=C
|
||||||
|
|
||||||
|
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||||
|
|
||||||
|
# Work around bug 329499. See also bug 413751 and 457194.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E python
|
||||||
|
else
|
||||||
|
pax-mark m python
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Tests will not work when cross compiling.
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
elog "Disabling tests due to crosscompiling."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip failing tests.
|
||||||
|
local skipped_tests="gdb faulthandler"
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# bug 660358
|
||||||
|
local -x COLUMNS=80
|
||||||
|
local -x PYTHONDONTWRITEBYTECODE=
|
||||||
|
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
|
||||||
|
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
|
||||||
|
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||||
|
local result=$?
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "The following tests have been skipped:"
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
elog "test_${test}.py"
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "If you would like to run them, you may:"
|
||||||
|
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
|
||||||
|
elog "and run the tests separately."
|
||||||
|
|
||||||
|
if [[ ${result} -ne 0 ]]; then
|
||||||
|
die "emake test failed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
|
||||||
|
|
||||||
|
emake DESTDIR="${D}" altinstall
|
||||||
|
|
||||||
|
# Remove static library
|
||||||
|
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||||
|
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||||
|
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||||
|
|
||||||
|
# Fix collisions between different slots of Python.
|
||||||
|
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||||
|
|
||||||
|
# Cheap hack to get version with ABIFLAGS
|
||||||
|
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||||
|
if [[ ${abiver} != python${PYVER} ]]; then
|
||||||
|
# Replace python3.X with a symlink to python3.Xm
|
||||||
|
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||||
|
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||||
|
# Create python3.X-config symlink
|
||||||
|
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||||
|
# Create python-3.5m.pc symlink
|
||||||
|
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# python seems to get rebuilt in src_install (bug 569908)
|
||||||
|
# Work around it for now.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||||
|
else
|
||||||
|
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||||
|
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||||
|
|
||||||
|
use threads || rm -r "${libdir}/multiprocessing" || die
|
||||||
|
use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
|
||||||
|
|
||||||
|
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
docinto examples
|
||||||
|
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||||
|
dodoc -r Tools
|
||||||
|
fi
|
||||||
|
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||||
|
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||||
|
emake --no-print-directory -s -f - 2>/dev/null)
|
||||||
|
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||||
|
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||||
|
sed \
|
||||||
|
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||||
|
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||||
|
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||||
|
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||||
|
|
||||||
|
local -x EPYTHON=python${PYVER}
|
||||||
|
# if not using a cross-compiler, use the fresh binary
|
||||||
|
if ! tc-is-cross-compiler; then
|
||||||
|
local -x PYTHON=./python
|
||||||
|
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||||
|
else
|
||||||
|
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||||
|
python_domodule epython.py
|
||||||
|
|
||||||
|
# python-exec wrapping support
|
||||||
|
local pymajor=${PYVER%.*}
|
||||||
|
local scriptdir=${D}$(python_get_scriptdir)
|
||||||
|
mkdir -p "${scriptdir}" || die
|
||||||
|
# python and pythonX
|
||||||
|
ln -s "../../../bin/${abiver}" \
|
||||||
|
"${scriptdir}/python${pymajor}" || die
|
||||||
|
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||||
|
# python-config and pythonX-config
|
||||||
|
# note: we need to create a wrapper rather than symlinking it due
|
||||||
|
# to some random dirname(argv[0]) magic performed by python-config
|
||||||
|
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||||
|
#!/bin/sh
|
||||||
|
exec "${abiver}-config" "\${@}"
|
||||||
|
EOF
|
||||||
|
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||||
|
ln -s "python${pymajor}-config" \
|
||||||
|
"${scriptdir}/python-config" || die
|
||||||
|
# 2to3, pydoc, pyvenv
|
||||||
|
ln -s "../../../bin/2to3-${PYVER}" \
|
||||||
|
"${scriptdir}/2to3" || die
|
||||||
|
ln -s "../../../bin/pydoc${PYVER}" \
|
||||||
|
"${scriptdir}/pydoc" || die
|
||||||
|
ln -s "../../../bin/pyvenv-${PYVER}" \
|
||||||
|
"${scriptdir}/pyvenv" || die
|
||||||
|
# idle
|
||||||
|
if use tk; then
|
||||||
|
ln -s "../../../bin/idle${PYVER}" \
|
||||||
|
"${scriptdir}/idle" || die
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,330 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
WANT_LIBTOOL="none"
|
||||||
|
|
||||||
|
inherit autotools flag-o-matic multiprocessing pax-utils \
|
||||||
|
python-utils-r1 toolchain-funcs verify-sig
|
||||||
|
|
||||||
|
MY_P="Python-${PV%_p*}"
|
||||||
|
PYVER=$(ver_cut 1-2)
|
||||||
|
PATCHSET="python-gentoo-patches-${PV}"
|
||||||
|
|
||||||
|
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||||
|
HOMEPAGE="https://www.python.org/"
|
||||||
|
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||||
|
verify-sig? (
|
||||||
|
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
|
||||||
|
)"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
LICENSE="PSF-2"
|
||||||
|
SLOT="${PYVER}/${PYVER}m"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
|
IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||||
|
# If you need to apply a patch which requires python for bootstrapping, please
|
||||||
|
# run the bootstrap code on your dev box and include the results in the
|
||||||
|
# patchset. See bug 447752.
|
||||||
|
|
||||||
|
RDEPEND="app-arch/bzip2:=
|
||||||
|
app-arch/xz-utils:=
|
||||||
|
dev-libs/libffi:=
|
||||||
|
sys-apps/util-linux:=
|
||||||
|
>=sys-libs/zlib-1.1.3:=
|
||||||
|
virtual/libcrypt:=
|
||||||
|
virtual/libintl
|
||||||
|
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||||
|
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||||
|
readline? ( >=sys-libs/readline-4.1:= )
|
||||||
|
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||||
|
ssl? ( dev-libs/openssl:= )
|
||||||
|
tk? (
|
||||||
|
>=dev-lang/tcl-8.0:=
|
||||||
|
>=dev-lang/tk-8.0:=
|
||||||
|
dev-tcltk/blt:=
|
||||||
|
dev-tcltk/tix
|
||||||
|
)
|
||||||
|
xml? ( >=dev-libs/expat-2.1:= )"
|
||||||
|
# bluetooth requires headers from bluez
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
verify-sig? ( app-crypt/openpgp-keys-python )
|
||||||
|
!sys-devel/gcc[libffi(-)]"
|
||||||
|
PDEPEND="app-eselect/eselect-python"
|
||||||
|
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||||
|
fi
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||||
|
rm -fr Modules/expat || die
|
||||||
|
rm -fr Modules/_ctypes/libffi* || die
|
||||||
|
rm -fr Modules/zlib || die
|
||||||
|
|
||||||
|
local PATCHES=(
|
||||||
|
"${WORKDIR}/${PATCHSET}"
|
||||||
|
)
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||||
|
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||||
|
|
||||||
|
# force correct number of jobs
|
||||||
|
# https://bugs.gentoo.org/737660
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local disable
|
||||||
|
# disable automagic bluetooth headers detection
|
||||||
|
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||||
|
use gdbm || disable+=" gdbm"
|
||||||
|
use ncurses || disable+=" _curses _curses_panel"
|
||||||
|
use readline || disable+=" readline"
|
||||||
|
use sqlite || disable+=" _sqlite3"
|
||||||
|
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||||
|
use tk || disable+=" _tkinter"
|
||||||
|
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||||
|
export PYTHON_DISABLE_MODULES="${disable}"
|
||||||
|
|
||||||
|
if ! use xml; then
|
||||||
|
ewarn "You have configured Python without XML support."
|
||||||
|
ewarn "This is NOT a recommended configuration as you"
|
||||||
|
ewarn "may face problems parsing any XML documents."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||||
|
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||||
|
append-flags -fwrapv
|
||||||
|
fi
|
||||||
|
|
||||||
|
filter-flags -malign-double
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||||
|
if is-flagq -O3; then
|
||||||
|
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||||
|
use hardened && replace-flags -O3 -O2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||||
|
tc-export CXX
|
||||||
|
|
||||||
|
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||||
|
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||||
|
|
||||||
|
local dbmliborder
|
||||||
|
if use gdbm; then
|
||||||
|
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local myeconfargs=(
|
||||||
|
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||||
|
# Python on glibc upgrade, remove it proactively to give
|
||||||
|
# a chance for users rebuilding python before glibc
|
||||||
|
ac_cv_header_stropts_h=no
|
||||||
|
|
||||||
|
--enable-shared
|
||||||
|
$(use_enable ipv6)
|
||||||
|
--infodir='${prefix}/share/info'
|
||||||
|
--mandir='${prefix}/share/man'
|
||||||
|
--with-computed-gotos
|
||||||
|
--with-dbmliborder="${dbmliborder}"
|
||||||
|
--with-libc=
|
||||||
|
--enable-loadable-sqlite-extensions
|
||||||
|
--without-ensurepip
|
||||||
|
--with-system-expat
|
||||||
|
--with-system-ffi
|
||||||
|
)
|
||||||
|
|
||||||
|
OPT="" econf "${myeconfargs[@]}"
|
||||||
|
|
||||||
|
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||||
|
eerror "configure has detected that the sem_open function is broken."
|
||||||
|
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||||
|
die "Broken sem_open function (bug 496328)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Ensure sed works as expected
|
||||||
|
# https://bugs.gentoo.org/594768
|
||||||
|
local -x LC_ALL=C
|
||||||
|
|
||||||
|
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||||
|
|
||||||
|
# Work around bug 329499. See also bug 413751 and 457194.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E python
|
||||||
|
else
|
||||||
|
pax-mark m python
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Tests will not work when cross compiling.
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
elog "Disabling tests due to crosscompiling."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip failing tests.
|
||||||
|
local skipped_tests="gdb"
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# bug 660358
|
||||||
|
local -x COLUMNS=80
|
||||||
|
local -x PYTHONDONTWRITEBYTECODE=
|
||||||
|
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
|
||||||
|
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
|
||||||
|
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||||
|
local result=$?
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "The following tests have been skipped:"
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
elog "test_${test}.py"
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "If you would like to run them, you may:"
|
||||||
|
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
|
||||||
|
elog "and run the tests separately."
|
||||||
|
|
||||||
|
if [[ ${result} -ne 0 ]]; then
|
||||||
|
die "emake test failed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local libdir=${ED}/usr/lib/python${PYVER}
|
||||||
|
|
||||||
|
emake DESTDIR="${D}" altinstall
|
||||||
|
|
||||||
|
# Remove static library
|
||||||
|
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||||
|
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||||
|
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||||
|
|
||||||
|
# Fix collisions between different slots of Python.
|
||||||
|
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||||
|
|
||||||
|
# Cheap hack to get version with ABIFLAGS
|
||||||
|
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||||
|
if [[ ${abiver} != python${PYVER} ]]; then
|
||||||
|
# Replace python3.X with a symlink to python3.Xm
|
||||||
|
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||||
|
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||||
|
# Create python3.X-config symlink
|
||||||
|
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||||
|
# Create python-3.5m.pc symlink
|
||||||
|
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# python seems to get rebuilt in src_install (bug 569908)
|
||||||
|
# Work around it for now.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||||
|
else
|
||||||
|
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||||
|
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||||
|
|
||||||
|
use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
|
||||||
|
|
||||||
|
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
docinto examples
|
||||||
|
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||||
|
dodoc -r Tools
|
||||||
|
fi
|
||||||
|
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||||
|
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||||
|
emake --no-print-directory -s -f - 2>/dev/null)
|
||||||
|
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||||
|
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||||
|
sed \
|
||||||
|
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||||
|
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||||
|
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||||
|
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||||
|
|
||||||
|
local -x EPYTHON=python${PYVER}
|
||||||
|
# if not using a cross-compiler, use the fresh binary
|
||||||
|
if ! tc-is-cross-compiler; then
|
||||||
|
local -x PYTHON=./python
|
||||||
|
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||||
|
else
|
||||||
|
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||||
|
python_domodule epython.py
|
||||||
|
|
||||||
|
# python-exec wrapping support
|
||||||
|
local pymajor=${PYVER%.*}
|
||||||
|
local scriptdir=${D}$(python_get_scriptdir)
|
||||||
|
mkdir -p "${scriptdir}" || die
|
||||||
|
# python and pythonX
|
||||||
|
ln -s "../../../bin/${abiver}" \
|
||||||
|
"${scriptdir}/python${pymajor}" || die
|
||||||
|
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||||
|
# python-config and pythonX-config
|
||||||
|
# note: we need to create a wrapper rather than symlinking it due
|
||||||
|
# to some random dirname(argv[0]) magic performed by python-config
|
||||||
|
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||||
|
#!/bin/sh
|
||||||
|
exec "${abiver}-config" "\${@}"
|
||||||
|
EOF
|
||||||
|
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||||
|
ln -s "python${pymajor}-config" \
|
||||||
|
"${scriptdir}/python-config" || die
|
||||||
|
# 2to3, pydoc, pyvenv
|
||||||
|
ln -s "../../../bin/2to3-${PYVER}" \
|
||||||
|
"${scriptdir}/2to3" || die
|
||||||
|
ln -s "../../../bin/pydoc${PYVER}" \
|
||||||
|
"${scriptdir}/pydoc" || die
|
||||||
|
ln -s "../../../bin/pyvenv-${PYVER}" \
|
||||||
|
"${scriptdir}/pyvenv" || die
|
||||||
|
# idle
|
||||||
|
if use tk; then
|
||||||
|
ln -s "../../../bin/idle${PYVER}" \
|
||||||
|
"${scriptdir}/idle" || die
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,336 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
WANT_LIBTOOL="none"
|
||||||
|
|
||||||
|
inherit autotools flag-o-matic multiprocessing pax-utils \
|
||||||
|
python-utils-r1 toolchain-funcs verify-sig
|
||||||
|
|
||||||
|
MY_PV=${PV/_rc/rc}
|
||||||
|
MY_P="Python-${MY_PV%_p*}"
|
||||||
|
PYVER=$(ver_cut 1-2)
|
||||||
|
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||||
|
|
||||||
|
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||||
|
HOMEPAGE="https://www.python.org/"
|
||||||
|
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||||
|
verify-sig? (
|
||||||
|
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
|
||||||
|
)"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
LICENSE="PSF-2"
|
||||||
|
SLOT="${PYVER}"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
|
IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||||
|
# If you need to apply a patch which requires python for bootstrapping, please
|
||||||
|
# run the bootstrap code on your dev box and include the results in the
|
||||||
|
# patchset. See bug 447752.
|
||||||
|
|
||||||
|
RDEPEND="app-arch/bzip2:=
|
||||||
|
app-arch/xz-utils:=
|
||||||
|
dev-libs/libffi:=
|
||||||
|
sys-apps/util-linux:=
|
||||||
|
>=sys-libs/zlib-1.1.3:=
|
||||||
|
virtual/libcrypt:=
|
||||||
|
virtual/libintl
|
||||||
|
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||||
|
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||||
|
readline? ( >=sys-libs/readline-4.1:= )
|
||||||
|
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||||
|
ssl? ( dev-libs/openssl:= )
|
||||||
|
tk? (
|
||||||
|
>=dev-lang/tcl-8.0:=
|
||||||
|
>=dev-lang/tk-8.0:=
|
||||||
|
dev-tcltk/blt:=
|
||||||
|
dev-tcltk/tix
|
||||||
|
)
|
||||||
|
xml? ( >=dev-libs/expat-2.1:= )"
|
||||||
|
# bluetooth requires headers from bluez
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
sys-devel/autoconf-archive
|
||||||
|
verify-sig? ( app-crypt/openpgp-keys-python )
|
||||||
|
!sys-devel/gcc[libffi(-)]"
|
||||||
|
PDEPEND="app-eselect/eselect-python"
|
||||||
|
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||||
|
fi
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||||
|
rm -fr Modules/expat || die
|
||||||
|
rm -fr Modules/_ctypes/libffi* || die
|
||||||
|
rm -fr Modules/zlib || die
|
||||||
|
|
||||||
|
local PATCHES=(
|
||||||
|
"${WORKDIR}/${PATCHSET}"
|
||||||
|
)
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||||
|
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||||
|
|
||||||
|
# force correct number of jobs
|
||||||
|
# https://bugs.gentoo.org/737660
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
|
||||||
|
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local disable
|
||||||
|
# disable automagic bluetooth headers detection
|
||||||
|
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||||
|
use gdbm || disable+=" gdbm"
|
||||||
|
use ncurses || disable+=" _curses _curses_panel"
|
||||||
|
use readline || disable+=" readline"
|
||||||
|
use sqlite || disable+=" _sqlite3"
|
||||||
|
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||||
|
use tk || disable+=" _tkinter"
|
||||||
|
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||||
|
export PYTHON_DISABLE_MODULES="${disable}"
|
||||||
|
|
||||||
|
if ! use xml; then
|
||||||
|
ewarn "You have configured Python without XML support."
|
||||||
|
ewarn "This is NOT a recommended configuration as you"
|
||||||
|
ewarn "may face problems parsing any XML documents."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||||
|
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||||
|
append-flags -fwrapv
|
||||||
|
fi
|
||||||
|
|
||||||
|
filter-flags -malign-double
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||||
|
if is-flagq -O3; then
|
||||||
|
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||||
|
use hardened && replace-flags -O3 -O2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/700012
|
||||||
|
if is-flagq -flto || is-flagq '-flto=*'; then
|
||||||
|
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||||
|
tc-export CXX
|
||||||
|
|
||||||
|
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||||
|
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||||
|
|
||||||
|
local dbmliborder
|
||||||
|
if use gdbm; then
|
||||||
|
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local myeconfargs=(
|
||||||
|
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||||
|
# Python on glibc upgrade, remove it proactively to give
|
||||||
|
# a chance for users rebuilding python before glibc
|
||||||
|
ac_cv_header_stropts_h=no
|
||||||
|
|
||||||
|
--enable-shared
|
||||||
|
$(use_enable ipv6)
|
||||||
|
--infodir='${prefix}/share/info'
|
||||||
|
--mandir='${prefix}/share/man'
|
||||||
|
--with-computed-gotos
|
||||||
|
--with-dbmliborder="${dbmliborder}"
|
||||||
|
--with-libc=
|
||||||
|
--enable-loadable-sqlite-extensions
|
||||||
|
--without-ensurepip
|
||||||
|
--with-system-expat
|
||||||
|
--with-system-ffi
|
||||||
|
)
|
||||||
|
|
||||||
|
OPT="" econf "${myeconfargs[@]}"
|
||||||
|
|
||||||
|
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||||
|
eerror "configure has detected that the sem_open function is broken."
|
||||||
|
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||||
|
die "Broken sem_open function (bug 496328)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Ensure sed works as expected
|
||||||
|
# https://bugs.gentoo.org/594768
|
||||||
|
local -x LC_ALL=C
|
||||||
|
|
||||||
|
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||||
|
|
||||||
|
# Work around bug 329499. See also bug 413751 and 457194.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E python
|
||||||
|
else
|
||||||
|
pax-mark m python
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Tests will not work when cross compiling.
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
elog "Disabling tests due to crosscompiling."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip failing tests.
|
||||||
|
local skipped_tests="gdb"
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# bug 660358
|
||||||
|
local -x COLUMNS=80
|
||||||
|
local -x PYTHONDONTWRITEBYTECODE=
|
||||||
|
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
|
||||||
|
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
|
||||||
|
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||||
|
local result=$?
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "The following tests have been skipped:"
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
elog "test_${test}.py"
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "If you would like to run them, you may:"
|
||||||
|
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
|
||||||
|
elog "and run the tests separately."
|
||||||
|
|
||||||
|
if [[ ${result} -ne 0 ]]; then
|
||||||
|
die "emake test failed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local libdir=${ED}/usr/lib/python${PYVER}
|
||||||
|
|
||||||
|
emake DESTDIR="${D}" altinstall
|
||||||
|
|
||||||
|
# Remove static library
|
||||||
|
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||||
|
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||||
|
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||||
|
|
||||||
|
# Fix collisions between different slots of Python.
|
||||||
|
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||||
|
|
||||||
|
# Cheap hack to get version with ABIFLAGS
|
||||||
|
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||||
|
if [[ ${abiver} != python${PYVER} ]]; then
|
||||||
|
# Replace python3.X with a symlink to python3.Xm
|
||||||
|
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||||
|
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||||
|
# Create python3.X-config symlink
|
||||||
|
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||||
|
# Create python-3.5m.pc symlink
|
||||||
|
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# python seems to get rebuilt in src_install (bug 569908)
|
||||||
|
# Work around it for now.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||||
|
else
|
||||||
|
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||||
|
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||||
|
|
||||||
|
use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
|
||||||
|
|
||||||
|
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
docinto examples
|
||||||
|
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||||
|
dodoc -r Tools
|
||||||
|
fi
|
||||||
|
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||||
|
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||||
|
emake --no-print-directory -s -f - 2>/dev/null)
|
||||||
|
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||||
|
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||||
|
sed \
|
||||||
|
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||||
|
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||||
|
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||||
|
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||||
|
|
||||||
|
local -x EPYTHON=python${PYVER}
|
||||||
|
# if not using a cross-compiler, use the fresh binary
|
||||||
|
if ! tc-is-cross-compiler; then
|
||||||
|
local -x PYTHON=./python
|
||||||
|
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||||
|
else
|
||||||
|
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||||
|
python_domodule epython.py
|
||||||
|
|
||||||
|
# python-exec wrapping support
|
||||||
|
local pymajor=${PYVER%.*}
|
||||||
|
local scriptdir=${D}$(python_get_scriptdir)
|
||||||
|
mkdir -p "${scriptdir}" || die
|
||||||
|
# python and pythonX
|
||||||
|
ln -s "../../../bin/${abiver}" \
|
||||||
|
"${scriptdir}/python${pymajor}" || die
|
||||||
|
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||||
|
# python-config and pythonX-config
|
||||||
|
# note: we need to create a wrapper rather than symlinking it due
|
||||||
|
# to some random dirname(argv[0]) magic performed by python-config
|
||||||
|
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||||
|
#!/bin/sh
|
||||||
|
exec "${abiver}-config" "\${@}"
|
||||||
|
EOF
|
||||||
|
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||||
|
ln -s "python${pymajor}-config" \
|
||||||
|
"${scriptdir}/python-config" || die
|
||||||
|
# 2to3, pydoc
|
||||||
|
ln -s "../../../bin/2to3-${PYVER}" \
|
||||||
|
"${scriptdir}/2to3" || die
|
||||||
|
ln -s "../../../bin/pydoc${PYVER}" \
|
||||||
|
"${scriptdir}/pydoc" || die
|
||||||
|
# idle
|
||||||
|
if use tk; then
|
||||||
|
ln -s "../../../bin/idle${PYVER}" \
|
||||||
|
"${scriptdir}/idle" || die
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,345 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
WANT_LIBTOOL="none"
|
||||||
|
|
||||||
|
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
|
||||||
|
python-utils-r1 toolchain-funcs verify-sig
|
||||||
|
|
||||||
|
MY_PV=${PV/_rc/rc}
|
||||||
|
MY_P="Python-${MY_PV%_p*}"
|
||||||
|
PYVER=$(ver_cut 1-2)
|
||||||
|
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||||
|
|
||||||
|
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||||
|
HOMEPAGE="https://www.python.org/"
|
||||||
|
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
|
||||||
|
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||||
|
verify-sig? (
|
||||||
|
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
|
||||||
|
)"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
LICENSE="PSF-2"
|
||||||
|
SLOT="${PYVER}"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
|
IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||||
|
# If you need to apply a patch which requires python for bootstrapping, please
|
||||||
|
# run the bootstrap code on your dev box and include the results in the
|
||||||
|
# patchset. See bug 447752.
|
||||||
|
|
||||||
|
RDEPEND="app-arch/bzip2:=
|
||||||
|
app-arch/xz-utils:=
|
||||||
|
dev-libs/libffi:=
|
||||||
|
sys-apps/util-linux:=
|
||||||
|
>=sys-libs/zlib-1.1.3:=
|
||||||
|
virtual/libcrypt:=
|
||||||
|
virtual/libintl
|
||||||
|
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||||
|
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||||
|
readline? ( >=sys-libs/readline-4.1:= )
|
||||||
|
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||||
|
ssl? ( dev-libs/openssl:= )
|
||||||
|
tk? (
|
||||||
|
>=dev-lang/tcl-8.0:=
|
||||||
|
>=dev-lang/tk-8.0:=
|
||||||
|
dev-tcltk/blt:=
|
||||||
|
dev-tcltk/tix
|
||||||
|
)
|
||||||
|
xml? ( >=dev-libs/expat-2.1:= )"
|
||||||
|
# bluetooth requires headers from bluez
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
bluetooth? ( net-wireless/bluez )
|
||||||
|
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
sys-devel/autoconf-archive
|
||||||
|
verify-sig? ( app-crypt/openpgp-keys-python )
|
||||||
|
!sys-devel/gcc[libffi(-)]"
|
||||||
|
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||||
|
PDEPEND="app-eselect/eselect-python"
|
||||||
|
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
|
||||||
|
|
||||||
|
# large file tests involve a 2.5G file being copied (duplicated)
|
||||||
|
CHECKREQS_DISK_BUILD=5500M
|
||||||
|
|
||||||
|
pkg_pretend() {
|
||||||
|
use test && check-reqs_pkg_pretend
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
use test && check-reqs_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use verify-sig; then
|
||||||
|
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||||
|
fi
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||||
|
rm -fr Modules/expat || die
|
||||||
|
rm -fr Modules/_ctypes/libffi* || die
|
||||||
|
rm -fr Modules/zlib || die
|
||||||
|
|
||||||
|
local PATCHES=(
|
||||||
|
"${WORKDIR}/${PATCHSET}"
|
||||||
|
)
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||||
|
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||||
|
|
||||||
|
# force correct number of jobs
|
||||||
|
# https://bugs.gentoo.org/737660
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
|
||||||
|
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local disable
|
||||||
|
# disable automagic bluetooth headers detection
|
||||||
|
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||||
|
use gdbm || disable+=" gdbm"
|
||||||
|
use ncurses || disable+=" _curses _curses_panel"
|
||||||
|
use readline || disable+=" readline"
|
||||||
|
use sqlite || disable+=" _sqlite3"
|
||||||
|
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||||
|
use tk || disable+=" _tkinter"
|
||||||
|
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||||
|
export PYTHON_DISABLE_MODULES="${disable}"
|
||||||
|
|
||||||
|
if ! use xml; then
|
||||||
|
ewarn "You have configured Python without XML support."
|
||||||
|
ewarn "This is NOT a recommended configuration as you"
|
||||||
|
ewarn "may face problems parsing any XML documents."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||||
|
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||||
|
append-flags -fwrapv
|
||||||
|
fi
|
||||||
|
|
||||||
|
filter-flags -malign-double
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||||
|
if is-flagq -O3; then
|
||||||
|
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||||
|
use hardened && replace-flags -O3 -O2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# https://bugs.gentoo.org/700012
|
||||||
|
if is-flagq -flto || is-flagq '-flto=*'; then
|
||||||
|
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||||
|
tc-export CXX
|
||||||
|
|
||||||
|
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||||
|
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||||
|
|
||||||
|
local dbmliborder
|
||||||
|
if use gdbm; then
|
||||||
|
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local myeconfargs=(
|
||||||
|
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||||
|
# Python on glibc upgrade, remove it proactively to give
|
||||||
|
# a chance for users rebuilding python before glibc
|
||||||
|
ac_cv_header_stropts_h=no
|
||||||
|
|
||||||
|
--enable-shared
|
||||||
|
$(use_enable ipv6)
|
||||||
|
--infodir='${prefix}/share/info'
|
||||||
|
--mandir='${prefix}/share/man'
|
||||||
|
--with-computed-gotos
|
||||||
|
--with-dbmliborder="${dbmliborder}"
|
||||||
|
--with-libc=
|
||||||
|
--enable-loadable-sqlite-extensions
|
||||||
|
--without-ensurepip
|
||||||
|
--with-system-expat
|
||||||
|
--with-system-ffi
|
||||||
|
)
|
||||||
|
|
||||||
|
OPT="" econf "${myeconfargs[@]}"
|
||||||
|
|
||||||
|
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||||
|
eerror "configure has detected that the sem_open function is broken."
|
||||||
|
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||||
|
die "Broken sem_open function (bug 496328)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Ensure sed works as expected
|
||||||
|
# https://bugs.gentoo.org/594768
|
||||||
|
local -x LC_ALL=C
|
||||||
|
|
||||||
|
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||||
|
|
||||||
|
# Work around bug 329499. See also bug 413751 and 457194.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E python
|
||||||
|
else
|
||||||
|
pax-mark m python
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
# Tests will not work when cross compiling.
|
||||||
|
if tc-is-cross-compiler; then
|
||||||
|
elog "Disabling tests due to crosscompiling."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Skip failing tests.
|
||||||
|
local skipped_tests="gdb"
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# bug 660358
|
||||||
|
local -x COLUMNS=80
|
||||||
|
local -x PYTHONDONTWRITEBYTECODE=
|
||||||
|
|
||||||
|
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||||
|
|
||||||
|
emake test EXTRATESTOPTS="-u-network -j${jobs}" \
|
||||||
|
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||||
|
local result=$?
|
||||||
|
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "The following tests have been skipped:"
|
||||||
|
for test in ${skipped_tests}; do
|
||||||
|
elog "test_${test}.py"
|
||||||
|
done
|
||||||
|
|
||||||
|
elog "If you would like to run them, you may:"
|
||||||
|
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
|
||||||
|
elog "and run the tests separately."
|
||||||
|
|
||||||
|
if [[ ${result} -ne 0 ]]; then
|
||||||
|
die "emake test failed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local libdir=${ED}/usr/lib/python${PYVER}
|
||||||
|
|
||||||
|
emake DESTDIR="${D}" altinstall
|
||||||
|
|
||||||
|
# Remove static library
|
||||||
|
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||||
|
|
||||||
|
sed \
|
||||||
|
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||||
|
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||||
|
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||||
|
|
||||||
|
# Fix collisions between different slots of Python.
|
||||||
|
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||||
|
|
||||||
|
# Cheap hack to get version with ABIFLAGS
|
||||||
|
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||||
|
if [[ ${abiver} != python${PYVER} ]]; then
|
||||||
|
# Replace python3.X with a symlink to python3.Xm
|
||||||
|
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||||
|
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||||
|
# Create python3.X-config symlink
|
||||||
|
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||||
|
# Create python-3.5m.pc symlink
|
||||||
|
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# python seems to get rebuilt in src_install (bug 569908)
|
||||||
|
# Work around it for now.
|
||||||
|
if has_version dev-libs/libffi[pax_kernel]; then
|
||||||
|
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||||
|
else
|
||||||
|
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||||
|
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||||
|
|
||||||
|
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||||
|
|
||||||
|
if use examples; then
|
||||||
|
docinto examples
|
||||||
|
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||||
|
dodoc -r Tools
|
||||||
|
fi
|
||||||
|
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||||
|
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||||
|
emake --no-print-directory -s -f - 2>/dev/null)
|
||||||
|
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||||
|
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||||
|
sed \
|
||||||
|
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||||
|
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||||
|
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||||
|
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||||
|
|
||||||
|
local -x EPYTHON=python${PYVER}
|
||||||
|
# if not using a cross-compiler, use the fresh binary
|
||||||
|
if ! tc-is-cross-compiler; then
|
||||||
|
local -x PYTHON=./python
|
||||||
|
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||||
|
else
|
||||||
|
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||||
|
python_domodule epython.py
|
||||||
|
|
||||||
|
# python-exec wrapping support
|
||||||
|
local pymajor=${PYVER%.*}
|
||||||
|
local scriptdir=${D}$(python_get_scriptdir)
|
||||||
|
mkdir -p "${scriptdir}" || die
|
||||||
|
# python and pythonX
|
||||||
|
ln -s "../../../bin/${abiver}" \
|
||||||
|
"${scriptdir}/python${pymajor}" || die
|
||||||
|
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||||
|
# python-config and pythonX-config
|
||||||
|
# note: we need to create a wrapper rather than symlinking it due
|
||||||
|
# to some random dirname(argv[0]) magic performed by python-config
|
||||||
|
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||||
|
#!/bin/sh
|
||||||
|
exec "${abiver}-config" "\${@}"
|
||||||
|
EOF
|
||||||
|
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||||
|
ln -s "python${pymajor}-config" \
|
||||||
|
"${scriptdir}/python-config" || die
|
||||||
|
# 2to3, pydoc
|
||||||
|
ln -s "../../../bin/2to3-${PYVER}" \
|
||||||
|
"${scriptdir}/2to3" || die
|
||||||
|
ln -s "../../../bin/pydoc${PYVER}" \
|
||||||
|
"${scriptdir}/pydoc" || die
|
||||||
|
# idle
|
||||||
|
if use tk; then
|
||||||
|
ln -s "../../../bin/idle${PYVER}" \
|
||||||
|
"${scriptdir}/idle" || die
|
||||||
|
fi
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/include/criterion/internal/assert/ieee.h b/include/criterion/internal/assert/ieee.h
|
||||||
|
index 3b6de3b..2063d87 100644
|
||||||
|
--- a/include/criterion/internal/assert/ieee.h
|
||||||
|
+++ b/include/criterion/internal/assert/ieee.h
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
# include <cmath>
|
||||||
|
+# include <limits>
|
||||||
|
|
||||||
|
namespace criterion { namespace internal { namespace operators {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue