parent
beb9f96d35
commit
62d7f7b769
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=425
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
Binary file not shown.
@ -0,0 +1,15 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-user
|
||||
|
||||
DESCRIPTION="User for kafka"
|
||||
|
||||
ACCT_USER_ID=425
|
||||
ACCT_USER_HOME=/var/lib/kafka
|
||||
ACCT_USER_SHELL=/bin/sh
|
||||
ACCT_USER_GROUPS=( kafka )
|
||||
|
||||
acct-user_add_deps
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
Binary file not shown.
@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Lightweight log shipper for Logstash and Elasticsearch"
|
||||
HOMEPAGE="https://www.elastic.co/products/beats"
|
||||
SRC_URI="https://github.com/elastic/beats/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 BSD-2 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.12.9"
|
||||
RDEPEND="!app-admin/filebeat-bin"
|
||||
|
||||
# Do not complain about CFLAGS etc since go projects do not use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
S="${WORKDIR}/src/github.com/elastic/beats"
|
||||
|
||||
src_unpack() {
|
||||
mkdir -p "${S%/*}" || die
|
||||
default
|
||||
mv beats-${PV} "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# avoid Elastic license
|
||||
rm -r x-pack || die
|
||||
|
||||
# use ${PV} instead of git commit id
|
||||
sed -i "s/\(COMMIT_ID=\).*/\1${PV}/g" "${S}/libbeat/scripts/Makefile" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
GOPATH="${WORKDIR}" emake -C "${S}/filebeat"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
keepdir /etc/${PN}
|
||||
keepdir /var/{lib,log}/${PN}
|
||||
|
||||
fperms 0750 /var/{lib,log}/${PN}
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd.1" ${PN}
|
||||
|
||||
docinto examples
|
||||
dodoc ${PN}/{filebeat.yml,filebeat.reference.yml}
|
||||
|
||||
dobin filebeat/filebeat
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n "${REPLACING_VERSIONS}" ]]; then
|
||||
elog "Please read the migration guide at:"
|
||||
elog "https://www.elastic.co/guide/en/beats/libbeat/$(ver_cut 1-2)/upgrading.html"
|
||||
elog ""
|
||||
fi
|
||||
|
||||
elog "Example configurations:"
|
||||
elog "${EROOT}/usr/share/doc/${PF}/examples"
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST graylog-2.5.1.tgz 123878927 BLAKE2B d168579be4d20e3a8081d608247e7101fc5d99ddd2b5f063f94d7e91d4095c6bd016a4bc1be0f0e08b5043b771070312286404ece5eacc51e4a8730dfc13dab1 SHA512 44e2ca00e47a34708cea94b74fdc0f56f3a381f161d25633bdf7685fbcd989937163508f8b47b0869c7daacec6c8bd2c874f9381e196ffb3194eb6e3f96b3ce9
|
||||
DIST graylog-3.1.3.tgz 120983897 BLAKE2B 68e1dd7b8de7ab9fb12fd2035bcf6f0901d8d9f5083ff8efef09736819ccd70ae4dd6f466cf2fa1eaebb24b4098a26d72524f9b9a47e8dd62d0224bad189bb62 SHA512 8eec2339db474b89fc717e693ec23ca32d9a018f9bb924aab895d1a1f4e90afa9fe9547e432d13b9d0bf5831f8772763f19de41ac66f3e09ebf7e96ebd6cbccf
|
||||
DIST graylog-3.2.2.tgz 125510385 BLAKE2B 87895af9c495361c03b0a6cea6299fb206152a05a69be63600cb15e57ed1c6bb90dcf58539c136361dc95bd7d138b9e6c5bc33c3ccc409e392e4b5857d175951 SHA512 c13c3daee81cd553f40156fc5add46e4af9a3436b04f2216a1460a9af7b5fe07e866451243cc04b756247d513ef76ab43ee52dc7cb67fd1b593a22e490227db7
|
||||
|
@ -0,0 +1,83 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Free and open source log management"
|
||||
HOMEPAGE="https://www.graylog.org"
|
||||
SRC_URI="https://downloads.graylog.org/releases/graylog/${P}.tgz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
RESTRICT="strip"
|
||||
|
||||
RDEPEND="!app-admin/graylog2
|
||||
acct-group/graylog
|
||||
acct-user/graylog
|
||||
>=virtual/jdk-1.8:*"
|
||||
|
||||
DOCS=(
|
||||
COPYING README.markdown UPGRADING.rst
|
||||
)
|
||||
|
||||
GRAYLOG_DATA_DIR="/var/lib/graylog"
|
||||
GRAYLOG_INSTALL_DIR="/usr/share/graylog"
|
||||
QA_PREBUILT="${GRAYLOG_INSTALL_DIR}/lib/sigar/libsigar*"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Stick to architecture of build host
|
||||
if ! use amd64; then
|
||||
rm -r lib/sigar/libsigar-amd64-*.so || die "Failed in removing AMD64 support libraries"
|
||||
fi
|
||||
if ! use ppc64; then
|
||||
rm -r lib/sigar/libsigar-ppc64-*.so || die "Failed in removing PPC64 support libraries"
|
||||
fi
|
||||
if ! use x86; then
|
||||
rm -r lib/sigar/libsigar-x86-*.so || die "Failed in removing X86 support libraries"
|
||||
fi
|
||||
# Currently unsupported platforms
|
||||
# QA warning galore but testing/patches welcome
|
||||
rm lib/sigar/libsigar-*freebsd*so \
|
||||
lib/sigar/libsigar-*solaris*so \
|
||||
lib/sigar/libsigar-*hpux*.sl \
|
||||
lib/sigar/libsigar-*macosx*.dylib \
|
||||
lib/sigar/libsigar-ia64-*.so \
|
||||
lib/sigar/libsigar-ppc-*.so \
|
||||
lib/sigar/libsigar-s390x*.so \
|
||||
lib/sigar/*winnt* || die "Failed in removing unsupported platform libraries"
|
||||
|
||||
# gentoo specific paths
|
||||
sed -i "s@\(node_id_file = \).*@\1${GRAYLOG_DATA_DIR}/node-id@g; \
|
||||
s@\(message_journal_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/journal@g;" \
|
||||
graylog.conf.example || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
insinto /etc/graylog
|
||||
doins graylog.conf.example
|
||||
|
||||
insinto "${GRAYLOG_INSTALL_DIR}"
|
||||
doins graylog.jar
|
||||
doins -r lib plugin
|
||||
|
||||
keepdir "${GRAYLOG_DATA_DIR}"
|
||||
|
||||
newconfd "${FILESDIR}/graylog.confd" graylog
|
||||
newinitd "${FILESDIR}/graylog.initd" graylog
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Graylog does not depend on need.net any more (#439092)."
|
||||
ewarn
|
||||
ewarn "Please configure rc_need according to your binding address in:"
|
||||
ewarn "/etc/conf.d/graylog"
|
||||
ewarn
|
||||
ewarn "Graylog requires Java >= 8"
|
||||
ewarn "Elasticsearch 5.x or 6.x (does NOT work with 7.x)"
|
||||
ewarn "and MongoDB 3.6 or 4.0 (does NOT work with 4.2)"
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit java-pkg-2
|
||||
|
||||
MY_PN="${PN%-bin}"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Tool for managing events and logs"
|
||||
HOMEPAGE="https://www.elastic.co/products/logstash"
|
||||
SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.tar.gz )
|
||||
!x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-oss-${PV}.tar.gz )"
|
||||
|
||||
# source: LICENSE.txt and NOTICE.txt
|
||||
LICENSE="Apache-2.0 MIT x-pack? ( Elastic )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="x-pack"
|
||||
|
||||
RESTRICT="strip"
|
||||
QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
|
||||
|
||||
RDEPEND="acct-group/logstash
|
||||
acct-user/logstash
|
||||
virtual/jre"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_install() {
|
||||
keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
|
||||
keepdir "/var/log/${MY_PN}"
|
||||
|
||||
insinto "/usr/share/${MY_PN}"
|
||||
newins "${FILESDIR}/agent.conf.sample" agent.conf
|
||||
|
||||
rm -v config/{pipelines.yml,startup.options} || die
|
||||
insinto /etc/${MY_PN}
|
||||
doins -r config/.
|
||||
doins "${FILESDIR}/pipelines.yml"
|
||||
rm -rv config data || die
|
||||
|
||||
insinto "/opt/${MY_PN}"
|
||||
doins -r .
|
||||
fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin"
|
||||
|
||||
newconfd "${FILESDIR}/${MY_PN}.confd-r2" "${MY_PN}"
|
||||
newinitd "${FILESDIR}/${MY_PN}.initd-r2" "${MY_PN}"
|
||||
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${FILESDIR}"/logstash-plugin.eselect
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Self installed plugins are removed during Logstash upgrades (Bug #622602)"
|
||||
ewarn "Install the plugins via eselect module that will automatically re-install"
|
||||
ewarn "all self installed plugins after Logstash upgrades."
|
||||
elog
|
||||
elog "Installing plugins:"
|
||||
elog "eselect logstash-plugin install logstash-output-gelf"
|
||||
elog
|
||||
|
||||
elog "Reinstalling self installed plugins (installed via eselect module):"
|
||||
eselect logstash-plugin reinstall
|
||||
|
||||
elog
|
||||
elog "Sample configuration:"
|
||||
elog "${EROOT}/usr/share/${MY_PN}"
|
||||
elog
|
||||
elog "The default pipeline configuration expects the configuration(s) to be found in:"
|
||||
elog "${EROOT}/etc/logstash/conf.d/*.conf"
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,3 +1,2 @@
|
||||
DIST qca-2.2.1.tar.xz 691676 BLAKE2B d5bcc0d6e791811e1efcdbf2e09916fe40ad682b0e59b2993c73a5bd79e09fc28facdec81259a982bee05223c8dfce78b9a6b729ca4e566c0901a13b91575379 SHA512 3a0e8aa7cf3ea9a7244facaf1d521ebca2753af37636e7bf5f21c57ae880ac9682ae7d6d9fa5ce41b73568ff9538214956b89cd41228c2cb828d9068c2031a9c
|
||||
DIST qca-2.2.90.tar.xz 729488 BLAKE2B bc061118afa7912d249317dd4af9d2f4619b339ec892e33d1c757dc11a4a8b06db96d2437f08abeb48e4a1277cb399d8b3d60d8e2645b2d81cf9d20735ac3cb4 SHA512 5c431b66f898786271881c1275883e332fbfecd62ee265cae2ad345a13ff74ca36fc9b3e93972dcf29c4333f1c8049488ca52ca809c977553b422b9a27b45b7c
|
||||
DIST qca-2.3.0.tar.xz 729504 BLAKE2B 71cf9dfae00066c14e1055da1fa1a8e1210f538b1addfde1b99a9b26b1e8f7dd61e289d0f505b5ec04d5f4745216d4fd0f8be8f8de9e9cbf74123907ba703d0e SHA512 ca9251868e073834562fa62ffc64b3e7817c9ddadc6bc3fb99cf8b5c8d859969562170a98874be9590c617b2dd8e5590d2c83792554f54bb880c677902db22fe
|
||||
|
@ -1,84 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit kde.org cmake qmake-utils
|
||||
|
||||
DESCRIPTION="Qt Cryptographic Architecture (QCA)"
|
||||
HOMEPAGE="https://userbase.kde.org/QCA"
|
||||
SRC_URI="mirror://kde/unstable/${PN}/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="2"
|
||||
KEYWORDS=""
|
||||
IUSE="botan debug doc examples gcrypt gpg logger nss pkcs11 sasl softstore +ssl test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
doc? ( app-doc/doxygen )
|
||||
"
|
||||
RDEPEND="
|
||||
dev-qt/qtcore:5
|
||||
botan? ( dev-libs/botan:= )
|
||||
gcrypt? ( dev-libs/libgcrypt:= )
|
||||
gpg? ( app-crypt/gnupg )
|
||||
nss? ( dev-libs/nss )
|
||||
pkcs11? (
|
||||
>=dev-libs/openssl-1.1
|
||||
dev-libs/pkcs11-helper
|
||||
)
|
||||
sasl? ( dev-libs/cyrus-sasl:2 )
|
||||
ssl? ( >=dev-libs/openssl-1.1:0= )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qttest:5
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-disable-pgp-test.patch" )
|
||||
|
||||
qca_plugin_use() {
|
||||
echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1")
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(qt5_get_mkspecsdir)/features"
|
||||
-DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(qt5_get_plugindir)"
|
||||
$(qca_plugin_use botan)
|
||||
$(qca_plugin_use gcrypt)
|
||||
$(qca_plugin_use gpg gnupg)
|
||||
$(qca_plugin_use logger)
|
||||
$(qca_plugin_use nss)
|
||||
$(qca_plugin_use pkcs11)
|
||||
$(qca_plugin_use sasl cyrus-sasl)
|
||||
$(qca_plugin_use softstore)
|
||||
$(qca_plugin_use ssl ossl)
|
||||
-DBUILD_TESTS=$(usex test)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca"
|
||||
cmake_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use doc; then
|
||||
pushd "${BUILD_DIR}" >/dev/null || die
|
||||
doxygen Doxyfile || die
|
||||
dodoc -r apidocs/html
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
dodoc -r "${S}"/examples
|
||||
fi
|
||||
}
|
@ -1,14 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<use>
|
||||
<flag name="pkcs11">
|
||||
Build Token data management utilities based on OpenCryptoki's
|
||||
(<pkg>dev-libs/opencryptoki</pkg>) PKCS#11 implementation.
|
||||
</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">trousers</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="person">
|
||||
<email>salah.coronya@gmail.com</email>
|
||||
<name>Salah Coronya</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="pkcs11">
|
||||
Build Token data management utilities based on OpenCryptoki's
|
||||
(<pkg>dev-libs/opencryptoki</pkg>) PKCS#11 implementation.
|
||||
</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">trousers</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -1 +1,2 @@
|
||||
DIST tpm2-abrmd-2.1.1.tar.gz 561352 BLAKE2B 4106811b238fee7b503bf0afb4ed857371bab023d8e449d5864eebb2386779e2bc8fb0f2bf8e334ebd8d7abe5c569f2b2cc2ea60b07672b1d3294092e63c2a5a SHA512 d685812c26a097190ced5a9e8ceb1544eb9e3858606123644d5496031706af91e5ba9fb54eb371bcb4eed4d236617f7a21a49a792196db9c5ebf277582ac7124
|
||||
DIST tpm2-abrmd-2.3.1.tar.gz 566988 BLAKE2B 281c1288baaa07b93939219143f4ecc2420b353d04d751746b6e43c93e092d0facb3d0ddbc20129328666d69954dd16ea7e709fea99690af80b2c83e1ac855e4 SHA512 144ab2b147cd18f892f3c05181efdbed2ac422fe8507eb42871ffe571340b6395431743a4f1995a7ce7a914fd5e7afd2b17328062c893a0403708c2c4d92e0cb
|
||||
|
@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools systemd
|
||||
|
||||
DESCRIPTION="TPM2 Access Broker & Resource Manager"
|
||||
HOMEPAGE="https://github.com/tpm2-software/tpm2-abrmd"
|
||||
SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="static-libs test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="acct-group/tss
|
||||
acct-user/tss
|
||||
sys-apps/dbus:=
|
||||
dev-libs/glib:=
|
||||
app-crypt/tpm2-tss:="
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-util/cmocka )"
|
||||
BDEPEND="virtual/pkgconfig
|
||||
dev-util/gdbus-codegen"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable test unit) \
|
||||
--disable-defaultflags \
|
||||
--with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d" \
|
||||
--with-systemdpresetdir="$(systemd_get_systemunitdir)/../system-preset" \
|
||||
--with-systemdpresetdisable \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST tpm2-tools-3.1.4.tar.gz 589388 BLAKE2B aaaa9a0158d0658dc2db4734b18ea1d49bd6c0aef84c4f1236f3134245165dccdb0bada69d92f0e5a59ecb1f2973e5cd25924d2b9c4cad2891d9e4f9fb94a84b SHA512 c5e1be4ffab305ee42a8b4a9c9aa4373158259a58844e273465f97a74f913fb12098b9fd81127148be95ecba7378f6a45b96af256dde3101a237e5e33e8e8ccb
|
||||
DIST tpm2-tools-4.1.1.tar.gz 779914 BLAKE2B 5b347b00508183cbde407e01454df0a7eb3a8080cb5b8f73d153c4972b38b98ac7c066664b54aeedef03b9bfd97b3cff482dbc44d5f11215af9c3c7754380d75 SHA512 25952cf947f0acd16b1a8dbd3ac8573bce85ff970a7e24c290c4f9cd29418e77a3e48ac82c932fbd250887a9303ab301ff92db594c2fffaba47b873382444d26
|
||||
|
@ -0,0 +1,26 @@
|
||||
From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
|
||||
From: Salah Coronya <salah.coronya@gmail.com>
|
||||
Date: Sun, 12 Jan 2020 19:17:48 -0600
|
||||
Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
|
||||
|
||||
Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
|
||||
---
|
||||
lib/tpm2_openssl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
|
||||
index 505dd7a0..fd3861d9 100644
|
||||
--- a/lib/tpm2_openssl.c
|
||||
+++ b/lib/tpm2_openssl.c
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "tpm2_openssl.h"
|
||||
|
||||
/* compatibility function for OpenSSL versions < 1.1.0 */
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
|
||||
int r;
|
||||
int topad;
|
||||
--
|
||||
2.24.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Tools for the TPM 2.0 TSS"
|
||||
HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
|
||||
SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="libressl test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND=">=app-crypt/tpm2-tss-2.3.1:=
|
||||
net-misc/curl:=
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-util/cmocka )"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-libressl.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable !libressl hardening) \
|
||||
$(use_enable test unit)
|
||||
}
|
@ -1 +1 @@
|
||||
DIST tpm2-totp-0.1.1.tar.gz 357787 BLAKE2B c7a24b30c155cfd5387180a2c8584497327eadd701068aa5eb3c385bbadf26f448f88c238849fbf68c4e7265f01d3783b3aa50a912070df1c2fd4485310f2299 SHA512 33a4af16a292ddd674a399bf12ce0b355d95de7014e8be11816a1d88edfd36ae222a8b7508f3aa1be3b46c7e04bf2712ee4839cf9f4f83fc308cb4f639ec5b9f
|
||||
DIST tpm2-totp-0.2.1.tar.gz 427226 BLAKE2B e6a9dbcdac4d7fc31048aff968e3eea097752c79a3c1b8551d22558a6b143a758e7bb507722185c648000f4b1edd2f0bbdd443890b5763b297f3d42cfbd84d9d SHA512 2bda34e89b76319a40206e08c0208b0f139309c0b0e40e7168b5e7562096750df504dfcae3a39e6f82fdccbf7a79ed0802d115fbd7560dc3f5b52d81fe8fb59c
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 2652497a15572d2484f57fee8be252d0d5fe4f8c Mon Sep 17 00:00:00 2001
|
||||
From: Alon Bar-Lev <alon.barlev@gmail.com>
|
||||
Date: Fri, 31 May 2019 01:39:29 +0300
|
||||
Subject: [PATCH] build: add --disable-defaultflags
|
||||
|
||||
Align with tpm2-tss to allow downstream to provide flags.
|
||||
|
||||
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
|
||||
---
|
||||
configure.ac | 42 +++++++++++++++++++++++++-----------------
|
||||
1 file changed, 25 insertions(+), 17 deletions(-)
|
||||
|
||||
https://github.com/tpm2-software/tpm2-totp/pull/39
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index baf596b..ac11e1e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -47,23 +47,31 @@ AC_SUBST([LIBEXECDIR])
|
||||
|
||||
AC_CONFIG_FILES([Makefile dist/tpm2-totp.pc dist/dracut/module-setup.sh dist/initcpio/install/plymouth-tpm2-totp])
|
||||
|
||||
-AX_ADD_COMPILER_FLAG([-std=c99])
|
||||
-AX_ADD_COMPILER_FLAG([-Wall])
|
||||
-AX_ADD_COMPILER_FLAG([-Wextra])
|
||||
-AX_ADD_COMPILER_FLAG([-Wformat-security])
|
||||
-AX_ADD_COMPILER_FLAG([-Werror])
|
||||
-AX_ADD_COMPILER_FLAG([-fstack-protector-all])
|
||||
-AX_ADD_COMPILER_FLAG([-fpic])
|
||||
-AX_ADD_COMPILER_FLAG([-fPIC])
|
||||
-
|
||||
-# work around GCC bug #53119
|
||||
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
|
||||
-AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
|
||||
-
|
||||
-AX_ADD_LINK_FLAG([-Wl,--no-undefined])
|
||||
-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
|
||||
-AX_ADD_LINK_FLAG([-Wl,-z,now])
|
||||
-AX_ADD_LINK_FLAG([-Wl,-z,relro])
|
||||
+AC_ARG_ENABLE([defaultflags],
|
||||
+ [AS_HELP_STRING([--disable-defaultflags],
|
||||
+ [Disable default preprocessor, compiler, and linker flags.])],
|
||||
+ [enable_defaultflags=$enableval],
|
||||
+ [enable_defaultflags=yes])
|
||||
+AS_IF([test "x$enable_defaultflags" = "xyes"],
|
||||
+ [
|
||||
+ AX_ADD_COMPILER_FLAG([-std=c99])
|
||||
+ AX_ADD_COMPILER_FLAG([-Wall])
|
||||
+ AX_ADD_COMPILER_FLAG([-Wextra])
|
||||
+ AX_ADD_COMPILER_FLAG([-Wformat-security])
|
||||
+ AX_ADD_COMPILER_FLAG([-Werror])
|
||||
+ AX_ADD_COMPILER_FLAG([-fstack-protector-all])
|
||||
+ AX_ADD_COMPILER_FLAG([-fpic])
|
||||
+ AX_ADD_COMPILER_FLAG([-fPIC])
|
||||
+
|
||||
+ # work around GCC bug #53119
|
||||
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
|
||||
+ AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
|
||||
+
|
||||
+ AX_ADD_LINK_FLAG([-Wl,--no-undefined])
|
||||
+ AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
|
||||
+ AX_ADD_LINK_FLAG([-Wl,-z,now])
|
||||
+ AX_ADD_LINK_FLAG([-Wl,-z,relro])
|
||||
+ ])
|
||||
|
||||
AX_CODE_COVERAGE
|
||||
m4_ifdef([_AX_CODE_COVERAGE_RULES],
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1 +1 @@
|
||||
DIST tpm2-tss-engine-1.0.0.tar.gz 382277 BLAKE2B 6580eb83f4e9391a12df2fb9cb86ace385a9e29004a64f6ca9378d9b8f60572a7761f4f486e1010d435487fed28858737d2bb71b08e400e9551a7b83c198bbe7 SHA512 b06722c82c9cefd5184125b26fb46bd7b20d62631c21c51a028348833c4786b41ff64f2c1cb7d53f749a6cf35b8fae02ae02285fc43d1d044e2d2b6e2e7048a3
|
||||
DIST tpm2-tss-engine-1.0.1.tar.gz 382715 BLAKE2B b33b91bf892509f8ed88bea1ba9611f06c9342726932baebbe918fcd4208f6c4b07710db666261b7676b90feb796746552804553e79ef817c02587504d266f44 SHA512 106fc6aadf0b4b27c3b38be596356aa59b4b76ec1602e8c5564aec6b4be7e2b5d6077006ee13d41e58402255b879aadaa966c758b5b326ae32742007ce2ef238
|
||||
|
@ -1 +1,2 @@
|
||||
DIST tpm2-tss-2.2.3.tar.gz 912179 BLAKE2B 36b2a462512822dccb3adab605ea9922132f027455a1d2895b6735f6200fe44f08288477c99afd0f6c06b4bff3090104b6412b12ea4a518888cf756fb8ee53c4 SHA512 68087cbf2b7acc33788e90b3825bf2c91faa65cfc04b576790634c88876a8a6930d6943f83b7cf0858e37e5e7307703d0c975b9fc0b0ad1d87f66c74b65bd411
|
||||
DIST tpm2-tss-2.3.2.tar.gz 1087241 BLAKE2B cccefc0635ba141b2e54025da064e6328b3c4c74b4b11a25f2230e0e499e235eea67f6df8d1a6cb011c53ce23978827cb4c633e631540bfca88b85d6c8762ed7 SHA512 7b679b54f3478c3adee5b6c3135cbe491ffd9f4712991f465edbd6c7d2831e5f1537038ec36f288e9545c719d5d167b61116c924cf5d816220615d0b58a1d436
|
||||
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-info udev
|
||||
|
||||
DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack"
|
||||
HOMEPAGE="https://github.com/tpm2-software/tpm2-tss"
|
||||
SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0/0" # sublot is libtss2-sys number
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc +gcrypt openssl static-libs test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="
|
||||
gcrypt? ( !openssl )
|
||||
openssl? ( !gcrypt )
|
||||
|| ( gcrypt openssl )"
|
||||
|
||||
RDEPEND="acct-group/tss
|
||||
acct-user/tss
|
||||
gcrypt? ( dev-libs/libgcrypt:0= )
|
||||
openssl? ( dev-libs/openssl:0= )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-util/cmocka )"
|
||||
BDEPEND="virtual/pkgconfig
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK=" \
|
||||
~TCG_TPM
|
||||
"
|
||||
linux-info_pkg_setup
|
||||
kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable doc doxygen-doc) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable test unit) \
|
||||
--disable-defaultflags \
|
||||
--disable-weakcrypto \
|
||||
--with-crypto="$(usex gcrypt gcrypt ossl)" \
|
||||
--with-udevrulesdir="$(get_udevdir)/rules.d" \
|
||||
--with-udevrulesprefix=60-
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
}
|
@ -1,9 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:debian:trousers</remote-id>
|
||||
<remote-id type="sourceforge">trousers</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="person">
|
||||
<email>salah.coronya@gmail.com</email>
|
||||
<name>Salah Coronya</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:debian:trousers</remote-id>
|
||||
<remote-id type="sourceforge">trousers</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST lyskom-elisp-client-0.48_p20180410.tar.xz 889468 BLAKE2B b8a1766b6f6b1d4b01676792f45d66517cdc43d2e29ae6e5b0704b90e4dfc749f8e4155159fd28a25426d79502bcaf7f2cbded32b2e64e22b2b36f11cbdbd123 SHA512 efb04b2100d59fac971898a6db3e48cf45e3bdc4455f06a0cdd065a97db5441edd4eda2e838a5e88c0b0246387dba0e3f71777892b3a6889c51960f0259fbdfc
|
||||
DIST lyskom-elisp-client-0.48_p20200226.tar.xz 896372 BLAKE2B e9d2c7db2cbce40fa48a788c09db052ff819db2cb00848c735646c8d6fc72ea808c03881295bf91d5cb37ce63ceebf6d4537674b9a87946c75a0a92c613eb37b SHA512 901257ef054e5700038cc59712d02e855920851782bf0d44090e1db500f545fee44e47c70c8036bb29a92056c2e72ff48ac518ccdb36ab84c18a6ac18e309529
|
||||
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit elisp readme.gentoo-r1
|
||||
|
||||
DESCRIPTION="Elisp client for the LysKOM conference system"
|
||||
HOMEPAGE="http://www.lysator.liu.se/lyskom/klienter/emacslisp/index.en.html"
|
||||
# snapshot of git://git.lysator.liu.se/${PN}/${PN}.git
|
||||
SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~sparc ~x86"
|
||||
IUSE="l10n_sv"
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
ELISP_PATCHES="${PN}-0.48_p20161231-no-git.patch"
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
elisp_src_prepare
|
||||
local d=${PV#*_p}
|
||||
sed -i "s/@@DATE@@/${d:0:4}-${d:4:2}-${d:6:2}/" src/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C src EMACS=emacs
|
||||
# Info page is in Swedish only
|
||||
use l10n_sv && emake -C doc elisp-client
|
||||
}
|
||||
|
||||
src_install() {
|
||||
elisp-install ${PN} src/lyskom.{el,elc}
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||
dodoc src/{ChangeLog*,README,TODO} doc/NEWS*
|
||||
use l10n_sv && doinfo doc/elisp-client
|
||||
|
||||
DOC_CONTENTS="If you prefer an English language environment, add the
|
||||
following line to your ~/.emacs file:
|
||||
\n\t(setq-default kom-default-language 'en)"
|
||||
readme.gentoo_create_doc
|
||||
}
|
Binary file not shown.
@ -0,0 +1,83 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit systemd
|
||||
|
||||
DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
|
||||
HOMEPAGE="https://www.elastic.co/products/elasticsearch"
|
||||
SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${P}-no-jdk-linux-x86_64.tar.gz )
|
||||
!x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${PN}-oss-${PV}-no-jdk-linux-x86_64.tar.gz )"
|
||||
LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain x-pack? ( Elastic )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="x-pack"
|
||||
|
||||
RDEPEND="acct-group/elasticsearch
|
||||
acct-user/elasticsearch
|
||||
virtual/jre"
|
||||
|
||||
QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
rm LICENSE.txt NOTICE.txt || die
|
||||
rmdir logs || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
keepdir /etc/${PN}
|
||||
keepdir /etc/${PN}/scripts
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins -r config/.
|
||||
rm -r config || die
|
||||
|
||||
fowners root:${PN} /etc/${PN}
|
||||
fperms 2750 /etc/${PN}
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r .
|
||||
|
||||
exeinto /usr/share/${PN}/bin
|
||||
doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
|
||||
|
||||
chmod +x "${ED}"/usr/share/${PN}/bin/* || die
|
||||
|
||||
if use x-pack; then
|
||||
chmod +x "${ED}"/usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin/* || die
|
||||
fi
|
||||
|
||||
keepdir /var/{lib,log}/${PN}
|
||||
fowners ${PN}:${PN} /var/{lib,log}/${PN}
|
||||
fperms 0750 /var/{lib,log}/${PN}
|
||||
dodir /usr/share/${PN}/plugins
|
||||
|
||||
insinto /etc/sysctl.d
|
||||
newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.conf.3" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.init.7" ${PN}
|
||||
|
||||
systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
|
||||
systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
|
||||
systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "You may create multiple instances of ${PN} by"
|
||||
elog "symlinking the init script:"
|
||||
elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
|
||||
elog
|
||||
elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
|
||||
elog "from /etc/${PN} into the configuration directory of the instance:"
|
||||
elog "/etc/${PN}/instance"
|
||||
elog
|
||||
ewarn "Please make sure you have proper permissions on /etc/${PN}"
|
||||
ewarn "prior to keystore generation or you may experience startup fails."
|
||||
ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
|
||||
ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,420 @@
|
||||
From 0274956acf4479b7346ac441fe09f2e56d575c47 Mon Sep 17 00:00:00 2001
|
||||
From: "Rafael G. Martins" <rafael@rafaelmartins.eng.br>
|
||||
Date: Wed, 26 Feb 2020 18:22:06 +0100
|
||||
Subject: [PATCH] python3 support
|
||||
|
||||
---
|
||||
distdiffer | 46 ++++++++++++++++++++++----------------------
|
||||
distpatch/chksums.py | 12 ++++++------
|
||||
distpatch/deltadb.py | 4 ++--
|
||||
distpatch/diff.py | 12 ++++++------
|
||||
distpatch/package.py | 6 +++---
|
||||
distpatch/patch.py | 4 ++--
|
||||
distpatch/stats.py | 6 +++---
|
||||
distpatcher | 32 +++++++++++++++---------------
|
||||
distpatchq | 28 +++++++++++++--------------
|
||||
9 files changed, 75 insertions(+), 75 deletions(-)
|
||||
|
||||
diff --git a/distdiffer b/distdiffer
|
||||
index a2b933d..6975b5c 100755
|
||||
--- a/distdiffer
|
||||
+++ b/distdiffer
|
||||
@@ -73,39 +73,39 @@ def main():
|
||||
return
|
||||
|
||||
if args.verbose:
|
||||
- print '>>> Starting distdiffer ...\n'
|
||||
+ print('>>> Starting distdiffer ...\n')
|
||||
|
||||
for package in packages:
|
||||
if args.verbose:
|
||||
- print '>>> Package: %s' % package
|
||||
+ print('>>> Package: %s' % package)
|
||||
pkg = Package(db)
|
||||
try:
|
||||
pkg.diff(package)
|
||||
- except Exception, err:
|
||||
- print >> sys.stderr, str(err)
|
||||
+ except Exception as err:
|
||||
+ print(str(err), file=sys.stderr)
|
||||
if args.verbose:
|
||||
- print ' >>> Versions:'
|
||||
+ print(' >>> Versions:')
|
||||
for cpv in pkg.ebuilds:
|
||||
- print ' %s' % cpv
|
||||
- print ' >>> Deltas:'
|
||||
+ print(' %s' % cpv)
|
||||
+ print(' >>> Deltas:')
|
||||
if len(pkg.diffs) == 0:
|
||||
- print ' None\n'
|
||||
+ print(' None\n')
|
||||
else:
|
||||
for diff in pkg.diffs:
|
||||
- print ' %s -> %s' % (diff.src.fname,
|
||||
- diff.dest.fname)
|
||||
+ print(' %s -> %s' % (diff.src.fname,
|
||||
+ diff.dest.fname))
|
||||
if len(pkg.diffs) == 0:
|
||||
continue
|
||||
if args.verbose:
|
||||
- print ' >>> Fetching distfiles:'
|
||||
+ print(' >>> Fetching distfiles:')
|
||||
try:
|
||||
pkg.fetch_distfiles()
|
||||
- except Exception, err:
|
||||
- print >> sys.stderr, str(err)
|
||||
- print
|
||||
+ except Exception as err:
|
||||
+ print(str(err), file=sys.stderr)
|
||||
+ print()
|
||||
continue
|
||||
if args.verbose:
|
||||
- print ' >>> Generating deltas:'
|
||||
+ print(' >>> Generating deltas:')
|
||||
for diff in pkg.diffs:
|
||||
if args.verbose:
|
||||
sys.stdout.write(' %s -> %s ... ' % (diff.src.fname,
|
||||
@@ -116,20 +116,20 @@ def main():
|
||||
not args.no_compress, args.force)
|
||||
except DiffExists:
|
||||
if args.verbose:
|
||||
- print 'up2date!'
|
||||
- print ' %s' % os.path.basename(diff.diff_file)
|
||||
- except Exception, err:
|
||||
+ print('up2date!')
|
||||
+ print(' %s' % os.path.basename(diff.diff_file))
|
||||
+ except Exception as err:
|
||||
if args.verbose:
|
||||
- print 'failed!'
|
||||
- print ' %s: %s' % (err.__class__.__name__, str(err))
|
||||
+ print('failed!')
|
||||
+ print(' %s: %s' % (err.__class__.__name__, str(err)))
|
||||
else:
|
||||
if args.verbose:
|
||||
- print 'done!'
|
||||
- print ' %s' % os.path.basename(diff.diff_file)
|
||||
+ print('done!')
|
||||
+ print(' %s' % os.path.basename(diff.diff_file))
|
||||
db.add(diff.dbrecord)
|
||||
diff.cleanup()
|
||||
if args.verbose:
|
||||
- print
|
||||
+ print()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
diff --git a/distpatch/chksums.py b/distpatch/chksums.py
|
||||
index 808dc59..d3dffab 100644
|
||||
--- a/distpatch/chksums.py
|
||||
+++ b/distpatch/chksums.py
|
||||
@@ -26,16 +26,16 @@ class ChksumValue(object):
|
||||
self._handler = get_handler(algorithm)
|
||||
|
||||
def to_str(self):
|
||||
- if isinstance(self.value, basestring):
|
||||
+ if isinstance(self.value, str):
|
||||
return self.value
|
||||
- elif isinstance(self.value, long):
|
||||
+ elif isinstance(self.value, int):
|
||||
return self._handler.long2str(self.value)
|
||||
raise ChksumException('Invalid value: %s' % self.value)
|
||||
|
||||
def to_long(self):
|
||||
- if isinstance(self.value, long):
|
||||
+ if isinstance(self.value, int):
|
||||
return self.value
|
||||
- elif isinstance(self.value, basestring):
|
||||
+ elif isinstance(self.value, str):
|
||||
return self._handler.str2long(self.value)
|
||||
raise ChksumException('Invalid value: %s' % self.value)
|
||||
|
||||
@@ -69,11 +69,11 @@ class Chksum(object):
|
||||
raise ChksumException('File not found: %s' % fname)
|
||||
|
||||
values = get_chksums(fname, *self.algorithms)
|
||||
- chksums = zip(self.algorithms, values)
|
||||
+ chksums = list(zip(self.algorithms, values))
|
||||
|
||||
# if provided checksums, use them
|
||||
else:
|
||||
- chksums = chksums.items()
|
||||
+ chksums = list(chksums.items())
|
||||
|
||||
# validate checksums, and set attributes
|
||||
tmp_algorithms = list(self.algorithms)
|
||||
diff --git a/distpatch/deltadb.py b/distpatch/deltadb.py
|
||||
index 77d8c21..345077d 100644
|
||||
--- a/distpatch/deltadb.py
|
||||
+++ b/distpatch/deltadb.py
|
||||
@@ -40,7 +40,7 @@ import os
|
||||
|
||||
from collections import OrderedDict
|
||||
from fcntl import lockf, LOCK_EX, LOCK_UN
|
||||
-from itertools import izip
|
||||
+
|
||||
from shutil import rmtree
|
||||
from snakeoil.chksum import get_handler
|
||||
from snakeoil.fileutils import AtomicWriteFile
|
||||
@@ -171,7 +171,7 @@ class DeltaDB(list):
|
||||
pieces = line.split()
|
||||
chksums = OrderedDict()
|
||||
uchksums = OrderedDict()
|
||||
- for key, value in izip(pieces[::2], pieces[1::2]):
|
||||
+ for key, value in zip(pieces[::2], pieces[1::2]):
|
||||
key = key.lower()[:]
|
||||
mykey = key[0] == 'u' and key[1:] or key
|
||||
myvalue = get_handler(mykey).str2long(value.strip())
|
||||
diff --git a/distpatch/diff.py b/distpatch/diff.py
|
||||
index d5818f1..eeaf8a6 100644
|
||||
--- a/distpatch/diff.py
|
||||
+++ b/distpatch/diff.py
|
||||
@@ -37,11 +37,11 @@ class DiffUnsupported(Exception):
|
||||
|
||||
|
||||
_supported_formats = [
|
||||
- u'.tar',
|
||||
- u'.tar.gz', u'.tgz', u'.gz',
|
||||
- u'.tar.bz2', u'.tbz2', u'.bz2',
|
||||
- u'.tar.xz', u'.xz',
|
||||
- u'.tar.lzma', u'.ĺzma',
|
||||
+ '.tar',
|
||||
+ '.tar.gz', '.tgz', '.gz',
|
||||
+ '.tar.bz2', '.tbz2', '.bz2',
|
||||
+ '.tar.xz', '.xz',
|
||||
+ '.tar.lzma', '.ĺzma',
|
||||
]
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class Diff(object):
|
||||
try:
|
||||
patch = Patch(self.dbrecord)
|
||||
patch.reconstruct(output_dir, tmp_dir, False)
|
||||
- except PatchException, err:
|
||||
+ except PatchException as err:
|
||||
if clean_sources:
|
||||
os.unlink(self.diff_file)
|
||||
raise DiffException('Delta reconstruction failed: %s' % str(err))
|
||||
diff --git a/distpatch/package.py b/distpatch/package.py
|
||||
index 553fc18..3c834cc 100644
|
||||
--- a/distpatch/package.py
|
||||
+++ b/distpatch/package.py
|
||||
@@ -35,17 +35,17 @@ class Package(object):
|
||||
diffs = []
|
||||
taken = {}
|
||||
for ebuild_id in range(len(self.ebuilds) - 1):
|
||||
- cpvs = self.ebuilds.keys()
|
||||
+ cpvs = list(self.ebuilds.keys())
|
||||
src_cpv = cpvs[ebuild_id]
|
||||
dest_cpv = cpvs[ebuild_id + 1]
|
||||
src_ebuild = self.ebuilds[src_cpv]
|
||||
dest_ebuild = self.ebuilds[dest_cpv]
|
||||
- for src_distfile in src_ebuild.src_uri_map.keys():
|
||||
+ for src_distfile in list(src_ebuild.src_uri_map.keys()):
|
||||
avg_distfile = None
|
||||
avg_ebuild = None
|
||||
max_avg = 0.0
|
||||
avgs = {}
|
||||
- for dest_distfile in dest_ebuild.src_uri_map.keys():
|
||||
+ for dest_distfile in list(dest_ebuild.src_uri_map.keys()):
|
||||
prefix = ''
|
||||
suffix = ''
|
||||
for i in range(min(len(src_distfile), len(dest_distfile))):
|
||||
diff --git a/distpatch/patch.py b/distpatch/patch.py
|
||||
index c210a5e..83eb3d6 100644
|
||||
--- a/distpatch/patch.py
|
||||
+++ b/distpatch/patch.py
|
||||
@@ -14,7 +14,7 @@ import portage
|
||||
import posixpath
|
||||
import re
|
||||
|
||||
-from itertools import izip
|
||||
+
|
||||
from portage.package.ebuild.fetch import fetch
|
||||
from shutil import move
|
||||
from subprocess import call
|
||||
@@ -96,7 +96,7 @@ class Patch(object):
|
||||
if self.src != DeltaDBFile(src):
|
||||
raise PatchException('Bad checksum for source: %s' % \
|
||||
self.src.fname)
|
||||
- for delta, delta_record in izip(deltas, self.dbrecords):
|
||||
+ for delta, delta_record in zip(deltas, self.dbrecords):
|
||||
if delta_record.delta != DeltaDBFile(delta):
|
||||
raise PatchException('Bad checksum for delta: %s' % \
|
||||
delta_record.delta.fname)
|
||||
diff --git a/distpatch/stats.py b/distpatch/stats.py
|
||||
index 187f926..7716e07 100644
|
||||
--- a/distpatch/stats.py
|
||||
+++ b/distpatch/stats.py
|
||||
@@ -48,7 +48,7 @@ class Stats(object):
|
||||
delta = float(record.delta.chksums['size'])
|
||||
dest = float(record.dest.chksums['size'])
|
||||
ratio.append(100 - ((delta / dest) * 100))
|
||||
- pyplot.plot(range(1, len(ratio) + 1), sorted(ratio))
|
||||
+ pyplot.plot(list(range(1, len(ratio) + 1)), sorted(ratio))
|
||||
pyplot.axes()
|
||||
pyplot.xlabel('Deltas (total: %i)' % len(ratio))
|
||||
pyplot.ylabel('Percentage of savings (for compressed files)')
|
||||
@@ -60,6 +60,6 @@ class Stats(object):
|
||||
for record in self.deltadb:
|
||||
dest.append(int(record.dest.chksums['size']))
|
||||
delta.append(int(record.delta.chksums['size']))
|
||||
- pyplot.plot(range(len(dest)), dest)
|
||||
- pyplot.plot(range(len(delta)), delta)
|
||||
+ pyplot.plot(list(range(len(dest))), dest)
|
||||
+ pyplot.plot(list(range(len(delta))), delta)
|
||||
pyplot.show()
|
||||
diff --git a/distpatcher b/distpatcher
|
||||
index 05980e2..984e4c2 100755
|
||||
--- a/distpatcher
|
||||
+++ b/distpatcher
|
||||
@@ -69,35 +69,35 @@ def main():
|
||||
return
|
||||
|
||||
if args.verbose:
|
||||
- print '>>> Starting distpatcher ...\n'
|
||||
+ print('>>> Starting distpatcher ...\n')
|
||||
|
||||
for cpv in cpv_list:
|
||||
if args.verbose:
|
||||
if args.distfile:
|
||||
- print '>>> Distfile: %s' % cpv
|
||||
+ print('>>> Distfile: %s' % cpv)
|
||||
else:
|
||||
- print '>>> CPV: %s' % cpv
|
||||
+ print('>>> CPV: %s' % cpv)
|
||||
pkg = Package(db)
|
||||
if args.distfile:
|
||||
pkg.patch_distfile(cpv, args.output_dir)
|
||||
else:
|
||||
pkg.patch(cpv, args.output_dir)
|
||||
if args.verbose:
|
||||
- print ' >>> Deltas:'
|
||||
+ print(' >>> Deltas:')
|
||||
if len(pkg.patches) == 0:
|
||||
- print ' None\n'
|
||||
+ print(' None\n')
|
||||
else:
|
||||
for patch in pkg.patches:
|
||||
- print ' %s' % '\n -> '.join(
|
||||
- [i.delta.fname for i in patch.dbrecords])
|
||||
+ print(' %s' % '\n -> '.join(
|
||||
+ [i.delta.fname for i in patch.dbrecords]))
|
||||
if len(pkg.patches) == 0:
|
||||
continue
|
||||
if args.verbose:
|
||||
- print ' >>> Fetching deltas:'
|
||||
+ print(' >>> Fetching deltas:')
|
||||
for patch in pkg.patches:
|
||||
patch.fetch_deltas(args.root_url, args.input_dir)
|
||||
if args.verbose:
|
||||
- print ' >>> Reconstructing distfiles:'
|
||||
+ print(' >>> Reconstructing distfiles:')
|
||||
for patch in pkg.patches:
|
||||
if args.verbose:
|
||||
sys.stdout.write(' %s ... ' % '\n -> '.join(
|
||||
@@ -106,17 +106,17 @@ def main():
|
||||
try:
|
||||
patch.reconstruct(args.input_dir, args.output_dir,
|
||||
not args.no_compress)
|
||||
- except PatchException, err:
|
||||
+ except PatchException as err:
|
||||
if args.verbose:
|
||||
- print 'failed!'
|
||||
- print ' %s' % str(err)
|
||||
+ print('failed!')
|
||||
+ print(' %s' % str(err))
|
||||
else:
|
||||
if args.verbose:
|
||||
- print 'done!'
|
||||
- print ' %s' % \
|
||||
- os.path.basename(patch.dest.fname)
|
||||
+ print('done!')
|
||||
+ print(' %s' % \
|
||||
+ os.path.basename(patch.dest.fname))
|
||||
if args.verbose:
|
||||
- print
|
||||
+ print()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
diff --git a/distpatchq b/distpatchq
|
||||
index 902f6c0..e6bcebe 100755
|
||||
--- a/distpatchq
|
||||
+++ b/distpatchq
|
||||
@@ -48,7 +48,7 @@ def delta_fetch_size(pkg, filename, distfiles_dir=None, deltas_dir=None):
|
||||
except OSError:
|
||||
pass
|
||||
if filename in distfiles:
|
||||
- print 0
|
||||
+ print(0)
|
||||
return 0
|
||||
pkg.patch_distfile(filename, distfiles_dir)
|
||||
if len(pkg.patches) == 0:
|
||||
@@ -62,7 +62,7 @@ def delta_fetch_size(pkg, filename, distfiles_dir=None, deltas_dir=None):
|
||||
if dbrecord.delta.fname in deltas:
|
||||
continue
|
||||
fetch_size += int(dbrecord.delta.chksums.size.to_long())
|
||||
- print fetch_size
|
||||
+ print(fetch_size)
|
||||
|
||||
|
||||
def delta_verify_checksums(pkg, filename, distfiles_dir=None):
|
||||
@@ -96,20 +96,20 @@ def delta_verify_checksums(pkg, filename, distfiles_dir=None):
|
||||
return 0 if dest_record.uchksums == _Chksum(usrc) else 4
|
||||
|
||||
|
||||
-commands = sorted(i for i in globals().keys() if not i.startswith('_'))
|
||||
+commands = sorted(i for i in list(globals().keys()) if not i.startswith('_'))
|
||||
|
||||
|
||||
def usage(argv):
|
||||
- print '>>> distpatch information query tool'
|
||||
- print '>>> Usage: distpatchq <command> [<option> ...]'
|
||||
- print
|
||||
- print 'Available commands:'
|
||||
+ print('>>> distpatch information query tool')
|
||||
+ print('>>> Usage: distpatchq <command> [<option> ...]')
|
||||
+ print()
|
||||
+ print('Available commands:')
|
||||
for name in commands:
|
||||
function = globals()[name]
|
||||
if function.__doc__ is None:
|
||||
- print ' ' + name
|
||||
- print ' MISSING DOCUMENTATION!'
|
||||
- print
|
||||
+ print(' ' + name)
|
||||
+ print(' MISSING DOCUMENTATION!')
|
||||
+ print()
|
||||
continue
|
||||
|
||||
# introspect command arguments
|
||||
@@ -120,14 +120,14 @@ def usage(argv):
|
||||
args.append('<%s>' % arg)
|
||||
for arg in spec.args[-opt:]:
|
||||
args.append('[%s]' % arg)
|
||||
- print ' ' + name + ' ' + ' '.join(args)
|
||||
+ print(' ' + name + ' ' + ' '.join(args))
|
||||
lines = function.__doc__.split('\n')
|
||||
if len(argv) > 1:
|
||||
for line in lines:
|
||||
- print " " + line.strip()
|
||||
+ print(" " + line.strip())
|
||||
|
||||
if len(argv) == 1:
|
||||
- print "\nRun distpatchq with --help for info"
|
||||
+ print("\nRun distpatchq with --help for info")
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(_sys.argv) < 2:
|
||||
@@ -150,7 +150,7 @@ if __name__ == '__main__':
|
||||
req = len(spec.args) - opt
|
||||
|
||||
if len(_sys.argv) < req + 2:
|
||||
- print "Invalid number of arguments!!"
|
||||
+ print("Invalid number of arguments!!")
|
||||
_sys.exit(2)
|
||||
|
||||
dbfile = _sys.argv[2]
|
||||
--
|
||||
2.21.0
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,121 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
|
||||
|
||||
BV=${PV}-1
|
||||
BV_AMD64=${BV}-linux-x86_64
|
||||
BV_X86=${BV}-linux-i686
|
||||
|
||||
DESCRIPTION="The Crystal Programming Language"
|
||||
HOMEPAGE="https://crystal-lang.org"
|
||||
SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
|
||||
x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
|
||||
|
||||
RESTRICT=test # not stable for day-to-day runs
|
||||
|
||||
LLVM_MAX_SLOT=9
|
||||
|
||||
# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
|
||||
DEPEND="
|
||||
sys-devel/llvm:${LLVM_MAX_SLOT}
|
||||
dev-libs/boehm-gc[static-libs,threads]
|
||||
dev-libs/libatomic_ops
|
||||
dev-libs/libevent
|
||||
dev-libs/libpcre
|
||||
sys-libs/libunwind
|
||||
dev-libs/pcl
|
||||
dev-libs/gmp:0
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
xml? ( dev-libs/libxml2 )
|
||||
yaml? ( dev-libs/libyaml )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.31.0-verbose.patch
|
||||
"${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
|
||||
"${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
|
||||
#"${FILESDIR}"/${PN}-0.27.0-max-age-0-test.patch
|
||||
"${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
|
||||
"${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
|
||||
"${FILESDIR}"/${PN}-0.29.0-no-usr-lib.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bootstrap_path=${WORKDIR}/${PN}-${BV}/bin
|
||||
if [[ ! -d ${bootstrap_path} ]]; then
|
||||
eerror "Binary tarball does not contain expected directory:"
|
||||
die "'${bootstrap_path}' path does not exist."
|
||||
fi
|
||||
|
||||
emake \
|
||||
$(usex debug "" release=1) \
|
||||
progress=true \
|
||||
stats=1 \
|
||||
threads=$(makeopts_jobs) \
|
||||
verbose=1 \
|
||||
\
|
||||
CC=$(tc-getCC) \
|
||||
CXX=$(tc-getCXX) \
|
||||
AR=$(tc-getAR) \
|
||||
\
|
||||
PATH="${bootstrap_path}:${PATH}" \
|
||||
CRYSTAL_PATH=src \
|
||||
CRYSTAL_CONFIG_VERSION=${PV} \
|
||||
CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
|
||||
use doc && emake docs
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# EXTRA_SPEC_FLAGS is useful to debug individual tests
|
||||
# as part of full build:
|
||||
# USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal
|
||||
emake spec \
|
||||
$(usex debug "" release=1) \
|
||||
progress=true \
|
||||
stats=1 \
|
||||
threads=$(makeopts_jobs) \
|
||||
verbose=1 \
|
||||
\
|
||||
CC=$(tc-getCC) \
|
||||
CXX=$(tc-getCXX) \
|
||||
AR=$(tc-getAR) \
|
||||
\
|
||||
CRYSTAL_PATH=src \
|
||||
CRYSTAL_CONFIG_VERSION=${PV} \
|
||||
\
|
||||
"EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/$(get_libdir)/crystal
|
||||
doins -r src/.
|
||||
dobin .build/crystal
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins etc/completion.zsh _crystal
|
||||
|
||||
use examples && dodoc -r samples
|
||||
|
||||
if use doc ; then
|
||||
docinto api
|
||||
dodoc -r docs/.
|
||||
fi
|
||||
|
||||
newbashcomp etc/completion.bash ${PN}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST elixir-1.10.0.tar.gz 2322668 BLAKE2B b5f393e406904fe38d1f9bd47811a9fc804109cb4c6ca6b4f512dc8a7af251495536b9238fc85126266150bf9ae869c815d68f6a0dfcafe9ff893b05780b4c54 SHA512 d71ef164f7dc3fe4a94a0b5f5f8709e782caeebba322c0a1aaf67ac129416ca0b01dc9fc0a14c71e37e386d176076f0fb35b4d51b17987d03794a92cbe831cc4
|
||||
DIST elixir-1.10.1.tar.gz 2322975 BLAKE2B 875948d233a726bdf88db4d64d21d227dd5e90f762f10dcc82103e088a2ed633898489a2f0a870a6c4e09ce22e509d117f05b3b3f8b8be6c742f628d612e3baf SHA512 823a685d62b6181be9f3314c1a86b69606dd3d3528a2053060f83802a561d8e136fb32099d51cb90542ea155a0a5768d7e6fc7aa1ae18d2c9f5fd5a5a2ac9cdc
|
||||
DIST elixir-1.10.2.tar.gz 2323450 BLAKE2B 2d0897af98864966dabc8760d3551caeae39baddc892239c398f3aecf6b72db0ee9d3c8e03fbc8b7a7da0b0dcb08f200fa145d704b8306190eb47a9ccb862bb4 SHA512 a1d1c7847fc8135865d063c6e014bee970066ba07f979f308bec456a732f5366a9343631239965d1caeeaea5cdb644f35185fdfb23f18fcc8c6735a7e3256c0f
|
||||
DIST elixir-1.9.4.tar.gz 2250611 BLAKE2B adc363627dc3997684482ac022927aaa4d315afdb8fbc8981e1b88371eb13be80e01084b67288fc88fc51f0015085743d11289e932093d5608e5ac4dfa0823a8 SHA512 c97b93c7438efd7215408525a3b9f2935a1591cce3da3eb31717282d06aff94e8e3d22c405bac40c671bcfe8e73f3dd1ada315f53dee73ceef0bfe2a7c27e86d
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Elixir programming language"
|
||||
HOMEPAGE="https://elixir-lang.org"
|
||||
SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 ErlPL-1.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/erlang-21:0=[ssl]"
|
||||
# 'mix' tool collides with sci-biology/phylip, bug #537514
|
||||
RDEPEND="${DEPEND}
|
||||
!!sci-biology/phylip
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
emake Q=""
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install
|
||||
dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit elisp-common java-pkg-opt-2 systemd 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 ~x86-macos ~x64-solaris"
|
||||
IUSE="doc emacs +hipe java +kpoll libressl 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? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
systemd? ( sys-apps/systemd )
|
||||
tk? ( dev-lang/tk:0 )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/18.2.1-wx3.0.patch"
|
||||
"${FILESDIR}/${PN}-22.0-dont-ignore-LDFLAGS.patch"
|
||||
"${FILESDIR}/${PN}-22.2.2-gcc-10.patch"
|
||||
"${FILESDIR}/${PN}-22.1.4-asn1-dep.patch"
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
./otp_build autoconf || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
$(use_enable hipe)
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_with java javac)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl "${EPREFIX}"/usr)
|
||||
$(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,155 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit elisp-common java-pkg-opt-2 systemd 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 ~x86-macos ~x64-solaris"
|
||||
IUSE="doc emacs +hipe java +kpoll libressl 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? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
systemd? ( sys-apps/systemd )
|
||||
tk? ( dev-lang/tk:0 )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/18.2.1-wx3.0.patch"
|
||||
"${FILESDIR}/${PN}-22.0-dont-ignore-LDFLAGS.patch"
|
||||
"${FILESDIR}/${PN}-22.2.2-gcc-10.patch"
|
||||
"${FILESDIR}/${PN}-22.1.4-asn1-dep.patch"
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
./otp_build autoconf || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
$(use_enable hipe)
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_with java javac)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl "${EPREFIX}"/usr)
|
||||
$(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
|
||||
local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
|
||||
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
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST editline-1.17.0.tar.xz 252508 BLAKE2B 4e59de72a7c8e6d538685b01c32b55283ec9244927d79848bf5277beb8095fc125289c61c6c6e02cda8821df481d5f926569512030c42cd50bc8f5a050bb89d8 SHA512 e8a519d5380a84913e1438ac0cd52400078457be5dcfa4eadc7112d7c2c4ff6601b8e3da4eef55296b42c6e9b5ed5fb269698dd62c4542eef824b6dd262ddd5c
|
||||
DIST editline-1.17.1.tar.xz 252196 BLAKE2B ae25ebc8efcc5ddf7d68553b6a5d93738e4fbf67c556b4089ace7386cb70058f36137d99df2385e324b36a285aa319b49e1c2eb82059d99d511c43c70f55ce11 SHA512 9b3f5f4a833e9e38c4f99d2e7f8d2716d4db74b6a2d3362e6c513505ff17a79044496405458835d508efd79cbe9046f3c1db602aaad210926312c22057145d35
|
||||
|
@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="line editing library for UNIX call compatible with the FSF readline"
|
||||
HOMEPAGE="http://troglobit.com/projects/editline/"
|
||||
SRC_URI="https://github.com/troglobit/editline/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
PATCHES=("${FILESDIR}"/${PN}-1.16.0-rename-man.patch)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# To avoid collision with dev-libs/libedit
|
||||
# we rename man/editline.3 to man/libeditline.3
|
||||
mv man/editline.3 man/libeditline.3 || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --disable-static
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# package installs .pc file
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST gom-0.3.2.tar.xz 410300 BLAKE2B c0c79c1c3f8a28a0ee992fa4c316538eb87ec26c77def353e8b2038e32f30f9daed433c6d6f6c81069e05e46a980f7d944c955182d973d42f3bd84a341c5a34d SHA512 a7bfb263e5ff6f89768d8fcbdcc949d4ec9b82ecbb80952becd357a3d5781a60e52a327e865e39e46d542b2a2c5e5c861e5302d7ae3c3a2258d3c3f698263675
|
||||
DIST gom-0.3.3.tar.xz 101580 BLAKE2B 08e0abb9eaf23ba3bbbca54289ebaa695af705e65b9b612f125e72c62f337baec899d16e657d3de51baeb4ffb79b583716a01d74067e256d59e1dcb63723273e SHA512 152924e704c92f39c493a8becc73fac1f7fe396f4f9e7c154dccec2b4413476821e43abf3c108cc1304de471e61f56c265f124710379ad8568b68f8902064e03
|
||||
DIST gom-0.4.tar.xz 102744 BLAKE2B 8116ac388a56e85effbb37c3d5ea5036f6de2f4ad7ee8fe119bd058e1ac3e293eab612a739cdba7467202bc9e258f7cd65b1f116e146577d3a103fc03afba37f SHA512 d847928ce09c53a3f64777c313cb843052e5e001873f29d3f7acf02772cadf0e4b133fb0137aa0463b4ff95dd54810bde87062d8e396ff4fc6d142ba59c8e9c8
|
||||
|
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
GCONF_DEBUG="yes"
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit gnome.org meson python-r1
|
||||
|
||||
DESCRIPTION="GObject to SQLite object mapper library"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/Gom"
|
||||
|
||||
LICENSE="LGPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="gtk-doc +introspection python test"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-db/sqlite-3.7:3
|
||||
>=dev-libs/glib-2.36:2
|
||||
introspection? ( >=dev-libs/gobject-introspection-1.30.0:= )
|
||||
python? ( ${PYTHON_DEPS}
|
||||
>=dev-python/pygobject-3.16:3[${PYTHON_USEDEP}] )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
gtk-doc? ( dev-util/gtk-doc
|
||||
app-text/docbook-xml-dtd:4.3 )
|
||||
virtual/pkgconfig
|
||||
test? ( x11-libs/gdk-pixbuf:2 )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e '/subdir.*python/d' bindings/meson.build || die
|
||||
# drop test building and deps if not enabled
|
||||
if ! use test; then
|
||||
sed -i -e '/gdkpixbuf_dep/d' meson.build || die
|
||||
sed -i -e '/subdir(.*tests.*)/d' meson.build || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
$(meson_use introspection enable-introspection)
|
||||
$(meson_use gtk-doc enable-gtk-doc)
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
docinto examples
|
||||
dodoc examples/*.py
|
||||
|
||||
meson_src_install
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl python_domodule bindings/python/gi
|
||||
fi
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
|
||||
From: Frank Tang <ftang@chromium.org>
|
||||
Date: Sat, 1 Feb 2020 02:39:04 +0000
|
||||
Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
|
||||
|
||||
See #971
|
||||
---
|
||||
common/unistr.cpp | 6 ++-
|
||||
test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
|
||||
test/intltest/ustrtest.h | 1 +
|
||||
3 files changed, 68 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/unistr.cpp b/common/unistr.cpp
|
||||
index 901bb3358ba..077b4d6ef20 100644
|
||||
--- a/common/unistr.cpp
|
||||
+++ b/common/unistr.cpp
|
||||
@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
|
||||
}
|
||||
|
||||
int32_t oldLength = length();
|
||||
- int32_t newLength = oldLength + srcLength;
|
||||
+ int32_t newLength;
|
||||
+ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
|
||||
+ setToBogus();
|
||||
+ return *this;
|
||||
+ }
|
||||
|
||||
// Check for append onto ourself
|
||||
const UChar* oldArray = getArrayStart();
|
||||
diff --git a/test/intltest/ustrtest.cpp b/test/intltest/ustrtest.cpp
|
||||
index b6515ea813c..ad38bdf53a3 100644
|
||||
--- a/test/intltest/ustrtest.cpp
|
||||
+++ b/test/intltest/ustrtest.cpp
|
||||
@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
|
||||
TESTCASE_AUTO(TestWCharPointers);
|
||||
TESTCASE_AUTO(TestNullPointers);
|
||||
TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
|
||||
+ TESTCASE_AUTO(TestLargeAppend);
|
||||
TESTCASE_AUTO_END;
|
||||
}
|
||||
|
||||
@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
|
||||
str.insert(2, sub);
|
||||
assertEquals("", u"abbcdcde", str);
|
||||
}
|
||||
+
|
||||
+void UnicodeStringTest::TestLargeAppend() {
|
||||
+ if(quick) return;
|
||||
+
|
||||
+ IcuTestErrorCode status(*this, "TestLargeAppend");
|
||||
+ // Make a large UnicodeString
|
||||
+ int32_t len = 0xAFFFFFF;
|
||||
+ UnicodeString str;
|
||||
+ char16_t *buf = str.getBuffer(len);
|
||||
+ // A fast way to set buffer to valid Unicode.
|
||||
+ // 4E4E is a valid unicode character
|
||||
+ uprv_memset(buf, 0x4e, len * 2);
|
||||
+ str.releaseBuffer(len);
|
||||
+ UnicodeString dest;
|
||||
+ // Append it 16 times
|
||||
+ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
|
||||
+ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
|
||||
+ int64_t total = 0;
|
||||
+ for (int32_t i = 0; i < 16; i++) {
|
||||
+ dest.append(str);
|
||||
+ total += len;
|
||||
+ if (total <= INT32_MAX) {
|
||||
+ assertFalse("dest is not bogus", dest.isBogus());
|
||||
+ } else {
|
||||
+ assertTrue("dest should be bogus", dest.isBogus());
|
||||
+ }
|
||||
+ }
|
||||
+ dest.remove();
|
||||
+ total = 0;
|
||||
+ for (int32_t i = 0; i < 16; i++) {
|
||||
+ dest.append(str);
|
||||
+ total += len;
|
||||
+ if (total + len <= INT32_MAX) {
|
||||
+ assertFalse("dest is not bogus", dest.isBogus());
|
||||
+ } else if (total <= INT32_MAX) {
|
||||
+ // Check that a string of exactly the maximum size works
|
||||
+ UnicodeString str2;
|
||||
+ int32_t remain = INT32_MAX - total;
|
||||
+ char16_t *buf2 = str2.getBuffer(remain);
|
||||
+ if (buf2 == nullptr) {
|
||||
+ // if somehow memory allocation fail, return the test
|
||||
+ return;
|
||||
+ }
|
||||
+ uprv_memset(buf2, 0x4e, remain * 2);
|
||||
+ str2.releaseBuffer(remain);
|
||||
+ dest.append(str2);
|
||||
+ total += remain;
|
||||
+ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
|
||||
+ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
|
||||
+ assertFalse("dest is not bogus", dest.isBogus());
|
||||
+
|
||||
+ // Check that a string size+1 goes bogus
|
||||
+ str2.truncate(1);
|
||||
+ dest.append(str2);
|
||||
+ total++;
|
||||
+ assertTrue("dest should be bogus", dest.isBogus());
|
||||
+ } else {
|
||||
+ assertTrue("dest should be bogus", dest.isBogus());
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/test/intltest/ustrtest.h b/test/intltest/ustrtest.h
|
||||
index 218befdcc68..4a356a92c7a 100644
|
||||
--- a/test/intltest/ustrtest.h
|
||||
+++ b/test/intltest/ustrtest.h
|
||||
@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
|
||||
void TestWCharPointers();
|
||||
void TestNullPointers();
|
||||
void TestUnicodeStringInsertAppendToSelf();
|
||||
+ void TestLargeAppend();
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
inherit autotools flag-o-matic multilib-minimal python-any-r1 toolchain-funcs
|
||||
|
||||
DESCRIPTION="International Components for Unicode"
|
||||
HOMEPAGE="http://site.icu-project.org/"
|
||||
SRC_URI="https://github.com/unicode-org/icu/releases/download/release-${PV//./-}/icu4c-${PV//./_}-src.tgz"
|
||||
|
||||
LICENSE="BSD"
|
||||
|
||||
SLOT="0/${PV}"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="debug doc examples static-libs"
|
||||
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
virtual/pkgconfig
|
||||
doc? ( app-doc/doxygen[dot] )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN}/source"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/icu-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-65.1-remove-bashisms.patch"
|
||||
"${FILESDIR}/${PN}-64.2-darwin.patch"
|
||||
"${FILESDIR}/${PN}-64.1-data_archive_generation.patch"
|
||||
"${FILESDIR}/${PN}-65.1-integer-overflow.patch" # bug 710758
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
local variable
|
||||
|
||||
# Disable renaming as it is stupid thing to do
|
||||
sed -i \
|
||||
-e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \
|
||||
common/unicode/uconfig.h || die
|
||||
|
||||
# Fix linking of icudata
|
||||
sed -i \
|
||||
-e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \
|
||||
config/mh-linux || die
|
||||
|
||||
# Append doxygen configuration to configure
|
||||
sed -i \
|
||||
-e 's:icudefs.mk:icudefs.mk Doxyfile:' \
|
||||
configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
mkdir "${WORKDIR}"/host || die
|
||||
pushd "${WORKDIR}"/host >/dev/null || die
|
||||
|
||||
CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \
|
||||
CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \
|
||||
RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \
|
||||
"${S}"/configure --disable-renaming --disable-debug \
|
||||
--disable-samples --enable-static || die
|
||||
emake
|
||||
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
--disable-renaming
|
||||
--disable-samples
|
||||
--disable-layoutex
|
||||
$(use_enable debug)
|
||||
$(use_enable static-libs static)
|
||||
$(multilib_native_use_enable examples samples)
|
||||
)
|
||||
|
||||
tc-is-cross-compiler && myeconfargs+=(
|
||||
--with-cross-build="${WORKDIR}"/host
|
||||
)
|
||||
|
||||
# icu tries to use clang by default
|
||||
tc-export CC CXX
|
||||
|
||||
# make sure we configure with the same shell as we run icu-config
|
||||
# with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined
|
||||
export CONFIG_SHELL="${EPREFIX}/bin/sh"
|
||||
# probably have no /bin/sh in prefix-chain
|
||||
[[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL="${BASH}"
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
default
|
||||
|
||||
if multilib_is_native_abi && use doc; then
|
||||
doxygen -u Doxyfile || die
|
||||
doxygen Doxyfile || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
# INTLTEST_OPTS: intltest options
|
||||
# -e: Exhaustive testing
|
||||
# -l: Reporting of memory leaks
|
||||
# -v: Increased verbosity
|
||||
# IOTEST_OPTS: iotest options
|
||||
# -e: Exhaustive testing
|
||||
# -v: Increased verbosity
|
||||
# CINTLTST_OPTS: cintltst options
|
||||
# -e: Exhaustive testing
|
||||
# -v: Increased verbosity
|
||||
emake -j1 VERBOSE="1" check
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
if multilib_is_native_abi && use doc; then
|
||||
docinto html
|
||||
dodoc -r doc/html/*
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
docinto html
|
||||
dodoc ../readme.html
|
||||
}
|
Binary file not shown.
@ -0,0 +1,96 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
MY_P=${PN}${PV}
|
||||
|
||||
inherit qmake-utils python-single-r1 virtualx
|
||||
|
||||
DESCRIPTION="A dynamic Python binding for the Qt framework"
|
||||
HOMEPAGE="https://mevislab.github.io/pythonqt"
|
||||
SRC_URI="mirror://sourceforge/pythonqt/pythonqt/${P}/${MY_P}.zip"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug doc examples +extensions test"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
extensions? (
|
||||
dev-qt/designer:5
|
||||
dev-qt/qtdeclarative:5[widgets]
|
||||
dev-qt/qtmultimedia:5[widgets]
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtopengl:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtsql:5
|
||||
dev-qt/qtsvg:5
|
||||
dev-qt/qtxml:5
|
||||
dev-qt/qtxmlpatterns:5
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-qt/qtxml:5
|
||||
test? ( dev-qt/qttest:5 )"
|
||||
BDEPEND="app-arch/unzip
|
||||
virtual/pkgconfig
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use examples ; then
|
||||
sed -i '/SUBDIRS/s/examples//' PythonQt.pro || die "sed for examples"
|
||||
fi
|
||||
if ! use extensions ; then
|
||||
sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions"
|
||||
fi
|
||||
if ! use test ; then
|
||||
sed -i '/SUBDIRS/s/tests//' PythonQt.pro || die "sed for test"
|
||||
fi
|
||||
|
||||
# Remove webkit support
|
||||
sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \
|
||||
extensions/PythonQt_QtAll/PythonQt_QtAll.pro \
|
||||
|| die "sed for webkit"
|
||||
|
||||
# Unset python version to use python-config
|
||||
sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \
|
||||
|| die "sed for python version"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
eqmake5 CONFIG+="$(usex debug debug release '' '')" PREFIX="${ED}"/usr
|
||||
}
|
||||
|
||||
src_test() {
|
||||
LD_PRELOAD="${S}"/lib/libPythonQt-Qt5-Python"$(usex debug _d '' '' '')".so.3 \
|
||||
virtx ./lib/PythonQtTest"$(usex debug _d '' '' '')"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
|
||||
# Includes
|
||||
insinto /usr/include/PythonQt
|
||||
doins -r src/*.h
|
||||
insinto /usr/include/PythonQt/gui
|
||||
doins -r src/gui/*.h
|
||||
|
||||
if use extensions ; then
|
||||
insinto /usr/include/PythonQt/extensions/PythonQt_QtAll
|
||||
doins -r extensions/PythonQt_QtAll/*.h
|
||||
fi
|
||||
|
||||
# Libraries
|
||||
dolib.so lib/libPythonQt*
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue