parent
153a4076fe
commit
cdfa3e1438
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST catatonit-0.1.7.tar.gz 21720 BLAKE2B ab73198e55dd06d3d0af04e6eff17a2f1e70ab1c0f9ec35f68f9afe71ce8cd1bdc3320e9728a6d8036c2251fe95028e1aad0838d1c9f51e4cc70e482a1109c24 SHA512 7d3174c60e1c8bd1f4b95b7751ccbe01cac63265060f18914b53311f68f7b4c63c693604f348ccfac5db4a96939169f835fbbbd614803b18062053d94f7dca67
|
@ -0,0 +1,23 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="A container init that is so simple it's effectively brain-dead"
|
||||
HOMEPAGE="https://github.com/openSUSE/catatonit"
|
||||
SRC_URI="https://github.com/openSUSE/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64"
|
||||
|
||||
src_configure() {
|
||||
./autogen.sh || die
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodir /usr/libexec/podman
|
||||
ln "${ED}/usr/"{bin,libexec/podman}/catatonit || die
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>zmedico@gentoo.org</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">openSUSE/catatonit</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit go-module systemd tmpfiles
|
||||
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
DESCRIPTION="An etcd backed network fabric for containers"
|
||||
HOMEPAGE="https://github.com/flannel-io/flannel"
|
||||
SRC_URI="https://github.com/flannel-io/flannel/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 BSD ISC LGPL-3 MIT"
|
||||
SLOT="0"
|
||||
IUSE="hardened"
|
||||
|
||||
RESTRICT+=" test"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -e "s:^var Version =.*:var Version = \"${PV}\":" \
|
||||
-i "${S}/version/version.go" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')"\
|
||||
go build -o dist/flanneld -ldflags "
|
||||
-X github.com/flannel-io/flannel/version.Version=v${PV}
|
||||
-extldflags \"-static\"" . || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
GOPATH="${WORKDIR}/${P}" \
|
||||
go test -v -work -x "${EGO_PN}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin dist/${PN}d
|
||||
exeinto /usr/libexec/flannel
|
||||
doexe dist/mk-docker-opts.sh
|
||||
insinto /etc/systemd/system/docker.service.d
|
||||
newins "${FILESDIR}/flannel-docker.conf" flannel.conf
|
||||
newinitd "${FILESDIR}"/flanneld.initd flanneld
|
||||
newconfd "${FILESDIR}"/flanneld.confd flanneld
|
||||
keepdir /var/log/${PN}
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/flanneld.logrotated flanneld
|
||||
newtmpfiles "${FILESDIR}/flannel.tmpfilesd" flannel.conf
|
||||
systemd_dounit "${FILESDIR}/flanneld.service"
|
||||
dodoc README.md
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process flannel.conf
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST podman-3.4.4.tar.gz 10945990 BLAKE2B 3de69c9bc3bd1334837d21cb2817a9e9757fbb561a0b047658c7401608ecf1fbe09d5cd0c65497a82150a67a3775c77705d0dbd314a54f7b3a1953733cfb2906 SHA512 cfd295bf50ce86ea70741c3e663b409ed47b1e560c962bc579f319151a0fe2b24cdd3045667660083cce89449a9c5de1508c94a9a02375165a72ce7c16166666
|
||||
DIST podman-4.0.0.tar.gz 11379640 BLAKE2B 2d68b95206ef59873c2a5c434aa3901c33a3526f840805ab42ac4dad4ed5861824a6b2142d02b500e087d56f4da3255c2b156af4d835a6427c2ebfae34278a75 SHA512 2e25f303d143bc4e265f0f8998ea1c4af3d6da8b35452cf6b27a4eb204805a9b5f75f4b6430921b42c80b76a6b5c9cf35a732c265727a11261fca25cc96f57e7
|
||||
DIST podman-4.0.1.tar.gz 11379467 BLAKE2B dc9785c6ff85ba2f2279b7b8fb820f402fa347c4af70e3c3a6119a7a79f19f1dc4e2048c0682f7751e701005e2966e806537630f6efd69d336bce560ad5053a4 SHA512 b333c91f1c04ef084df05dc6f31717e89078a3e5c6b620c403c29e4a3c9db30bbd15537334a645206d85bfb9679b1f4748c46936d9ca21c1f77066e8cf0f25c8
|
||||
DIST podman-4.0.2.tar.gz 11377152 BLAKE2B ab022c3e7ef40685301f08b2d939e936b07e08231d5b86a84fefa6ea7a60c8f20a5e15b79788d862c263336204a9cd8d7206748b4530f2f42ccdd31df370747f SHA512 f3c42b3b3c75ca451b4c22c2d6f9f1b9ab9437b118b16e19f17f92f28b5849f8e3de4ebc97d8d249f565a61ba187214928c25a031204163a59174e94ce300a59
|
||||
|
@ -0,0 +1,162 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EGIT_COMMIT="342c8259381b63296e96ad29519bd4b9c7afbf97"
|
||||
|
||||
inherit bash-completion-r1 flag-o-matic go-module tmpfiles
|
||||
|
||||
DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
|
||||
HOMEPAGE="https://github.com/containers/podman/"
|
||||
MY_PN=podman
|
||||
MY_P=${MY_PN}-${PV}
|
||||
SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64"
|
||||
IUSE="apparmor btrfs +fuse +init +rootless selinux"
|
||||
RESTRICT+=" test"
|
||||
|
||||
COMMON_DEPEND="
|
||||
app-crypt/gpgme:=
|
||||
>=app-containers/conmon-2.0.0
|
||||
|| ( >=app-containers/runc-1.0.0_rc6 app-containers/crun )
|
||||
dev-libs/libassuan:=
|
||||
dev-libs/libgpg-error:=
|
||||
>=net-misc/cni-plugins-0.8.6
|
||||
sys-fs/lvm2
|
||||
sys-libs/libseccomp:=
|
||||
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
btrfs? ( sys-fs/btrfs-progs )
|
||||
init? ( app-containers/catatonit )
|
||||
rootless? ( app-containers/slirp4netns )
|
||||
selinux? ( sys-libs/libselinux:= )
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
dev-go/go-md2man"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
fuse? ( sys-fs/fuse-overlayfs )"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Disable installation of python modules here, since those are
|
||||
# installed by separate ebuilds.
|
||||
local makefile_sed_args=(
|
||||
-e '/^GIT_.*/d'
|
||||
-e 's/$(GO) build/$(GO) build -v -work -x/'
|
||||
-e 's/^\(install:.*\) install\.python$/\1/'
|
||||
-e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|'
|
||||
)
|
||||
|
||||
has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
|
||||
|
||||
sed "${makefile_sed_args[@]}" -i Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local git_commit=${EGIT_COMMIT}
|
||||
|
||||
# Filter unsupported linker flags
|
||||
filter-flags '-Wl,*'
|
||||
|
||||
[[ -f hack/apparmor_tag.sh ]] || die
|
||||
if use apparmor; then
|
||||
echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
|
||||
fi
|
||||
|
||||
[[ -f hack/btrfs_installed_tag.sh ]] || die
|
||||
if use btrfs; then
|
||||
echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
|
||||
hack/btrfs_installed_tag.sh || die
|
||||
fi
|
||||
|
||||
[[ -f hack/selinux_tag.sh ]] || die
|
||||
if use selinux; then
|
||||
echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
|
||||
fi
|
||||
|
||||
# Avoid this error when generating pkg/varlink/iopodman.go:
|
||||
# cannot find package "github.com/varlink/go/varlink/idl"
|
||||
mkdir -p _output || die
|
||||
ln -snf ../vendor _output/src || die
|
||||
GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die
|
||||
rm _output/src || die
|
||||
|
||||
export -n GOCACHE GOPATH XDG_CACHE_HOME
|
||||
GOBIN="${S}/bin" \
|
||||
emake all \
|
||||
GIT_BRANCH=master \
|
||||
GIT_BRANCH_CLEAN=master \
|
||||
COMMIT_NO="${git_commit}" \
|
||||
GIT_COMMIT="${git_commit}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
|
||||
|
||||
insinto /etc/containers
|
||||
newins test/registries.conf registries.conf.example
|
||||
newins test/policy.json policy.json.example
|
||||
|
||||
insinto /usr/share/containers
|
||||
doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json
|
||||
|
||||
newconfd "${FILESDIR}"/podman.confd podman
|
||||
newinitd "${FILESDIR}"/podman.initd podman
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/podman.logrotated" podman
|
||||
|
||||
dobashcomp completions/bash/*
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins completions/zsh/*
|
||||
|
||||
insinto /usr/share/fish/vendor_completions.d
|
||||
doins completions/fish/*
|
||||
|
||||
keepdir /var/lib/containers
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
PODMAN_ROOTLESS_UPGRADE=false
|
||||
if use rootless; then
|
||||
has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process podman.conf
|
||||
|
||||
local want_newline=false
|
||||
if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
|
||||
elog "You need to create the following config files:"
|
||||
elog "/etc/containers/registries.conf"
|
||||
elog "/etc/containers/policy.json"
|
||||
elog "To copy over default examples, use:"
|
||||
elog "cp /etc/containers/registries.conf{.example,}"
|
||||
elog "cp /etc/containers/policy.json{.example,}"
|
||||
want_newline=true
|
||||
fi
|
||||
if [[ ${PODMAN_ROOTLESS_UPGRADE} == true ]] ; then
|
||||
${want_newline} && elog ""
|
||||
elog "For rootless operation, you need to configure subuid/subgid"
|
||||
elog "for user running podman. In case subuid/subgid has only been"
|
||||
elog "configured for root, run:"
|
||||
elog "usermod --add-subuids 1065536-1131071 <user>"
|
||||
elog "usermod --add-subgids 1065536-1131071 <user>"
|
||||
want_newline=true
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST company-coq-1.0.1_p20210708.tar.gz 3803957 BLAKE2B d2bb3022228cc7a103d4343e914ec20cf539405062e475c7be6cd0db776490a7af35f10fc9e712733bd8f7c6667a05f8d3d6c4321820a61da0847b8bc718c182 SHA512 92a7d0bf8326460519e5f47fe1e9779a4cc2d2bf069898e1797fabf483535eca8244c1ea36bc525aac418e2c26036a8580076435ccbfaa5bdc2e6ee6f133b655
|
@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
H=382db93374380e5db56f02934ee32bbe39159019
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Collection of extensions for Proof General's Coq mode"
|
||||
HOMEPAGE="https://github.com/cpitclaudel/company-coq/"
|
||||
SRC_URI="https://github.com/cpitclaudel/${PN}/archive/${H}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${H}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
app-emacs/company-math
|
||||
app-emacs/company-mode
|
||||
app-emacs/dash
|
||||
app-emacs/yasnippet
|
||||
"
|
||||
BDEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-refman-path.patch )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
src_prepare(){
|
||||
default
|
||||
|
||||
sed -i "s|@SITEETC@|${EPREFIX}${SITEETC}|" ./company-coq.el || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
elisp_src_install
|
||||
einstalldocs
|
||||
|
||||
insinto "${SITEETC}"
|
||||
doins -r ./refman
|
||||
}
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,13 @@
|
||||
index 3a984878..9a42fed9 100644
|
||||
--- a/company-coq.el
|
||||
+++ b/company-coq.el
|
||||
@@ -762,8 +762,7 @@ Useful as a value for `company-coq-completion-predicate'."
|
||||
"Full path of this script.")
|
||||
|
||||
(defconst company-coq-refman-path
|
||||
- (when company-coq-script-full-path
|
||||
- (expand-file-name "refman/" (file-name-directory company-coq-script-full-path)))
|
||||
+ (expand-file-name "@SITEETC@/refman/")
|
||||
"Refman (and other assets)'s directory.")
|
||||
|
||||
(defface company-coq-doc-header-face-docs-and-sources
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xgqt@gentoo.org</email>
|
||||
<name>Maciej Barć</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
Company-Coq is a new Emacs package that extends Proof General with a
|
||||
contextual auto-completion engine for Coq proofs and many additional
|
||||
facilities to make writing proofs easier and more efficient. Beyond fuzzy
|
||||
auto-completion of tactics, options, module names, and local definitions,
|
||||
company-coq offers offline in-editor documentation, convenient snippets,
|
||||
and multiple other Coq-specific IDE features.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/cpitclaudel/company-coq/issues/</bugs-to>
|
||||
<remote-id type="github">cpitclaudel/company-coq</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST company-math-1.4_p20210731.tar.gz 10358 BLAKE2B 15834f0e7b59cff25c1c3b488f16b19701ee3b1f8a715aa169ba40d5d7e4fd1e9ad226a0c52af88740dbfc950f660c46edb18e0e0bcad3687fb81610bafe9e84 SHA512 66b770d1ac37fdc7bae08bf79751cf4b9a2803944222d733beb6ad63dbdf5a8879ba19dcca61ec83cd4b1add813417508faca1649022242ab2ad11189a3444d7
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
H=45778f5731c97a21a83e3b965cbde42018709afd
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Completion back-ends for for math unicode symbols and latex tags"
|
||||
HOMEPAGE="https://github.com/vspinu/company-math/"
|
||||
SRC_URI="https://github.com/vspinu/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${H}
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
app-emacs/company-mode
|
||||
app-emacs/math-symbol-lists
|
||||
"
|
||||
BDEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( readme.md )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xgqt@gentoo.org</email>
|
||||
<name>Maciej Barć</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/vspinu/company-math/issues/</bugs-to>
|
||||
<remote-id type="github">vspinu/company-math</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1 @@
|
||||
DIST math-symbol-lists-1.3.tar.gz 43132 BLAKE2B 0690b45a11f8ce65103261928a2ae61b64b04f6034df3e530507422546098e016f8cb5974997a061bcf08be8877b8f17bbe38528c999d011bd6b2e67600b15a1 SHA512 4dd71c2e73c5907e88c1b05f01e4ab1bc2b911243e5aed0d1dc3edc4c06e842de1c8ba59b15bb185f75d9b549042c17715b7502cbc5ded6da16bae427522976e
|
@ -0,0 +1 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
@ -0,0 +1,17 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Lists of Unicode mathematical symbols and latex commands"
|
||||
HOMEPAGE="https://github.com/vspinu/math-symbol-lists/"
|
||||
SRC_URI="https://github.com/vspinu/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DOCS=( readme.md )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xgqt@gentoo.org</email>
|
||||
<name>Maciej Barć</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/vspinu/math-symbol-lists/issues/</bugs-to>
|
||||
<remote-id type="github">vspinu/math-symbol-lists</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Binary file not shown.
@ -0,0 +1,28 @@
|
||||
# Copyright 2019-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module systemd
|
||||
|
||||
DESCRIPTION="Process exporter for prometheus"
|
||||
HOMEPAGE="https://github.com/ncabatoff/process-exporter"
|
||||
SRC_URI="https://github.com/ncabatoff/process-exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
||||
|
||||
LICENSE="MIT Apache-2.0 BSD BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
src_compile() {
|
||||
emake build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
dodoc *.md
|
||||
insinto /etc/${PN}
|
||||
doins packaging/conf/all.yaml
|
||||
systemd_dounit packaging/${PN}.service
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
keepdir /var/log/${PN}
|
||||
}
|
Binary file not shown.
@ -1,38 +0,0 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
DISTUTILS_USE_SETUPTOOLS=bdepend
|
||||
PYTHON_COMPAT=( python3_{7,8,9,10} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A python implementation of the jp CLI for JMESPath"
|
||||
HOMEPAGE="https://github.com/pipebus/jpipe https://github.com/jmespath/jmespath.py/pull/224"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
KEYWORDS="~amd64"
|
||||
SLOT="0"
|
||||
IUSE="jpp-symlink jp-symlink test"
|
||||
RESTRICT="!test? ( test )"
|
||||
RDEPEND="
|
||||
jpp-symlink? ( !app-misc/jp[jpp(-)] )
|
||||
jp-symlink? ( !app-misc/jp[jp(+)] )
|
||||
dev-python/jmespath[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
python_prepare_all() {
|
||||
if ! use jpp-symlink; then
|
||||
sed -e '/"jpp = jpipe/d' -i setup.py || die
|
||||
fi
|
||||
if ! use jp-symlink; then
|
||||
sed -e '/"jp = jpipe/d' -i setup.py || die
|
||||
fi
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
"${PYTHON}" test/test_jp.py || die "jp tests failed for ${EPYTHON}"
|
||||
"${PYTHON}" test/test_jpp.py || die "jpp tests failed for ${EPYTHON}"
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Console CardDAV client"
|
||||
HOMEPAGE="https://github.com/scheibler/khard"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
|
||||
if [[ "${PV}" == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/scheibler/khard"
|
||||
else
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/atomicwrites[${PYTHON_USEDEP}]
|
||||
dev-python/configobj[${PYTHON_USEDEP}]
|
||||
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
|
||||
dev-python/ruamel-yaml-clib[${PYTHON_USEDEP}]
|
||||
dev-python/unidecode[${PYTHON_USEDEP}]
|
||||
dev-python/vobject[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/setuptools_scm[${PYTHON_USEDEP}]
|
||||
)
|
||||
doc? (
|
||||
dev-python/sphinx
|
||||
dev-python/sphinx-autoapi
|
||||
dev-python/sphinx-autodoc-typehints
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( CHANGES CONTRIBUTING.rst README.md doc/source/examples/khard.conf.example )
|
||||
|
||||
distutils_enable_tests setup.py
|
||||
|
||||
src_compile() {
|
||||
distutils-r1_src_compile
|
||||
|
||||
if use doc; then
|
||||
emake -j1 -C doc/ html text man info
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use doc; then
|
||||
DOCS+=( doc/build/text/. )
|
||||
HTML_DOCS+=( doc/build/html/. )
|
||||
|
||||
doman doc/build/man/*
|
||||
doinfo doc/build/texinfo/*.info
|
||||
fi
|
||||
|
||||
distutils-r1_src_install
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/_khard
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,162 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
WX_GTK_VER="3.0-gtk3"
|
||||
|
||||
inherit elisp-common flag-o-matic java-pkg-opt-2 systemd toolchain-funcs wxwidgets
|
||||
|
||||
# NOTE: If you need symlinks for binaries please tell maintainers or
|
||||
# open up a bug to let it be created.
|
||||
|
||||
UPSTREAM_V="$(ver_cut 1-2)"
|
||||
|
||||
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
|
||||
HOMEPAGE="https://www.erlang.org/"
|
||||
SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
|
||||
http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
|
||||
doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
# We use this subslot because Compiled HiPE Code can be loaded on the exact
|
||||
# same build of ERTS that was used when compiling the code. See
|
||||
# http://erlang.org/doc/system_principles/misc.html for more information.
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc emacs java +kpoll odbc sctp ssl systemd tk wxwidgets"
|
||||
|
||||
RDEPEND="
|
||||
acct-group/epmd
|
||||
acct-user/epmd
|
||||
sys-libs/ncurses:0
|
||||
sys-libs/zlib
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
java? ( >=virtual/jdk-1.8:* )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
systemd? ( sys-apps/systemd )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
|
||||
"${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
tc-export AR CPP CXX LD
|
||||
|
||||
# bug #797886: erlang's VM does unsafe casts for ints
|
||||
# to pointers and back. This breaks on gcc-11 -flto.
|
||||
append-flags -fno-strict-aliasing
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
|
||||
# don't search for static zlib
|
||||
--with-ssl-zlib=no
|
||||
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_with java javac)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl)
|
||||
$(use_enable ssl dynamic-ssl-lib)
|
||||
$(use_enable systemd)
|
||||
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
if use emacs ; then
|
||||
pushd lib/tools/emacs &>/dev/null || die
|
||||
elisp-compile *.el
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
extract_version() {
|
||||
local path="$1"
|
||||
local var_name="$2"
|
||||
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local erl_libdir_rel="$(get_libdir)/erlang"
|
||||
local erl_libdir="/usr/${erl_libdir_rel}"
|
||||
local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
|
||||
local erl_erts_ver="$(extract_version erts VSN)"
|
||||
local my_manpath="/usr/share/${PN}/man"
|
||||
|
||||
[[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
|
||||
[[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version"
|
||||
|
||||
emake INSTALL_PREFIX="${D}" install
|
||||
|
||||
if use doc ; then
|
||||
# Note: we explicitly install docs into:
|
||||
# /usr/share/doc/${PF}/{doc,lib,erts-*}
|
||||
# To maintain that layout we gather everything in 'html-docs'.
|
||||
# See bug #684376.
|
||||
mkdir html-docs || die
|
||||
mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* html-docs/ || die
|
||||
local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" html-docs/. )
|
||||
docompress -x /usr/share/doc/${PF}
|
||||
else
|
||||
local DOCS=("README.md")
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
|
||||
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
|
||||
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
|
||||
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
|
||||
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
|
||||
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
|
||||
|
||||
## Clean up the no longer needed files
|
||||
rm "${ED}/${erl_libdir}/Install" || die
|
||||
|
||||
insinto "${my_manpath}"
|
||||
doins -r "${WORKDIR}"/man/*
|
||||
# extend MANPATH, so the normal man command can find it
|
||||
# see bug 189639
|
||||
newenvd - "90erlang" <<-_EOF_
|
||||
MANPATH="${my_manpath}"
|
||||
_EOF_
|
||||
|
||||
if use emacs ; then
|
||||
elisp-install erlang lib/tools/emacs/*.{el,elc}
|
||||
sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
|
||||
"${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
|
||||
elisp-site-file-install "${T}/${SITEFILE}"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/epmd.init-r2 epmd
|
||||
newconfd "${FILESDIR}"/epmd.confd-r2 epmd
|
||||
use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -0,0 +1,386 @@
|
||||
# Copyright 1999-2022 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 libedit lto +ncurses pgo +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-lang/python-exec[python_targets_python3_10(-)]
|
||||
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? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
xml? ( >=dev-libs/expat-2.1:= )
|
||||
!!<sys-apps/sandbox-2.21"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
sys-devel/autoconf-archive
|
||||
virtual/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
|
||||
|
||||
if use pgo; then
|
||||
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
PROFILE_TASK+=" -x test_distutils"
|
||||
fi
|
||||
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
|
||||
--without-static-libpython
|
||||
--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
|
||||
|
||||
$(use_with lto)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
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
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict /usr/lib/python3.10/site-packages
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
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=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite /usr/lib/python3.10/site-packages
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
}
|
@ -0,0 +1,389 @@
|
||||
# Copyright 1999-2022 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/_alpha/a}
|
||||
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 libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst"
|
||||
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/expat-2.1:=
|
||||
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? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
!!<sys-apps/sandbox-2.21"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils[extra-filters(+)] )"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
sys-devel/autoconf-archive
|
||||
virtual/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
[[ ${PV} != *_alpha* ]] &&
|
||||
RDEPEND+=" dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
if use pgo; then
|
||||
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
PROFILE_TASK+=" -x test_distutils"
|
||||
fi
|
||||
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
|
||||
--without-static-libpython
|
||||
--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
|
||||
--with-platlibdir=lib
|
||||
|
||||
$(use_with lto)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
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
|
||||
|
||||
# force-disable modules we don't want built
|
||||
local disable_modules=(
|
||||
NIS
|
||||
)
|
||||
use gdbm || disable_modules+=( _GDBM _DBM )
|
||||
use sqlite || disable_modules+=( _SQLITE3 )
|
||||
use ssl || disable_modules+=( _HASHLIB _SSL )
|
||||
use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
|
||||
use readline || disable_modules+=( READLINE )
|
||||
use tk || disable_modules+=( _TKINTER )
|
||||
|
||||
local mod
|
||||
for mod in "${disable_modules[@]}"; do
|
||||
echo "MODULE_${mod}=disabled"
|
||||
done >> Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict /usr/lib/python3.11/site-packages
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
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
|
||||
|
||||
# Expects to find skipped tests and fails
|
||||
mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite /usr/lib/python3.11/site-packages
|
||||
|
||||
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
|
||||
|
||||
mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die
|
||||
|
||||
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
|
||||
|
||||
# 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 || 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
|
||||
}
|
@ -0,0 +1,335 @@
|
||||
# Copyright 1999-2022 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 +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-1.1.1:= )
|
||||
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/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
|
||||
--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
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
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
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
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
|
||||
|
||||
# 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,345 @@
|
||||
# Copyright 1999-2022 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 +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-lang/python-exec[python_targets_python3_8(-)]
|
||||
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-1.1.1:= )
|
||||
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/awk
|
||||
virtual/pkgconfig
|
||||
sys-devel/autoconf-archive
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
|
||||
--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
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
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
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
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
|
||||
|
||||
# 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,380 @@
|
||||
# Copyright 1999-2022 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 lto +ncurses pgo +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-lang/python-exec[python_targets_python3_9(-)]
|
||||
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-1.1.1:= )
|
||||
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/awk
|
||||
virtual/pkgconfig
|
||||
sys-devel/autoconf-archive
|
||||
verify-sig? ( sec-keys/openpgp-keys-python )
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/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
|
||||
|
||||
if use pgo; then
|
||||
local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
|
||||
export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
PROFILE_TASK+=" -x test_distutils"
|
||||
fi
|
||||
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
|
||||
--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
|
||||
|
||||
$(use_with lto)
|
||||
$(use_enable pgo optimizations)
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
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
|
||||
# Prevent using distutils bundled by setuptools.
|
||||
# https://bugs.gentoo.org/823728
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict /usr/lib/python3.9/site-packages
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
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
|
||||
|
||||
# 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
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST swipl-8.4.1.tar.gz 11386908 BLAKE2B bd53355abe63ffde348ed38b0e7fee4bcba4e74128c73904a72ca3ba2021a8b650d08480a643ea3336f3fc6d1d7bcf7651deb1d32608581ce43bc118288df6da SHA512 22806d8abd0b729e27a6d7bbbd0df37af8af21bb186a8de58ec5f9a1d32c9a477838fd10155ff21998737fcc2aaf4711d1d4d5457ce5d62e328d5da032474ee5
|
||||
DIST swipl-8.5.4.tar.gz 11406222 BLAKE2B ece161b1143897324e2204bbeed0c7784824481de8b5ada12d42b4fea14334ab9b2be68cc39f3e4aceffb049baf6ec6c6b239438c4d8654172980e6aecea8016 SHA512 c277248d8a3b7cbad622d06eb0a418cbb87540802152d9a49364c3b45905e0be0be28ae100c6abcb06084c6ca5e92d7d4b46553d59d47c8b987e01b0d420bdb6
|
||||
DIST swipl-8.5.5.tar.gz 11403057 BLAKE2B 13bdd69245bd6317e13642cf520a644f3bd4932ac1590afee0dce98bdb4da7a95bae37a9f7e5a0b88e7311d277a10fe8be7a2c92af52fe2d8865caface71e7da SHA512 a25e582b4d1ba20ee0a2568a71f961ca6436b1d31f046cceec8a2e27e48034dd06c751f1ea5452cce72ce2186adc26334bb1a895c54112597df8b0fba2fba883
|
||||
DIST swipl-8.5.6.tar.gz 11425087 BLAKE2B c2d051302cf7f7c11cec84bc1b6fcea3cf1b427c84e88210d40ea231c8a1bb9960cbdbe4a199cf41b81737b5b8dbeb8b096081e075adbc3aefd2f4937936afe0 SHA512 148dc86ed48895cee682941c0b93f98e803b11b97785339e943381ed0ecd4f60e6cd2e8909225156ae503a5463d2ff5ce756ad0e0078995886ac021bb748df69
|
||||
|
@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
|
||||
|
||||
PATCHSET_VER="0"
|
||||
|
||||
DESCRIPTION="Versatile implementation of the Prolog programming language"
|
||||
HOMEPAGE="https://www.swi-prolog.org/"
|
||||
SRC_URI="https://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="archive berkdb debug doc +gmp java +libedit minimal odbc pcre qt5 readline ssl test +uuid X yaml"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:=
|
||||
sys-libs/zlib
|
||||
virtual/libcrypt:=
|
||||
archive? ( app-arch/libarchive:= )
|
||||
berkdb? ( >=sys-libs/db-4:= )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
pcre? ( dev-libs/libpcre )
|
||||
readline? ( sys-libs/readline:= )
|
||||
libedit? ( dev-libs/libedit )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
java? ( >=virtual/jdk-1.8:* )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
qt5? (
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtgui:5
|
||||
)
|
||||
X? (
|
||||
virtual/jpeg:0
|
||||
x11-libs/libX11
|
||||
x11-libs/libXft
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXt
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM )
|
||||
yaml? ( dev-libs/libyaml )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
X? ( x11-base/xorg-proto )
|
||||
java? ( test? ( =dev-java/junit-3.8* ) )"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
S="${WORKDIR}/swipl-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
if [[ -d "${WORKDIR}"/${PV} ]] ; then
|
||||
eapply "${WORKDIR}"/${PV}
|
||||
fi
|
||||
|
||||
sed -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" \
|
||||
-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" \
|
||||
-i CMakeLists.txt || die
|
||||
|
||||
local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
|
||||
sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
|
||||
sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
use debug && append-flags -DO_DEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
|
||||
-DUSE_GMP=$(usex gmp)
|
||||
-DINSTALL_DOCUMENTATION=$(use doc && usex archive)
|
||||
-DSWIPL_PACKAGES_BASIC=$(usex !minimal)
|
||||
-DSWIPL_PACKAGES_ARCHIVE=$(usex archive)
|
||||
-DSWIPL_PACKAGES_ODBC=$(usex odbc)
|
||||
-DSWIPL_PACKAGES_BDB=$(usex berkdb)
|
||||
-DSWIPL_PACKAGES_PCRE=$(usex pcre)
|
||||
-DSWIPL_PACKAGES_YAML=$(usex yaml)
|
||||
-DSWIPL_PACKAGES_SSL=$(usex ssl)
|
||||
-DSWIPL_PACKAGES_JAVA=$(usex java)
|
||||
-DSWIPL_PACKAGES_QT=$(usex qt5)
|
||||
-DSWIPL_PACKAGES_X=$(usex X)
|
||||
-DSWIPL_PACKAGES_TERM=$(if use libedit || use readline; then echo yes; else echo no; fi)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
XDG_CONFIG_DIRS="${HOME}" \
|
||||
XDG_DATA_DIRS="${HOME}" \
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
USE_PUBLIC_NETWORK_TESTS=false \
|
||||
USE_ODBC_TESTS=false \
|
||||
cmake_src_test -V
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use qt5; then
|
||||
doicon "${S}"/snap/gui/swipl.png
|
||||
make_desktop_entry swipl-win "SWI-Prolog" swipl "Development"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST libarcus-4.12.1.tar.gz 32079 BLAKE2B 0efc45f3ddb4d08f960b2a629b0ad58cad9cbf16e90d75ca4f63706acb3ce8625dbe7c51c9265074f3104b66f23385c41e865fbc603a0b43c848c55a95b1f971 SHA512 0b2f2a0b4c3492725b83f2c8b0bb38a2cba10c27317cedd722b27447f0e36c571f1ae7a796de29cfb30e9827f35449327cc20c21780212fdeb35d05c90c3e2e6
|
||||
DIST libarcus-4.13.0.tar.gz 32079 BLAKE2B 56ddd99c347936770c5b2a99d337784605a27fda2c8a16e1537b25f5ff4d2ccead20e4992aed6cfba439be73a42dc2785da9681e80bc1a7c0ef0aa3a2c33f630 SHA512 a48ab1cb286c13b817363e113707499f2619724c8d2f7672309f9aad78123a89f60e60e92932d8761af87ec5f868f8c319717457532d45e3f2d8e5c3cc010db5
|
||||
DIST libarcus-4.13.1.tar.gz 32077 BLAKE2B 8a75de1ccd0879db817cd67600f83e765e00eed175d73685331ea7f1cde07dabd5c49c9b0f3f039a2a0e6ad7f491fa34de62054494fd9c588e3bb530370b65b7 SHA512 ffb14595f23c47f71082b994eae01471f45e2e9e1ae9a8ad01df577b9445594c30173388beab016a92be9723638ca6e46b5cecddddc6adc97e9d212fc0fa23fa
|
||||
DIST libarcus-4.9.1.tar.gz 31967 BLAKE2B 2ee827c3f1f592ac1efa7557a2cbfa9cf9fd2d43a7be7fd803f94f7b51c9a03be1078d3df319e1bbe2bc37b6ec3a1c6f16996c4e3b6251dd06f6031dd32ad2a9 SHA512 5124b80647cb0715ad94c5eaaeac797a867319de9a8064b689783fdb28598903a69e3a61393db90f5e0b3d10ee30aed844170cab63dc4b7c70509d5129a17cdd
|
||||
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit cmake python-single-r1
|
||||
|
||||
MY_PN="libArcus"
|
||||
|
||||
DESCRIPTION="This library facilitates communication between Cura and its backend"
|
||||
HOMEPAGE="https://github.com/Ultimaker/libArcus"
|
||||
SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0/3"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE="examples +python static-libs"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
dev-libs/protobuf:=
|
||||
$(python_gen_cond_dep '
|
||||
<dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
python? ( dev-python/protobuf-python[${PYTHON_USEDEP}] )
|
||||
')"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.8.0-deprecated-protobuf-calls.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Find SIP for current python version, not the latest installed
|
||||
sed -i "s/find_package(Python3 3.4 REQUIRED/find_package(Python3 ${EPYTHON##python} EXACT REQUIRED/g" \
|
||||
CMakeLists.txt cmake/FindSIP.cmake || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_EXAMPLES=$(usex examples ON OFF)
|
||||
-DBUILD_PYTHON=$(usex python ON OFF)
|
||||
-DBUILD_STATIC=$(usex static-libs ON OFF)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST lablgtk-2.18.10.tar.gz 1068504 BLAKE2B 8f82cd8b31c136420bfbbeaf78ec2d7913b7c5fc16abd485c508f8de3ab587173b0b5c798cdbe851254b48754929c1f0063cfc9e3c5e0663b7cdebc380ec0e8a SHA512 73705aaa80db433d11a28df5f6f5d10bd282e477e90916152a87e71865ccfcd7dfbdbe77350ecadf61ba2ccc7a188de1c68f1e6385e20c75f167969001e8418d
|
||||
DIST lablgtk-2.18.12.tar.gz 1066997 BLAKE2B fcdc74ae444af509b2c95929ac8df556aeea21187a95433a9c67ac3d7a515054d53c4955ea2e908297065fd005099fb5df45d52311cf015f63a72780c11cccb8 SHA512 284a1234ae817c4df49809d28c103ca5e64046da5ec9ff28c6edc0ce999e9d3e6e180dd053f8b1663d4fb3b7ba19570d53b9441c8fa622add924e8d85e41b813
|
||||
DIST lablgtk3-3.1.1.tbz 854720 BLAKE2B e6a916151fe1ca0746c14c2a66cd178f3b0c051976815a1d13daf801002f16bc76d9f4cb15625353f0cfbdc16b0a218857d72c4e57125050bbcffe67f7096ad0 SHA512 193c340d9941680869eb90bc89f5b27cc5bdf294f4635081a9ba56a99fa2982266c4ee2eb5fd04d3a3f6150082800de5df786def8c72a276a779d843d914e9e3
|
||||
|
@ -0,0 +1,76 @@
|
||||
diff -ur lablgtk-2.18.12.orig/src/Makefile lablgtk-2.18.12/src/Makefile
|
||||
--- lablgtk-2.18.12.orig/src/Makefile 2021-12-25 02:23:31.000000000 +0100
|
||||
+++ lablgtk-2.18.12/src/Makefile 2022-03-04 08:12:28.151812474 +0100
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
include $(CONFIG)
|
||||
#GTKCFLAGS += -Werror -Wno-error=deprecated-declarations
|
||||
+CFLAGS=
|
||||
|
||||
TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk_pixbuf_mlsource$(XE) \
|
||||
$(THINITOBJS) build.ml
|
||||
@@ -45,14 +46,13 @@
|
||||
|
||||
ifdef DEBUG
|
||||
COMPILER += -warn-error A-52-6
|
||||
-CFLAGS = -g $(GTKCFLAGS)
|
||||
+OCAMLCFLAGS = $(GTKCFLAGS)
|
||||
CUSTOM = -custom
|
||||
#MLLINK += -cclib -lcamlrund
|
||||
MLBYTEFLAGS = -g -dtypes
|
||||
else
|
||||
-CFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
|
||||
+OCAMLCFLAGS = -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS $(GTKCFLAGS)
|
||||
ifneq ($(TOOLCHAIN),msvc)
|
||||
-CFLAGS += -O
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
THLINK = unix.cma threads.cma
|
||||
|
||||
ifdef USE_CC
|
||||
-CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(CFLAGS)
|
||||
+CCOMPILER = $(CC) -c -I"$(LIBDIR)" $(OCAMLCFLAGS) $(CFLAGS)
|
||||
else
|
||||
-CCOMPILER = $(CAMLC) -c -ccopt '$(CFLAGS)' -verbose
|
||||
+CCOMPILER = $(CAMLC) -c -ccopt '$(OCAMLCFLAGS) $(CFLAGS)' -verbose
|
||||
endif
|
||||
|
||||
ifdef USE_GL
|
||||
@@ -123,7 +123,7 @@
|
||||
CLIBS += liblablrsvg$(XA)
|
||||
RSVGMLOBJS = rsvg.cmo
|
||||
RSVGCOBJS = ml_rsvg$(XO)
|
||||
-$(RSVGCOBJS) : CFLAGS+=$(HAVE_SVGZ)
|
||||
+$(RSVGCOBJS) : OCAMLCFLAGS+=$(HAVE_SVGZ)
|
||||
endif
|
||||
|
||||
ifdef USE_GTKSPELL
|
||||
@@ -140,7 +140,7 @@
|
||||
opt:: lablgtksourceview.cmxs
|
||||
endif
|
||||
|
||||
-ml_gtksourceview.o: CFLAGS=$(GTKSOURCEVIEWCFLAGS)
|
||||
+ml_gtksourceview.o: OCAMLCFLAGS=$(GTKSOURCEVIEWCFLAGS)
|
||||
GTKSOURCEVIEWMLOBJS = gtkSourceView.cmo gSourceView.cmo
|
||||
GTKSOURCEVIEWCOBJS = ml_gtksourceview$(XO)
|
||||
ml_gtksourceview.c: pango_tags.h
|
||||
@@ -179,7 +179,7 @@
|
||||
endif
|
||||
|
||||
ifdef USE_GTKQUARTZ
|
||||
-CFLAGS += -DHAS_GTKQUARTZ
|
||||
+OCAMLCFLAGS += -DHAS_GTKQUARTZ
|
||||
endif
|
||||
# Rules
|
||||
.SUFFIXES: .ml .mli .cmo .cmi .cmx .cmxs .cmxa .c $(XO) .d$(XO) .var .h .opt .def .ml4
|
||||
@@ -188,7 +188,7 @@
|
||||
.cpp$(XO):
|
||||
$(CCOMPILER) $<
|
||||
.c.d$(XO):
|
||||
- $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(CFLAGS)' $<
|
||||
+ $(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(OCAMLCFLAGS) $(CFLAGS)' $<
|
||||
.ml.cmo:
|
||||
$(COMPILER) $(PRINCIPAL) $<
|
||||
.mli.cmi:
|
@ -0,0 +1,78 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Objective CAML interface for Gtk+2"
|
||||
HOMEPAGE="http://lablgtk.forge.ocamlcore.org"
|
||||
SRC_URI="https://github.com/garrigue/lablgtk/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1-with-linking-exception examples? ( lablgtk-examples )"
|
||||
SLOT="2/${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="debug examples glade gnomecanvas +ocamlopt sourceview spell svg"
|
||||
|
||||
DEPEND=">=dev-lang/ocaml-4.05:=[ocamlopt?]
|
||||
dev-ml/camlp4:=
|
||||
x11-libs/gtk+:2
|
||||
glade? ( gnome-base/libglade )
|
||||
gnomecanvas? ( gnome-base/libgnomecanvas )
|
||||
sourceview? ( x11-libs/gtksourceview:2.0 )
|
||||
spell? ( app-text/gtkspell:2 )
|
||||
svg? ( gnome-base/librsvg:2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="dev-ml/findlib
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS=( CHANGES README CHANGES.API )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-cflags.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable debug)
|
||||
$(use_with svg rsvg)
|
||||
$(use_with glade)
|
||||
--without-gnomeui
|
||||
--without-panel
|
||||
# relies on EOL gtkglarea
|
||||
--without-gl
|
||||
$(use_with spell gtkspell)
|
||||
--without-gtksourceview
|
||||
$(use_with sourceview gtksourceview2)
|
||||
$(use_with gnomecanvas)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# parallel build crashes
|
||||
emake -j1 all CFLAGS="${CFLAGS}"
|
||||
if use ocamlopt; then
|
||||
emake -j1 opt CFLAGS="${CFLAGS}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local destdir="$(ocamlfind printconf destdir || die)"
|
||||
dodir "${destdir}/stublibs"
|
||||
export OCAMLFIND_DESTDIR=${ED}"${destdir}"
|
||||
export OCAMLPATH="${ED}${destdir}"
|
||||
export OCAMLFIND_LDCONF=ignore
|
||||
|
||||
default
|
||||
rm "${ED}/usr/$(get_libdir)/ocaml/ld.conf" || die
|
||||
dosym lablgtk2/liblablgtk2.a \
|
||||
/usr/$(get_libdir)/ocaml/liblablgtk2.a
|
||||
use sourceview && \
|
||||
dosym lablgtk2/liblablgtksourceview2.a \
|
||||
/usr/$(get_libdir)/ocaml/liblablgtksourceview2.a
|
||||
|
||||
if use examples; then
|
||||
dodoc -r examples/
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Converts the output of popular command-line tools and file-types to JSON"
|
||||
HOMEPAGE="https://github.com/kellyjonbrazil/jc"
|
||||
SRC_URI="
|
||||
https://github.com/kellyjonbrazil/jc/archive/v${PV}.tar.gz
|
||||
-> ${P}.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64"
|
||||
|
||||
RDEPEND="dev-python/pygments[${PYTHON_USEDEP}]
|
||||
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
|
||||
dev-python/xmltodict[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests unittest
|
@ -1,4 +1 @@
|
||||
DIST nbconvert-6.3.0.tar.gz 900850 BLAKE2B 8ef7d3bfcb914bf4be064ef440faab283fcc71e53579a681deb343d307a8b39cca2d0b83828b9df7c45ee7e9e06164ba6daa234b678197bc8a3202cd7e560c06 SHA512 efbe18c50e408fcb7d920c5ee070d19e19f0347f7073cf86b45046f3e30bd30ab8174115c539020fbf404faf5fc6e55dc7df1ad27accb45f1b2acf2db1d325e6
|
||||
DIST nbconvert-6.4.0.tar.gz 901586 BLAKE2B 85087046fe9a211c077165f47c03e7b025c770e2d409278703ddeef3c84b3d60e1ad28650f67fb9d68b72ad077db5bbd99af5c81ddf94fd7bf67471701dbdc4a SHA512 12662cca240a4c57a41e3bc7fedebd51c6fb83a0740afa7acfcc25424ca544a44b4dbfecfb9edb396360866de0b8fafad124fbb87c46c6f796661a7f40e96f68
|
||||
DIST nbconvert-6.4.1.tar.gz 900632 BLAKE2B 4946a5fd6e408951aad1d0015e3bc4aad812ca3d8f9d1ee8a45a9ffd12a23e25a5952a403082d78a488ac723e2540bc5e39f675de3c2ec5f7f2c67cdc00346de SHA512 9da691b404bb1fd052075bbc3d55adcce4fb6bcb822901c73d2d3d362555bc9794db98803563a2a61c5a1ce24d4f803c6135d0ea2a162933173d19c9c6ce4f48
|
||||
DIST nbconvert-6.4.2.tar.gz 902691 BLAKE2B ee61836ac423db0803d90b92f5cfce7e53e311637dfff7e31e5506fc1588a41515e984860bc56f617b0e0add033c41e6d2099f2abfdda7f31015f6e751110639 SHA512 325637844044ff4a118ca7803e9803fd6909667e017dae04859f58a02e1aadc8b8c699f9b9612bd47991a4c06a23acd526abdcbf1a219e29d985001ae01237bb
|
||||
|
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Converting Jupyter Notebooks"
|
||||
HOMEPAGE="https://nbconvert.readthedocs.io/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~arm64 hppa ~ia64 ppc ~ppc64 ~riscv ~s390 ~sparc x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/bleach[${PYTHON_USEDEP}]
|
||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||
>=dev-python/entrypoints-0.2.2[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/jupyter_core[${PYTHON_USEDEP}]
|
||||
dev-python/jupyterlab_pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/mistune-0.7.4[${PYTHON_USEDEP}]
|
||||
dev-python/nbclient[${PYTHON_USEDEP}]
|
||||
dev-python/nbformat[${PYTHON_USEDEP}]
|
||||
>=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}]
|
||||
dev-python/testpath[${PYTHON_USEDEP}]
|
||||
www-servers/tornado[${PYTHON_USEDEP}]
|
||||
"
|
||||
# Skip inkscape on hppa b/c tests should skip it gracefully if not around
|
||||
# It's a heavy dependency.
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pebble[${PYTHON_USEDEP}]
|
||||
dev-python/ipykernel[${PYTHON_USEDEP}]
|
||||
dev-python/ipywidgets[${PYTHON_USEDEP}]
|
||||
>=dev-python/jupyter_client-4.2[${PYTHON_USEDEP}]
|
||||
!hppa? ( media-gfx/inkscape )
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_test() {
|
||||
mkdir -p "${HOME}/.local" || die
|
||||
cp -r share "${HOME}/.local/" || die
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# Missing pyppeteer for now
|
||||
# TODO: Doesn't skip?
|
||||
nbconvert/exporters/tests/test_webpdf.py
|
||||
# Needs pyppeteer too
|
||||
'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium'
|
||||
)
|
||||
|
||||
distutils_install_for_testing bdist_egg
|
||||
cd "${TEST_DIR}"/lib || die
|
||||
epytest --pyargs nbconvert
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version app-text/pandoc ; then
|
||||
einfo "Pandoc is required for converting to formats other than Python,"
|
||||
einfo "HTML, and Markdown. If you need this functionality, install"
|
||||
einfo "app-text/pandoc."
|
||||
fi
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Converting Jupyter Notebooks"
|
||||
HOMEPAGE="https://nbconvert.readthedocs.io/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/bleach[${PYTHON_USEDEP}]
|
||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||
>=dev-python/entrypoints-0.2.2[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/jupyter_core[${PYTHON_USEDEP}]
|
||||
dev-python/jupyterlab_pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/mistune-0.8.1[${PYTHON_USEDEP}]
|
||||
<dev-python/mistune-2[${PYTHON_USEDEP}]
|
||||
dev-python/nbclient[${PYTHON_USEDEP}]
|
||||
dev-python/nbformat[${PYTHON_USEDEP}]
|
||||
>=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}]
|
||||
dev-python/testpath[${PYTHON_USEDEP}]
|
||||
www-servers/tornado[${PYTHON_USEDEP}]
|
||||
"
|
||||
# Skip inkscape on hppa b/c tests should skip it gracefully if not around
|
||||
# It's a heavy dependency.
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pebble[${PYTHON_USEDEP}]
|
||||
dev-python/ipykernel[${PYTHON_USEDEP}]
|
||||
dev-python/ipywidgets[${PYTHON_USEDEP}]
|
||||
>=dev-python/jupyter_client-4.2[${PYTHON_USEDEP}]
|
||||
!hppa? ( media-gfx/inkscape )
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_test() {
|
||||
mkdir -p "${HOME}/.local" || die
|
||||
cp -r share "${HOME}/.local/" || die
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# Missing pyppeteer for now
|
||||
# TODO: Doesn't skip?
|
||||
nbconvert/exporters/tests/test_webpdf.py
|
||||
# Needs pyppeteer too
|
||||
'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium'
|
||||
)
|
||||
|
||||
distutils_install_for_testing bdist_egg
|
||||
cd "${TEST_DIR}"/lib || die
|
||||
epytest --pyargs nbconvert
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version app-text/pandoc ; then
|
||||
einfo "Pandoc is required for converting to formats other than Python,"
|
||||
einfo "HTML, and Markdown. If you need this functionality, install"
|
||||
einfo "app-text/pandoc."
|
||||
fi
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Converting Jupyter Notebooks"
|
||||
HOMEPAGE="https://nbconvert.readthedocs.io/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/bleach[${PYTHON_USEDEP}]
|
||||
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||||
>=dev-python/entrypoints-0.2.2[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/jupyter_core[${PYTHON_USEDEP}]
|
||||
dev-python/jupyterlab_pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/mistune-0.8.1[${PYTHON_USEDEP}]
|
||||
<dev-python/mistune-2[${PYTHON_USEDEP}]
|
||||
dev-python/nbclient[${PYTHON_USEDEP}]
|
||||
dev-python/nbformat[${PYTHON_USEDEP}]
|
||||
>=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
>=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}]
|
||||
dev-python/testpath[${PYTHON_USEDEP}]
|
||||
www-servers/tornado[${PYTHON_USEDEP}]
|
||||
"
|
||||
# Skip inkscape on hppa b/c tests should skip it gracefully if not around
|
||||
# It's a heavy dependency.
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pebble[${PYTHON_USEDEP}]
|
||||
dev-python/ipykernel[${PYTHON_USEDEP}]
|
||||
dev-python/ipywidgets[${PYTHON_USEDEP}]
|
||||
>=dev-python/jupyter_client-4.2[${PYTHON_USEDEP}]
|
||||
!hppa? ( media-gfx/inkscape )
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_test() {
|
||||
mkdir -p "${HOME}/.local" || die
|
||||
cp -r share "${HOME}/.local/" || die
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# Missing pyppeteer for now
|
||||
# TODO: Doesn't skip?
|
||||
nbconvert/exporters/tests/test_webpdf.py
|
||||
# Needs pyppeteer too
|
||||
'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium'
|
||||
)
|
||||
|
||||
epytest --pyargs nbconvert
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version app-text/pandoc ; then
|
||||
einfo "Pandoc is required for converting to formats other than Python,"
|
||||
einfo "HTML, and Markdown. If you need this functionality, install"
|
||||
einfo "app-text/pandoc."
|
||||
fi
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST sphinx-autoapi-1.8.4.tar.gz 83541 BLAKE2B 05d706fda6da4aea55e535a995ef01dc54269fa8e452c51c9bf2cec2e596ccec20191b8cb3c0cde1b93daa4f5d85074a293c9fd449d99d3c494ba20c6cee2df8 SHA512 10b4d87e1046ad372a3491006cd4bece8334fc398025f98654781c83ee200045d707f3293a031f8cf0abe5d20a111e7ded864f2b6deffe5222b331ca8c9b688b
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>marco@sirabella.org</email>
|
||||
<name>Marco Sirabella</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<stabilize-allarches/>
|
||||
<upstream>
|
||||
<remote-id type="github">readthedocs/sphinx-autoapi</remote-id>
|
||||
<remote-id type="pypi">sphinx-autoapi</remote-id>
|
||||
<doc>https://sphinx-autoapi.readthedocs.io</doc>
|
||||
<bugs-to>https://github.com/readthedocs/sphinx-autoapi/issues</bugs-to>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,32 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A new approach to API documentation in Sphinx"
|
||||
HOMEPAGE="https://sphinx-autoapi.readthedocs.io/"
|
||||
SRC_URI="https://github.com/readthedocs/sphinx-autoapi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
# pypi lacks docs/
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/astroid[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/unidecode[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
DOCS=( README.rst CHANGELOG.rst )
|
||||
|
||||
# Test requires pypi download w/ internet: https://github.com/readthedocs/sphinx-autoapi/issues/329
|
||||
EPYTEST_DESELECT="tests/test_integration.py::TestExtensionErrors::test_extension_setup_errors[dotnetexample-override_conf2-AutoAPI"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
distutils_enable_sphinx docs --no-autodoc
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST rocm-Tensile-4.3.0.tar.gz 14250149 BLAKE2B 030138eaca2a0aadd96801e6dbd72e510716dd90553ef3795c5e04e00a34a05ecae82b24f755e4033a4acfcdb1cf26291da1e7902bb090f89a010d403e832beb SHA512 126db0b413c716fba8d5be9bff7a44fd1badacbf32f3db8d0db649819177db37ebd56fd22dd3c809655f5d29675be115e698cd10bc3d0b4b23878ae3726fce47
|
@ -0,0 +1,74 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Stretching GPU performance for GEMMs and tensor contractions"
|
||||
HOMEPAGE="https://github.com/ROCmSoftwarePlatform/Tensile"
|
||||
SRC_URI="https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-${PV}.tar.gz -> rocm-Tensile-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-rocm-${PV}"
|
||||
|
||||
LICENSE="MIT"
|
||||
KEYWORDS="~amd64"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
|
||||
# Not compatible with recent versions of pytest
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/msgpack[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/hip:${SLOT}
|
||||
"
|
||||
BDEPEND="test? (
|
||||
dev-util/rocminfo:${SLOT}
|
||||
)"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/Tensile-${PV}-hsaco-compile-specified-arch.patch" # backported from upstream, should remove after 4.3.0
|
||||
"${FILESDIR}/Tensile-4.3.0-output-commands.patch"
|
||||
)
|
||||
|
||||
CMAKE_USE_DIR="${WORKDIR}/Source"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
|
||||
mv ${PN}/Source "${WORKDIR}"/ || die
|
||||
sed -e "/ROCM_SMI_ROOT/s,lib,$(get_libdir)," \
|
||||
-i "${WORKDIR}"/Source/cmake/FindROCmSMI.cmake || die
|
||||
sed -r -e "/TENSILE_USE_LLVM/s/ON/OFF/" \
|
||||
-i "${WORKDIR}"/Source/CMakeLists.txt || die
|
||||
|
||||
sed -e "/HipClangVersion/s/0,0,0/$(ver_rs 1-3 ,)/" \
|
||||
-e "/SourcePath/s,os\.path\.join.*$,\"${EPREFIX}/usr/share/${PN}\"," \
|
||||
-i ${PN}/Common.py || die
|
||||
|
||||
sed -e "s|os\.path\.dirname.*$|\"${EPREFIX}/usr/share/Tensile\", end='')|" \
|
||||
-i ${PN}/__init__.py || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
ROCM_PATH="${EPREFIX}/usr/" distutils-r1_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
|
||||
# Move the cmake files to the correct directory
|
||||
mkdir -p "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
|
||||
mv "${ED}/usr/cmake/"* "${ED}/usr/$(get_libdir)/cmake/${PN}" || die
|
||||
rm -r "${ED}/usr/cmake" || die
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r "${WORKDIR}"/Source/*
|
||||
dosym . /usr/share/${PN}/Source
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
https://github.com/ROCmSoftwarePlatform/Tensile/issues/1395
|
||||
https://github.com/ROCmSoftwarePlatform/Tensile/pull/1398
|
||||
|
||||
--- a/Tensile/TensileCreateLibrary.py
|
||||
+++ b/Tensile/TensileCreateLibrary.py
|
||||
@@ -136,6 +136,35 @@ def which(p):
|
||||
return candidate
|
||||
return None
|
||||
|
||||
+def splitArchs():
|
||||
+ # Helper for architecture
|
||||
+ def isSupported(arch):
|
||||
+ return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
|
||||
+ globalParameters["AsmCaps"][arch]["SupportedSource"]
|
||||
+
|
||||
+ if ";" in globalParameters["Architecture"]:
|
||||
+ wantedArchs = globalParameters["Architecture"].split(";")
|
||||
+ else:
|
||||
+ wantedArchs = globalParameters["Architecture"].split("_")
|
||||
+ archs = []
|
||||
+ cmdlineArchs = []
|
||||
+ if "all" in wantedArchs:
|
||||
+ for arch in globalParameters['SupportedISA']:
|
||||
+ if isSupported(arch):
|
||||
+ if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
|
||||
+ if (arch == (9,0,10)):
|
||||
+ archs += [gfxName(arch) + '-xnack+']
|
||||
+ cmdlineArchs += [gfxName(arch) + ':xnack+']
|
||||
+ archs += [gfxName(arch) + '-xnack-']
|
||||
+ cmdlineArchs += [gfxName(arch) + ':xnack-']
|
||||
+ else:
|
||||
+ archs += [gfxName(arch)]
|
||||
+ cmdlineArchs += [gfxName(arch)]
|
||||
+ else:
|
||||
+ for arch in wantedArchs:
|
||||
+ archs += [re.sub(":", "-", arch)]
|
||||
+ cmdlineArchs += [arch]
|
||||
+ return archs, cmdlineArchs
|
||||
|
||||
def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
|
||||
buildPath = ensurePath(os.path.join(globalParameters['WorkingPath'], 'code_object_tmp'))
|
||||
@@ -149,24 +178,8 @@ def buildSourceCodeObjectFile(CxxCompiler, outputPath, kernelFile):
|
||||
objectFilename = base + '.o'
|
||||
soFilename = base + '.so'
|
||||
|
||||
- def isSupported(arch):
|
||||
- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
|
||||
- globalParameters["AsmCaps"][arch]["SupportedSource"]
|
||||
-
|
||||
if (CxxCompiler == "hipcc"):
|
||||
- archs = []
|
||||
- cmdlineArchs = []
|
||||
- for arch in globalParameters['SupportedISA']:
|
||||
- if isSupported(arch):
|
||||
- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
|
||||
- if (arch == (9,0,10)):
|
||||
- archs += [gfxName(arch) + '-xnack+']
|
||||
- cmdlineArchs += [gfxName(arch) + ':xnack+']
|
||||
- archs += [gfxName(arch) + '-xnack-']
|
||||
- cmdlineArchs += [gfxName(arch) + ':xnack-']
|
||||
- else:
|
||||
- archs += [gfxName(arch)]
|
||||
- cmdlineArchs += [gfxName(arch)]
|
||||
+ archs, cmdlineArchs = splitArchs()
|
||||
|
||||
archFlags = ['--offload-arch=' + arch for arch in cmdlineArchs]
|
||||
|
||||
@@ -1063,11 +1076,6 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
|
||||
sourceKernels = list([k for k in kernels if k['KernelLanguage'] == 'Source'])
|
||||
asmKernels = list([k for k in kernels if k['KernelLanguage'] == 'Assembly'])
|
||||
|
||||
- # Helper for architecture
|
||||
- def isSupported(arch):
|
||||
- return globalParameters["AsmCaps"][arch]["SupportedISA"] and \
|
||||
- globalParameters["AsmCaps"][arch]["SupportedSource"]
|
||||
-
|
||||
# Build a list of kernel object names.
|
||||
for kernel in sourceKernels:
|
||||
sourceKernelNames += [kernelWriterSource.getKernelFileBase(kernel)]
|
||||
@@ -1081,15 +1089,7 @@ def buildObjectFileNames(solutionWriter, kernelWriterSource, kernelWriterAssembl
|
||||
|
||||
# Source based kernels are built for all supported architectures
|
||||
if (cxxCompiler == 'hipcc'):
|
||||
- sourceArchs = []
|
||||
- for arch in globalParameters['SupportedISA']:
|
||||
- if isSupported(arch):
|
||||
- if (arch == (9,0,6) or arch == (9,0,8) or arch == (9,0,10)):
|
||||
- if (arch == (9,0,10)):
|
||||
- sourceArchs += [gfxName(arch) + '-xnack+']
|
||||
- sourceArchs += [gfxName(arch) + '-xnack-']
|
||||
- else:
|
||||
- sourceArchs += [gfxName(arch)]
|
||||
+ sourceArchs, _ = splitArchs()
|
||||
else:
|
||||
raise RuntimeError("Unknown compiler %s" % cxxCompiler)
|
||||
|
@ -0,0 +1,23 @@
|
||||
diff --color -uprN orig/Tensile/cmake/TensileConfig.cmake Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake
|
||||
--- orig/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:00.115478470 +0800
|
||||
+++ Tensile-rocm-4.3.0/Tensile/cmake/TensileConfig.cmake 2021-08-18 17:48:49.963478801 +0800
|
||||
@@ -234,6 +234,7 @@ function(TensileCreateLibraryFiles
|
||||
COMMENT "Generating Tensile Libraries"
|
||||
OUTPUT ${Tensile_EMBED_LIBRARY_SOURCE};${Tensile_MANIFEST_CONTENTS}
|
||||
COMMAND ${CommandLine}
|
||||
+ USES_TERMINAL
|
||||
)
|
||||
|
||||
set("${Tensile_VAR_PREFIX}_ALL_FILES" ${Tensile_MANIFEST_CONTENTS} PARENT_SCOPE)
|
||||
diff --color -uprN orig/Tensile/Common.py Tensile-rocm-4.3.0/Tensile/Common.py
|
||||
--- orig/Tensile/Common.py 2021-08-18 17:48:00.075478470 +0800
|
||||
+++ Tensile-rocm-4.3.0/Tensile/Common.py 2021-08-18 17:48:23.287478624 +0800
|
||||
@@ -179,7 +179,7 @@ globalParameters["PrintTensorD"] = 0
|
||||
globalParameters["PrintTensorRef"] = 0 # Print reference tensor. 0x1=after init; 0x2=after copy-back; 0x3=both
|
||||
globalParameters["PrintIndexAssignments"] = 0 # Print the tensor index assignment info
|
||||
globalParameters["PrintWinnersOnly"] = False # Only print the solutions which become the fastest
|
||||
-globalParameters["PrintCodeCommands"] = False # print the commands used to generate the code objects (asm,link,hip-clang, etc)
|
||||
+globalParameters["PrintCodeCommands"] = True # print the commands used to generate the code objects (asm,link,hip-clang, etc)
|
||||
globalParameters["DumpTensors"] = False # If True, dump tensors to binary files instead of printing them.
|
||||
|
||||
# TODO - remove this when NewClient is mainstream
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>sci@gentoo.org</email>
|
||||
<name>Science Project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ROCmSoftwarePlatform/Tensile</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,3 +1,5 @@
|
||||
DIST cmake-3.21.4.tar.gz 9630991 BLAKE2B ca6b6c50d984cc6713f3e88e1a6438c360d80c34927e60a20cc006ba47df2b91a290f1578d556f58d2d40711848a9b9caf36f65a043df892b81c1d48e3edb0d8 SHA512 0262a666f6da106576c26215580c40b54497bcdac400e847e1799716c31c71068293e719416338132a7da6122826c08ff50ac23dfed2711ab42631e96303f544
|
||||
DIST cmake-3.22.2.tar.gz 9779456 BLAKE2B 5f1c76344fe2d6fba012b0d745dc990ec1ed4bf32c99beac1e538f4b83c1d695aee757d2780e635b67c0a185935a6a70b344a733259e3a91d01c4b83e94e2730 SHA512 86e95f9ce773bcc7513a1c3901561a1b09d06830936b8b1d44e075fe3bac55cfa636eccdedfa94a9939f5e12eb965224559fac30a17c64314ee023acb2a3e53f
|
||||
DIST cmake-3.22.3.tar.gz 9779118 BLAKE2B 917b722701481cb87cc282a19083ec3299d845eeb633369bf29a961d1eef8a0f1157d0000866d983c4720a9b0524b81d647b5947a06281089a0a106146df2936 SHA512 a35003468153b99770ac6bbdeaa611a231a1104560da36aca0f393b8b71dbb44d854378504d2ec6b4af615f78efe18d91453fe15a1b7ec58129aa0289a5a1507
|
||||
DIST cmake-3.23.0-rc1.tar.gz 9974071 BLAKE2B d4f3c6003ac36fb899a13a75c1ba8b25ecf233e939bcf88c4a63ae89837a5d3260e3c3458bea30cc59f64bf26742a15f2b6a27a3f98fc6339f137e0d1fa37a1b SHA512 c476ec038f5f2241765d7fd2f9afb5a0ff5969901b12cba43cf4b7ad507535c968833022ce1f293e3fab692e04b664809b5d66edc7d76e76a843c9634b3d86c6
|
||||
DIST cmake-3.23.0-rc2.tar.gz 9981585 BLAKE2B 8c075b02c71e701e77f9b5f33090b85a2baaf8c2d4a40f2b0f1f3d9c683fac85dfdcd652f04b2d9f24c077fc10610d546ef850b4a5e4e3a9bd22ed20291cf25b SHA512 12e11dc66a4f79faacb2f6ac503adda5b349b68c7d9b9d7824651cf77dd49b65d58fa5ff23e6e3c38e03ef60a2f34139a663261725cacec603db37cd42fae0da
|
||||
|
@ -0,0 +1,226 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
|
||||
# ... but seems fine as of 3.22.3?
|
||||
#CMAKE_MAKEFILE_GENERATOR="emake"
|
||||
CMAKE_REMOVE_MODULES_LIST=( none )
|
||||
inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
|
||||
toolchain-funcs virtualx xdg-utils
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="Cross platform Make"
|
||||
HOMEPAGE="https://cmake.org/"
|
||||
SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="CMake"
|
||||
SLOT="0"
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="doc emacs ncurses qt5 test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/libarchive-3.3.3:=
|
||||
app-crypt/rhash
|
||||
>=dev-libs/expat-2.0.1
|
||||
>=dev-libs/jsoncpp-1.9.2-r2:0=
|
||||
>=dev-libs/libuv-1.10.0:=
|
||||
>=net-misc/curl-7.21.5[ssl]
|
||||
sys-libs/zlib
|
||||
virtual/pkgconfig
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
doc? (
|
||||
dev-python/requests
|
||||
dev-python/sphinx
|
||||
)
|
||||
test? ( app-arch/libarchive[zstd] )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
PATCHES=(
|
||||
# prefix
|
||||
"${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch
|
||||
"${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch
|
||||
"${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch
|
||||
|
||||
# handle gentoo packaging in find modules
|
||||
"${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
|
||||
# Next patch needs to be reworked
|
||||
#"${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch
|
||||
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
|
||||
|
||||
# respect python eclasses
|
||||
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
|
||||
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
|
||||
|
||||
"${FILESDIR}"/${PN}-3.18.0-filter_distcc_warning.patch # bug 691544
|
||||
|
||||
# upstream fixes (can usually be removed with a version bump)
|
||||
)
|
||||
|
||||
cmake_src_bootstrap() {
|
||||
# disable running of cmake in bootstrap command
|
||||
sed -i \
|
||||
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
|
||||
bootstrap || die "sed failed"
|
||||
|
||||
# execinfo.h on Solaris isn't quite what it is on Darwin
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
sed -i -e 's/execinfo\.h/blablabla.h/' \
|
||||
Source/kwsys/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
# bootstrap script isn't exactly /bin/sh compatible
|
||||
tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
|
||||
--prefix="${T}/cmakestrap/" \
|
||||
--parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|
||||
|| die "Bootstrap failed"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# disable Xcode hooks, bug #652134
|
||||
sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \
|
||||
Source/CMakeLists.txt || die
|
||||
sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \
|
||||
-e '/cmGlobalXCodeGenerator.h/d' \
|
||||
Source/cmake.cxx || die
|
||||
# disable isysroot usage with GCC, we've properly instructed
|
||||
# where things are via GCC configuration and ldwrapper
|
||||
sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
|
||||
Modules/Platform/Apple-GNU-*.cmake || die
|
||||
# disable isysroot usage with clang as well
|
||||
sed -i -e '/_SYSROOT_FLAG/d' \
|
||||
Modules/Platform/Apple-Clang.cmake || die
|
||||
# don't set a POSIX standard, system headers don't like that, #757426
|
||||
sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
|
||||
Source/cmLoadCommandCommand.cxx \
|
||||
Source/cmStandardLexer.h \
|
||||
Source/cmSystemTools.cxx \
|
||||
Source/cmTimestamp.cxx
|
||||
sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
|
||||
Source/cmStandardLexer.h
|
||||
fi
|
||||
|
||||
# Add gcc libs to the default link paths
|
||||
sed -i \
|
||||
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
|
||||
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
|
||||
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
|
||||
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
|
||||
|
||||
if ! has_version -b \>=${CATEGORY}/${PN}-3.4.0_rc1 || ! cmake --version &>/dev/null ; then
|
||||
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
|
||||
cmake_src_bootstrap
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Fix linking on Solaris
|
||||
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
|
||||
-DCMAKE_DOC_DIR=/share/doc/${PF}
|
||||
-DCMAKE_MAN_DIR=/share/man
|
||||
-DCMAKE_DATA_DIR=/share/${PN}
|
||||
-DSPHINX_MAN=$(usex doc)
|
||||
-DSPHINX_HTML=$(usex doc)
|
||||
-DBUILD_CursesDialog="$(usex ncurses)"
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
)
|
||||
use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use emacs && elisp-compile Auxiliary/cmake-mode.el
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# fix OutDir and SelectLibraryConfigurations tests
|
||||
# these are altered thanks to our eclass
|
||||
sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
|
||||
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|
||||
|| die
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
# Excluded tests:
|
||||
# BootstrapTest: we actualy bootstrap it every time so why test it.
|
||||
# BundleUtilities: bundle creation broken
|
||||
# CMakeOnly.AllFindModules: pthread issues
|
||||
# CTest.updatecvs: which fails to commit as root
|
||||
# Fortran: requires fortran
|
||||
# RunCMake.CompilerLauncher: also requires fortran
|
||||
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
|
||||
# debugedit binary is not in the expected location
|
||||
# RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
|
||||
# it can't find a deb package that owns libc
|
||||
# TestUpload, which requires network access
|
||||
# RunCMake.CMP0125, known failure reported upstream (bug #829414)
|
||||
local myctestargs=(
|
||||
--output-on-failure
|
||||
-E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \
|
||||
)
|
||||
|
||||
virtx cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||
fi
|
||||
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins Auxiliary/vim/syntax/cmake.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/indent
|
||||
doins Auxiliary/vim/indent/cmake.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${FILESDIR}/${PN}.vim"
|
||||
|
||||
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
fi
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
|
||||
# ... but seems fine as of 3.22.3?
|
||||
#CMAKE_MAKEFILE_GENERATOR="emake"
|
||||
CMAKE_REMOVE_MODULES_LIST=( none )
|
||||
inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \
|
||||
toolchain-funcs virtualx xdg-utils
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
DESCRIPTION="Cross platform Make"
|
||||
HOMEPAGE="https://cmake.org/"
|
||||
SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="CMake"
|
||||
SLOT="0"
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="doc emacs ncurses qt5 test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/libarchive-3.3.3:=
|
||||
app-crypt/rhash
|
||||
>=dev-libs/expat-2.0.1
|
||||
>=dev-libs/jsoncpp-1.9.2-r2:0=
|
||||
>=dev-libs/libuv-1.10.0:=
|
||||
>=net-misc/curl-7.21.5[ssl]
|
||||
sys-libs/zlib
|
||||
virtual/pkgconfig
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
qt5? (
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
doc? (
|
||||
dev-python/requests
|
||||
dev-python/sphinx
|
||||
)
|
||||
test? ( app-arch/libarchive[zstd] )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
PATCHES=(
|
||||
# prefix
|
||||
"${FILESDIR}"/${PN}-3.16.0_rc4-darwin-bundle.patch
|
||||
"${FILESDIR}"/${PN}-3.14.0_rc3-prefix-dirs.patch
|
||||
"${FILESDIR}"/${PN}-3.19.1-darwin-gcc.patch
|
||||
|
||||
# handle gentoo packaging in find modules
|
||||
"${FILESDIR}"/${PN}-3.17.0_rc1-FindBLAS.patch
|
||||
# Next patch needs to be reworked
|
||||
#"${FILESDIR}"/${PN}-3.17.0_rc1-FindLAPACK.patch
|
||||
"${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
|
||||
|
||||
# respect python eclasses
|
||||
"${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
|
||||
"${FILESDIR}"/${PN}-3.9.0_rc2-FindPythonInterp.patch
|
||||
|
||||
"${FILESDIR}"/${PN}-3.18.0-filter_distcc_warning.patch # bug 691544
|
||||
|
||||
# upstream fixes (can usually be removed with a version bump)
|
||||
)
|
||||
|
||||
cmake_src_bootstrap() {
|
||||
# disable running of cmake in bootstrap command
|
||||
sed -i \
|
||||
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
|
||||
bootstrap || die "sed failed"
|
||||
|
||||
# execinfo.h on Solaris isn't quite what it is on Darwin
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
sed -i -e 's/execinfo\.h/blablabla.h/' \
|
||||
Source/kwsys/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
# bootstrap script isn't exactly /bin/sh compatible
|
||||
tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \
|
||||
--prefix="${T}/cmakestrap/" \
|
||||
--parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|
||||
|| die "Bootstrap failed"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# disable Xcode hooks, bug #652134
|
||||
sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \
|
||||
Source/CMakeLists.txt || die
|
||||
sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \
|
||||
-e '/cmGlobalXCodeGenerator.h/d' \
|
||||
Source/cmake.cxx || die
|
||||
# disable isysroot usage with GCC, we've properly instructed
|
||||
# where things are via GCC configuration and ldwrapper
|
||||
sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
|
||||
Modules/Platform/Apple-GNU-*.cmake || die
|
||||
# disable isysroot usage with clang as well
|
||||
sed -i -e '/_SYSROOT_FLAG/d' \
|
||||
Modules/Platform/Apple-Clang.cmake || die
|
||||
# don't set a POSIX standard, system headers don't like that, #757426
|
||||
sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
|
||||
Source/cmLoadCommandCommand.cxx \
|
||||
Source/cmStandardLexer.h \
|
||||
Source/cmSystemTools.cxx \
|
||||
Source/cmTimestamp.cxx
|
||||
sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \
|
||||
Source/cmStandardLexer.h
|
||||
fi
|
||||
|
||||
# Add gcc libs to the default link paths
|
||||
sed -i \
|
||||
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
|
||||
-e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
|
||||
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
|
||||
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
|
||||
|
||||
if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then
|
||||
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
|
||||
cmake_src_bootstrap
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Fix linking on Solaris
|
||||
[[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
|
||||
-DCMAKE_DOC_DIR=/share/doc/${PF}
|
||||
-DCMAKE_MAN_DIR=/share/man
|
||||
-DCMAKE_DATA_DIR=/share/${PN}
|
||||
-DSPHINX_MAN=$(usex doc)
|
||||
-DSPHINX_HTML=$(usex doc)
|
||||
-DBUILD_CursesDialog="$(usex ncurses)"
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
)
|
||||
use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
use emacs && elisp-compile Auxiliary/cmake-mode.el
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# fix OutDir and SelectLibraryConfigurations tests
|
||||
# these are altered thanks to our eclass
|
||||
sed -i -e 's:^#_cmake_modify_IGNORE ::g' \
|
||||
"${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
|
||||
|| die
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
# Excluded tests:
|
||||
# BootstrapTest: we actualy bootstrap it every time so why test it.
|
||||
# BundleUtilities: bundle creation broken
|
||||
# CMakeOnly.AllFindModules: pthread issues
|
||||
# CTest.updatecvs: which fails to commit as root
|
||||
# Fortran: requires fortran
|
||||
# RunCMake.CompilerLauncher: also requires fortran
|
||||
# RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because
|
||||
# debugedit binary is not in the expected location
|
||||
# RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because
|
||||
# it can't find a deb package that owns libc
|
||||
# TestUpload, which requires network access
|
||||
# RunCMake.CMP0125, known failure reported upstream (bug #829414)
|
||||
local myctestargs=(
|
||||
--output-on-failure
|
||||
-E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \
|
||||
)
|
||||
|
||||
virtx cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||
fi
|
||||
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins Auxiliary/vim/syntax/cmake.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/indent
|
||||
doins Auxiliary/vim/indent/cmake.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${FILESDIR}/${PN}.vim"
|
||||
|
||||
dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
if use qt5; then
|
||||
xdg_icon_cache_update
|
||||
xdg_desktop_database_update
|
||||
xdg_mimeinfo_database_update
|
||||
fi
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit cmake prefix
|
||||
|
||||
DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
|
||||
HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP"
|
||||
SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz -> rocm-hip-${PV}.tar.gz
|
||||
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
|
||||
S="${WORKDIR}/HIP-rocm-${PV}"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
|
||||
IUSE="debug profile"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/rocclr:${SLOT}
|
||||
dev-util/rocminfo:${SLOT}
|
||||
dev-libs/roct-thunk-interface:${SLOT}
|
||||
=sys-devel/llvm-roc-${PV}*[runtime]
|
||||
profile? ( dev-util/roctracer:${SLOT} )"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-perl/URI-Encode"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
|
||||
"${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
|
||||
"${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch"
|
||||
"${FILESDIR}/${PN}-4.3.0-hip_vector_types.patch"
|
||||
"${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
# Use Gentoo slot number, otherwise git hash is attempted in vain.
|
||||
sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING ${SLOT#*/})" -i CMakeLists.txt || die
|
||||
|
||||
# disable PCH, because it results in a build error in ROCm 4.0.0
|
||||
sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i CMakeLists.txt || die
|
||||
|
||||
# remove forcing set USE_PROF_API to 1
|
||||
sed -e '/set(USE_PROF_API "1")/d' -i rocclr/CMakeLists.txt || die
|
||||
|
||||
# "hcc" is deprecated and not installed, new platform is "rocclr";
|
||||
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
|
||||
# which makes "stdlib.h" not found when using "#include_next" in header files;
|
||||
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
|
||||
-e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
|
||||
-e "/rpath/s,--rpath=[^ ]*,," \
|
||||
-i bin/hipcc || die
|
||||
|
||||
# correctly find HIP_CLANG_INCLUDE_PATH using cmake
|
||||
sed -e "/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i hip-config.cmake.in || die
|
||||
|
||||
# change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align with "dev-libs/rocm-device-libs"
|
||||
sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
|
||||
-i "${S}/hip-config.cmake.in" || die
|
||||
|
||||
einfo "prefixing hipcc and its utils..."
|
||||
hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
|
||||
|
||||
cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to replace hipvars.pm"
|
||||
sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e "s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
|
||||
-e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || die
|
||||
|
||||
cp -a "${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}/amdocl/cl_vk_amd.hpp amdocl/ || die
|
||||
|
||||
# Bug 790164
|
||||
rm amdocl/CL/cl{,_icd,_gl,_gl_ext,_platform}.h || die
|
||||
sed -i 's/CL_EXT_SUFFIX/CL_API_SUFFIX/' amdocl/cl_icd_amd.h amdocl/CL/cl_ext.h rocclr/cl_lqdflash_amd.h || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use debug && CMAKE_BUILD_TYPE="Debug"
|
||||
|
||||
# TODO: Currently a GENTOO configuration is build,
|
||||
# this is also used in the cmake configuration files
|
||||
# which will be installed to find HIP;
|
||||
# Other ROCm packages expect a "RELEASE" configuration,
|
||||
# see "hipBLAS"
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_PREFIX_PATH="${EPREFIX}/usr/lib/llvm/roc"
|
||||
-DCMAKE_BUILD_TYPE=${buildtype}
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/hip"
|
||||
-DBUILD_HIPIFY_CLANG=OFF
|
||||
-DHIP_PLATFORM=rocclr
|
||||
-DHIP_COMPILER=clang
|
||||
-DROCM_PATH="${EPREFIX}/usr"
|
||||
-DHSA_PATH="${EPREFIX}/usr"
|
||||
-DUSE_PROF_API=$(usex profile 1 0)
|
||||
-DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
|
||||
-DROCclr_DIR="${EPREFIX}"/usr/include/rocclr
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
echo "PATH=${EPREFIX}/usr/lib/hip/bin" >> 99hip || die
|
||||
echo "LDPATH=${EPREFIX}/usr/lib/hip/lib" >> 99hip || die
|
||||
echo "ROOTPATH=${EPREFIX}/usr/lib/hip/bin" >> 99hip || die
|
||||
|
||||
doenvd 99hip
|
||||
|
||||
cmake_src_install
|
||||
|
||||
rm "${ED}/usr/lib/hip/include/hip/hcc_detail" || die
|
||||
}
|
Binary file not shown.
@ -1 +1,4 @@
|
||||
DIST snes9x-1.60.tar.gz 2863228 BLAKE2B 0ac3bdd2403221f1013e2b5438aacc4e7d361e943ac7edc56f8ef22827d81484e0b162b84f739ce0f68fe58021124275fd908ccdde99e1e1d6d6c9c0a6e3d17b SHA512 840b006a8fbd479fd5ceb2d94af4ef6470c5e27a3e6c8ddb0dffc8d3e51f465669144cd428bfce28b2ed4f68e70d8f252f2d8a2cae602ba797791d7e483c14c9
|
||||
DIST snes9x-1.61-glslang.tar.gz 3188787 BLAKE2B 36ed327fbb2aec3657fe300b98f2e45cfe039596a64bca3076ecb079f7c33aa14ac09a96e5a174ad51faf0c4d585d82aaadec3d8209cf8d3ca55d70e316b1642 SHA512 de2ebc0cd89d22582c079006ac45a812e3aaaad9a44c77c68530aa1468fbc840c6ae25a4356d4e9fc697524cd721d26506d85bc35eac98452eabce0bc098b5a4
|
||||
DIST snes9x-1.61-spirv.tar.gz 676662 BLAKE2B ab18406c99e4e04c6c497b5f447dcaccb7d5a60f42bf1cea31afee04ee664e74916b32736c1aea1e7106494154e48e5cbe9b5d6a0652667c4d0e2020814cd9bd SHA512 bfa3cc944450db59a57a685eea12b0ed0b5059d55a092ac5cdf6f4dc03c1e2d2e62fa5a576156c772340e12136b10d7ed790bb35b4aece2ee8405e64f826e31b
|
||||
DIST snes9x-1.61.tar.gz 3016890 BLAKE2B 3e94dee5172bf48d2461a3a1403fc7e7fc8069df6dddf5b5e1da59ee140297bd0b7cee6948b5eb154c1eec38aebe3ab29a9fae3dfb4abdce41769d2ace43dee1 SHA512 8b644f5b7136e89fd222bcb430fc736c74a3e383d7e6c7f0880235f6fa4c0f77abbf02493f8d654a12e87701111643e33877bc21bb3dfcc9b82a056fa1b1d880
|
||||
|
@ -0,0 +1,25 @@
|
||||
CXXFLAGS is used as a "common" flags variable and passed to CFLAGS,
|
||||
but want to use user's CFLAGS for CC rather than CXXFLAGS. Workaround
|
||||
with a temporary variable and also drop -O3/lto from defaults.
|
||||
--- a/libretro/Makefile
|
||||
+++ b/libretro/Makefile
|
||||
@@ -4,3 +4,5 @@
|
||||
|
||||
-LTO ?= -flto
|
||||
+LTO :=
|
||||
+ORIG_CXXFLAGS := $(CXXFLAGS)
|
||||
+CXXFLAGS :=
|
||||
SPACE :=
|
||||
@@ -580,4 +582,4 @@
|
||||
else
|
||||
- CFLAGS += -O3 -DNDEBUG
|
||||
- CXXFLAGS += -O3 -DNDEBUG
|
||||
+ CFLAGS += -DNDEBUG
|
||||
+ CXXFLAGS += -DNDEBUG
|
||||
endif
|
||||
@@ -612,3 +614,4 @@
|
||||
CXXFLAGS += -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -DALLOW_CPU_OVERCLOCK
|
||||
-CFLAGS := $(CXXFLAGS)
|
||||
+CFLAGS := $(CXXFLAGS) $(CFLAGS)
|
||||
+CXXFLAGS += $(ORIG_CXXFLAGS)
|
||||
CFLAGS += -DHAVE_STDINT_H
|
@ -0,0 +1,153 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools meson toolchain-funcs xdg
|
||||
|
||||
GLSLANG_COMMIT="bcf6a2430e99e8fc24f9f266e99316905e6d5134"
|
||||
SPIRV_COMMIT="1458bae62ec67ea7d12c5a13b740e23ed4bb226c"
|
||||
|
||||
DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator"
|
||||
HOMEPAGE="https://github.com/snes9xgit/snes9x/"
|
||||
SRC_URI="
|
||||
https://github.com/snes9xgit/snes9x/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
gui? ( glslang? (
|
||||
https://github.com/KhronosGroup/glslang/archive/${GLSLANG_COMMIT}.tar.gz -> ${P}-glslang.tar.gz
|
||||
https://github.com/KhronosGroup/SPIRV-Cross/archive/${SPIRV_COMMIT}.tar.gz -> ${P}-spirv.tar.gz
|
||||
) )"
|
||||
|
||||
LICENSE="
|
||||
Snes9x GPL-2 GPL-2+ LGPL-2.1 LGPL-2.1+ ISC MIT ZLIB
|
||||
gui? ( glslang? ( Apache-2.0 BSD ) )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
IUSE="alsa debug glslang gui libretro netplay opengl oss png portaudio pulseaudio wayland xinerama +xv"
|
||||
REQUIRED_USE="glslang? ( gui opengl )"
|
||||
RESTRICT="bindist test" # has no tests but can lead to bug #737044
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/zlib:=[minizip]
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
gui? (
|
||||
dev-cpp/cairomm:0
|
||||
dev-cpp/glibmm:2
|
||||
dev-cpp/gtkmm:3.0[wayland?]
|
||||
dev-libs/glib:2
|
||||
dev-libs/libsigc++:2
|
||||
media-libs/libsdl2[joystick]
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/gtk+:3[wayland?]
|
||||
x11-libs/libXrandr
|
||||
x11-misc/xdg-utils
|
||||
opengl? ( media-libs/libepoxy )
|
||||
portaudio? ( media-libs/portaudio )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
wayland? ( dev-libs/wayland )
|
||||
)
|
||||
libretro? ( !games-emulation/libretro-snes9x )
|
||||
png? ( media-libs/libpng:= )
|
||||
xinerama? ( x11-libs/libXinerama )
|
||||
xv? ( x11-libs/libXv )"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
x11-base/xorg-proto
|
||||
opengl? ( media-libs/libglvnd )"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.53-cross-compile.patch
|
||||
"${FILESDIR}"/${PN}-1.59-build-system.patch
|
||||
"${FILESDIR}"/${PN}-1.61-libretro-flags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use gui && use glslang; then
|
||||
rmdir shaders/{glslang,SPIRV-Cross} || die
|
||||
mv ../glslang-${GLSLANG_COMMIT} shaders/glslang || die
|
||||
mv ../SPIRV-Cross-${SPIRV_COMMIT} shaders/SPIRV-Cross || die
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
rm -r unzip || die
|
||||
|
||||
cd unix || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX # for libretro
|
||||
|
||||
local econfargs=(
|
||||
$(use_enable alsa sound-alsa)
|
||||
$(use_enable debug debugger)
|
||||
$(use_enable netplay)
|
||||
$(use_enable png screenshot)
|
||||
$(use_enable xinerama)
|
||||
$(use_enable xv xvideo)
|
||||
--enable-gamepad
|
||||
--enable-gzip
|
||||
--enable-zip
|
||||
--with-system-zip
|
||||
)
|
||||
|
||||
cd unix || die
|
||||
econf "${econfargs[@]}"
|
||||
|
||||
if use gui; then
|
||||
local emesonargs=(
|
||||
$(meson_use alsa)
|
||||
$(meson_use debug debugger)
|
||||
$(meson_use glslang slang) # TODO?: unbundle
|
||||
$(meson_use opengl)
|
||||
$(meson_use oss)
|
||||
$(meson_use png screenshot)
|
||||
$(meson_use portaudio)
|
||||
$(meson_use pulseaudio)
|
||||
$(meson_use wayland)
|
||||
$(meson_use xv)
|
||||
-Dsystem-zip=true
|
||||
-Dzlib=true
|
||||
)
|
||||
|
||||
EMESON_SOURCE=${S}/gtk
|
||||
meson_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use libretro; then
|
||||
emake -C libretro
|
||||
# rebuild objects given libretro uses different defines (bug #791475)
|
||||
rm *.o || die
|
||||
fi
|
||||
|
||||
emake -C unix
|
||||
|
||||
use gui && meson_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use libretro; then
|
||||
exeinto /usr/$(get_libdir)/libretro
|
||||
doexe libretro/snes9x_libretro.so
|
||||
fi
|
||||
|
||||
dobin unix/${PN}
|
||||
|
||||
local DOCS=(
|
||||
README.md
|
||||
docs/{changes,control-inputs,controls,snapshots}.txt
|
||||
unix/snes9x.conf.default
|
||||
)
|
||||
einstalldocs
|
||||
|
||||
if use gui; then
|
||||
meson_src_install
|
||||
dodoc gtk/AUTHORS
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST xcowsay-1.5.1.tar.gz 101281 BLAKE2B 568f6ad7225cd859c37d79bf3ddf66c184f47d8feb6dedbafbd29ca4e05d97d883c6d6e4f4d60cebe107f1527e1ff01e17ec61430a3e55e2f504c2c00e402488 SHA512 55c165b5b2c01b11463af0eeb13fd646ea50138e2938ddfc25d44f1a704b7473d047bc7c95165f449a600de51ee005904f007843e33a8ef02c725b827eaec616
|
||||
DIST xcowsay-1.6.tar.gz 292845 BLAKE2B 88597063616928edfc74830171b287b676163faca0b3545dc4495cb0faee810ca7867f36223bba726074866de7fb3458621670265250c846ce94c035a0ad0828 SHA512 53016e1b2790b8bc213702f1b99a0ca0cacc57ef1c2cf821814ecb4aff68df05c98b279a1f39718f4fcee771e1397b27ad43123314b1f04dd442ddc0520a9f98
|
||||
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PV="r${PV}"
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Displays a cute cow and message on your desktop"
|
||||
HOMEPAGE="
|
||||
https://github.com/nickg/xcowsay
|
||||
https://www.doof.me.uk/xcowsay/
|
||||
"
|
||||
SRC_URI="https://github.com/nickg/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="dbus fortune nls"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
dbus? ( dev-libs/dbus-glib )
|
||||
fortune? ( games-misc/fortune-mod )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use fortune; then
|
||||
sed -e 's/xcowfortune//g' -i src/Makefile.am || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--disable-rpath
|
||||
$(use_enable dbus)
|
||||
$(use_enable nls)
|
||||
)
|
||||
|
||||
econf ${myeconfargs[@]}
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST gnome-tweaks-40.0.tar.xz 251908 BLAKE2B 4280e7565da3f95d7bcd81ba874d2f15e8c3834ab052cb4cf7cde8060eaea016670acf6f441d2cbce4b7566ba0bb7a7f9666b257893bc7b22b1cdc4d5a0edee2 SHA512 c3467f40af6bb79c2b10cb429e93aa29261066c2a5fd744bf2801c4e596cc270d45302ebfa942ee0c40067849c12e1ccd404c40e7f594bcff4c44cfe3f90bb97
|
||||
DIST gnome-tweaks-40.10.tar.xz 251712 BLAKE2B 7e9e04b86ffcff25cafd2a6dfc0c7be14c8caa4ae003369c34ed2c40c36ce857b05de9994f7c2187cbdd535f464b92f782ec91b835318c2b5d2219ad817fbe56 SHA512 1247933ad2f93bd7817af367d715468591840df4840d45641033ca19ea26c64239828ba3e24fafb8694014a98024b911266c314172ba8e37d6c4165e7e6e8a29
|
||||
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit gnome.org gnome2-utils meson python-single-r1 xdg
|
||||
|
||||
DESCRIPTION="Customize advanced GNOME options"
|
||||
HOMEPAGE="https://wiki.gnome.org/Apps/Tweaks"
|
||||
|
||||
LICENSE="GPL-3+ CC0-1.0"
|
||||
SLOT="0"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}"
|
||||
# See README.md for list of deps
|
||||
RDEPEND="${DEPEND}
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/pygobject-3.10.2:3[${PYTHON_USEDEP}]
|
||||
')
|
||||
>=gnome-base/gnome-settings-daemon-3
|
||||
x11-themes/sound-theme-freedesktop
|
||||
|
||||
>=dev-libs/glib-2.58:2
|
||||
>=x11-libs/gtk+-3.12:3[introspection]
|
||||
>=gnome-base/gnome-desktop-3.30:3[introspection]
|
||||
gui-libs/libhandy:1[introspection]
|
||||
net-libs/libsoup:2.4[introspection]
|
||||
x11-libs/libnotify[introspection]
|
||||
|
||||
>=gnome-base/gsettings-desktop-schemas-40.0
|
||||
>=gnome-base/gnome-shell-3.24
|
||||
x11-wm/mutter
|
||||
"
|
||||
BDEPEND=">=sys-devel/gettext-0.19.8"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/3.28.1-gentoo-cursor-themes.patch # Add contents of Gentoo's cursor theme directory to cursor theme list
|
||||
)
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
python_optimize
|
||||
python_fix_shebang "${ED}"/usr/bin/
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_schemas_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
gnome2_schemas_update
|
||||
}
|
Binary file not shown.
@ -0,0 +1,126 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Meta package for fonts to cover most needs"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||||
|
||||
LICENSE="metapackage"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~riscv ~x86"
|
||||
IUSE="cjk emoji +latin ms"
|
||||
|
||||
LANGS="as bn bo brx doi dz gu hi km kn kok ks mai ml mr ne or pa ru sa sat sd si syc ta te th"
|
||||
for lang in ${LANGS}; do
|
||||
IUSE+=" l10n_${lang}"
|
||||
done
|
||||
unset lang LANGS
|
||||
|
||||
RDEPEND="media-fonts/cantarell
|
||||
media-fonts/droid
|
||||
media-fonts/noto
|
||||
media-fonts/oldstandard
|
||||
media-fonts/powerline-symbols
|
||||
media-fonts/ubuntu-font-family
|
||||
media-libs/fontconfig
|
||||
|| (
|
||||
media-fonts/source-pro
|
||||
media-fonts/anonymous-pro
|
||||
media-fonts/cascadia-code
|
||||
media-fonts/fantasque-sans-mono
|
||||
media-fonts/fira-code
|
||||
media-fonts/fira-mono
|
||||
media-fonts/hack
|
||||
media-fonts/hermit
|
||||
media-fonts/ibm-plex
|
||||
media-fonts/inconsolata
|
||||
media-fonts/iosevka
|
||||
media-fonts/jetbrains-mono
|
||||
media-fonts/montecarlo
|
||||
media-fonts/roboto
|
||||
media-fonts/terminus-font
|
||||
)
|
||||
cjk? (
|
||||
media-fonts/ipaex
|
||||
media-fonts/ja-ipafonts
|
||||
media-fonts/koruri
|
||||
media-fonts/monafont
|
||||
media-fonts/nanum
|
||||
media-fonts/noto-cjk
|
||||
media-fonts/opendesktop-fonts
|
||||
media-fonts/shinonome
|
||||
media-fonts/source-han-sans
|
||||
media-fonts/unfonts
|
||||
media-fonts/wqy-microhei
|
||||
media-fonts/wqy-zenhei
|
||||
|| (
|
||||
media-fonts/mikachan-font-otf
|
||||
media-fonts/mikachan-font-ttf
|
||||
)
|
||||
)
|
||||
emoji? (
|
||||
|| (
|
||||
media-fonts/noto-emoji
|
||||
media-fonts/joypixels
|
||||
)
|
||||
)
|
||||
l10n_as? ( media-fonts/lohit-assamese )
|
||||
l10n_bn? ( media-fonts/lohit-bengali )
|
||||
l10n_bo? ( media-fonts/tibetan-machine-font )
|
||||
l10n_brx? ( media-fonts/lohit-devanagari )
|
||||
l10n_doi? ( media-fonts/lohit-devanagari )
|
||||
l10n_dz? ( media-fonts/dzongkha-fonts )
|
||||
l10n_gu? ( media-fonts/lohit-gujarati )
|
||||
l10n_hi? ( media-fonts/lohit-devanagari )
|
||||
l10n_km? ( media-fonts/khmer )
|
||||
l10n_kn? ( media-fonts/lohit-kannada )
|
||||
l10n_kok? ( media-fonts/lohit-devanagari )
|
||||
l10n_ks? ( media-fonts/lohit-devanagari )
|
||||
l10n_mai? ( media-fonts/lohit-devanagari )
|
||||
l10n_ml? ( media-fonts/lohit-malayalam )
|
||||
l10n_mr? (
|
||||
media-fonts/lohit-devanagari
|
||||
media-fonts/lohit-marathi
|
||||
)
|
||||
l10n_ne? (
|
||||
media-fonts/lohit-devanagari
|
||||
media-fonts/lohit-nepali
|
||||
)
|
||||
l10n_or? ( media-fonts/lohit-odia )
|
||||
l10n_pa? ( media-fonts/lohit-gurmukhi )
|
||||
l10n_ru? (
|
||||
media-fonts/font-misc-cyrillic
|
||||
media-fonts/paratype
|
||||
media-fonts/paratype-astra
|
||||
)
|
||||
l10n_sa? ( media-fonts/lohit-devanagari )
|
||||
l10n_sat? ( media-fonts/lohit-devanagari )
|
||||
l10n_sd? ( media-fonts/lohit-devanagari )
|
||||
l10n_si? ( media-fonts/lklug )
|
||||
l10n_syc? ( media-fonts/font-misc-meltho )
|
||||
l10n_ta? (
|
||||
media-fonts/lohit-tamil
|
||||
media-fonts/lohit-tamil-classical
|
||||
)
|
||||
l10n_te? ( media-fonts/lohit-telugu )
|
||||
l10n_th? ( media-fonts/thaifonts-scalable )
|
||||
latin? (
|
||||
media-fonts/courier-prime
|
||||
media-fonts/dejavu
|
||||
media-fonts/font-bh-ttf
|
||||
media-fonts/font-cursor-misc
|
||||
media-fonts/liberation-fonts
|
||||
media-fonts/open-sans
|
||||
media-fonts/quivira
|
||||
media-fonts/signika
|
||||
media-fonts/tex-gyre
|
||||
media-fonts/ttf-bitstream-vera
|
||||
media-fonts/urw-fonts
|
||||
)
|
||||
ms? (
|
||||
media-fonts/corefonts
|
||||
media-fonts/croscorefonts
|
||||
media-fonts/crosextrafonts-caladea
|
||||
media-fonts/crosextrafonts-carlito
|
||||
)"
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST cura-4.12.1.tar.gz 50021408 BLAKE2B 114bbe0cc022e33125486228db2eeaeacd9f4abeac8e65f3ed70231e05f4429062ce1cd49e1649959beb827b7a2d245f61c106529a18bd0cebbd0e8b9b8f883f SHA512 397048e1ed93d2e3ec326a3b0564db2b6ee2b239843346e2dd44470b11b5aea86f3f519534270789e020261c87a0100bf3bba39ddbd3a1d8be0e38e68fd7e0c0
|
||||
DIST cura-4.13.0.tar.gz 42339276 BLAKE2B 05e747b8e84ecf64bdc1ad7662eae7b5e8a739b7c1bbafdd3ae081e790dafbcd98209eb90f45996e93115ea8b7a38764be957091dd358c502e7aa71cb61fe6c7 SHA512 46f13cde12735d64dad2c533c7688612ebc1c2c8b78d71ced8cfd7d7abd80a53c09105bb16f64ae92cddf345fe44f83800d4448007fe5c2938c652f58354747b
|
||||
DIST cura-4.13.1.tar.gz 42339030 BLAKE2B e5c10ff03e42c0f88a2e7d827bf08f45c57142ca7b1dda6c00ccfbf0fd486dd366db23f00990ac5a021ecbfe038b2ca0247df8ea5130f2ee1efb766efc6f152c SHA512 6483fd6312bd2181cc812bce78aadc7e8532ecf292f09c75ce5e7870f7efddd63e84315ab40eb73c775b15c2ed2ce7fc804fcbefb73b3d8aaac77d8b22f0cbd0
|
||||
DIST cura-4.9.1.tar.gz 47870392 BLAKE2B 2471c8461f73ad2343f4c3315994c5f63781ae1e49cb4699cd66e7e77c25a93916931fbaa6598c4144707dbc7778c902dad3a25839c0523aaf51ed39aacd2463 SHA512 436b8e33514de67d6d680fe59ab9599a75a86caa7e63fbcd05297b12a435483ec0c9ca90557fe23f25590a24e533294915fc18a665fd5cdb77fcc3a05a9076bf
|
||||
|
@ -1,3 +1,3 @@
|
||||
DIST curaengine-4.12.1.tar.gz 1726565 BLAKE2B be231ec43792e1f27a6c720444c6755f71bbc3dbaea45b714c73f9b5b51753d58dafeef7ad2ed1bc21de1c39fe9f2a325ab8b85d3eb5b7f075a472dac98654b7 SHA512 c0c703ec9c7fb05389806f45174d45dd65bece169e3ad88aa1744091ce3c3c1e1e4f5af32cb55cfa9f1a4a8bffe0a008d5924a6e5d02baed00996c9112fbafef
|
||||
DIST curaengine-4.13.0.tar.gz 1727539 BLAKE2B e28aab6a4fa6c4fd9eb6b365ecd99d8c49a4e76da9198628e38d2d6aaa13f0120fcbd9fc809520f7b1f117782a09759e0c625b880f3b40e9d5d110b14debb260 SHA512 3d52c67c0968f6caffd9e0b86743f70916705e6f2896466e69a179ce97b6d35f7af33b056e9375abaa445a00438d25e5f782a7e2a92c0805cec0c0527a25426c
|
||||
DIST curaengine-4.13.1.tar.gz 1727935 BLAKE2B d306f990b86e6120705b36eba6f3363adc67cf8c93c66c2da506c1ee461a5a6bdd27a4e04880daeb6cebab3ecc736d9a52eec27bf17aa9f032237a4c8ee1d2a3 SHA512 224379a40e26ae0026a3849d582353e49edf99520401e1fef56c9504638c68c62cfe394dab0eb40e4a447bfe0bfa506a880512e84fd6057a839b6384087c46d0
|
||||
DIST curaengine-4.9.1.tar.gz 1694141 BLAKE2B 84119a2dd66340bdc3a4bd58384f300fb839aa7c5920de87d070945d3c436ace0f8686cd907a204e5825bdc17809d9f9052e37fb96b37e34a20650ca625d7b1e SHA512 cfa918c6301c9948713306256d74a2a84a1fefbc0f85c7ac0eb182d8363f1eae97aecdcb91c207a2e7e1ab252f63cf4b513734b50d4229da7aa35e095ef88bee
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue