Sync with portage [Fri Jan 31 18:24:52 MSK 2020].

develop 1579
root 4 years ago
parent f1e863f402
commit ef914af1b8

Binary file not shown.

Binary file not shown.

@ -1,3 +1,4 @@
DIST sudo-1.8.28p1.tar.gz 3310254 BLAKE2B a1810af7a42d05cce49bb9d0acf6f3731a5193e9e9c3b458691379131eb86d36995854d11c09525e8d999ed1da7e99cf170634667c5a444aa522b8f23db7d1aa SHA512 bda3de34c15fbb68fc29759542295560ccc1562b419d03709cea51613937e9b92ba689c79c3ef4858aeea90d3d1a4dc0148225b11b22cf82395ae1bad8cb1734
DIST sudo-1.8.29.tar.gz 3338260 BLAKE2B 7ba29d155bfb1d7ba20e32ade2e8ee3919e70400b6c235e313052b247b48406b9a051e71daa7e47fdb0a9fd0889f4c05b8a1a170c027503b90081e8cec81660e SHA512 ea780922b2afb47df4df4b533fb355fd916cb18a6bfd13c7ca36a25b03ef585d805648c6fa85692bea363b1f83664ac3bc622f99bcd149b3a86f70522eb4d340
DIST sudo-1.8.30.tar.gz 3349455 BLAKE2B 5e0aaa41f42c18cd0de473add3665adf797cd37eacfb4abfc9472814ea679c1e88e28e95e13a73eb7d9648174609d80a2d4eccf3bdf87a44186df07aeba60eee SHA512 d44831feabd92d736614239e0e0f086829d84b213c98524fffb4b926a96715b1156538a7ab5e0b6e0db8be67a6e24a1642b3648105b076d23b58c39d0dd947af
DIST sudo-1.8.31.tar.gz 3350674 BLAKE2B de5a968732fdd58933b4c513d13c43a08cb50075a00c3e0d338c9892570a416a2b3a8f19940c0893715f4eeab991e804831a87ef656ffd91e7f1ba047c119261 SHA512 b9e408a322938c7a712458e9012d8a5f648fba5b23a5057cf5d8372c7f931262595f1575c32c32b9cb1a04af670ff4611e7df48d197e5c4cc038d6b65439a28a

@ -0,0 +1,263 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit pam multilib libtool tmpfiles
MY_P="${P/_/}"
MY_P="${MY_P/beta/b}"
DESCRIPTION="Allows users or groups to run commands as other users"
HOMEPAGE="https://www.sudo.ws/"
if [[ ${PV} == "9999" ]] ; then
inherit mercurial
EHG_REPO_URI="https://www.sudo.ws/repos/sudo"
else
uri_prefix=
case ${P} in
*_beta*|*_rc*) uri_prefix=beta/ ;;
esac
SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-solaris"
fi
fi
# Basic license is ISC-style as-is, some files are released under
# 3-clause BSD license
LICENSE="ISC BSD"
SLOT="0"
IUSE="gcrypt ldap libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest"
DEPEND="
sys-libs/zlib:=
ldap? (
>=net-nds/openldap-2.1.30-r1
sasl? (
dev-libs/cyrus-sasl
net-nds/openldap[sasl]
)
)
pam? ( sys-libs/pam )
sasl? ( dev-libs/cyrus-sasl )
skey? ( >=sys-auth/skey-1.1.5-r1 )
sssd? ( sys-auth/sssd[sudo] )
system-digest? (
gcrypt? ( dev-libs/libgcrypt:= )
!gcrypt? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)
)
"
RDEPEND="
${DEPEND}
>=app-misc/editor-wrapper-3
virtual/editor
ldap? ( dev-lang/perl )
pam? ( sys-auth/pambase )
selinux? ( sec-policy/selinux-sudo )
sendmail? ( virtual/mta )
"
BDEPEND="
sys-devel/bison
"
S="${WORKDIR}/${MY_P}"
REQUIRED_USE="
pam? ( !skey )
skey? ( !pam )
"
MAKEOPTS+=" SAMPLES="
src_prepare() {
default
elibtoolize
}
set_secure_path() {
# FIXME: secure_path is a compile time setting. using PATH or
# ROOTPATH is not perfect, env-update may invalidate this, but until it
# is available as a sudoers setting this will have to do.
einfo "Setting secure_path ..."
# first extract the default ROOTPATH from build env
SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env;
echo "${ROOTPATH}")
case "${SECURE_PATH}" in
*/usr/sbin*) ;;
*) SECURE_PATH=$(unset PATH;
. "${EPREFIX}"/etc/profile.env; echo "${PATH}")
;;
esac
if [[ -z ${SECURE_PATH} ]] ; then
ewarn " Failed to detect SECURE_PATH, please report this"
fi
# then remove duplicate path entries
cleanpath() {
local newpath thisp IFS=:
for thisp in $1 ; do
if [[ :${newpath}: != *:${thisp}:* ]] ; then
newpath+=:${thisp}
else
einfo " Duplicate entry ${thisp} removed..."
fi
done
SECURE_PATH=${newpath#:}
}
cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}}
# finally, strip gcc paths #136027
rmpath() {
local e newpath thisp IFS=:
for thisp in ${SECURE_PATH} ; do
for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done
newpath+=:${thisp}
done
SECURE_PATH=${newpath#:}
}
rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
einfo "... done"
}
src_configure() {
local SECURE_PATH
set_secure_path
# audit: somebody got to explain me how I can test this before I
# enable it.. - Diego
# plugindir: autoconf code is crappy and does not delay evaluation
# until `make` time, so we have to use a full path here rather than
# basing off other values.
myeconfargs=(
--enable-zlib=system
--enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d
--with-editor="${EPREFIX}"/usr/libexec/editor
--with-env-editor
--with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo
--with-rundir="${EPREFIX}"/run/sudo
$(use_with secure-path secure-path "${SECURE_PATH}")
--with-vardir="${EPREFIX}"/var/db/sudo
--without-linux-audit
--without-opie
$(use_enable gcrypt)
$(use_enable nls)
$(use_enable sasl)
$(use_with offensive insults)
$(use_with offensive all-insults)
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo)
$(use_with ldap)
$(use_with pam)
$(use_with skey)
$(use_with sssd)
$(use_with selinux)
$(use_with sendmail)
)
if use system-digest && ! use gcrypt; then
myeconfargs+=("--enable-openssl")
else
myeconfargs+=("--disable-openssl")
fi
econf "${myeconfargs[@]}"
}
src_install() {
default
if use ldap ; then
dodoc README.LDAP
cat <<-EOF > "${T}"/ldap.conf.sudo
# See ldap.conf(5) and README.LDAP for details
# This file should only be readable by root
# supported directives: host, port, ssl, ldap_version
# uri, binddn, bindpw, sudoers_base, sudoers_debug
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key}
EOF
if use sasl ; then
cat <<-EOF >> "${T}"/ldap.conf.sudo
# SASL directives: use_sasl, sasl_mech, sasl_auth_id
# sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname
EOF
fi
insinto /etc
doins "${T}"/ldap.conf.sudo
fperms 0440 /etc/ldap.conf.sudo
insinto /etc/openldap/schema
newins doc/schema.OpenLDAP sudo.schema
fi
pamd_mimic system-auth sudo auth account session
keepdir /var/db/sudo/lectured
fperms 0700 /var/db/sudo/lectured
fperms 0711 /var/db/sudo #652958
# Don't install into /run as that is a tmpfs most of the time
# (bug #504854)
rm -rf "${ED}"/run
find "${ED}" -type f -name "*.la" -delete || die #697812
}
pkg_postinst() {
tmpfiles_process sudo.conf
#652958
local sudo_db="${EROOT}/var/db/sudo"
if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
chmod 711 "${sudo_db}" || die
fi
if use ldap ; then
ewarn
ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
ewarn
if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
ewarn "configured in /etc/nsswitch.conf."
ewarn
ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
ewarn " sudoers: ldap files"
ewarn
fi
fi
if use prefix ; then
ewarn
ewarn "To use sudo, you need to change file ownership and permissions"
ewarn "with root privileges, as follows:"
ewarn
ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
ewarn
fi
elog "To use the -A (askpass) option, you need to install a compatible"
elog "password program from the following list. Starred packages will"
elog "automatically register for the use with sudo (but will not force"
elog "the -A option):"
elog ""
elog " [*] net-misc/ssh-askpass-fullscreen"
elog " net-misc/x11-ssh-askpass"
elog ""
elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
elog "variable to the program you want to use."
}

Binary file not shown.

@ -1,4 +1,3 @@
DIST unrar-5.7.5.tar.gz 228818 BLAKE2B 2bd9cfaed07802147af9a3457cea3f78f464cc26e2e20ef2c15817fffb7dc275fd326fd96b089257a8044982c0ae130ca3dc42126356d973ee6a8afd43e28df0 SHA512 101a21a20d8e30ca2cccc1605e332579064d362feacb36e9d4a7cd5218585298dcb48ec2805ff9523ae9b25e8e3d3e7557b73ea457702c6cb6d8c50d324ea1f4
DIST unrar-5.8.3.tar.gz 229162 BLAKE2B 1515af301fdcbbe02d1ebf487b1a0ab7849919e0065f223ec78e69cf5fb9436778f184c9cdead927c37d41ddf779bc7c539259cc60b1e9db19225762af17ed27 SHA512 32ab5cd9135d968f2e908975e72e716f5aa8911ee53fbcade6cf9783eb22330dc0114baf5db148c223015498d28fa4c60446e0ccd8108856c6d089117a147669
DIST unrar-5.8.4.tar.gz 229618 BLAKE2B 3b163a7d3a13dd5864ae729eef6c6bc171e45b0db4e716660b24a14ecf035572fdd1dc44a9c59d07d9fde87255b941f45d5b2e0aeffac3a53b021dc1cbd4b0f1 SHA512 dd3502662b443f05c7bd01a50806b9e3443f9bbba7d88ee8fe9ca0d671d93b0db8956b822ec25b9d827941313ef2ec5608f15934bab91cecbab1ccea9ae8129e
DIST unrar-5.8.5.tar.gz 229641 BLAKE2B 132453d2e2ddb1b1b2151be15bd092dc06fe7ab96d8fa640db95dc1acdee90f6b259a5d04c1da959a398e3a9beb22862a14db9b41b19055771373e00d89e958b SHA512 bacd36c78c6bab2720b13796b73b376bd0ae693916b8130637cc4e6bbd76f6bd103347d9033d2d6cf6301587ba62449ec88b3aa4c18c8557ad5ace3475b41a7c
DIST unrar-5.9.1.tar.gz 229913 BLAKE2B 0969678b0676fbf8058e214e2ac8725ebbfbd391d23690eb0f55bdbbaa86b0a0752d4028bd52a95b455aacb324be5180dee485864b9f6cf63e2c1efc90b52af7 SHA512 dcc1ae8cd886f711f7ce400c2dc496e170e62f17f41f96bb26e3900bea82c3923114678efee07b88a9bf55ce22d7d07d36400744e42f2b59231a51724b04c138

@ -1,70 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic multilib toolchain-funcs
MY_PN="${PN}src"
DESCRIPTION="Uncompress rar files"
HOMEPAGE="https://www.rarlab.com/rar_add.htm"
SRC_URI="https://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="unRAR"
# subslot = soname version
SLOT="0/5"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""
RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417"
S="${WORKDIR}/unrar"
PATCHES=(
"${FILESDIR}"/${PN}-5.5.5-build.patch
"${FILESDIR}"/${PN}-5.5.5-honor-flags.patch
)
src_prepare() {
default
local sed_args=( -e "/libunrar/s:.so:$(get_libname ${PV%.*.*}):" )
if [[ ${CHOST} == *-darwin* ]] ; then
sed_args+=( -e "s:-shared:-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/libunrar$(get_libname ${PV%.*.*}):" )
else
sed_args+=( -e "s:-shared:& -Wl,-soname -Wl,libunrar$(get_libname ${PV%.*.*}):" )
fi
sed -i "${sed_args[@]}" makefile || die
}
src_configure() {
mkdir -p build-{lib,bin}
printf 'VPATH = ..\ninclude ../makefile' > build-lib/Makefile || die
cp build-{lib,bin}/Makefile || die
}
src_compile() {
unrar_make() {
emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" STRIP=true "$@"
}
unrar_make CXXFLAGS+=" -fPIC" -C build-lib lib
ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname) || die
ln -s libunrar$(get_libname ${PV%.*.*}) build-lib/libunrar$(get_libname ${PV}) || die
unrar_make -C build-bin
}
src_install() {
dobin build-bin/unrar
dodoc readme.txt
dolib.so build-lib/libunrar*
insinto /usr/include/libunrar${PV%.*.*}
doins *.hpp
dosym libunrar${PV%.*.*} /usr/include/libunrar
find "${ED}" -type f -name "*.a" -delete || die
}

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7

Binary file not shown.

@ -1 +1,2 @@
DIST simhv311-0.zip 2790607 BLAKE2B f9399977093f07d7f58067ed40e22f60e43228bbb1e0fdaa6b04408956962d9ea14b6dc57d758b819cee59f3bade9505a6802d42804df49622990402c0f22600 SHA512 e5fb6915c050e7402363cd9c1f99feb00874c3693905067ce901ffa86fc29a0cd2648684f111216b09a3c847f75812e2db2e2f2fa9f9d0db5dc932d53ec832fa
DIST simhv39-0.zip 3103657 BLAKE2B 3b5fcaa7f1aa24bd5afa78452fb2d5e2822654bcaa3caa478dbdf939770c13f7f1d3f95859674fc02e2cc35a4cfff239bb9ee6a726fb9e31586f639cdf40ca10 SHA512 5e8cbf92e980b7cb40d68ff60a266f70c0bef0eecdc169a8077ae72a6a71fe12a7be5c62bd033ca36727e2cb8f266a5a6f8a5ed6dd509afbf0a9d7b618f1a4f6

@ -0,0 +1,37 @@
From ca4b7338836edb7325c82f86dccdeb4808cb4a89 Mon Sep 17 00:00:00 2001
From: Mark Pizzolato <mark@infocomm.com>
Date: Wed, 29 Jan 2020 11:39:36 -0800
Subject: [PATCH] makefile: Force gcc/clang -fcommon to address future gcc
-fno-common default
as reported and discussed in #794
---
makefile | 7 +++++++
1 file changed, 7 insertions(+)
--- a/makefile
+++ b/makefile
@@ -506,9 +506,13 @@ else
ifneq (3,$(GCC_MAJOR_VERSION))
ifeq (,$(GCC_OPTIMIZERS_CMD))
GCC_OPTIMIZERS_CMD = $(GCC) --help=optimizers
+ GCC_COMMON_CMD = $(GCC) --help=common
endif
GCC_OPTIMIZERS = $(shell $(GCC_OPTIMIZERS_CMD))
endif
+ ifneq (,$(GCC_COMMON_CMD))
+ GCC_OPTIMIZERS += $(shell $(GCC_COMMON_CMD))
+ endif
ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
NO_LTO = 1
endif
@@ -530,6 +534,9 @@ else
ifneq (,$(findstring -fstrict-overflow,$(GCC_OPTIMIZERS)))
CFLAGS_O += -fno-strict-overflow
endif
+ ifneq (,$(findstring -fcommon,$(GCC_OPTIMIZERS))$(findstring -fno-common,$(GCC_OPTIMIZERS)))
+ CFLAGS_O += -fcommon
+ endif
ifeq (,$(NO_LTO))
ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
CFLAGS_O += -flto -fwhole-program

@ -0,0 +1,11 @@
--- simh-3.9.0/makefile
+++ simh-3.9.0/makefile
@@ -249,7 +249,7 @@
NETWORK_OPT = $(NETWORK_CCDEFS)
endif
ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi))
- MKDIRBIN = if $(TEST) ! -e BIN; then mkdir BIN; fi
+ MKDIRBIN = mkdir -p BIN
endif
else
#Win32 Environments (via MinGW32)

@ -0,0 +1,13 @@
--- a/makefile
+++ b/makefile
@@ -497,8 +497,8 @@ ifneq ($(DEBUG),)
CFLAGS_O = -O0
BUILD_FEATURES = - debugging support
else
- CFLAGS_O = -O2
- LDFLAGS_O =
+ CFLAGS_O ?= -O2
+ LDFLAGS_O ?=
ifeq (Darwin,$(OSTYPE))
NO_LTO = 1
endif

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>slyfox@gentoo.org</email>
<name>Sergei Trofimovich</name>
</maintainer>
</pkgmetadata>

@ -0,0 +1,62 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
MY_P="${PN}v$(ver_rs 1 '' 2 '-')" # 'a.b.c' -> 'ab-c'
DESCRIPTION="a simulator for historical computers such as Vax, PDP-11 etc.)"
HOMEPAGE="http://simh.trailing-edge.com/"
SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE=""
RDEPEND="net-libs/libpcap"
DEPEND="${RDEPEND}
app-arch/unzip"
S=${WORKDIR}/sim
PATCHES=(
"${FILESDIR}"/${PN}-3.11.0-respect-FLAGS.patch
"${FILESDIR}"/${PN}-3.11.0-fix-mkdir-race.patch
"${FILESDIR}"/${PN}-3.11.0-fcommon.patch
)
src_prepare() {
default
# fix linking on Darwin
if [[ ${CHOST} == *-darwin* ]] ; then
sed -e 's/-lrt//g' \
-i makefile || die
fi
}
src_compile() {
export GCC="$(tc-getCC)"
export LDFLAGS_O="${LDFLAGS}"
export CFLAGS_O="${CFLAGS}"
local my_makeopts=""
if tc-is-gcc && ver_test $(gcc-version) -lt 4.6 ; then
my_makeopts+=" NO_LTO=1"
fi
emake ${my_makeopts}
}
src_install() {
for BINFILE in BIN/* ; do
newbin ${BINFILE} "simh-$(basename ${BINFILE})"
done
insinto /usr/share/simh
doins VAX/*.bin
dodoc *.txt */*.txt
}

@ -1,4 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=4
@ -40,7 +40,7 @@ src_compile() {
export LDFLAGS_O="${LDFLAGS}"
export CFLAGS_O="${CFLAGS}"
local my_makeopts="USE_NETWORK=1"
local my_makeopts=""
if [ "$(gcc-major-version)" -le "4" -a "$(gcc-minor-version)" -lt "6" ] ; then
my_makeopts+=" NO_LTO=1"
fi

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -173,13 +173,13 @@ src_install() {
if [[ "${lib32}" != "${lib64}" ]] ; then
local f
for f in xiiimp.so xiiimp.a iiim-xbe xiiimp.so.2 xiiimp.so.2.0.0 iiimd-watchdog xiiimp.la ; do
dosym "${EPREFIX}/usr/${lib32}/iiim/${f}" "/usr/${lib64}/iiim/${f}"
dosym "../../${lib32}/iiim/${f}" "/usr/${lib64}/iiim/${f}"
done
for f in ${PN}aux.so ${PN}.so ; do
dosym "${EPREFIX}/usr/${lib32}/iiim/le/${PN}/${f}" "/usr/${lib64}/iiim/le/${PN}/${f}"
dosym "../../../../${lib32}/iiim/le/${PN}/${f}" "/usr/${lib64}/iiim/le/${PN}/${f}"
done
dosym "${EPREFIX}/usr/${lib64}/iiim/le/${PN}/64" "/usr/${lib32}/iiim/le/${PN}/64"
dosym "${EPREFIX}/usr/${lib64}/iiim/le/${PN}/64" "/usr/${lib32}/iiim/le/${PN}/amd64"
dosym "../../../../${lib64}/iiim/le/${PN}/64" "/usr/${lib32}/iiim/le/${PN}/64"
dosym "../../../../${lib64}/iiim/le/${PN}/64" "/usr/${lib32}/iiim/le/${PN}/amd64"
fi
fi

Binary file not shown.

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_6 )
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7} )
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7} )
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
PYTHON_COMPAT=( python3_{6,7,8} pypy3 )
inherit distutils-r1

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7} )
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1

Binary file not shown.

@ -1,3 +1,3 @@
DIST portage-utils-0.74.tar.xz 1587792 BLAKE2B 7c4588e3d44266a5260df42cc685aa03c584248e9970956033e4191a7a842a4b2162110ac99c2bb18645aaafc6ae6ee960e9b26ba0a8863497911eef1e943f64 SHA512 cd3f44c135b3d44e15a95eed41281fce62f225a9d05d5d5bb1be230b2d59cdb87755f011b313a9ec32e4cafdf3b3979c4ef423365edd7dcc472ca2e38c09c83e
DIST portage-utils-0.80.tar.xz 1762692 BLAKE2B 32e4502d517ec088eadf17a4a348b9b9bc33348380b65f93ac7c043150732ba3ff0d18ee96f8877c697a91000fdc036de392d6e6711d62248bb7c57e25d4433f SHA512 cca86877e87e5bd2e9423822db4b7afa15e8f291717c808ef0455b121db0778b2364552e9f1d5e1a8bad3f1f8880ae2b5dbd586bf1dd74d7c4f4e72fa990c78c
DIST portage-utils-0.84.tar.xz 1774396 BLAKE2B 964711e1d2277dbde814e86f9717381ea0b87fb2d8ae639c6134974cc141bdc88b4ee6a37c932495fb9b6153003d78832c34237a5c7076d4a0f7b7d9cfd3151a SHA512 90abe61dc30af4de34f57ff603afe4982d5951e7e0d702444ee7ab5e265976d03cda53518004b9ae1aa19c85eb235a732ea3fcf19705ac86977a42d49fe3b22e
DIST portage-utils-0.85.tar.xz 1773300 BLAKE2B ba1482fc04e590612331e7dfdc0a330f81aba919fad21918912f490529cbab5f4f173cdefe70e0e40267f8cc7f64afd3c0e2a39e1b234034187f5bc75d10d9d1 SHA512 56b2cfa0fe6f7c5da0e7e7095568902173a7a976a5fb71b286e3269ac3c8f2fc878089d4c676d8ff2efd86ff150392c3407c838019e3846abef158f236d23830

@ -60,13 +60,6 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
src_prepare() {
default
# fix #705636, basically apply 2f917fee
sed -i -e '/free(name);/d' libq/tree.c || die
}
src_configure() {
econf \
--disable-maintainer-mode \

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
RDEPEND="

Binary file not shown.

@ -3,7 +3,7 @@
EAPI=5
PYTHON_COMPAT=( python{2_7,3_6} )
PYTHON_COMPAT=( python3_6 )
inherit bash-completion-r1 python-r1 vcs-snapshot

@ -3,7 +3,7 @@
EAPI=6
PYTHON_COMPAT=( python{2_7,3_6} )
PYTHON_COMPAT=( python3_6 )
inherit bash-completion-r1 python-r1 vcs-snapshot

@ -3,7 +3,7 @@
EAPI=6
PYTHON_COMPAT=( python{2_7,3_6,3_7} )
PYTHON_COMPAT=( python{3_6,3_7} )
inherit bash-completion-r1 python-r1 vcs-snapshot prefix

Binary file not shown.

@ -1 +1,2 @@
DIST coolreader-3.2.2.1.tar.gz 12463566 BLAKE2B 208026a87b36a06cd0a2e83b60bb506174b2edec4e3f4d1663c9d630cf316afd54aa0dbd0fdf0d3e44e03277d39692bbada8b03376a22970321928e594632997 SHA512 c2e3ea139ff3969c16985a56a9605a59ae31c59f9dc962abcc4aae5d87b8c48c8d7ed716a7077dd9da93cefc0d9ba0fe8a43c50e33e3d58acbcdfc35b73b3538
DIST coolreader-3.2.39.tar.gz 17679570 BLAKE2B e84fb7d8032ae62fec24a74a9cebab086664a2ed3827f0664e667a4ab3b8d76b722790958f71f5fcd79729238e897c6592059f9b45eb4069c9ad483883bc0600 SHA512 1b92b35750174a8ef4df4b7c4f33bb9fcc94b36008c08a7f9d1f8e85c6b642c5b037e0673a783cde1aa98296887bb286c4a2da186911b26f298f689605e1eb4b

@ -0,0 +1,97 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
WX_GTK_VER="3.0"
PLOCALES="bg cs de es hu pl ru uk"
inherit cmake-utils wxwidgets l10n xdg-utils gnome2-utils eapi7-ver
CR_PV=$(ver_rs 3 '-')
if [ "${PV}" != 9999 ]
then
# git tag cr3.2.2-1
SRC_URI="https://github.com/buggins/${PN}/archive/cr${CR_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-cr${CR_PV}"
else
inherit git-r3
# github mirror has some new commits to fix page margins settings
# sourceforge mirror saved as backup
#EGIT_REPO_URI="git://git.code.sf.net/p/crengine/crengine"
EGIT_REPO_URI="https://github.com/buggins/${PN}.git"
SRC_URI=""
fi
DESCRIPTION="CoolReader - reader of eBook files (fb2,epub,htm,rtf,txt)"
HOMEPAGE="https://sourceforge.net/projects/crengine/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="wxwidgets"
CDEPEND="sys-libs/zlib
media-libs/libpng:0
virtual/jpeg:0
media-libs/freetype
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
!wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )"
DEPEND="${CDEPEND}
!wxwidgets? ( dev-qt/linguist-tools:5 )"
RDEPEND="${CDEPEND}
wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )"
for lang in ${PLOCALES}; do
IUSE="${IUSE} l10n_${lang}"
done
src_prepare() {
cmake-utils_src_prepare
# locales
l10n_find_plocales_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts'
local lang langs
langs=""
for lang in ${PLOCALES}; do
if use l10n_${lang}; then
langs="${langs} ${lang}"
fi
done
sed -e "s|SET(LANGUAGES .*)|SET(LANGUAGES ${langs})|" \
-i "${S}"/cr3qt/CMakeLists.txt \
|| die "sed CMakeLists.txt failed"
}
src_configure() {
CMAKE_USE_DIR="${S}"
CMAKE_BUILD_TYPE="Release"
if use wxwidgets; then
setup-wxwidgets
local mycmakeargs=(-D GUI=WX)
else
local mycmakeargs=(-D GUI=QT5)
fi
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
if ! use wxwidgets; then
mv "${D}"usr/share/doc/cr3/changelog.gz "${D}"usr/share/doc/${PF}/ || die "mv changelog.gz failed"
rmdir "${D}"usr/share/doc/cr3 || die "rmdir doc/cr3 failed"
gunzip "${D}"usr/share/doc/${PF}/changelog.gz || die "gunzip changelog.gz failed"
gunzip "${D}"usr/share/man/man1/cr3.1.gz || die "gunzip cr3.1.gz failed"
fi
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
gnome2_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
gnome2_icon_cache_update
}

@ -1,3 +1,4 @@
DIST poppler-0.82.0.tar.xz 1553336 BLAKE2B a83d476ce1174cb7789f857a52a8a9ed29dfe8863d082ef662508ad9957667349aa62b038fa1a52e9e7ae3ddf4701eb5fbd58545b041b6aebd69cb8b91376d8d SHA512 1631be30e398dd18a4e8c2cc893cf0d9469a98d93f02f2ffe3bc14857518b76674a10cafe89ee92b9886c3c6b03d50e214a6838c102f673a62789c9832cfa4a2
DIST poppler-0.83.0.tar.xz 1555456 BLAKE2B 4ab24a85e879d0ddbf24cf7bab5b1da7c15fc026e88b4076dc2b8cd34d69a5bcc0113df20fabda6915afea880480613ba34be6e23b5b0d79a3c6197c92af7853 SHA512 bfde1e3cc4d9c626949aab770d84fccbe47bdde2331d3b9f5b98c24319eb573a5db62acbfa5a524b21ed0f195f8b163fee64677c2bd616d31d0bb219d1e66713
DIST poppler-0.84.0.tar.xz 1561236 BLAKE2B eb85b2d0aac2d736ffa74a11df4fbdf28841ded8fec3d32aa92d22f0d1c51aae9d3deacc8cbdd7dbf95906cf46b01f1bca7aa8af99c7fe209e4169478a778e72 SHA512 e00aca76b4909621b79ec68374529396ddba756af5d60d86750095dfebbabe5b576aa7c873c3fcfabaff28c89e3e37e826d4a0fac356d76ef966500514a772e7
DIST poppler-0.85.0.tar.xz 1588616 BLAKE2B d30c16ff214d2b64fade28bb4099567150e99df6ab967702f48e18ed2191e444728f51d4c1ce1772567c31f9b87a8cf64993ebc383184e06f8b3707436c89143 SHA512 2311bde5ae52e065c12a6129f500469860f5ebefafc3f7be581393f08c2121f3eae57394ff54c1f83ee1b926f28c61530bcd8149d42de10a16b9ba7345f2604e

@ -0,0 +1,123 @@
# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake toolchain-funcs xdg-utils
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.freedesktop.org/git/poppler/poppler.git"
SLOT="0/9999"
else
SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0/95" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
fi
DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
HOMEPAGE="https://poppler.freedesktop.org/"
LICENSE="GPL-2"
IUSE="cairo cjk curl cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils"
# No test data provided
RESTRICT="test"
BDEPEND="
dev-util/glib-utils
virtual/pkgconfig
"
DEPEND="
media-libs/fontconfig
media-libs/freetype
sys-libs/zlib
cairo? (
dev-libs/glib:2
x11-libs/cairo
introspection? ( dev-libs/gobject-introspection:= )
)
curl? ( net-misc/curl )
jpeg? ( virtual/jpeg:0 )
jpeg2k? ( >=media-libs/openjpeg-2.3.0-r1:2= )
lcms? ( media-libs/lcms:2 )
nss? ( >=dev-libs/nss-3.19:0 )
png? ( media-libs/libpng:0= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtxml:5
)
tiff? ( media-libs/tiff:0 )
"
RDEPEND="${DEPEND}
cjk? ( app-text/poppler-data )
"
DOCS=( AUTHORS NEWS README.md README-XPDF )
PATCHES=(
"${FILESDIR}/${PN}-0.60.1-qt5-dependencies.patch"
"${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch"
"${FILESDIR}/${PN}-0.82.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.61.0-respect-cflags.patch"
"${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
)
src_prepare() {
cmake_src_prepare
# Clang doesn't grok this flag, the configure nicely tests that, but
# cmake just uses it, so remove it if we use clang
if [[ ${CC} == clang ]] ; then
sed -e 's/-fno-check-new//' -i cmake/modules/PopplerMacros.cmake || die
fi
if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
sed -e '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
-i CMakeLists.txt || die
else
einfo "policy(SET CMP0002 OLD) - workaround can be removed"
fi
}
src_configure() {
xdg_environment_reset
local mycmakeargs=(
-DBUILD_GTK_TESTS=OFF
-DBUILD_QT5_TESTS=OFF
-DBUILD_CPP_TESTS=OFF
-DRUN_GPERF_IF_PRESENT=OFF
-DENABLE_SPLASH=ON
-DENABLE_ZLIB=ON
-DENABLE_ZLIB_UNCOMPRESS=OFF
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
-DUSE_FLOAT=OFF
-DWITH_Cairo=$(usex cairo)
-DENABLE_LIBCURL=$(usex curl)
-DENABLE_CPP=$(usex cxx)
-DWITH_JPEG=$(usex jpeg)
-DENABLE_DCTDECODER=$(usex jpeg libjpeg none)
-DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none)
-DENABLE_CMS=$(usex lcms lcms2 none)
-DWITH_NSS3=$(usex nss)
-DWITH_PNG=$(usex png)
$(cmake_use_find_package qt5 Qt5Core)
-DWITH_TIFF=$(usex tiff)
-DENABLE_UTILS=$(usex utils)
)
use cairo && mycmakeargs+=( -DWITH_GObjectIntrospection=$(usex introspection) )
cmake_src_configure
}
src_install() {
cmake_src_install
# live version doesn't provide html documentation
if use cairo && use doc && [[ ${PV} != *9999* ]]; then
# For now install gtk-doc there
insinto /usr/share/gtk-doc/html/poppler
doins -r "${S}"/glib/reference/html/*
fi
}

@ -1,4 +1,4 @@
# Copyright 2005-2019 Gentoo Authors
# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -12,7 +12,7 @@ if [[ ${PV} == *9999* ]] ; then
else
SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0/94" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
SLOT="0/95" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
fi
DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
@ -87,6 +87,7 @@ src_configure() {
-DBUILD_GTK_TESTS=OFF
-DBUILD_QT5_TESTS=OFF
-DBUILD_CPP_TESTS=OFF
-DRUN_GPERF_IF_PRESENT=OFF
-DENABLE_SPLASH=ON
-DENABLE_ZLIB=ON
-DENABLE_ZLIB_UNCOMPRESS=OFF

Binary file not shown.

@ -1,3 +1,4 @@
DIST fugitive-2.4.tar.gz 33340 BLAKE2B d5e5df47e0492510abae735dd47b51d797fe38862401f7d8e64404f6fa4e040641141c6febb13b05910cc44dc0372b084fe0ee8c3980a73d11d65e1a502ed627 SHA512 fb9d4129090bbafcace9400e9f21feae06bc9f903a54cfef7c4cbfa62856019a511b924c294e86fd26cd713d588ca0054a17d9676b59e2f406779ab5d51c3363
DIST fugitive-2.5.tar.gz 39318 BLAKE2B 437f4c36b357937fc83e0107882d535c5cc9e609801147d1a48c28e16c4f964c221ff404301e57c9d740a04caf4cf5383a1f307ad89a76294e13b784561223bd SHA512 9a58ff3fa9eae72fca3d1232d01856ef56fe38b7bbf61be44ec4cdf4f0f69fca69fafe19266d657530a6d08f856236b1d1370bb770b14402bb7e476d5ca4bb78
DIST fugitive-3.1.tar.gz 61142 BLAKE2B 15436725924d7ab09903973d77e9d7ce904f6bfaee451da2d3240236b2ef0589efd4b34e3673550749a6f021802018b2fb86f09ecdd727231f58bce3fd7c82b0 SHA512 4301e53a688ef1c822c146e04c41b6724cc38503733c622c0be8ea67ff2dd442f487fab8569bd3c8f7d97f6a4d5b42b58c0f23a216d74b862c09ed5c57f6ea87
DIST fugitive-3.2.tar.gz 64708 BLAKE2B cab484ec66b7c54857856ed1f6cbebbf6d3fb1afdb35b004f72f8c06785a18d8810244255305cd949e25d1f78d734c46e400488526631b4070d3e0b104830552 SHA512 c7ac97d52f683a73545efddf33986dedecbae25208ebf0703dccf99cb46fd5020362f724c5b530aeca40467d9e864ce6597d6eb5eaa93a33643191e1aa5b44db

@ -0,0 +1,22 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit vim-plugin
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/tpope/vim-fugitive.git"
else
SRC_URI="https://github.com/tpope/vim-fugitive/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86 ~ppc-macos ~x64-macos"
S="${WORKDIR}/vim-${P}"
fi
DESCRIPTION="vim plugin: a git wrapper for vim"
HOMEPAGE="https://www.vim.org/scripts/script.php?script_id=2975 https://github.com/tpope/vim-fugitive/"
LICENSE="vim"
VIM_PLUGIN_HELPFILES="${PN}.txt"
RDEPEND="dev-vcs/git"

@ -1 +1,2 @@
DIST merginal-2.1.0.tar.gz 13510 BLAKE2B c44f3873f36ee540e69f1cd87558e2601f944f430d15ae0e863adbba5383637ddbae2bee01cf1f7788f677a159da7870a83b909562813f8817d610e85f9d4a96 SHA512 3514c210a016d3446e73b7acc8a8a4cc2427e0133df81d7c644aaa1465e9c5945d3f46b7cac697f70cac990563e595305360991cdaa8244032167aea5f88eaed
DIST merginal-2.1.2.tar.gz 15156 BLAKE2B a8181ebd7aa67663b4541b5cb5028b6cadcca68c48f325dca07308ad13554d1d4b96b53f0a30e516cea732c880e68cb7e4cb7836b72cbd6b59a009e8d3c744b2 SHA512 70da5529ee22b3f06d83ecac62634d46d30472f064613a1844a7cdae31ed97366b5fcf6b31f4becd4cde246ccac32be6528c8c93ee2f02bdd32932388282f9bf

@ -0,0 +1,31 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit vim-plugin
MY_PN=vim-${PN}
MY_P=${MY_PN}-${PV}
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/idanarye/${MY_PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/idanarye/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="vim script: fugitive extension to manage and merge git branches"
HOMEPAGE="https://www.vim.org/scripts/script.php?script_id=4955 https://github.com/idanarye/vim-merginal/"
LICENSE="vim"
RDEPEND="app-vim/fugitive"
VIM_PLUGIN_HELPFILES="${PN}"
src_prepare() {
rm README.md || die
default
}

@ -1,7 +1,7 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit vim-plugin

Binary file not shown.

@ -1,11 +1,15 @@
DIST mariadb-10.1.38.tar.gz 63535685 BLAKE2B c179ea2f60287c2bc1c0d1c47ae989ac2653a24063e8344cef2f3062fc6798e18b969e8f9aa8287104ce2518e6c644cb8d3a4650b5a0bc5dfde973e76e618955 SHA512 184582f3a902a989ba3d9c4d21288c014c8b469adbbb4cbabc621c5006022cef29baed8c1140ed4476b124da83b76dfa414295ed0c3374be826e75aca953a77b
DIST mariadb-10.1.43.tar.gz 63635313 BLAKE2B 60617d3021bb478633a995b93a3659a287ecab49bb1997efc430e2f453a8145307f0db02799b43560a51c92ef528060f93fb82fd0362ea34052f68590144bff0 SHA512 47e9693c6c1d25d2c3541efe001569c17e70721edcbfc3d0ccc96f3638820123436c18d2cbc3c2ad252adf1eda446feff0370eb97f9e57b6711757ac899b47e8
DIST mariadb-10.1.44.tar.gz 63660764 BLAKE2B fb88660687c57217c82a05442b1f6e1d85a10fbcdb54b5c455409fd6e280aede27aafe61020eae278a0424b7b21f4afc4e581dd68ce9690948970ef22127ecd0 SHA512 4216524dae5eaf882d3667345fdccc58fa29cb02fb04367900d25c1d120b609d9c7af460dea37ba15ba3fb89f4390f9b15072f5c1ecc434c64b840fa14bab8a9
DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fbafa9de45bbd5c7232f92d29b934148dd124ad462bf8aa5aec2e4ee0bf75a03fae5e5fe97a77e1d93095052a577c14b SHA512 cd61d0c2d528b23b975e6ea142560d9b9ebff7ecda6fa9b3659b25b3406e8cc925918f4c3bb0e200ddb8d0520bcaa4d4f70d245b4731896f9ba2f1bdf0a817b2
DIST mariadb-10.2.29.tar.gz 73087972 BLAKE2B aa3fe880f00b02846b26f16fcd37d18ebe217a2c9680c8c535042d2759852c929cd649d662c6a2bc603d934a6ba770ef945752c99d150f539e1fdd0d9be0ad51 SHA512 cee4e0d1a2b203cadaaa5678c5ce17302f18ffa55d07c8329392b1ea84740340c006eb9ab5920beef80835c2a399d5fffca409b8288e10ae62d290af62ec4ab8
DIST mariadb-10.2.31.tar.gz 73134720 BLAKE2B a410f71cffd7ff904cb16d9d00bbb4b1d6d17a4931de1635a14dce7c7c66d8dfd097b0c261959809cf2f327d196b11f3196129c2894efb5bab0141aca10ea3c7 SHA512 2cf28e4e049618f633470e7a4cd4f3bc8c2a74bf9796bfd026da7c75812e6d4962323785fdbca7a5b505c2e4fe95e3b47cd2e24e4dec2dcd230ac8a25f49b9b9
DIST mariadb-10.3.20.tar.gz 71990355 BLAKE2B f950f0eb836751d0eebb9ae561fe3b5aefade04a0d389465918aa2a887e4f717ab4e6bd835dea8f9a88aacfe10c0b091fc2a59882a1781a3f2903ef07a759f5d SHA512 8080cb6db85c587f39f128e98b00c3e6428bf3e828271a227bb2c61c97683c965802baa6e5f825317f7e2963683c0f81699642853deeca6977faa2b6932044a3
DIST mariadb-10.3.22.tar.gz 72050820 BLAKE2B 9e08f1360f8db2c5f466d4f6f967145286412a5598c7de8828eb8f8f3dd113b38f039c38335f9251f3bba19c67c5f62d57808eabc57480338b64dae0c5588774 SHA512 57a6551b8939f54742963202d50a537e69e8ab9b2dca42ce3d2a09c0f7af368fded71f36af26f6cbd956d54fe43853981ba8fe28b7a3ba97c7d52ea4a0d233f6
DIST mariadb-10.4.10.tar.gz 78352896 BLAKE2B c0e448fba455feb9385b7d57e1a727e84eaf4cfa52ce0dbd6ff062aa0b5abc42005680fb185416d04fbd7bb62d9bbd6c93e4cb77b145418cf6be92747f8b1c2a SHA512 4a9b9a37bc3a273de4bd781dac3636256364dae6efbba45765d6b28995da3d64e180422cd10418d1c7acd7fd8843fe2a2638c07e0f56b0c09170c58812cc6b71
DIST mariadb-10.4.12.tar.gz 79120835 BLAKE2B 1c511e788f8ddc9b9d2e580b29c380ada85d7cc46febe6a6bec626fd6239e4f50480b7a31dcd7e1a9474c6ed9626a910e996257ac8366646a22decc0226c45f0 SHA512 518dae18c04a1f7fcc6fd4d2dfbfbfbdf5e83e72ca41e66e1074328df8d92ab41b458e6a9973771419ac09a7348f264f158916cd198c335085d6e823e707bbc6
DIST mariadb-5.5.66.tar.gz 45962591 BLAKE2B 41befba24abec2af876168a11fc205d328c137baa49e5e521787898e4b973d1dc548ef459228811caa99fa3c2b7a9fe96f3eb7a04bf62f0bb20966e4ffd2ea9b SHA512 403f3bc67018e01eb2277a88d3a7ac673d50df8f7a67607f9d14e3167d1bdd4ca202983df69c97688ff51edbd6d6b43af3541c75e968d1d01713a7b6495e4c8c
DIST mariadb-5.5.67.tar.gz 45971908 BLAKE2B 494fdc5d13c3560b074514f30a828e6689b820a1eefc0d0ec67f00a9dced6f4d3c305ed81ad39dddbb07659ccfbab418900f822baf502067d706ba84d2e7fd78 SHA512 494b2b0d863e2fed6f02f8d61134a645aa113bb0e17ba08b304350dfa974f6fce2a2fcc231fb413872156f70f08fbd2604f58d642fffe085f3b093176a3e68c9
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c
DIST mysql-extras-20190731-2258Z.tar.bz2 332111 BLAKE2B cc144c9af852bfdd4149b96bdc22f8afb2d0aa92f95ebd272a244f0fb7743dc03f9244871d5c195260bac5d9ed20583093257ee2c95a5a4d0a4dae488d781adf SHA512 d4428a1128cd5aef62c463b659992b110090b1602cdcb6b8d922d570c6b946fde325bfcf5a9a955a8dcc61f3ccd3d612d8517ebf63e316f98ca9ff2cd8a807aa

@ -0,0 +1,897 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20190305-2052Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
# Gentoo patches to MySQL
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
fi
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
+perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
inherit git-r3
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
EGIT_CLONE_TYPE=shallow
else
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
fi
PATCHES=(
"${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
"${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
"${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
"${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
"${MY_PATCH_DIR}"/20029_all_mariadb-10.1.37-enable-numa.patch
"${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
)
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
!yassl? (
!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
libressl? ( dev-libs/libressl:0= )
)
>=sys-libs/zlib-1.2.3:0=
sys-libs/ncurses:0=
!bindist? (
sys-libs/binutils-libs:0=
>=sys-libs/readline-4.1:0=
)
server? (
backup? ( app-arch/libarchive:0= )
cracklib? ( sys-libs/cracklib:0= )
extraengine? (
odbc? ( dev-db/unixODBC:0= )
xml? ( dev-libs/libxml2:2= )
sys-libs/zlib[minizip]
)
innodb-lz4? ( app-arch/lz4 )
innodb-lzo? ( dev-libs/lzo )
innodb-snappy? ( app-arch/snappy )
kerberos? ( virtual/krb5 )
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
numa? ( sys-process/numactl )
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( sys-libs/pam:0= )
systemd? ( sys-apps/systemd:= )
tokudb? ( app-arch/snappy )
)
!yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
>=dev-libs/libpcre-8.41-r1:3=
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
"
DEPEND="virtual/yacc
static? ( sys-libs/ncurses[static-libs] )
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
${COMMON_DEPEND}
server? ( galera? (
sys-apps/iproute2
=sys-cluster/galera-25*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( net-misc/socat[ssl] )
sst-xtrabackup? ( net-misc/socat[ssl] )
) )
perl? ( !dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes )
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
java-pkg-opt-2_pkg_setup
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
fi
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
}
src_prepare() {
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
# Don't build bundled xz-utils for tokudb
echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit semisync sql_errlog )
local test_plugins=( audit_null auth_examples daemon_example fulltext )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
if ! use test; then # These plugins are only used during testing
for plugin in "${test_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
# Collides with mariadb-connector-c bug 655980
_disable_plugin auth_dialog
# Avoid useless library checks
use mroonga || _disable_engine mroonga
use oqgraph || _disable_engine oqgraph
_disable_engine example
# Don't clash with dev-db/mysql-connector-c
sed -i -e 's/ my_print_defaults.1//' \
-e 's/ perror.1//' \
"${S}"/man/CMakeLists.txt || die
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
append-cxxflags -felide-constructors
# bug #283926, with GCC4.4, this is required to get correct behavior.
append-flags -fno-strict-aliasing
CMAKE_BUILD_TYPE="RelWithDebInfo"
# debug hack wrt #497532
mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
-DINSTALL_BINDIR=bin
-DINSTALL_DOCDIR=share/doc/${PF}
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_LIBDIR=$(get_libdir)
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-DWITH_UNIT_TESTS=$(usex test ON OFF)
-DWITH_ZLIB=system
-DENABLED_LOCAL_INFILE=1
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-DWITH_DEFAULT_COMPILER_OPTIONS=0
-DWITH_DEFAULT_FEATURE_SET=0
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
# The build forces this to be defined when cross-compiling. We pass it
# all the time for simplicity and to make sure it is actually correct.
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DWITHOUT_CLIENTLIBS=YES
-DWITH_READLINE=$(usex bindist 1 0)
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
-DENABLE_DTRACE=$(usex systemtap)
-DWITH_SSL=$(usex yassl bundled system)
-DPLUGIN_CLIENT_ED25519=NO
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
)
if use server ; then
# Federated{,X} must be treated special otherwise they will not be built as plugins
if ! use extraengine ; then
mycmakeargs+=(
-DPLUGIN_FEDERATED=NO
-DPLUGIN_FEDERATEDX=NO )
fi
mycmakeargs+=(
-DWITH_JEMALLOC=$(usex jemalloc system)
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
-DPLUGIN_CASSANDRA=NO
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
-DCONNECT_WITH_MYSQL=1
-DCONNECT_WITH_LIBXML2=$(usex xml)
-DCONNECT_WITH_ODBC=$(usex odbc)
-DCONNECT_WITH_JDBC=$(usex jdbc)
# Build failure and autodep wrt bug 639144
-DCONNECT_WITH_MONGO=OFF
-DWITH_WSREP=$(usex galera)
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
-DWITH_MARIABACKUP=$(usex backup ON OFF)
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
-DWITH_SYSTEMD=$(usex systemd yes no)
-DWITH_NUMA=$(usex numa ON OFF)
-DINSTALL_SQLBENCHDIR=''
)
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
mycmakeargs+=(
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
)
elif ! use latin1 ; then
mycmakeargs+=(
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
)
else
mycmakeargs+=(
-DDEFAULT_CHARSET=latin1
-DDEFAULT_COLLATION=latin1_swedish_ci
)
fi
mycmakeargs+=(
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
-DDISABLE_SHARED=$(usex static YES NO)
-DWITH_DEBUG=$(usex debug)
-DWITH_EMBEDDED_SERVER=OFF
-DENABLED_PROFILING=$(usex profiling)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
if use jemalloc || use tcmalloc ; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_HEAP_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
)
else
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DWITH_EMBEDDED_SERVER=OFF
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
-DWITH_SYSTEMD=no
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
rm "${ED}/usr/include/mysql/server/private/config.h" || die
fi
# Make sure the vars are correctly initialized
mysql_init_vars
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
if [[ -d "${ED}/usr/data" ]] ; then
rm -Rf "${ED}/usr/data" || die
fi
# Unless they explicitly specific USE=test, then do not install the
# testsuite. It DOES have a use to be installed, esp. when you want to do a
# validation of your database configuration after tuning it.
if ! use test ; then
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
fi
# Configuration stuff
einfo "Building default configuration ..."
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
local mycnf_src="my.cnf-5.6-r1"
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR}/${mycnf_src}" \
> "${TMPDIR}/my.cnf.ok" || die
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
if use latin1 ; then
sed -i \
-e "/character-set/s|utf8|latin1|g" \
"${TMPDIR}/my.cnf.ok" || die
fi
eprefixify "${TMPDIR}/my.cnf.ok"
newins "${TMPDIR}/my.cnf.ok" my.cnf
if use server ; then
einfo "Including support files and sample configurations"
docinto "support-files"
local script
for script in \
"${S}"/support-files/magic
do
[[ -f "$script" ]] && dodoc "${script}"
done
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
}
# Official test instructions:
# USE='extraengine perl server' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mariadb-X.X.XX.ebuild \
# digest clean package
src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
}
local TESTDIR="${BUILD_DIR}/mysql-test"
local retstatus_unit
local retstatus_tests
if ! use server ; then
einfo "Skipping server tests due to minimal build."
return 0
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
# cmake-utils_src_test
# retstatus_unit=$?
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# Enable parallel testing, auto will try to detect number of cores
# You may set this by hand.
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
mkdir -p "${T}"/var-tests{,/log} || die
# Run mysql tests
pushd "${TESTDIR}" > /dev/null || die
touch "${T}/disabled.def"
# These are failing in MariaDB 10.0 for now and are believed to be
# false positives:
#
# main.mysql_client_test, main.mysql_client_test_nonblock
# main.mysql_client_test_comp:
# segfaults at random under Portage only, suspect resource limits.
local t
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
_disable_test "$t" "False positive due to varying policies"
done
for t in main.mysql_client_test main.mysql_client_test_nonblock \
rpl.rpl_semi_sync_uninstall_plugin main.mysql \
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
_disable_test "$t" "False positives in Gentoo"
done
if ! use client-libs ; then
_disable_test main.plugin_auth "Needs client libraries built"
_disable_test plugins.auth_ed25519 "Needs client libraries built"
fi
_disable_test main.gis_notembedded "Fails when latin1 USE is not set"
_disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
# run mysql-test tests
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd > /dev/null || die
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
local failures=""
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
}
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
else
if [[ ${EBUILD_PHASE} == "config" ]]; then
local new_MY_DATADIR
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
ewarn "MySQL MY_DATADIR has changed"
ewarn "from ${MY_DATADIR}"
ewarn "to ${new_MY_DATADIR}"
MY_DATADIR="${new_MY_DATADIR}"
fi
fi
fi
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LOCALSTATEDIR MY_LOGDIR
export MY_DATADIR
}
pkg_config() {
_getoptval() {
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
fi
einfo "Found password in '${tmp_mysqld_password_source}' section!"
break
fi
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
fi
local options
local sqltmp="$(emktemp)"
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
pushd "${TMPDIR}" &>/dev/null || die
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

@ -0,0 +1,986 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20190305-2052Z"
SUBSLOT="18"
JAVA_PKG_OPT_USE="jdbc"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit eutils systemd flag-o-matic prefix toolchain-funcs \
java-pkg-opt-2 user cmake-utils
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
# Gentoo patches to MySQL
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
fi
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2 LGPL-2.1+"
SLOT="0/${SUBSLOT:-0}"
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
sst-rsync sst-mariabackup static systemd systemtap tcmalloc
test tokudb xml yassl"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
REQUIRED_USE="jdbc? ( extraengine server !static )
server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
EGIT_CLONE_TYPE=shallow
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
else
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
fi
PATCHES=(
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
"${MY_PATCH_DIR}"/20018_all_mariadb-10.3.12-without-clientlibs-tools.patch
"${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
"${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
"${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
)
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
>=sys-libs/zlib-1.2.3:0=
kerberos? ( virtual/krb5 )
yassl? ( net-libs/gnutls:0= )
!yassl? (
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
libressl? ( dev-libs/libressl:0= )
)
sys-libs/ncurses:0=
!bindist? (
sys-libs/binutils-libs:0=
>=sys-libs/readline-4.1:0=
)
server? (
backup? ( app-arch/libarchive:0= )
cracklib? ( sys-libs/cracklib:0= )
extraengine? (
odbc? ( dev-db/unixODBC:0= )
xml? ( dev-libs/libxml2:2= )
)
innodb-lz4? ( app-arch/lz4 )
innodb-lzo? ( dev-libs/lzo )
innodb-snappy? ( app-arch/snappy )
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
numa? ( sys-process/numactl )
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( sys-libs/pam:0= )
systemd? ( sys-apps/systemd:= )
tokudb? ( app-arch/snappy )
)
>=dev-libs/libpcre-8.41-r1:3=
"
DEPEND="virtual/yacc
static? ( sys-libs/ncurses[static-libs] )
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
!<virtual/mysql-5.6-r11
${COMMON_DEPEND}
server? ( galera? (
sys-apps/iproute2
=sys-cluster/galera-25*
sst-rsync? ( sys-process/lsof )
sst-mariabackup? ( net-misc/socat[ssl] )
) )
perl? ( !dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes )
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
server? ( ~virtual/mysql-5.6[static=] )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
java-pkg-opt-2_pkg_setup
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
# Here we need to see if the implementation switched client libraries
# We check if this is a new instance of the package and a client library already exists
local SHOW_ABI_MESSAGE libpath
if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
elog "Due to ABI changes when switching between different client libraries,"
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
elog "Please run: revdep-rebuild --library ${libpath}"
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
fi
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
if use galera ; then
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
fi
fi
# Note about configuration change
einfo
elog "This version of mariadb reorganizes the configuration from a single my.cnf"
elog "to several files in /etc/mysql/${PN}.d."
elog "Please backup any changes you made to /etc/mysql/my.cnf"
elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
elog "You may have as many files as needed and they are read alphabetically."
elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
einfo
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
}
src_prepare() {
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
if use jemalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
elif use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
fi
# Don't build bundled xz-utils for tokudb
echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
locale_info qc_info server_audit sql_errlog auth_ed25519 )
local test_plugins=( audit_null auth_examples daemon_example fulltext
debug_key_management example_key_management versioning )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
if ! use test; then # These plugins are only used during testing
for plugin in "${test_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
_disable_engine test_sql_discovery
fi
_disable_engine example
if ! use oqgraph ; then # avoids extra library checks
_disable_engine oqgraph
fi
if use mroonga ; then
# Remove the bundled groonga
# There is no CMake flag, it simply checks for existance
rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
else
_disable_engine mroonga
fi
# Don't clash with dev-db/mysql-connector-c
sed -i -e 's/ my_print_defaults.1//' \
-e 's/ perror.1//' \
"${S}"/man/CMakeLists.txt || die
# Fix galera_recovery.sh script
sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
scripts/galera_recovery.sh || die
cmake-utils_src_prepare
java-pkg-opt-2_src_prepare
}
src_configure(){
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
append-cxxflags -felide-constructors
# bug #283926, with GCC4.4, this is required to get correct behavior.
append-flags -fno-strict-aliasing
CMAKE_BUILD_TYPE="RelWithDebInfo"
# debug hack wrt #497532
mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-DINSTALL_BINDIR=bin
-DINSTALL_DOCDIR=share/doc/${PF}
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_LIBDIR=$(get_libdir)
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
-DWITH_COMMENT="Gentoo Linux ${PF}"
-DWITH_UNIT_TESTS=$(usex test ON OFF)
-DWITH_LIBEDIT=0
-DWITH_ZLIB=system
-DWITHOUT_LIBWRAP=1
-DENABLED_LOCAL_INFILE=1
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DWITH_DEFAULT_COMPILER_OPTIONS=0
-DWITH_DEFAULT_FEATURE_SET=0
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
# The build forces this to be defined when cross-compiling. We pass it
# all the time for simplicity and to make sure it is actually correct.
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
-DCONC_WITH_EXTERNAL_ZLIB=YES
-DWITH_EXTERNAL_ZLIB=YES
-DSUFFIX_INSTALL_DIR=""
-DWITH_UNITTEST=OFF
-DWITHOUT_CLIENTLIBS=YES
-DCLIENT_PLUGIN_DIALOG=OFF
-DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
-DCLIENT_PLUGIN_CLIENT_ED25519=OFF
-DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
-DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
)
if use test ; then
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
else
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
fi
if ! use yassl ; then
mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
else
mycmakeargs+=( -DWITH_SSL=bundled )
fi
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
mycmakeargs+=(
-DWITH_READLINE=$(usex bindist 1 0)
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
-DENABLE_DTRACE=$(usex systemtap)
)
if use server ; then
# Federated{,X} must be treated special otherwise they will not be built as plugins
if ! use extraengine ; then
mycmakeargs+=(
-DPLUGIN_FEDERATED=NO
-DPLUGIN_FEDERATEDX=NO )
fi
mycmakeargs+=(
-DWITH_PCRE=system
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
-DPLUGIN_CASSANDRA=NO
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
-DCONNECT_WITH_MYSQL=1
-DCONNECT_WITH_LIBXML2=$(usex xml)
-DCONNECT_WITH_ODBC=$(usex odbc)
-DCONNECT_WITH_JDBC=$(usex jdbc)
# Build failure and autodep wrt bug 639144
-DCONNECT_WITH_MONGO=OFF
-DWITH_WSREP=$(usex galera)
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
-DWITH_MARIABACKUP=$(usex backup ON OFF)
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
-DINSTALL_SQLBENCHDIR=""
-DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
# systemd is only linked to for server notification
-DWITH_SYSTEMD=$(usex systemd yes no)
-DWITH_NUMA=$(usex numa ON OFF)
)
# Workaround for MDEV-14524
use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
if use test ; then
# This is needed for the new client lib which tests a real, open server
mycmakeargs+=( -DSKIP_TESTS=ON )
fi
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
mycmakeargs+=(
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
)
elif ! use latin1 ; then
mycmakeargs+=(
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
)
else
mycmakeargs+=(
-DDEFAULT_CHARSET=latin1
-DDEFAULT_COLLATION=latin1_swedish_ci
)
fi
mycmakeargs+=(
-DEXTRA_CHARSETS=all
-DMYSQL_USER=mysql
-DDISABLE_SHARED=$(usex static YES NO)
-DWITH_DEBUG=$(usex debug)
-DWITH_EMBEDDED_SERVER=OFF
-DWITH_PROFILING=$(usex profiling)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
if use jemalloc || use tcmalloc ; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_HEAP_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
)
else
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DWITH_EMBEDDED_SERVER=OFF
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
-DWITH_SYSTEMD=no
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
rm "${ED}/usr/include/mysql/server/private/config.h" || die
fi
# Make sure the vars are correctly initialized
mysql_init_vars
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
if [[ -d "${ED}/usr/data" ]] ; then
rm -Rf "${ED}/usr/data" || die
fi
# Unless they explicitly specific USE=test, then do not install the
# testsuite. It DOES have a use to be installed, esp. when you want to do a
# validation of your database configuration after tuning it.
if ! use test ; then
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
fi
# Configuration stuff
einfo "Building default configuration ..."
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
eprefixify "${TMPDIR}/my.cnf"
doins "${TMPDIR}/my.cnf"
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
eprefixify "${TMPDIR}/50-distro-client.cnf"
doins "${TMPDIR}/50-distro-client.cnf"
if use server ; then
mycnf_src="my.cnf.distro-server"
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR}/${mycnf_src}" \
> "${TMPDIR}/my.cnf.ok" || die
if use prefix ; then
sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
"${TMPDIR}/my.cnf.ok" || die
fi
if use latin1 ; then
sed -i \
-e "/character-set/s|utf8|latin1|g" \
"${TMPDIR}/my.cnf.ok" || die
fi
eprefixify "${TMPDIR}/my.cnf.ok"
newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
einfo "Including support files and sample configurations"
docinto "support-files"
local script
for script in \
"${S}"/support-files/magic
do
[[ -f "$script" ]] && dodoc "${script}"
done
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
# Remove mytop if perl is not selected
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
rm -f "${ED}/usr/bin/mytop" || die
fi
# Fix a dangling symlink when galera is not built
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
rm "${ED}/usr/bin/wsrep_sst_rsync_wan" || die
fi
# Remove broken SST scripts that are incompatible
local scriptremove
for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
rm "${ED}/usr/bin/${scriptremove}" || die
fi
done
}
# Official test instructions:
# USE='extraengine perl server' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mariadb-X.X.XX.ebuild \
# digest clean package
src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
}
local TESTDIR="${BUILD_DIR}/mysql-test"
local retstatus_unit
local retstatus_tests
if ! use server ; then
einfo "Skipping server tests due to minimal build."
return 0
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
cmake-utils_src_test
retstatus_unit=$?
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# Enable parallel testing, auto will try to detect number of cores
# You may set this by hand.
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
mkdir -p "${T}"/var-tests{,/log} || die
# Run mysql tests
pushd "${TESTDIR}" > /dev/null || die
touch "${T}/disabled.def"
# These are failing in MariaDB 10.0 for now and are believed to be
# false positives:
#
# main.mysql_client_test, main.mysql_client_test_nonblock
# main.mysql_client_test_comp:
# segfaults at random under Portage only, suspect resource limits.
local t
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
_disable_test "$t" "False positive due to varying policies"
done
for t in main.mysql_client_test main.mysql_client_test_nonblock \
main.mysql main.gis_notembedded \
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
_disable_test "$t" "False positives in Gentoo"
done
_disable_test main.plugin_auth "Needs client libraries built"
_disable_test plugins.auth_ed25519 "Needs client libraries built"
_disable_test main.func_time "Dependent on time test was written"
_disable_test main.ssl_crl "Not compatible with OpenSSL 1.1.1"
# run mysql-test tests
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd > /dev/null || die
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
local failures=""
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
}
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
else
if [[ ${EBUILD_PHASE} == "config" ]]; then
local new_MY_DATADIR
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
ewarn "MySQL MY_DATADIR has changed"
ewarn "from ${MY_DATADIR}"
ewarn "to ${new_MY_DATADIR}"
MY_DATADIR="${new_MY_DATADIR}"
fi
fi
fi
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LOCALSTATEDIR MY_LOGDIR
export MY_DATADIR
}
pkg_config() {
_getoptval() {
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
fi
einfo "Found password in '${tmp_mysqld_password_source}' section!"
break
fi
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
fi
local options
local sqltmp="$(emktemp)"
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
pushd "${TMPDIR}" &>/dev/null || die
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,836 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
MY_EXTRAS_VER="20180809-1700Z"
SUBSLOT="18"
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
# Gentoo patches to MySQL
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
fi
HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"
IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
oqgraph pam +perl profiling selinux +server sphinx
static static-libs systemtap tcmalloc
test tokudb yassl"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
REQUIRED_USE="server? ( tokudb? ( jemalloc !tcmalloc ) )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
inherit git-r3
EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
EGIT_CLONE_TYPE=shallow
else
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
fi
PATCHES=(
"${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
"${MY_PATCH_DIR}/20004_all_mariadb-filter-tokudb-flags.patch"
"${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-5.5.50.patch"
"${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
"${MY_PATCH_DIR}/20018_all_mariadb-5.5.60-without-clientlibs-tools.patch"
)
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
COMMON_DEPEND="
kernel_linux? (
sys-process/procps:0=
dev-libs/libaio:0=
)
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
jemalloc? ( dev-libs/jemalloc:0= )
tcmalloc? ( dev-util/google-perftools:0= )
systemtap? ( >=dev-util/systemtap-1.3:0= )
!yassl? (
!libressl? ( <dev-libs/openssl-1.1.0:0= )
libressl? ( dev-libs/libressl:0= )
)
>=sys-libs/zlib-1.2.3:0=
sys-libs/ncurses:0=
!bindist? (
>=sys-libs/readline-4.1:0=
)
server? (
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
pam? ( sys-libs/pam:0= )
)
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
"
DEPEND="virtual/yacc
static? ( sys-libs/ncurses[static-libs] )
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
${COMMON_DEPEND}"
RDEPEND="selinux? ( sec-policy/selinux-mysql )
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
${COMMON_DEPEND}
perl? ( !dev-db/mytop
virtual/perl-Getopt-Long
dev-perl/TermReadKey
virtual/perl-Term-ANSIColor
virtual/perl-Time-HiRes )
"
# For other stuff to bring us in
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
local GCC_MINOR_SET=$(gcc-minor-version)
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
# non x86{,_64} arches
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
eerror "${PN} needs to be built with gcc-4.7 or later."
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
die
fi
fi
if has test ${FEATURES} && \
use server && ! has userpriv ${FEATURES} ; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Create log directory securely if it does not exist
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
if use server ; then
if use pam; then
einfo
elog "This install includes the PAM authentication plugin."
elog "To activate and configure the PAM plugin, please read:"
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
elog
elog "If you are switching server implentations, you should run the"
elog "mysql_upgrade tool."
einfo
else
einfo
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
fi
einfo
elog "Be sure to edit the my.cnf file to activate your cluster settings."
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
elog "The first time the cluster is activated, you should add"
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
elog "This option should then be removed for subsequent starts."
einfo
fi
}
src_unpack() {
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
mv -f "${WORKDIR%/}/${P}" "${S}" || die
}
src_prepare() {
_disable_engine() {
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
}
_disable_plugin() {
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
}
if use tcmalloc; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
fi
# Don't build bundled xz-utils for tokudb
echo > "${S%/}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
sed -i -e 's/ build_lzma//' "${S%/}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/ft-index/portability/CMakeLists.txt" || die
local plugin
local server_plugins=( handler_socket auth_socket feedback qc_info server_audit semisync sql_errlog )
local test_plugins=( audit_null auth_examples daemon_example fulltext )
if ! use server; then # These plugins are for the server
for plugin in "${server_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
if ! use test; then # These plugins are only used during testing
for plugin in "${test_plugins[@]}" ; do
_disable_plugin "${plugin}"
done
fi
# Collides with mariadb-connector-c bug 655980
_disable_plugin auth_dialog
# Don't build example
_disable_engine example
if ! use oqgraph ; then # avoids extra library checks
_disable_engine oqgraph
fi
# Don't clash with dev-db/mysql-connector-c
sed -i -e 's/ my_print_defaults.1//' \
-e 's/ perror.1//' \
"${S}"/man/CMakeLists.txt || die
cmake-utils_src_prepare
}
src_configure(){
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
append-cxxflags -felide-constructors
# bug #283926, with GCC4.4, this is required to get correct behavior.
append-flags -fno-strict-aliasing
CMAKE_BUILD_TYPE="RelWithDebInfo"
# debug hack wrt #497532
mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
-DINSTALL_BINDIR=bin
-DINSTALL_DOCDIR=share/doc/${PF}
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_LIBDIR=$(get_libdir)
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mariadb
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-DINSTALL_SBINDIR=sbin
-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-DWITH_UNIT_TESTS=$(usex test ON OFF)
-DWITH_ZLIB=system
-DENABLED_LOCAL_INFILE=1
-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
# The build forces this to be defined when cross-compiling. We pass it
# all the time for simplicity and to make sure it is actually correct.
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DWITHOUT_CLIENTLIBS=YES
-DWITH_READLINE=$(usex bindist 1 0)
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
-DENABLE_DTRACE=$(usex systemtap)
)
if use test ; then
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
else
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
fi
if ! use yassl ; then
mycmakeargs+=( -DWITH_SSL=system )
else
mycmakeargs+=( -DWITH_SSL=bundled )
fi
if use server ; then
# Federated{,X} must be treated special otherwise they will not be built as plugins
if ! use extraengine ; then
mycmakeargs+=(
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
fi
mycmakeargs+=(
-DWITH_JEMALLOC=$(usex jemalloc system)
-D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
-D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
-D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
-DINSTALL_SQLBENCHDIR=share/mariadb
)
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
mycmakeargs+=(
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
)
elif ! use latin1 ; then
mycmakeargs+=(
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
)
else
mycmakeargs+=(
-DDEFAULT_CHARSET=latin1
-DDEFAULT_COLLATION=latin1_swedish_ci
)
fi
mycmakeargs+=(
-DEXTRA_CHARSETS=all
-DDISABLE_SHARED=$(usex static YES NO)
-DWITH_EMBEDDED_SERVER=OFF
-DENABLED_PROFILING=$(usex profiling)
)
if use static; then
mycmakeargs+=( -DWITH_PIC=1 )
fi
if use jemalloc || use tcmalloc ; then
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
fi
# Storage engines
mycmakeargs+=(
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_HEAP_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
)
else
mycmakeargs+=(
-DWITHOUT_SERVER=1
-DEXTRA_CHARSETS=none
-DINSTALL_SQLBENCHDIR=
)
fi
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
}
src_install() {
cmake-utils_src_install
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
fi
# Make sure the vars are correctly initialized
mysql_init_vars
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
if [[ -d "${ED%/}/usr/data" ]] ; then
rm -Rf "${ED%/}/usr/data" || die
fi
# Unless they explicitly specific USE=test, then do not install the
# testsuite. It DOES have a use to be installed, esp. when you want to do a
# validation of your database configuration after tuning it.
if ! use test ; then
rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
fi
# Configuration stuff
einfo "Building default configuration ..."
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
local mycnf_src="my.cnf-5.5"
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR%/}/${mycnf_src}" \
> "${TMPDIR%/}/my.cnf.ok" || die
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
if use latin1 ; then
sed -i \
-e "/character-set/s|utf8|latin1|g" \
"${TMPDIR%/}/my.cnf.ok" || die
fi
eprefixify "${TMPDIR%/}/my.cnf.ok"
newins "${TMPDIR}/my.cnf.ok" my.cnf
if use server ; then
einfo "Including support files and sample configurations"
docinto "support-files"
local script
for script in \
"${S%/}"/support-files/magic
do
[[ -f "$script" ]] && dodoc "${script}"
done
docinto "scripts"
for script in "${S%/}"/scripts/mysql* ; do
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
done
# Manually install supporting files that conflict with other packages
# but are needed for galera and initial installation
exeinto /usr/libexec/mariadb
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
fi
#Remove mytop if perl is not selected
[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
}
# Official test instructions:
# USE='extraengine perl server' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mariadb-X.X.XX.ebuild \
# digest clean package
src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
reason="${@}"
ewarn "test '${rawtestname}' disabled: '${reason}'"
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
}
local TESTDIR="${BUILD_DIR}/mysql-test"
local retstatus_unit
local retstatus_tests
if ! use server ; then
einfo "Skipping server tests due to minimal build."
return 0
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
cmake-utils_src_test
retstatus_unit=$?
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# Enable parallel testing, auto will try to detect number of cores
# You may set this by hand.
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
mkdir -p "${T}"/var-tests{,/log} || die
# Run mysql tests
pushd "${TESTDIR}" > /dev/null || die
touch "${T}/disabled.def"
# These are failing in MariaDB 5.5 for now and are believed to be
# false positives:
#
# main.information_schema, binlog.binlog_statement_insert_delayed,
# main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
# funcs_1.is_columns_mysql
# fails due to USE=-latin1 / utf8 default
#
# main.mysql_client_test, main.mysql_client_test_nonblock:
# segfaults at random under Portage only, suspect resource limits.
#
# archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
# fails due to bad cleanup of previous tests when run in parallel
# The tool is deprecated anyway
# Bug 532288
local t
for t in main.mysql_client_test main.mysql_client_test_nonblock \
binlog.binlog_statement_insert_delayed main.information_schema \
main.mysqld--help \
archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
_disable_test "$t" "False positives in Gentoo"
done
if ! use client-libs ; then
_disable_test main.plugin_auth "Needs client libraries built"
fi
# run mysql-test tests
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
retstatus_tests=$?
popd > /dev/null || die
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
local failures=""
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
}
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
else
if [[ ${EBUILD_PHASE} == "config" ]]; then
local new_MY_DATADIR
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
ewarn "MySQL MY_DATADIR has changed"
ewarn "from ${MY_DATADIR}"
ewarn "to ${new_MY_DATADIR}"
MY_DATADIR="${new_MY_DATADIR}"
fi
fi
fi
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LOCALSTATEDIR MY_LOGDIR
export MY_DATADIR
}
pkg_config() {
_getoptval() {
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
local old_MY_DATADIR="${MY_DATADIR}"
local old_HOME="${HOME}"
# my_print_defaults needs to read stuff in $HOME/.my.cnf
export HOME=${EPREFIX}/root
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
die "Minimal builds do NOT include the MySQL server"
fi
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
else
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|| die "Moving MY_DATADIR failed"
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
fi
fi
fi
local pwd1="a"
local pwd2="b"
local maxtry=15
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
fi
einfo "Found password in '${tmp_mysqld_password_source}' section!"
break
fi
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n 1)"
# These are dir+prefix
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n 1)"
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n 1)"
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
fi
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
fi
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
fi
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
MYSQL_ROOT_PASSWORD="${pwd1}"
unset pwd1 pwd2
fi
local options
local sqltmp="$(emktemp)"
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
# see https://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
# Figure out which options we need to disable to do the setup
local helpfile="${TMPDIR}/mysqld-help"
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
federated ssl log-bin relay-log slow-query-log external-locking \
log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
done
einfo "Creating the mysql database and setting proper permissions on it ..."
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]]; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
if [[ ! -d "${MY_DATADIR}" ]]; then
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
fi
pushd "${TMPDIR}" &>/dev/null || die
# Filling timezones, see
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null || die
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
use prefix || options="${options} --user=mysql"
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
${options} \
--log-warnings=0 \
--basedir=${EROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile} \
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
#einfo "About to start mysqld: ${mysqld}"
ebegin "Starting mysqld"
einfo "Command ${mysqld}"
${mysqld} &
rc=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
eend $rc
if ! [[ -S "${socket}" ]]; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-e "${sql}"
eend $?
if [[ -n "${sqltmp}" ]] ; then
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
"${EROOT}/usr/bin/mysql" \
"--socket=${socket}" \
-hlocalhost \
-uroot \
--password="${MYSQL_ROOT_PASSWORD}" \
mysql < "${sqltmp}"
rc=$?
eend $?
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
fi
# Stop the server and cleanup
einfo "Stopping the server ..."
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
wait %1
einfo "Done"
}

@ -0,0 +1,12 @@
diff -Naru a/build/cmake/Modules/FindMySQLCppConn.cmake b/build/cmake/Modules/FindMySQLCppConn.cmake
--- a/build/cmake/Modules/FindMySQLCppConn.cmake 2019-12-18 13:31:34.520496484 +0100
+++ b/build/cmake/Modules/FindMySQLCppConn.cmake 2019-12-18 13:32:32.590496631 +0100
@@ -27,7 +27,7 @@
set(MySQLCppConn_FIND_QUIETLY TRUE)
endif ()
-find_path(MySQLCppConn_INCLUDE_DIR NAMES mysql_connection.h PATHS /usr/include /usr/local/include)
+find_path(MySQLCppConn_INCLUDE_DIR NAMES mysql_connection.h PATHS /usr/include /usr/include/jdbc /usr/local/include /usr/local/include/jdbc)
SET(MySQLCppConn_NAMES mysqlcppconn)

@ -70,6 +70,7 @@ S="${WORKDIR}"/"${MY_P}"
PATCHES=(
"${FILESDIR}/${PN}-6.2.5-wbcopytables.patch"
"${FILESDIR}/${P}-mysql-connector-8.patch"
)
src_unpack() {

@ -1,7 +1,5 @@
DIST postgis-2.4.6.tar.gz 12616474 BLAKE2B 8e33ae7e8ca5ef2a4dd90f64a8e9910118e4ef711444b196f46e4a63f98ff6044709d65a853c5c10de91308658a206965503b6a85a16438ea422becdbbd9bb40 SHA512 eec4276a58549f3cc57d6574186aebc72df0dd7dc2ab9acbaf410604b4d271dee6d5154caacd7297d20493d879434ca78050672e8197ff0fc63a36100c20c66c
DIST postgis-2.4.7.tar.gz 12831401 BLAKE2B 0069a339cc778a02a008835189b5560ffb1724aceaaeeec5264750cdfaa4346310ca1d112f698556e750b6559f0dabb727584c9d41ff8747ed7673e147c9723e SHA512 832f039e582227cd1c6edef98af8dfcceb90db75b18d4ba605b7baf2842227b23fe2d15c3b1cde941182c93230ba41ab94da59e97506c77e79f2016bbd98c885
DIST postgis-2.4.8.tar.gz 12846228 BLAKE2B dc7cd26f08774011bddba362040f35fd46dab5f58870643d4e6d939fb107a8e93ccb8c2d57ac67bf5ba44a7dd05c25eee77358548d9d7d9a8b3e2f7538e49538 SHA512 afeddbdcbad68358c3bc36beec5f1baf74c328daba90f0ac7d6322e4330d18da2e5534fa200f8ae3f19e7e897221989a564f6e2855e9181eadfd9cc32315b666
DIST postgis-2.5.1.tar.gz 16041872 BLAKE2B 589cf7168d3698737a19d817b8efb91695c2c3f63d6c3aa24189d9a37459a28ca8a7db0450aa2d557699f76cd8e3ab1eec198bd332b294d976330fdc9d8a7f60 SHA512 c6c9c8c5befd945614e92d1062df1d753ca8b7fd69b70226065c2dac77a59783b14ece4da994187079b683ee090ba5a79389ba679f22fce8c20a5afc2c8dfca0
DIST postgis-2.5.2.tar.gz 16252761 BLAKE2B 181ecc41e659c1df32392d0dfea9cc081c2a647fd23401b8b0470f99e1136b6b8ed900eaea38afdf87cc801bf13ede4247f9c188fcf0da6782624239c77b434f SHA512 b10781f0b74bad8162c33eb111a6090fba184b45fe5874d22cd3a5b0acfb057f3407c073bc44c9d4cd20ed8c2cb1fbb34480b0cf331340bc8b52580d4eccb819
DIST postgis-2.5.3.tar.gz 16424752 BLAKE2B 94c2ccd41eb88a39c6db48ad7f4d142742a1b0791e3abe57adb2c778406dcc8286afc6d55c80067e0b94a1300eff1c76a227d3cfd813e12541c715edeea11a9b SHA512 1c9f873ba8f8ff4aeae248c68c001eb4174416de1e00ce6a0d0c9ea129b475e887a83235027068d52f587ab95c549adbfaa7e5dccdda77855e39c55dac0fdc2d
DIST postgis-3.0.0.tar.gz 17359802 BLAKE2B aa83bdc2d1950c517f99cbdd877eb7261f6c29ce2cbd9f67f1e606c290080fc3d02ab0b7ceb68ce852e0c0d3d4b7753f03cb5b0921da164ab65d68e23d1df538 SHA512 82c233681fa6444686f9979768e5d6d3a9b6ca9cbd4fc2b14bd0a5d1269a8d0f45ee067e64984077063407c7abc13fa0e37a29928d7ccbfe3a61b694f592bed2

@ -1,125 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
POSTGRES_COMPAT=( 9.{4..6} {10..11} )
POSTGRES_USEDEP="server"
inherit autotools eutils postgres-multi versionator
MY_PV=$(replace_version_separator 3 '')
MY_P="${PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Geographic Objects for PostgreSQL"
HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
RDEPEND="
${POSTGRES_DEP}
dev-libs/json-c:=
dev-libs/libxml2:2
>=sci-libs/geos-3.5.0
>=sci-libs/proj-4.6.0
>=sci-libs/gdal-1.10.0
address-standardizer? ( dev-libs/libpcre )
gtk? ( x11-libs/gtk+:2 )
mapbox? ( dev-libs/protobuf )
"
DEPEND="${RDEPEND}
doc? (
app-text/docbook-xsl-stylesheets
app-text/docbook-xml-dtd:4.5
dev-libs/libxslt
|| (
media-gfx/imagemagick[png]
media-gfx/graphicsmagick[imagemagick,png]
)
)
virtual/pkgconfig
test? ( dev-util/cunit )
"
PGIS="$(get_version_component_range 1-2)"
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
# Needs a running psql instance, doesn't work out of the box
RESTRICT="test"
MAKEOPTS+=' -j1'
# These modules are built using the same *FLAGS that were used to build
# dev-db/postgresql. The right thing to do is to ignore the current
# *FLAGS settings.
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
src_prepare() {
eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
local AT_M4DIR="macros"
eautoreconf
postgres-multi_src_prepare
}
src_configure() {
local myargs=""
use gtk && myargs+=" --with-gui"
use address-standardizer || myargs+=" --without-address-standardizer"
use mapbox || myargs+=" --without-protobuf"
use topology || myargs+=" --without-topology"
postgres-multi_foreach econf ${myargs}
}
src_compile() {
postgres-multi_foreach emake
postgres-multi_foreach emake -C topology
if use doc ; then
postgres-multi_foreach emake comments
postgres-multi_foreach emake cheatsheets
postgres-multi_forbest emake -C doc html
fi
}
src_install() {
postgres-multi_foreach emake DESTDIR="${D}" install
postgres-multi_foreach emake -C topology DESTDIR="${D}" install
postgres-multi_forbest dobin ./utils/postgis_restore.pl
dodoc CREDITS TODO loader/README.* doc/*txt
docinto topology
dodoc topology/{TODO,README}
if use doc ; then
postgres-multi_foreach emake DESTDIR="${D}" comments-install
docinto html
postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
docinto html/images
postgres-multi_forbest dodoc doc/html/images/*
fi
use static-libs || find "${ED}" -name '*.a' -delete
}
pkg_postinst() {
ebegin "Refreshing PostgreSQL symlinks"
postgresql-config update
eend $?
elog "To finish installing PostGIS, follow the directions detailed at:"
elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
}

@ -1,65 +1,72 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
EAPI=6
POSTGRES_COMPAT=( 9.{4..6} {10..12} )
POSTGRES_USEDEP="server"
inherit autotools eapi7-ver postgres-multi
inherit autotools eutils postgres-multi versionator
MY_P="${PN}-$(ver_rs 3 '')"
MY_PV=$(replace_version_separator 3 '')
MY_P="${PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"
if [[ ${PV} = *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git"
else
PGIS="$(ver_cut 1-2)"
SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
fi
DESCRIPTION="Geographic Objects for PostgreSQL"
HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
HOMEPAGE="https://postgis.net"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
IUSE="address-standardizer doc gtk mapbox static-libs test topology"
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
RDEPEND="
${POSTGRES_DEP}
# Needs a running psql instance, doesn't work out of the box
RESTRICT="test"
RDEPEND="${POSTGRES_DEP}
dev-libs/json-c:=
dev-libs/libxml2:2
>=sci-libs/geos-3.5.0
>=sci-libs/proj-4.6.0
>=sci-libs/proj-4.6.0:=
>=sci-libs/gdal-1.10.0
address-standardizer? ( dev-libs/libpcre )
gtk? ( x11-libs/gtk+:2 )
mapbox? ( dev-libs/protobuf )
mapbox? ( dev-libs/protobuf-c:= )
"
DEPEND="${RDEPEND}
doc? (
app-text/docbook-xsl-stylesheets
app-text/docbook-xml-dtd:4.5
dev-libs/libxslt
|| (
media-gfx/imagemagick[png]
media-gfx/graphicsmagick[imagemagick,png]
)
)
virtual/pkgconfig
test? ( dev-util/cunit )
virtual/pkgconfig
doc? (
app-text/docbook-xsl-stylesheets
app-text/docbook-xml-dtd:4.5
dev-libs/libxslt
virtual/imagemagick-tools[png]
)
test? ( dev-util/cunit )
"
PGIS="$(get_version_component_range 1-2)"
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
PATCHES=( "${FILESDIR}/${PN}-2.2.0-arflags.patch" )
# Needs a running psql instance, doesn't work out of the box
RESTRICT="test"
src_prepare() {
default
# These modules are built using the same *FLAGS that were used to build
# dev-db/postgresql. The right thing to do is to ignore the current
# *FLAGS settings.
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
if [[ ${PV} = *9999* ]] ; then
source "${S}"/Version.config
PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}"
fi
src_prepare() {
eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
# These modules are built using the same *FLAGS that were used to build
# dev-db/postgresql. The right thing to do is to ignore the current
# *FLAGS settings.
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
local AT_M4DIR="macros"
eautoreconf
@ -68,15 +75,13 @@ src_prepare() {
}
src_configure() {
local myargs=""
use gtk && myargs+=" --with-gui"
use address-standardizer || myargs+=" --without-address-standardizer"
use mapbox || myargs+=" --without-protobuf"
use topology || myargs+=" --without-topology"
postgres-multi_foreach econf ${myargs}
local myeconfargs=(
$(use_with address-standardizer)
$(use_with gtk gui)
$(use_with mapbox protobuf)
$(use_with topology)
)
postgres-multi_foreach econf "${myeconfargs[@]}"
}
src_compile() {
@ -118,6 +123,13 @@ pkg_postinst() {
postgresql-config update
eend $?
local base_uri="https://postgis.net/docs/manual-"
if [[ ${PV} = *9999* ]] ; then
base_uri+="dev"
else
base_uri+="${PGIS}"
fi
elog "To finish installing PostGIS, follow the directions detailed at:"
elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
elog "${base_uri}/postgis_installation.html#create_new_db_extensions"
}

@ -1,123 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
POSTGRES_COMPAT=( 9.{4..6} {10..12} )
POSTGRES_USEDEP="server"
inherit autotools eutils postgres-multi versionator
MY_PV=$(replace_version_separator 3 '')
MY_P="${PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Geographic Objects for PostgreSQL"
HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
RDEPEND="
${POSTGRES_DEP}
dev-libs/json-c:=
dev-libs/libxml2:2
>=sci-libs/geos-3.5.0
>=sci-libs/proj-4.6.0
>=sci-libs/gdal-1.10.0
address-standardizer? ( dev-libs/libpcre )
gtk? ( x11-libs/gtk+:2 )
mapbox? ( dev-libs/protobuf )
"
DEPEND="${RDEPEND}
doc? (
app-text/docbook-xsl-stylesheets
app-text/docbook-xml-dtd:4.5
dev-libs/libxslt
|| (
media-gfx/imagemagick[png]
media-gfx/graphicsmagick[imagemagick,png]
)
)
virtual/pkgconfig
test? ( dev-util/cunit )
"
PGIS="$(get_version_component_range 1-2)"
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
# Needs a running psql instance, doesn't work out of the box
RESTRICT="test"
# These modules are built using the same *FLAGS that were used to build
# dev-db/postgresql. The right thing to do is to ignore the current
# *FLAGS settings.
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
src_prepare() {
eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
local AT_M4DIR="macros"
eautoreconf
postgres-multi_src_prepare
}
src_configure() {
local myargs=""
use gtk && myargs+=" --with-gui"
use address-standardizer || myargs+=" --without-address-standardizer"
use mapbox || myargs+=" --without-protobuf"
use topology || myargs+=" --without-topology"
postgres-multi_foreach econf ${myargs}
}
src_compile() {
postgres-multi_foreach emake
postgres-multi_foreach emake -C topology
if use doc ; then
postgres-multi_foreach emake comments
postgres-multi_foreach emake cheatsheets
postgres-multi_forbest emake -C doc html
fi
}
src_install() {
postgres-multi_foreach emake DESTDIR="${D}" install
postgres-multi_foreach emake -C topology DESTDIR="${D}" install
postgres-multi_forbest dobin ./utils/postgis_restore.pl
dodoc CREDITS TODO loader/README.* doc/*txt
docinto topology
dodoc topology/{TODO,README}
if use doc ; then
postgres-multi_foreach emake DESTDIR="${D}" comments-install
docinto html
postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
docinto html/images
postgres-multi_forbest dodoc doc/html/images/*
fi
use static-libs || find "${ED}" -name '*.a' -delete
}
pkg_postinst() {
ebegin "Refreshing PostgreSQL symlinks"
postgresql-config update
eend $?
elog "To finish installing PostGIS, follow the directions detailed at:"
elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
}

@ -1,125 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
POSTGRES_COMPAT=( 9.{5..6} {10..12} )
POSTGRES_USEDEP="server"
inherit autotools eutils postgres-multi versionator
MY_PV=$(replace_version_separator 3 '')
MY_P="${PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Geographic Objects for PostgreSQL"
HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
RDEPEND="
${POSTGRES_DEP}
dev-libs/json-c:=
dev-libs/libxml2:2
>=sci-libs/geos-3.6.0
>=sci-libs/proj-4.6.0
>=sci-libs/gdal-1.10.0
address-standardizer? ( dev-libs/libpcre )
gtk? ( x11-libs/gtk+:2 )
dev-libs/protobuf
"
DEPEND="${RDEPEND}
doc? (
app-text/docbook-xsl-stylesheets
app-text/docbook-xml-dtd:4.5
dev-libs/libxslt
|| (
media-gfx/imagemagick[png]
media-gfx/graphicsmagick[imagemagick,png]
)
)
virtual/pkgconfig
test? ( dev-util/cunit )
"
PGIS="$(get_version_component_range 1-2)"
REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
# Needs a running psql instance, doesn't work out of the box
RESTRICT="test"
# These modules are built using the same *FLAGS that were used to build
# dev-db/postgresql. The right thing to do is to ignore the current
# *FLAGS settings.
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
src_prepare() {
eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
# funky misdetection if enabled but --without-protobuf
local AT_M4DIR="macros"
eautoreconf
postgres-multi_src_prepare
}
src_configure() {
local myargs=""
use gtk && myargs+=" --with-gui"
use address-standardizer || myargs+=" --without-address-standardizer"
myargs+=" --with-protobuf"
use topology || myargs+=" --without-topology"
postgres-multi_foreach econf ${myargs}
}
src_compile() {
postgres-multi_foreach emake
postgres-multi_foreach emake -C topology
if use doc ; then
postgres-multi_foreach emake comments
postgres-multi_foreach emake cheatsheets
postgres-multi_forbest emake -C doc html
fi
}
src_install() {
postgres-multi_foreach emake DESTDIR="${D}" install
postgres-multi_foreach emake -C topology DESTDIR="${D}" install
postgres-multi_forbest dobin ./utils/postgis_restore.pl
dodoc CREDITS TODO loader/README.* doc/*txt
docinto topology
dodoc topology/{TODO,README}
if use doc ; then
postgres-multi_foreach emake DESTDIR="${D}" comments-install
docinto html
postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
docinto html/images
postgres-multi_forbest dodoc doc/html/images/*
fi
use static-libs || find "${ED}" -name '*.a' -delete
}
pkg_postinst() {
ebegin "Refreshing PostgreSQL symlinks"
postgresql-config update
eend $?
elog "To finish installing PostGIS, follow the directions detailed at:"
elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
}

Binary file not shown.

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -134,9 +134,9 @@ src_install() {
# In upstream's build process, we copy these fiels below from the bundled arduino-builder.
# Here we do the same thing, but from the system arduino-builder.
dosym "${EPREFIX}/usr/share/arduino-builder/platform.txt" "${SHARE}/hardware/platform.txt"
dosym "${EPREFIX}/usr/share/arduino-builder/platform.keys.rewrite.txt" "${SHARE}/hardware/platform.keys.rewrite.txt"
dosym "${EPREFIX}/usr/bin/arduino-builder" "${SHARE}/arduino-builder"
dosym "../../arduino-builder/platform.txt" "${SHARE}/hardware/platform.txt"
dosym "../../arduino-builder/platform.keys.rewrite.txt" "${SHARE}/hardware/platform.keys.rewrite.txt"
dosym "../../../bin/arduino-builder" "${SHARE}/arduino-builder"
# hardware/tools/avr needs to exist or arduino-builder will
# complain about missing required -tools arg
@ -147,7 +147,7 @@ src_install() {
einstalldocs
# arduino expects its doc in its "main" directory. symlink it.
dosym "${EPREFIX}/usr/share/doc/${PF}/html/reference" "${SHARE}/reference"
dosym "../doc/${PF}/html/reference" "${SHARE}/reference"
fi
# Install menu and icons

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -111,9 +111,9 @@ src_install() {
# In upstream's build process, we copy these fiels below from the bundled arduino-builder.
# Here we do the same thing, but from the system arduino-builder.
dosym "${EPREFIX}/usr/share/arduino-builder/platform.txt" "/usr/share/${PN}/hardware/platform.txt"
dosym "${EPREFIX}/usr/share/arduino-builder/platform.keys.rewrite.txt" "/usr/share/${PN}/hardware/platform.keys.rewrite.txt"
dosym "${EPREFIX}/usr/bin/arduino-builder" "/usr/share/${PN}/arduino-builder"
dosym "../../arduino-builder/platform.txt" "/usr/share/${PN}/hardware/platform.txt"
dosym "../../arduino-builder/platform.keys.rewrite.txt" "/usr/share/${PN}/hardware/platform.keys.rewrite.txt"
dosym "../../../bin/arduino-builder" "/usr/share/${PN}/arduino-builder"
# hardware/tools/avr needs to exist or arduino-builder will
# complain about missing required -tools arg
@ -124,7 +124,7 @@ src_install() {
einstalldocs
# arduino expects its doc in its "main" directory. symlink it.
dosym "${EPREFIX}/usr/share/doc/${PF}/html/reference" "/usr/share/${PN}/reference"
dosym "../doc/${PF}/html/reference" "/usr/share/${PN}/reference"
fi
# Install menu and icons

Binary file not shown.

@ -4,6 +4,7 @@ DIST erlang-22.1.8.tar.gz 54967877 BLAKE2B cb022e3c5f577605872e7689639fced6c1f6c
DIST erlang-22.2.1.tar.gz 55742915 BLAKE2B cfb49a07289f66ee8bcdc37452c88ec60c90b92febb7d41538166916989e80b612f13bae4ae2ba305aa12c790a74bcd9dc8412207413ba512537193811d177ad SHA512 4c0e5b963def01e02f8550414bee9e15a79681ac19547c4707d4cf3a67924e252dde7f8f94dfeca5eb3d34730acaffd193603711531bdf7c22d47d8880c5e5f4
DIST erlang-22.2.2.tar.gz 55743605 BLAKE2B f316b78f33d81f05d22eb4eab52756a46c39df31ce93bf57ddbc6d663d0165f6cdcb4de2e4a70308024e7648a54267364ec19c94c425d643d03dc741112acaff SHA512 c38ecfcbc7ca66d45b5a2dad9a03d9c2a3a504d9ac85635de93975b03056a3d59edf462c296349f657534d935bcc1ea4321b771fb216f54f723d9db438437e42
DIST erlang-22.2.3.tar.gz 55742102 BLAKE2B 85c1f9a2f6ae05e8e3c0f4c71c0dc4f1dd14f5a91e35070f20631b9349fd5d884a9c5390a0159bafcfda8464253bb3636a735f05f4d286ce2bf0518bdb3f3b50 SHA512 4ec29abfba875ddff700ed19095bf5709e75083530216ac8f3b24147e06d098675d1b4e5c0674aef44bc7391fe8e3fbcfc2e17d8083cd006e5ddb5c910010e44
DIST erlang-22.2.4.tar.gz 55746886 BLAKE2B 2132ab12789c98259f284cd0188109eb1bdbac63c3f6c5bb7a79572dd99586bdf9b741b3b2c87965f5794c3d41df1f0b713e9b89ebff0707ab9fa079dd20a9d2 SHA512 b73bb94c0172635cc4843958a62959c42085e63916423cebbb094cef9684ffd0491874a12338c7066cc94b660ac8b6f6aae73cc0eedcf5517ba1c85cf1b80258
DIST erlang-22.2.tar.gz 55736930 BLAKE2B bcd67ea4ef5c358d4f0bcbec977e2c60a3b0f1ccccb2d38c35ba1908ed9d96727c83ab6cb6dc69ce90ffc6772e34de68014cc66ec8c3bfcda852844a4f6b1548 SHA512 a192da8ee02588c44e5c04bf2933c95672f596ca10f485c2c41d0c97563c90b5ea24fa02da61e007595f25a80557e6513372db3059bb7e394647a4c11f4cd41e
DIST erlang_doc_html_21.1.tar.gz 32692731 BLAKE2B a7fa8ebe1c876ab7eecd2dd46ffd4d288db6d308e0f131d53c26ee4b67a92cb6fcb89b6c880ef34df395c7ad61fcdc81eac32e0fcf7336be7d517263218146bc SHA512 0d659f55bfb01eecf140a310154724489ef56b6ccbe9ac30f6b053f598276721b80de7b5b3200707cf8a6e77b8854eae5453f655225f431fcc982550539f767f
DIST erlang_doc_html_22.1.tar.gz 33824830 BLAKE2B 2d50802fff81eba8bcf5f630da49d68d7cb2098175012e12f13941e69949a109c9f601c3cfaa2700b669415cd0c6c15961d8e4dd94b9b228cee17b661fe5400a SHA512 cc24927a4ff98b04d8f93fbc46bb36ffb34570521e4f31154b778dc17cf1cff60869239c26c327d7a9360c06528f9b380a302b39fa47285e50dfd4656b508202

@ -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
}

@ -12,3 +12,4 @@ DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe59
DIST go1.12.13.src.tar.gz 21980338 BLAKE2B 205bee35a947ccd08f36547530e3de7928f5f3970be89580ddff80f7710dd1dcf4f292c10ec93c27717ce25ce2575f7151129430b80d1fb927872f891166d8db SHA512 a8210ba909c1bb26799625bbf648204dbef5a9f91af323277f76caee489f5912a08e9de686b71fe97d30c7dc171d5f4bcf8a2c2227d02353cfbb7d292c9efc22
DIST go1.12.15.src.tar.gz 20726294 BLAKE2B d123fc2328bf9db8f7337108e3d6857c31e10829096d47fb58519861b68bc0e2bdc9f032fc076666124ab418d3f37026107d6a853021fecbf26138bf00963572 SHA512 887e331c73b9d174e4a707a85be389fa0de43c77bc191ef5e0fe326ac7285374404450ca081cb8e92514a973d25d0314ca74eb17c8e53f8386e1798edd9d41aa
DIST go1.13.6.src.tar.gz 21631050 BLAKE2B 8923021d5ff785f5422ee204ee81c986fc066a878a347bc73625974f05045689f694f76147c9bf7956dc59d6e3d3a543f0970e0716df8cd4f6556c28fe23808b SHA512 dffb6e06eea0b1541901dfbed8d28e8cc1eac3184dc40a19ed3637737df796a67a2e7170b228e1003d36b14e6f0f13bb8be9d2a702834a9c06228d1821659528
DIST go1.13.7.src.tar.gz 21631267 BLAKE2B 9c3096e7c7658e03be52b76298dd409de292929d95448cb8945fe6f263fda774d9d13e124bb978c91b51a3770c0ca81302098b0e915015cfcac5f26256987796 SHA512 f87dd04befbe32c7ff1eb617a756fcc7d85e4236d4b063bbf6091d8911ef147c070808f7f7db536e7a3b3990f61f6fb4666e665217b0807e7e0703e00c5491fa

@ -0,0 +1,197 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
export CBUILD=${CBUILD:-${CHOST}}
export CTARGET=${CTARGET:-${CHOST}}
MY_PV=${PV/_/}
inherit toolchain-funcs
case ${PV} in
*9999*)
EGIT_REPO_URI="https://github.com/golang/go.git"
inherit git-r3
;;
*)
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
S="${WORKDIR}"/go
case ${PV} in
*_beta*|*_rc*) ;;
*)
KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
# The upstream tests fail under portage but pass if the build is
# run according to their documentation [1].
# I am restricting the tests on released versions until this is
# solved.
# [1] https://golang.org/issues/18442
RESTRICT="test"
;;
esac
esac
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
HOMEPAGE="https://golang.org"
LICENSE="BSD"
SLOT="0/${PV}"
BDEPEND="|| (
dev-lang/go
dev-lang/go-bootstrap )"
RDEPEND="!<dev-go/go-tools-0_pre20150902"
# These test data objects have writable/executable stacks.
QA_EXECSTACK="
usr/lib/go/src/debug/elf/testdata/*.obj
usr/lib/go/src/*.gox
"
# Do not complain about CFLAGS, etc, since Go doesn't use them.
QA_FLAGS_IGNORED='.*'
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
# Do not strip this package. Stripping is unsupported upstream and may
# fail.
RESTRICT+=" strip"
DOCS=(
AUTHORS
CONTRIBUTING.md
CONTRIBUTORS
PATENTS
README.md
)
go_arch()
{
# By chance most portage arch names match Go
local portage_arch=$(tc-arch $@)
case "${portage_arch}" in
x86) echo 386;;
x64-*) echo amd64;;
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
s390) echo s390x ;;
*) echo "${portage_arch}";;
esac
}
go_arm()
{
case "${1:-${CHOST}}" in
armv5*) echo 5;;
armv6*) echo 6;;
armv7*) echo 7;;
*)
die "unknown GOARM for ${1:-${CHOST}}"
;;
esac
}
go_os()
{
case "${1:-${CHOST}}" in
*-linux*) echo linux;;
*-darwin*) echo darwin;;
*-freebsd*) echo freebsd;;
*-netbsd*) echo netbsd;;
*-openbsd*) echo openbsd;;
*-solaris*) echo solaris;;
*-cygwin*|*-interix*|*-winnt*)
echo windows
;;
*)
die "unknown GOOS for ${1:-${CHOST}}"
;;
esac
}
go_tuple()
{
echo "$(go_os $@)_$(go_arch $@)"
}
go_cross_compile()
{
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
}
src_compile()
{
if has_version -b dev-lang/go; then
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
elif has_version -b dev-lang/go-bootstrap; then
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
else
eerror "Go cannot be built without go or go-bootstrap installed"
die "Should not be here, please report a bug"
fi
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
export GOROOT="$(pwd)"
export GOBIN="${GOROOT}/bin"
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
export GOHOSTARCH=$(go_arch ${CBUILD})
export GOHOSTOS=$(go_os ${CBUILD})
export CC=$(tc-getBUILD_CC)
export GOARCH=$(go_arch)
export GOOS=$(go_os)
export CC_FOR_TARGET=$(tc-getCC)
export CXX_FOR_TARGET=$(tc-getCXX)
if [[ ${ARCH} == arm ]]; then
export GOARM=$(go_arm)
fi
cd src
./make.bash || die "build failed"
}
src_test()
{
go_cross_compile && return 0
cd src
PATH="${GOBIN}:${PATH}" \
./run.bash -no-rebuild || die "tests failed"
}
src_install()
{
local bin_path f x
dodir /usr/lib/go
# There is a known issue which requires the source tree to be installed [1].
# Once this is fixed, we can consider using the doc use flag to control
# installing the doc and src directories.
# [1] https://golang.org/issue/2775
#
# deliberately use cp to retain permissions
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
if go_cross_compile; then
bin_path="bin/$(go_tuple)"
else
bin_path=bin
fi
for x in ${bin_path}/*; do
f=${x##*/}
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
done
einstalldocs
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name for test object (binutils_test) on Darwin, it
# is never used in real circumstances
local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
install_name_tool -id "${libmac64}" "${D}${libmac64}"
fi
}

@ -54,3 +54,17 @@ DIST rust-1.40.0-powerpc64le-unknown-linux-gnu.tar.xz 87972788 BLAKE2B ad1e460db
DIST rust-1.40.0-s390x-unknown-linux-gnu.tar.xz 95398844 BLAKE2B e897ac3e1f46a63c7ad14e0e5229b7028ac325256e084439bcad0ced631eb26d50ca72710c46e59accb0e3d0574d08a9c15455be59a8d78173387d35ddd3bed7 SHA512 e71d3a1d85975653b6d972a4854c9e53be7f2d093a601145261c97f7917f869399fbc6322a04f63b782a5a28b91c3be40041a8c77367d19dec8d0e857cbbef14
DIST rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz 110186516 BLAKE2B ad89d8cecbd565b23c98ec095bad218de971cb4bb89924bbcb012df6c9ecf0db2b50d624abdf6b050fe1f5067aea9311dc01852950a5ca5e993e99f913fc5dbc SHA512 11a2ad1d8b9e91cbe9ee6a1954d46ac75eeaa83f0c2425a8ad70d191727b02e86ead33d6464222effca6f5134c31a165801a854aa57bdb5f12944d605de3c1d1
DIST rust-1.40.0-x86_64-unknown-linux-musl.tar.xz 96869284 BLAKE2B 61cdf2eab51455e377e079e7013959ee51358c9846f8442f81a3240062af573f452a0f5f007e63cbbcdd0db98ac22ab0d4f3006f6ef30327b609d303410cba8c SHA512 3e6d7cf7b24c09d13266e06f20ab317c5ffb68de3242719c71e95c3d778269c4076e06badfb488e8fc223b822246ebbeb888d4168ddf6e2401793e23e77810bb
DIST rust-1.41.0-aarch64-unknown-linux-gnu.tar.xz 96574096 BLAKE2B 1cd5e5c2cc9a53344e46f2bc88894346669f7395959e5beea921be1765d0c71fe2bd8f6cbf31bca91fef391e2e35dd8d477432d0a9e4c23b147ab9982b74870e SHA512 e96e17045fee7056c5cad764d77c79a995c0f969a12d7c0b8eb8e55235bd72d97fd6836c8ee283f09ab1447bf0ae931766db5db0703fb8d5ac647556c417c254
DIST rust-1.41.0-arm-unknown-linux-gnueabi.tar.xz 99328148 BLAKE2B cf8426b77db7bcb310a0cf95322371b79df22f5f1c048675f460bd8eaac4d2a2e84ce0fc478287fc140fdfee54bcd7eb903be9aa37d59e9a6b562b3997533fcf SHA512 6a0a96967094ac9502c880158b163f2e33134bc849ffb01ef88dfed22d96483d82166e695ca21d9e9e96e56e5c83ede5dba9573f3225a3418c71e625f8e98470
DIST rust-1.41.0-arm-unknown-linux-gnueabihf.tar.xz 99310972 BLAKE2B dfdb003e95034fe72287a0c2527e9a7b5c02cf3682263c225037e86a0d5a71250f067f757e0b099c4b8a639993ba9e9353562d64b750ceb31d67f98c9a8835d9 SHA512 3da429f804dd5c61375bedd06f1e6262b44dbed487644aeebadc0ea3438584855d48c67c75021e551e5527465213a9699ce4a8595f93c8ef3df2ed4bbd9b8c76
DIST rust-1.41.0-armv7-unknown-linux-gnueabihf.tar.xz 103804972 BLAKE2B 7ecb1800f144f8ee0fa020b28cd5087cf20cb6583fcd334f0d07ab722a5cd078a4a94649e464c6778222ba197aec95154ed6ebdbff76aa83067695439bd4a255 SHA512 b699eb497145e36fbda283abd2881b0e879bc6713b170be04be3919fb2064153779e4535c6a513c667a79b6aa21c775dbd479af131db1a55c7caa4504e808fbd
DIST rust-1.41.0-i686-unknown-linux-gnu.tar.xz 120547488 BLAKE2B cf5b240c6f116f4d54092c9d466e2eb8408584f3fb4b0759601ad0bcba59ff3d639debca1cc45ce490964a09b02a071fea0d2cbcac0f3a5ac0bbb5aedef6d6af SHA512 b9541e07bd92b9135c538e0d8d3b47577fd4a7019a7ba4ce99a85c568a724b9a31f76d8b547e944818f215af8f8347a7674f14b4e61b2f5fc09b83595415583b
DIST rust-1.41.0-mips-unknown-linux-gnu.tar.xz 90976844 BLAKE2B eef629a270e53299df4a3e2beef6962c028e1c1380c86264ac72d80b3837e7ef44100ab6484b9f9bdc5e4415ce9897bdb14d9643d164ec3c2eb12825a8833bc3 SHA512 823d2f8ccd70b9f1506134d027972ae021aa2867ac53d2e8d77deaac2ab55310c5c6978ad17f259d82adfe79ed4973029052407e3412f30988d890e20745b812
DIST rust-1.41.0-mips64-unknown-linux-gnuabi64.tar.xz 98858296 BLAKE2B 57c73264a8a82d32854fba3d3283b53068c4200b54b0cf90d7e185cec6392fef26a1128079f5c056ae5cf77d86a3cd25c2d96d089de60e5a43fc3f312f099f32 SHA512 4c67f719b4d6573d5a48b31922c76bf475ee025fcc66b23fcda1a5713da1fd02aac9d407af703af017b2ff9d76822d3ab3f452fb2081a52a6610cdc61bfd6b39
DIST rust-1.41.0-mipsel-unknown-linux-gnu.tar.xz 92840348 BLAKE2B 6a94aa8999eaffcff1788d60b196a432840850383bb2b3530cc2097b1533ff139ae4ce47aff15e85352682e869c24f8680dd5126f37ba31f6b49562ccf74ce94 SHA512 e3ff18a44a79f7d1625ecd20963e9831d30d5eccb0b41f09cdceb1306671e53b9519c399a25b9d71890c1d2cd490b4bcdc59fc92b38db8f4f25e28cada5ce45c
DIST rust-1.41.0-powerpc-unknown-linux-gnu.tar.xz 98469628 BLAKE2B f7b7cad2b7f702b5a67309bdae3ac94b3118c05e9a429ebeec22312ac8bd37d268f6e9f23acc59f35e89664d01fecc9216739346fa395d688e3266d994aaa961 SHA512 4af61af924dc103ee582b273cb7e4d66f45b8ea3955b90f3c59a11b2d057eba5ac915a33579761053b4f22216dc56de1ae4984ce3ddb789189a787888ec45306
DIST rust-1.41.0-powerpc64-unknown-linux-gnu.tar.xz 104761152 BLAKE2B ff05e6ba0fd4a2bf74d01c459ad73c17503cf6fa877989130b0949e67300dfaa8f5a16be7e56c594d38aa1df680775fadc556686f7dd89630528a0db38e36339 SHA512 0c40a966ab9d8b485cc8e542b74fc7fec74e00f409744be79d38bddeff74b12e6a130fead8f13531210d123fd95be1fc476434cf26cedf25f74774de8fff42ee
DIST rust-1.41.0-powerpc64le-unknown-linux-gnu.tar.xz 110799904 BLAKE2B c89548ec66be561fccca42922e418ba8bb952bd5848f69ad4606bf388076b1b0bb9d04bc7181792f1df3e9cf8d9014abe08fdc0a65eb8a73c0ccb79f6e3324b0 SHA512 5b9faee91ae2f4c472ba3155149ac9e3a300a149209e62393502a2d69730cba0361e4ddcbb0d5f1d3c26a93b7ebe1fc497d8573bad049e492156ca743603ef06
DIST rust-1.41.0-s390x-unknown-linux-gnu.tar.xz 115153476 BLAKE2B 1646b42f5a2001f63b653c59d5e30d1b6c9f3a8c2d2d07a779cc530242fee1f5e92ae8dc1af2a81c57f93d615ad519d40ec6f5ceea79e56048ccae7a37d4a5ba SHA512 458b9877bf2569e6e3a0a6692228d4dda68506336587880f6a51254bab5cbb60c5f82673b0d44842137a426411f25146c08447f22e1a5b883dee99f52e30aeb0
DIST rust-1.41.0-x86_64-unknown-linux-gnu.tar.xz 111122952 BLAKE2B e1380cf72c8db8279c7b0d4349f09efb040117b1ca70ed599cd5197c6c8a257a846213db372e5b2df93ee266124a8a410e348dc8d5502a537a9b86159afe7bbb SHA512 1f08ba8b82ee17e4ae8130a092913767bd448a580efa4eb06ca2c926234efc72d9b73e2b846102296b80e324697c0ac6f5d3768fbd159d49d248f307efc244ff
DIST rust-1.41.0-x86_64-unknown-linux-musl.tar.xz 96497736 BLAKE2B 3a193cc6d607891c2c7800498dc499d13bc50ce1249cb553271ab3eef69ea8e309f5048bfca9470c61056469a933824527002d5cc3f10f2ef1aea5519226710a SHA512 bcffacbb48b1d76cbf2951e7233951d6d58c4696f13b3ae616ca661bd8c20ebefd9420c494327d91999b76a34a6afe957281187e8fb5ce9cb968a3cfa8c23ea8

@ -133,7 +133,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -133,7 +133,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -133,7 +133,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -133,7 +133,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -0,0 +1,167 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-r1 rust-toolchain toolchain-funcs
MY_P="rust-${PV}"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="$(rust_all_arch_uris ${MY_P})"
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
SLOT="stable"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
DEPEND=""
RDEPEND=">=app-eselect/eselect-rust-20190311
sys-libs/zlib
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
net-libs/libssh2
net-misc/curl[ssl]
!dev-lang/rust:0
!dev-util/cargo
rustfmt? ( !dev-util/rustfmt )"
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
QA_PREBUILT="
opt/${P}/bin/*-${PV}
opt/${P}/lib/*.so
opt/${P}/lib/rustlib/*/bin/*
opt/${P}/lib/rustlib/*/lib/*.so
opt/${P}/lib/rustlib/*/lib/*.rlib*
"
pkg_pretend () {
if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
fi
}
src_unpack() {
default
mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
}
src_install() {
local std=$(grep 'std' ./components)
local components="rustc,cargo,${std}"
use doc && components="${components},rust-docs"
use clippy && components="${components},clippy-preview"
use rustfmt && components="${components},rustfmt-preview"
./install.sh \
--components="${components}" \
--disable-verify \
--prefix="${ED}/opt/${P}" \
--mandir="${ED}/usr/share/${P}/man" \
--disable-ldconfig \
|| die
local rustc=rustc-bin-${PV}
local rustdoc=rustdoc-bin-${PV}
local rustgdb=rust-gdb-bin-${PV}
local rustgdbgui=rust-gdbgui-bin-${PV}
local rustlldb=rust-lldb-bin-${PV}
mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
dosym "${rustc}" "/opt/${P}/bin/rustc"
dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
local cargo=cargo-bin-${PV}
mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
dosym "${cargo}" "/opt/${P}/bin/cargo"
dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
if use clippy; then
local clippy_driver=clippy-driver-bin-${PV}
local cargo_clippy=cargo-clippy-bin-${PV}
mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
fi
if use rustfmt; then
local rustfmt=rustfmt-bin-${PV}
local cargo_fmt=cargo-fmt-bin-${PV}
mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
fi
cat <<-EOF > "${T}"/50${P}
LDPATH="/opt/${P}/lib"
MANPATH="/usr/share/${P}/man"
EOF
doenvd "${T}"/50${P}
# note: eselect-rust adds EROOT to all paths below
cat <<-EOF > "${T}/provider-${P}"
/usr/bin/rustdoc
/usr/bin/rust-gdb
/usr/bin/rust-gdbgui
/usr/bin/rust-lldb
EOF
echo /usr/bin/cargo >> "${T}/provider-${P}"
if use clippy; then
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
fi
if use rustfmt; then
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}
pkg_postinst() {
eselect rust update --if-unset
elog "Rust installs a helper script for calling GDB now,"
elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
if has_version app-editors/emacs; then
elog "install app-emacs/rust-mode to get emacs support for rust."
fi
if has_version app-editors/gvim || has_version app-editors/vim; then
elog "install app-vim/rust-vim to get vim support for rust."
fi
if use elibc_musl; then
ewarn "${PN} on *-musl targets is configured with crt-static"
ewarn ""
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
ewarn "to use it with portage, otherwise you may see failures like"
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
ewarn "x86_64-unknown-linux-musl does not support these crate types"
fi
}
pkg_postrm() {
eselect rust cleanup
}

@ -54,7 +54,22 @@ DIST rust-1.39.0-powerpc64le-unknown-linux-gnu.tar.xz 247026740 BLAKE2B 90269aa7
DIST rust-1.39.0-s390x-unknown-linux-gnu.tar.xz 298119784 BLAKE2B 82f64163929c129e2aaee8909401c4f302496f63f8d9d366d6f7460b4546d7657ea38bcd864ecd0f58a5995e47f7f5890e4523dcbcbc51e3bf4085536b07de5f SHA512 d2b588f802d4fbe153dbd88cb745d34d1f5434cb3134cc9e091ebfb336a48b4c886cd80311cf92b5e1c6a16374302853a67e8a0576b02a89dbcf61d27919a045
DIST rust-1.39.0-x86_64-unknown-linux-gnu.tar.xz 284967620 BLAKE2B c5d2c2a11c4f66105ece51e7ca45ca6a9e0d70215f94ce52f6e61b20995ceb611e45bad1e5e9f33fd444bb0a58a2edb691f1a65a1caf36ad892c034e00104383 SHA512 02ca6c821877379d8bd0bcc38281a87e6f86bdbae1270da19e41336cc3a812d9c11c1e976655c192c39153f92cda90ddbd7b4b0bcb4f6787d6d354d2be827a8a
DIST rust-1.39.0-x86_64-unknown-linux-musl.tar.xz 262751216 BLAKE2B f719f4168f3d463f5184b9f72990f2e43b99f75902f762f5736e819f47ad451a325cbc7b7140cb322b46b5dc51253ebb8aa2a16b0f792343dbfcab5a91ac95a4 SHA512 155458717aaaaa82b202fae180c094e5a40f45071c3a0f6d27423a612ffe926058642fc82aaa7ea091963108b7a819d6156294149648e5b0a5d5b6196028f4fb
DIST rust-1.40.0-aarch64-unknown-linux-gnu.tar.xz 80285104 BLAKE2B 857a3148337833a216912b732c017827d0ee2869af41d114f3a743fbc8bd0ad851c4c42dca63cbcb8f15c816a8c45bd60049fb60ea80a85faec23000140acab6 SHA512 f601e4251e08a6d66edb0489b6ab840b57622b506547e81036e6dfe08eb71005a22a2777a0b8b2d07a6f88286d58f513482b863116311a6f43c7284769af6e7f
DIST rust-1.40.0-arm-unknown-linux-gnueabi.tar.xz 82051152 BLAKE2B 33c62780b3f228298217f7a16e00348cf3c29c504f59de414a0e8a3c506c801d87f460a7bf6107bb7856249c5a5b8fad94499f7f059602b99252ef85dc5b973c SHA512 2098ff12393dd99004ce94f49d445dad03184a108ea8249b70e51abd44bd510f8a4ee43eba3b32967b1a543951e8eec5b06c85692312821b5c855c1d5f034e94
DIST rust-1.40.0-arm-unknown-linux-gnueabihf.tar.xz 82518972 BLAKE2B 2861693efa9bbd54e09bd693886941ec13b09f1901d384f24534b2852f9cb3b59fa0eaac1ec16bc6df49437cf08a09eff6c649729b0b8c2b4d8def6d7111d229 SHA512 994a91704e65e126bf3d53aa5ccbf9f92f05495a68db1917754f8bf078f16b0255797c884b4f2c70033ae0c94d5f41ad73e1af2e963580ebf56c90a6bf76630a
DIST rust-1.40.0-armv7-unknown-linux-gnueabihf.tar.xz 84254100 BLAKE2B 5ec75764435f5b906ed5ac84c6454a8fade0d71a9f9d2b3c799525ebf1e1a6e208e85dffe125e3de163d94a62693241a6ed59651955942edc8cdfad5c354a23d SHA512 d3345946c5a3d5cb3d7fca4d3200710704d64547ebfa4ab11c45ea1a18ca3c49b429783d499845f31dcb150abe2f6836fe203fd9d7aa53e0475b940da5549492
DIST rust-1.40.0-i686-unknown-linux-gnu.tar.xz 122168896 BLAKE2B c89278bd7af7d167251c122297b4a8045da94951aaba5288a3a47b7d4f7af2af2e5ae672388f5c6192382e800151ad54cb2fc9a4fd66fde3acb8acb877aaa27b SHA512 d727149afbbc3b2709360dd6080ff301e781aaa94459c1348d3e35382bc9c7ad65c4d70f9bfc7b44ac92ddaf89e3aab92b75b9d184eba86916da25bd629592b6
DIST rust-1.40.0-mips-unknown-linux-gnu.tar.xz 74305992 BLAKE2B cf51e3d843a32a3025232d1bc4374c55d3931d8b8634aed83f3f5e890081d7ed2a09d0aa3f026936d5e2f91fd26b56be704cf2975678db5fa23cf57c34277a89 SHA512 995b875dcbbd8472e3109504e695bf15eca812ea252e5ff1a615fb1c5dd3b66fe637fa4c30618b1584af4b641d4b4d5a4d7e1b6a09cb0ca4ff8fdd8a3488a255
DIST rust-1.40.0-mips64-unknown-linux-gnuabi64.tar.xz 80925812 BLAKE2B a77123767639e93531fdf30af711a8dafd91c4143e7774edf88a9f513fd6fc928f3c96656ce4d0ede54677077c8eb383d5c37bee6881fd0796fe47257a16d753 SHA512 ebbb01c033c16dd9fe93ce0a532afa39b1459b056896c906f9e561285977e7c569e770c7e624e485cd8014008c9d496dae893921bbc1342c3e2b6520c9b84440
DIST rust-1.40.0-mipsel-unknown-linux-gnu.tar.xz 76145484 BLAKE2B e06cfc8ac8d6124c4eb7c004c9e792c6ba21de5621d21456a7e47f1cd67f584d480708ddb098d882005953db818da27e396c9409c1e089d7db42844608ba1fe8 SHA512 4d4b52397574cfcbf8e79d71cbf783119b0096ed6d8b1f1a4c191336ac0e616b682342077f3451db477e0271a5ac453ee418314c071e8f922e790eb0e32ae768
DIST rust-1.40.0-powerpc-unknown-linux-gnu.tar.xz 82846452 BLAKE2B e82e117b0592278b491399f27de4c26b518bf8f7cbb60125fc3ae36ddb033113324222ac7433ac9b02026efe4be477ec9967c55648121869a36ce833c3600afd SHA512 4d71bbf1b29f9ea649f444bafbaa8d6447026d992c264736b50365736c9e2129d28f23e09260aa21be10562727a5f6b298ddaf8f7598b4bad53d65cdd2f9e9f0
DIST rust-1.40.0-powerpc64-unknown-linux-gnu.tar.xz 85231436 BLAKE2B b307d794e9e849d40a98116851950f76576b5ea6bb159c71830bb4210c40d5b6cc37d67d316d1b289735f83a29393699a49dd0c11cafe8191a64de6384ed69af SHA512 eae2e0ba3a6a9ba07945112c17962ca3c77737fa187759e674e78f626777da85a5ee6107168fe2866b5beb1ecf2e655652cb7d9b51867b247d76e174dfb103ce
DIST rust-1.40.0-powerpc64le-unknown-linux-gnu.tar.xz 87972788 BLAKE2B ad1e460dbd7ee5dbe90bf84a68fbcdd89f3d7a1a898ccd94827327bbb2bfeafeb66d5c50651183e0d429f8d14a41e4e26b8f7cae2ff61b055eddcb2c0fa6aecd SHA512 8b82f3bacc503aa23cfa7a6cd6232e34b734becffbbe02df9f766878d526d24d7409d8c104f39fa791c0f7a8b3fa61f6b8a528e89e8ab94d6a131b2d0ac11f0f
DIST rust-1.40.0-s390x-unknown-linux-gnu.tar.xz 95398844 BLAKE2B e897ac3e1f46a63c7ad14e0e5229b7028ac325256e084439bcad0ced631eb26d50ca72710c46e59accb0e3d0574d08a9c15455be59a8d78173387d35ddd3bed7 SHA512 e71d3a1d85975653b6d972a4854c9e53be7f2d093a601145261c97f7917f869399fbc6322a04f63b782a5a28b91c3be40041a8c77367d19dec8d0e857cbbef14
DIST rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz 110186516 BLAKE2B ad89d8cecbd565b23c98ec095bad218de971cb4bb89924bbcb012df6c9ecf0db2b50d624abdf6b050fe1f5067aea9311dc01852950a5ca5e993e99f913fc5dbc SHA512 11a2ad1d8b9e91cbe9ee6a1954d46ac75eeaa83f0c2425a8ad70d191727b02e86ead33d6464222effca6f5134c31a165801a854aa57bdb5f12944d605de3c1d1
DIST rust-1.40.0-x86_64-unknown-linux-musl.tar.xz 96869284 BLAKE2B 61cdf2eab51455e377e079e7013959ee51358c9846f8442f81a3240062af573f452a0f5f007e63cbbcdd0db98ac22ab0d4f3006f6ef30327b609d303410cba8c SHA512 3e6d7cf7b24c09d13266e06f20ab317c5ffb68de3242719c71e95c3d778269c4076e06badfb488e8fc223b822246ebbeb888d4168ddf6e2401793e23e77810bb
DIST rustc-1.37.0-src.tar.xz 98654252 BLAKE2B ddee92c7959a0e1ee11ffe5ded6017703cfac7bbf2a00dc46c37ed28f1cd1d31e1d5b62cc1a5ae2d55d64f8705d0cb282f4968deddf36c3152e5e0cfdfbea67d SHA512 bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4
DIST rustc-1.38.0-src.tar.xz 96163304 BLAKE2B 1e900b44db64727477ccf8e58e0ebb9ec209bbeb349816b5f7937e58c165db8befae33c5667732e5aaaa677c5a6c1e0229d9969ab8967fda9b8d7a593e6c5eb6 SHA512 b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
DIST rustc-1.39.0-src.tar.xz 96495140 BLAKE2B 6df6bf0c3b38c28753713acdc477ea6929740c32893171dd9b8620992439e45730ef6f9489a6fc411ff5884c661ac4c07b7b93f5a4174207ed53351d2dea09bf SHA512 8610b2ec77722087c572bd84ac562a5b7c5f1a644aea58c5d5daa07a9aed242703b7816e73e2eaa049f773d5907859e259744a0de700622df005584fd798dab0
DIST rustc-1.40.0-src.tar.xz 92306352 BLAKE2B 762b9592414e5c816540f6fd37d07b3b0ffe97a151968cc8ae77be2fda03a6d66905192985edc65055cc7811dbd90faa2b2c056481f72161c6f7ccbcce13671a SHA512 b5ac3079acefb62d3c985b77f624d7fb68de23a59396fed9ccb292db61641c064f3146ee54d3cf59067b17ebfaadd14a6b2b466def60316bb5b13ba3aef01e1f
DIST rustc-1.41.0-src.tar.xz 93763052 BLAKE2B a68524fb6e3abb43d52ae6676a1e9de1c5d33606eaea6e93bb518f10b196d620f2f370c631c32e39a624af71a3bf6911662a9df7eecb8dde78a20c8054a349fc SHA512 0e30fe53b77860085bea0f1f60315eb835b00dd796c5d1b98ed44fe6fc27336dfb064908c86e1669a9cbe81c9ca1495e1c259a8a268bef23b23805a719cef0dd

@ -304,7 +304,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -304,7 +304,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -309,7 +309,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -320,7 +320,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -307,7 +307,7 @@ src_install() {
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
dodir /etc/env.d/rust
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}

@ -0,0 +1,366 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
MY_P="rustc-beta"
SLOT="beta/${PV}"
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
else
ABI_VER="$(ver_cut 1-2)"
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
!system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
IUSE="clippy cpu_flags_x86_sse2 debug doc libressl nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
# simultaneously.
# How to use it:
# 1. List all the working slots (with min versions) in ||, newest first.
# 2. Update the := to specify *max* version, e.g. < 10.
# 3. Specify LLVM_MAX_SLOT, e.g. 9.
LLVM_DEPEND="
|| (
sys-devel/llvm:9[llvm_targets_WebAssembly?]
wasm? ( =sys-devel/lld-9* )
)
<sys-devel/llvm-10:=
"
LLVM_MAX_SLOT=9
BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)).0-r1 >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
COMMON_DEPEND="
sys-libs/zlib
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
net-libs/libssh2
net-libs/http-parser:=
net-misc/curl[ssl]
elibc_musl? ( sys-libs/libunwind )
system-llvm? (
${LLVM_DEPEND}
)
"
DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
|| (
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
system-llvm? (
dev-util/cmake
dev-util/ninja
)
"
RDEPEND="${COMMON_DEPEND}
>=app-eselect/eselect-rust-20190311
"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
parallel-compiler? ( nightly )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
"
QA_FLAGS_IGNORED="
usr/bin/*-${PV}
usr/lib*/lib*.so
usr/lib/rustlib/*/codegen-backends/librustc_codegen_llvm-llvm.so
usr/lib/rustlib/*/lib/lib*.so
"
QA_SONAME="usr/lib.*/librustc_macros.*.so"
PATCHES=(
"${FILESDIR}"/1.40.0-add-soname.patch
)
S="${WORKDIR}/${MY_P}-src"
toml_usex() {
usex "$1" true false
}
pre_build_checks() {
CHECKREQS_DISK_BUILD="10G"
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
CHECKREQS_DISK_BUILD="15G"
fi
eshopts_pop
check-reqs_pkg_setup
}
pkg_pretend() {
pre_build_checks
}
pkg_setup() {
pre_build_checks
python-any-r1_pkg_setup
export LIBGIT2_SYS_USE_PKG_CONFIG=1
export LIBSSH2_SYS_USE_PKG_CONFIG=1
export PKG_CONFIG_ALLOW_CROSS=1
if use system-llvm; then
llvm_pkg_setup
local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
export LLVM_LINK_SHARED=1
export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
fi
}
src_prepare() {
if ! use system-bootstrap; then
local rust_stage0_root="${WORKDIR}"/rust-stage0
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
--destdir="${rust_stage0_root}" --prefix=/ || die
fi
default
}
src_configure() {
local rust_target="" rust_targets="" arch_cflags
# Collect rust target names to compile standard libs for all ABIs.
for v in $(multilib_get_enabled_abi_pairs); do
rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
done
if use wasm; then
rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
fi
rust_targets="${rust_targets#,}"
local extended="true" tools="\"cargo\","
if use clippy; then
tools="\"clippy\",$tools"
fi
if use rls; then
tools="\"rls\",\"analysis\",\"src\",$tools"
fi
if use rustfmt; then
tools="\"rustfmt\",$tools"
fi
local rust_stage0_root
if use system-bootstrap; then
rust_stage0_root="$(rustc --print sysroot)"
else
rust_stage0_root="${WORKDIR}"/rust-stage0
fi
rust_target="$(rust_abi)"
cat <<- EOF > "${S}"/config.toml
[llvm]
optimize = $(toml_usex !debug)
release-debuginfo = $(toml_usex debug)
assertions = $(toml_usex debug)
targets = "${LLVM_TARGETS// /;}"
experimental-targets = ""
link-shared = $(toml_usex system-llvm)
[build]
build = "${rust_target}"
host = ["${rust_target}"]
target = [${rust_targets}]
cargo = "${rust_stage0_root}/bin/cargo"
rustc = "${rust_stage0_root}/bin/rustc"
docs = $(toml_usex doc)
compiler-docs = $(toml_usex doc)
submodules = false
python = "${EPYTHON}"
locked-deps = true
vendor = true
extended = ${extended}
tools = [${tools}]
verbose = 2
[install]
prefix = "${EPREFIX}/usr"
libdir = "lib"
docdir = "share/doc/${PF}"
mandir = "share/man"
[rust]
optimize = $(toml_usex !debug)
debug = $(toml_usex debug)
debug-assertions = $(toml_usex debug)
default-linker = "$(tc-getCC)"
parallel-compiler = $(toml_usex parallel-compiler)
channel = "$(usex nightly nightly stable)"
rpath = false
lld = $(usex system-llvm false $(toml_usex wasm))
[dist]
src-tarball = false
EOF
for v in $(multilib_get_enabled_abi_pairs); do
rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
arch_cflags="$(get_abi_CFLAGS ${v##*.})"
cat <<- EOF >> "${S}"/config.env
CFLAGS_${rust_target}=${arch_cflags}
EOF
cat <<- EOF >> "${S}"/config.toml
[target.${rust_target}]
cc = "$(tc-getBUILD_CC)"
cxx = "$(tc-getBUILD_CXX)"
linker = "$(tc-getCC)"
ar = "$(tc-getAR)"
EOF
# librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
if use elibc_musl; then
cat <<- EOF >> "${S}"/config.toml
crt-static = false
EOF
fi
if use system-llvm; then
cat <<- EOF >> "${S}"/config.toml
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
EOF
fi
done
if use wasm; then
cat <<- EOF >> "${S}"/config.toml
[target.wasm32-unknown-unknown]
linker = "$(usex system-llvm lld rust-lld)"
EOF
fi
}
src_compile() {
env $(cat "${S}"/config.env)\
"${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
--exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
}
src_install() {
env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \
--exclude src/tools/miri || die
# bug #689562, #689160
rm "${D}/etc/bash_completion.d/cargo" || die
rmdir "${D}"/etc{/bash_completion.d,} || die
dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
if use clippy; then
mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
fi
if use rls; then
mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
fi
if use rustfmt; then
mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
fi
# Move public shared libs to abi specific libdir
# Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
if [[ $(get_libdir) != lib ]]; then
dodir /usr/$(get_libdir)
mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
fi
dodoc COPYRIGHT
# note: eselect-rust adds EROOT to all paths below
cat <<-EOF > "${T}/provider-${P}"
/usr/bin/rustdoc
/usr/bin/rust-gdb
/usr/bin/rust-gdbgui
/usr/bin/rust-lldb
EOF
echo /usr/bin/cargo >> "${T}/provider-${P}"
if use clippy; then
echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
fi
if use rls; then
echo /usr/bin/rls >> "${T}/provider-${P}"
fi
if use rustfmt; then
echo /usr/bin/rustfmt >> "${T}/provider-${P}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
fi
insinto /etc/env.d/rust
doins "${T}/provider-${P}"
}
pkg_postinst() {
eselect rust update --if-unset
elog "Rust installs a helper script for calling GDB and LLDB,"
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
if has_version app-editors/emacs; then
elog "install app-emacs/rust-mode to get emacs support for rust."
fi
if has_version app-editors/gvim || has_version app-editors/vim; then
elog "install app-vim/rust-vim to get vim support for rust."
fi
if use elibc_musl; then
ewarn "${PN} on *-musl targets is configured with crt-static"
ewarn ""
ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
ewarn "to use it with portage, otherwise you may see failures like"
ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
ewarn "x86_64-unknown-linux-musl does not support these crate types"
fi
}
pkg_postrm() {
eselect rust cleanup
}

Binary file not shown.

@ -11,4 +11,4 @@ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/3"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="amd64 arm ~arm64 ~hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+asm doc cxx static-libs"
IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@ -77,12 +77,15 @@ multilib_src_configure() {
filter-flags -O?
fi
# --with-pic forces static libraries to be built as PIC
# and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
$(use pic && echo --with-pic) \
$(use_enable static-libs static)
}

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+asm doc cxx static-libs"
IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@ -76,12 +76,15 @@ multilib_src_configure() {
filter-flags -O?
fi
# --with-pic forces static libraries to be built as PIC
# and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
$(use pic && echo --with-pic) \
$(use_enable static-libs static)
}

@ -0,0 +1,105 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic eutils libtool multilib-minimal
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
PLEVEL=${PV/*p}
DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers"
HOMEPAGE="https://gmplib.org/"
SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
mirror://gnu/${PN}/${MY_P}.tar.xz
doc? ( https://gmplib.org/${PN}-man-${MY_PV}.pdf )"
LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
RDEPEND=""
S=${WORKDIR}/${MY_P%a}
DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache )
HTML_DOCS=( doc )
MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h )
PATCHES=(
"${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch
)
src_prepare() {
default
# note: we cannot run autotools here as gcc depends on this package
elibtoolize
# https://bugs.gentoo.org/536894
if [[ ${CHOST} == *-darwin* ]] ; then
eapply "${FILESDIR}"/${PN}-6.1.2-gcc-apple-4.0.1.patch
fi
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.
mv configure configure.wrapped || die
cat <<-\EOF > configure
#!/usr/bin/env sh
exec env ABI="${GMPABI}" "$0.wrapped" "$@"
EOF
# Patches to original configure might have lost the +x bit.
chmod a+rx configure{,.wrapped} || die
}
multilib_src_configure() {
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
# https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
if [[ ${CHOST} == hppa2.0-* ]] ; then
GMPABI="1.0"
fi
# ABI mappings (needs all architectures supported)
case ${ABI} in
32|x86) GMPABI=32;;
64|amd64|n64) GMPABI=64;;
[onx]32) GMPABI=${ABI};;
esac
export GMPABI
#367719
if [[ ${CHOST} == *-mint* ]]; then
filter-flags -O?
fi
# --with-pic forces static libraries to be built as PIC
# and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
$(use pic && echo --with-pic) \
$(use_enable static-libs static)
}
multilib_src_install() {
emake DESTDIR="${D}" install
# should be a standalone lib
rm -f "${ED}"/usr/$(get_libdir)/libgmp.la
# this requires libgmp
local la="${ED}/usr/$(get_libdir)/libgmpxx.la"
use static-libs || rm -f "${la}"
}
multilib_src_install_all() {
einstalldocs
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${ED}"/usr/share/doc/${PF}/
}

@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+asm doc cxx static-libs"
IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@ -77,12 +77,15 @@ multilib_src_configure() {
filter-flags -O?
fi
# --with-pic forces static libraries to be built as PIC
# and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
$(use pic && echo --with-pic) \
$(use_enable static-libs static)
}

@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="asm">Enable use of hand optimized assembly routines (faster execution)</flag>
<flag name="pic">Force static libraries to be built as PIC to avoid TEXTRELs.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gmplib:gmp</remote-id>

@ -39,7 +39,7 @@ src_install() {
into "${destdir}"
for solib in ${solibs_to_install[@]}; do
dolib.so "opt/rocm/hsa/lib/${solib}.${soversion}"
dosym "${EPREFIX}/${destdir}/$(get_libdir)/${solib}.${soversion}" "${EPREFIX}/usr/$(get_libdir)/${solib}.${soversion}"
dosym "${solib}.${soversion}" "${EPREFIX}/usr/$(get_libdir)/${solib}.${somajor}"
dosym "../../${destdir}/$(get_libdir)/${solib}.${soversion}" "/usr/$(get_libdir)/${solib}.${soversion}"
dosym "${solib}.${soversion}" "/usr/$(get_libdir)/${solib}.${somajor}"
done
}

@ -39,7 +39,7 @@ src_install() {
into "${destdir}"
for solib in ${solibs_to_install[@]}; do
dolib.so "opt/rocm/hsa/lib/${solib}.${soversion}"
dosym "${EPREFIX}/${destdir}/$(get_libdir)/${solib}.${soversion}" "${EPREFIX}/usr/$(get_libdir)/${solib}.${soversion}"
dosym "${solib}.${soversion}" "${EPREFIX}/usr/$(get_libdir)/${solib}.${somajor}"
dosym "../..${destdir}/$(get_libdir)/${solib}.${soversion}" "/usr/$(get_libdir)/${solib}.${soversion}"
dosym "${solib}.${soversion}" "/usr/$(get_libdir)/${solib}.${somajor}"
done
}

@ -1,2 +1,3 @@
DIST libunibreak-4.0.tar.gz 629403 BLAKE2B 067d09bd48c5381ebef1f3a0ca488732e216234e45977d5c2eee181c9c98b435a7e4030fb5bdbd83035a7937c2107ec05f78dc33158ec64297511d24e329f03d SHA512 43da73f66fabd8fdef444c5a06ad1800464a0aeab590938522d6c19973950a242f2ccc0575a93d10d87bdcf82610452117ac081ddb73f47271a8c2a65897e11c
DIST libunibreak-4.1.tar.gz 642497 BLAKE2B 79a09cc19e72bcf98605f3c49649c2d0753774825e737e0682ff4b67d4908be748b81b6ba79827ccc2032b7c5284fc2dd932d61d6775cae841888d6ee4a77b70 SHA512 f02a94b1c1757c0321f112ef9b44a17fc9f73c9ec6041f263bb55fe8ec44e5599c6061c4e1f6f92ca9069b282e5a8e40d90dcceaf04b6e2ed6ae948f104e1ce2
DIST libunibreak-4.2-1.tar.gz 643399 BLAKE2B 620e904113730078a8e74a09594b9e18c63768a926df433b4a251767fd492ae11c0954e97a4d94db577956a621f075bc6743535bdc67f9c5151243f304b33bf4 SHA512 26bbff1203dde9ffdc2b9046727ab7698f5693c1eb898c819ee83d0c97fbfd32b9dc7c4406dea29fff6642b2678fee74a1307aa5c9c3279f65484eb080ae1e2d

@ -0,0 +1,55 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Line and word breaking library"
HOMEPAGE="http://vimgadgets.sourceforge.net/libunibreak/"
SRC_URI="https://github.com/adah1972/${PN}/releases/download/${PN}_$(ver_rs 1- '_')-1/${P}-1.tar.gz"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~x86"
IUSE="doc +man static-libs"
# Tests require internet access to www.unicode.org
RESTRICT="test"
DEPEND="man? ( app-doc/doxygen )"
RDEPEND="!dev-libs/liblinebreak"
src_prepare() {
if use man; then
echo 'GENERATE_MAN=YES' >> Doxyfile || die
echo 'GENERATE_HTML=NO' >> Doxyfile || die
fi
default
}
src_configure() {
econf $(use_enable static-libs static)
}
src_compile() {
default
if use man; then
doxygen || die 'doxygen failed'
pushd "${S}"/doc/man > /dev/null
mv man3 x || die
mkdir man3 || die
for h in graphemebreak linebreak linebreakdef unibreakbase unibreakdef wordbreak; do
mv x/${h}.h.3 man3/ || die "man ${h} not found"
done
rm -rf x || die
popd > /dev/null
fi
}
src_install() {
use doc && HTML_DOCS=( doc/html/. )
default
find "${D}" -name '*.la' -delete || die
if use man; then
doman doc/man/man3/*.3
fi
}

@ -1,2 +1,3 @@
DIST libzia-4.18.tar.gz 623928 BLAKE2B ff7f4873f77c1782bc704ff11f0fcdc2a479404cf0719d9156fad2ad01634241f7f556699d778fbd6e3f4bfe108b1735c65def859d56cefcedd6a3c760200a14 SHA512 7d4287cf6804ae757d6c96c03fd948db1bf0b5463d345929b2c8dd4540e66b45849a8096500576199fa650b63b892ea17c976338b88e9310d64f804fa3920489
DIST libzia-4.19.tar.gz 623995 BLAKE2B 55bc17854614af92873059e741179d9bc4f35000c4fc29cdd56854b85cf059d422ec49cee9d07056cf8fd18f7a6bf15aeb98a3f3dcbee44420ca1862175d3938 SHA512 65b7cb87740a3288c186f30a10d29824f2b725e54290d4c56ebfd9aa6902ff2e1e48725ed35e3ff5c2d144ccd6a20384df470c1b615c99da8a14c7e0647b0f6a
DIST libzia-4.20.tar.gz 624009 BLAKE2B f0342c144c3e0b9dd7720466b24d79632de6dc8597786ba22acccd4eee20cdfb4f941da5717fde27a7ee0097f4f57b20a93455c123fd518916c1552cab801bc2 SHA512 0780eb791fdd85778a074eddab933650d4fbb09a9b441432cf6e63fe97978d47c75155caa251820f283badb16ffa5ac2d323b1f98ab5864caaa020511ff856d5

@ -0,0 +1,38 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
DESCRIPTION="platform abstraction code for tucnak package"
HOMEPAGE="http://tucnak.nagano.cz"
SRC_URI="http://tucnak.nagano.cz/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ftdi"
RDEPEND="dev-libs/glib:2
x11-libs/gtk+:2
media-libs/libsdl
media-libs/libpng:0
ftdi? ( dev-embedded/libftdi:0 )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
MAKEOPTS+=" -j1"
src_prepare() {
eapply_user
sed -i -e "s/docsdir/#docsdir/g" \
-e "s/docs_/#docs_/g" Makefile.am || die
eautoreconf
}
src_configure() {
econf \
$(use_with ftdi) --with-sdl \
--with-png --without-bfd
}

@ -15,7 +15,7 @@ SRC_URI="https://github.com/gdraheim/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc sdl static-libs test"
RESTRICT="!test? ( test )"

Binary file not shown.

@ -24,3 +24,5 @@ DIST sbcl-1.5.8-source.tar.bz2 6409837 BLAKE2B cb503ee1db82f2e1a9c123b9b6b5052b2
DIST sbcl-1.5.8-x86-64-linux-binary.tar.bz2 10145219 BLAKE2B aeccd48a5448e334d6cf3ca4e067ac23943256c2a729ff24b6b3c332c6c70c108b68a6903193a403176d4fbf4804c9f22add615e29fa09022f84b0190a429454 SHA512 d733929775be6fe5d46fd5b11c808eae89172a5a8694f1c2a7927cc364419529292d70f6902731f4c7822c85708555382de31b605440493bb281ccef552daf6c
DIST sbcl-2.0.0-source.tar.bz2 6457217 BLAKE2B ae09d4d80ca7100fb412be570126918612eb5a3f27a8c17ced4e0c555d105f3180999f2663ea86910dda9d812d4297cceb8d7c43d5084d20902839e1f23bc739 SHA512 e458e11af6703d8cff973cf5167866b93fe5f6e1b2df3cbf0c1beb014eef2d737d83fc9cde5745d476ef5397a2c9b4b4148d2b77ebbcec13e0f284b2e0900906
DIST sbcl-2.0.0-x86-64-linux-binary.tar.bz2 10196560 BLAKE2B 161d53df96817a50606ffc6a5ad502a94a1aa622e0a45c17c4ff4148deafb2e1db560aacd33b1198eb6fd3bc462b320e01d4925097bec3954f9d6ce564a2b1f5 SHA512 23d3974656a33ae0cfce340e2fbdd60a4e595353e7cc6e75dbab0242d7baaa30d677d1163d4440e953cd7f859fc737b073055b68fbeb2e57e3542a0133d7648f
DIST sbcl-2.0.1-source.tar.bz2 6466983 BLAKE2B f040fb288f5b7adb8a7f56aae60a37e38034c2fed958b1361f473096769367b0a10a76a0e45380e6dcf3b4bd2c1038957448f70eede38b04c228a14e3afc1fc2 SHA512 1d92589033e123c21377f820dbc22e27f2610a372c5545799bec7c247795ba4b8b65102c7fe739f4a15a84579ec72f63fb9f4b197db5c6da1f8d59bd35966bea
DIST sbcl-2.0.1-x86-64-linux-binary.tar.bz2 10151722 BLAKE2B 445fcaa5a6f1c2a7a7d80dd28d1126c33437af2a59dadd25cbbe9ca4e12488a985e78aa12095fda8e38e21dceca77a0e1bca0949133b0ac2666d4367bf881f68 SHA512 1d24981b42c5d91f6037ad6fed782786bbc75edcb2f125a6d5b793448d00c211af515f56b6dd70a68bd33ea7174fd1d96ef9ab353c96905835b6299dcb170f47

@ -0,0 +1,12 @@
diff -r -U3 sbcl-2.0.1.orig/contrib/sb-concurrency/tests/test-frlock.lisp sbcl-2.0.1/contrib/sb-concurrency/tests/test-frlock.lisp
--- sbcl-2.0.1.orig/contrib/sb-concurrency/tests/test-frlock.lisp 2020-01-27 04:26:30.000000000 +0700
+++ sbcl-2.0.1/contrib/sb-concurrency/tests/test-frlock.lisp 2020-01-30 21:53:57.750913923 +0700
@@ -88,7 +88,7 @@
#+sb-thread
(deftest* (frlock.1)
(handler-case
- (sb-ext:with-timeout 40
+ (sb-ext:with-timeout 240
(test-frlocks #+win32 :outer-write-pause #+win32 t ))
(sb-ext:timeout (c)
(error "~A" c)))

@ -0,0 +1,246 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib eutils flag-o-matic pax-utils
#same order as http://www.sbcl.org/platform-table.html
BV_X86=1.4.3
BV_AMD64=2.0.1
BV_PPC=1.2.7
BV_SPARC=1.0.28
BV_ALPHA=1.0.28
BV_ARM=1.4.11
BV_ARM64=1.4.2
BV_X86_MACOS=1.1.6
BV_X64_MACOS=1.2.11
BV_PPC_MACOS=1.0.47
BV_X86_SOLARIS=1.2.7
BV_X64_SOLARIS=1.2.7
BV_SPARC_SOLARIS=1.0.23
DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
HOMEPAGE="http://sbcl.sourceforge.net/"
SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
arm64? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM64}-arm64-linux-binary.tar.bz2 )
x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )
sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
IUSE="debug doc source +threads +unicode pax_kernel zlib"
CDEPEND=">=dev-lisp/asdf-3.1:="
DEPEND="${CDEPEND}
doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
pax_kernel? ( sys-apps/elfix )"
RDEPEND="${CDEPEND}
!prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
# Disable warnings about executable stacks, as this won't be fixed soon by upstream
QA_EXECSTACK="usr/bin/sbcl"
CONFIG="${S}/customize-target-features.lisp"
ENVD="${T}/50sbcl"
# Prevent ASDF from using the system libraries
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
usep() {
use ${1} && echo "true" || echo "false"
}
sbcl_feature() {
echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
}
sbcl_apply_features() {
sed 's/^X//' > "${CONFIG}" <<-'EOF'
(lambda (list)
X (flet ((enable (x) (pushnew x list))
X (disable (x) (setf list (remove x list))))
EOF
if use x86 || use amd64; then
sbcl_feature "$(usep threads)" ":sb-thread"
fi
sbcl_feature "true" ":sb-ldb"
sbcl_feature "false" ":sb-test"
sbcl_feature "$(usep unicode)" ":sb-unicode"
sbcl_feature "$(usep zlib)" ":sb-core-compression"
sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
sed 's/^X//' >> "${CONFIG}" <<-'EOF'
X )
X list)
EOF
cat "${CONFIG}"
}
src_unpack() {
unpack ${A}
mv sbcl-*-* sbcl-binary || die
cd "${S}"
}
src_prepare() {
# bug #468482
eapply "${FILESDIR}"/concurrency-test-2.0.1.patch
# bugs #486552, #527666, #517004
eapply "${FILESDIR}"/${PN}-1.4.0-bsd-sockets-test.patch
# bugs #560276, #561018
eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch
eapply "${FILESDIR}"/${PN}-1.4.0-verbose-build.patch
eapply_user
# Make sure the *FLAGS variables are sane.
# sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
strip-unsupported-flags
filter-flags -fomit-frame-pointer -Wl,-s
filter-ldflags -s
# original bugs #526194, #620532
# this broke no-pie default builds, c.f. bug #632670
# Pass CFLAGS down by appending our value, to let users override
# the default values.
# Keep passing LDFLAGS down via the LINKFLAGS variable.
sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
-e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
-i src/runtime/GNUmakefile || die
sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
-i make-config.sh || die
# Use installed ASDF version
cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
# Avoid installation of ASDF info page. See bug #605752
sed '/INFOFILES/s/asdf.info//' -i doc/manual/Makefile || die
use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
# Some shells(such as dash) don't have "time" as builtin
# and we don't want to DEPEND on sys-process/time
sed "s,^time ,," -i make.sh || die
sed "s,/lib,/$(get_libdir),g" -i install.sh || die
# #define SBCL_HOME ...
sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
# change location of /etc/sbclrc ...
sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
find . -type f -name .cvsignore -delete
}
src_configure() {
# customizing SBCL version as per
# http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
# applying customizations
sbcl_apply_features
}
src_compile() {
local bindir="${WORKDIR}"/sbcl-binary
if use pax_kernel ; then
# To disable PaX on hardened systems
pax-mark -mr "${bindir}"/src/runtime/sbcl
# Hack to disable PaX on second GENESIS stage
sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
"${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
fi
# clear the environment to get rid of non-ASCII strings, see bug #174702
# set HOME for paludis
env - HOME="${T}" PATH="${PATH}" \
CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
GNUMAKE=make ./make.sh \
"sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
|| die "make failed"
# need to set HOME because libpango(used by graphviz) complains about it
if use doc; then
env - HOME="${T}" PATH="${PATH}" \
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
make -C doc/manual info html || die "Cannot build manual"
env - HOME="${T}" PATH="${PATH}" \
CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
make -C doc/internals info html || die "Cannot build internal docs"
fi
}
src_test() {
ewarn "Unfortunately, it is known that some tests fail eg."
ewarn "run-program.impure.lisp. This is an issue of the upstream's"
ewarn "development and not of Gentoo's side. Please, before filing"
ewarn "any bug(s) search for older submissions. Thank you."
time ( cd tests && sh run-tests.sh )
}
src_install() {
# install system-wide initfile
dodir /etc/
sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
;;; The following is required if you want source location functions to
;;; work in SLIME, for example.
X
(setf (logical-pathname-translations "SYS")
X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
X
;;; Setup ASDF2
(load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
EOF
# Install documentation
unset SBCL_HOME
INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
sh install.sh || die "install.sh failed"
# bug #517008
pax-mark -mr "${D}"/usr/bin/sbcl
# rm empty directories lest paludis complain about this
find "${ED}" -empty -type d -exec rmdir -v {} +
if use doc; then
dodoc -r doc/internals/sbcl-internals
doinfo doc/manual/*.info*
doinfo doc/internals/sbcl-internals.info
docinto internals-notes
dodoc doc/internals-notes/*
else
rm -Rv "${ED}/usr/share/doc/${PF}" || die
fi
# install the SBCL source
if use source; then
./clean.sh
cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
fi
# necessary for running newly-saved images
echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
doenvd "${ENVD}"
}

Binary file not shown.

@ -1,5 +1,6 @@
DIST lua-openssl-0.7.3.tar.gz 383743 BLAKE2B 2709eed607e6d752488cacd5b96ee4a845f1ec13948fc7e40e45af968f240579b5d96ab69380f87d7edfc8a55aa44b099e9a592891f78a7928d172f5abcbc9fb SHA512 00eea8d4d04e167456a7602ae111cb768db61f7bdf9e0056c424bdcd67618811cd304543f95ecb273c66c6b41779e2fe721cb43bc332765ce77effb6245edbe2
DIST lua-openssl-0.7.7_p0.tar.gz 395094 BLAKE2B a4f8efdce1ad76879f85cd1b467c4cfaa6d4444da60e337a850bf8a521b02e93e3252f0a77c39bfa6bbb01ff1f9af76b63db9e257499278e2f6789c1d0c4965c SHA512 5c659bced2801b9a42a20894261bb10f516ae2cf66206a68249e1c24b73af9df32280640f1379db1a24648852b2a4be1a4b52baee1e18862b538bfff8232fa6d
DIST lua-openssl-0.7.7_p1.tar.gz 396946 BLAKE2B 58d3bbf0b90a4437d989c5b786e2a44dac86dc40009688753daa81b1e17a14f6a8506e6330ec4a2c360645826c85f83c5ff38642315806b8c5b902206f13510b SHA512 1e470ca0b899fb647215f9c5ed11f8f0e52e662d6ef01c27fe86b9fd1eb833c878d6022455e1867ef844f252d07597eaf6326c686e2eb290c1a98772614ec145
DIST lua-openssl-aux-b56f6937096acea34ddf241ec7ea08ac52414d18.tar.gz 3684 BLAKE2B 78e92c6cc1c2a29b00a9179db71a9404aff40a0e844f2f092b7868bbf98b6f3fa9519c63a2c38304ce2928b007bd4c015c5afa66ca32b1646035ebb949b3c655 SHA512 ba1eaf7c6b58fde48f47146d6c773368484ea10a229d6a45f317bda8d8cc21829ceda68071685f1b071e150936362b934b90532344ebb266febcc0efa45904f4
DIST lua-openssl-compat-a1735f6e6bd17588fcaf98720f0548c4caa23b34.tar.gz 51950 BLAKE2B 16dbf5eb444393f093a5f2cc0fa2a8b394a8b2d62ca36882d02202304a2906b4e2bb87814c1ca198e4b77a9bc27d85627da75244ce9c68c3fd1e06e9262fa970 SHA512 2a8e1d3bb6475225f311995f70417c0620c5efa7384400b2002166daa6fc1baedb32f492dc65cc5b92bf63e850c293a36c1f8aed6e7cf0985e582aa0e52141a8
DIST lua-openssl-compat-daebe77a2f498817713df37f0bb316db1d82222f.tar.gz 51418 BLAKE2B 1d04684e6b6d850bdf6bd3165a90c6a08bd93b757d91e387da152bcb3fc4756db5c16f3cc12ecf33bcdd647742c7923cc2e72627beb5527c5e9dfbfd63c147ba SHA512 60ec9ecfc4e4ad47b6a8189ffb1e7c83fe8b9e9df13cb91bf33725905ab72bff3d3009e8ad04fb73fd7255facdbb8279f20bfd160aee89b12c25431786eaca14

@ -0,0 +1,74 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
MY_PV="${PV//_p/-}"
DESCRIPTION="OpenSSL binding for Lua"
HOMEPAGE="https://github.com/zhaozg/lua-openssl"
LUA_AUX_COMMIT="b56f6937096acea34ddf241ec7ea08ac52414d18"
LUA_COMPAT_COMMIT="a1735f6e6bd17588fcaf98720f0548c4caa23b34"
SRC_URI="https://github.com/zhaozg/lua-openssl/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
https://github.com/zhaozg/lua-auxiliar/archive/${LUA_AUX_COMMIT}.tar.gz -> ${PN}-aux-${LUA_AUX_COMMIT}.tar.gz
https://github.com/keplerproject/lua-compat-5.3/archive/${LUA_COMPAT_COMMIT}.tar.gz -> ${PN}-compat-${LUA_COMPAT_COMMIT}.tar.gz"
LICENSE="MIT openssl PHP-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="libressl luajit"
RDEPEND="
luajit? ( dev-lang/luajit:2 )
!luajit? ( >=dev-lang/lua-5.1:0 )
libressl? ( dev-libs/libressl:0= )
!libressl? ( dev-libs/openssl:0=[-bindist] )
!dev-lua/luaossl
!dev-lua/luacrypto
"
DEPEND="${RDEPEND}
virtual/pkgconfig"
S="${WORKDIR}/${PN}-${MY_PV}"
src_prepare() {
rmdir deps/auxiliar deps/lua-compat || die
mv "${WORKDIR}/lua-auxiliar-${LUA_AUX_COMMIT}" deps/auxiliar || die
mv "${WORKDIR}/lua-compat-5.3-${LUA_COMPAT_COMMIT}" deps/lua-compat || die
# fixes: deps/auxiliar/auxiliar.c:11:10: fatal error: c-api/compat-5.3.h: No such file or directory
ln -sv lua-compat/c-api deps/c-api
default
}
src_configure() {
tc-export PKG_CONFIG
LUA_VERSION="$(${PKG_CONFIG} --variable=$(usex luajit abiver V) $(usex luajit luajit lua))"
LUA_CFLAGS="$(${PKG_CONFIG} $(usex luajit luajit lua) --cflags) ${CFLAGS}"
LUA_LIBS="$(${PKG_CONFIG} $(usex luajit luajit lua) --libs) ${LDFLAGS}"
INSTALL_CMOD="$(${PKG_CONFIG} $(usex luajit luajit lua) --variable=INSTALL_CMOD)"
INSTALL_LMOD="$(${PKG_CONFIG} $(usex luajit luajit lua) --variable=INSTALL_LMOD)"
export LUA_VERSION LUA_CFLAGS LUA_LIBS
}
src_compile() {
emake CC="$(tc-getCC)"
}
src_test() {
emake CC="$(tc-getCC)" test
}
src_install() {
emake PREFIX="${ED}/usr" LUA_LIBDIR="${ED}/${INSTALL_CMOD}" install
# install lua code as well
insinto "${INSTALL_LMOD}"
doins -r lib/*
einstalldocs
}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save