summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-02 00:21:11 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-02 00:21:11 +0200
commitfdd6b67a78a966f6a2131de8fe0e539316511083 (patch)
tree7dd65d3814c4733b311985dbeb00b879ddd0df05
parent6109bebd80c2873d9a5763436902b17a0d68d21c (diff)
downloaddarklin4-fdd6b67a78a966f6a2131de8fe0e539316511083.tar.gz
darklin4-fdd6b67a78a966f6a2131de8fe0e539316511083.tar.bz2
darklin4-fdd6b67a78a966f6a2131de8fe0e539316511083.tar.xz
darklin4-fdd6b67a78a966f6a2131de8fe0e539316511083.zip
Taglib and NVIDA
-rw-r--r--dev-util/nvidia-cuda-sdk/Manifest2
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild137
-rw-r--r--dev-util/nvidia-cuda-toolkit/Manifest3
-rwxr-xr-xdev-util/nvidia-cuda-toolkit/files/cuda-config28
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild15
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild10
-rw-r--r--media-libs/taglib/Manifest5
-rw-r--r--media-libs/taglib/files/taglib-1.11-ds-rusxmms.patch684
-rw-r--r--media-libs/taglib/files/taglib-1.11-install-examples.patch13
-rw-r--r--media-libs/taglib/files/taglib-1.11.1_p20181028-version-1.11.2.patch11
-rw-r--r--media-libs/taglib/taglib-1.11.1_p20181028-r1.ebuild66
-rw-r--r--sys-devel/kgcc64/Manifest5
-rw-r--r--sys-devel/kgcc64/files/gcc-configure-LANG.patch64
-rw-r--r--sys-devel/kgcc64/files/gcc-configure-texinfo.patch16
-rw-r--r--sys-devel/kgcc64/kgcc64-4.9.3.ebuild54
-rw-r--r--x11-drivers/nvidia-drivers/Manifest20
-rw-r--r--x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist1
-rw-r--r--x11-drivers/nvidia-drivers/files/95-nvidia-settings2
-rw-r--r--x11-drivers/nvidia-drivers/files/95-nvidia-settings-r12
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-169.0714
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf8
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-persistenced.init24
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf3
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch22
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-settings.desktop7
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-smi.init24
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-udev.sh17
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r120
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule1
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia.udev-rule6
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-399-r1.ebuild12
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-430.40-r1.ebuild15
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-435.21.ebuild587
-rw-r--r--x11-libs/vte/Manifest13
-rw-r--r--x11-libs/vte/files/0.54.4-vala-0.44-compat.patch29
-rw-r--r--x11-libs/vte/files/vte-0.56.2-ds-mc.diff82
-rw-r--r--x11-libs/vte/vte-0.56.2.ebuild94
37 files changed, 2027 insertions, 89 deletions
diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest
new file mode 100644
index 0000000..85b76d4
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST cuda_10.1.168_418.67_linux.run 2526901749 BLAKE2B ed2207400730600c63895cc894e02a14dce59c6293f198ea2a94f6dd0fab25a005d4754f91376c267cb95f3fdc66ee08e4353ec17b69d28881c59190b9eb4746 SHA512 85635012ec7081e200fb46f973852939f9709e802f495c288d5f31ff1fbd283a578fdaca0afa8955e6e0c7ca6c4862428da5168e0938b48390952d8633350910
+EBUILD nvidia-cuda-sdk-10.1.168.ebuild 3636 BLAKE2B a47fed140a65075281d0c21203cd26ed255a33756455352d5c361a1fe142e41aaea81ae8b3f9ca390b856e74fb493c10a9a299cbf4bf19a4ce7b63a50b9839c1 SHA512 28fc13b9986fd54922c58f3dc408e6f6e8de67fc9b1d74c71be8526d8c35d2a5ac3a7562a74848c0a74d071a38efb36c91544bad297b29a32f4b1d90838e2c95
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild
new file mode 100644
index 0000000..64d25cd
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-10.1.168.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cuda flag-o-matic portability toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1-2)
+DRIVER_PV="418.67"
+
+DESCRIPTION="NVIDIA CUDA Software Development Kit"
+HOMEPAGE="https://developer.nvidia.com/cuda-zone"
+SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod/local_installers/cuda_${PV}_${DRIVER_PV}_linux -> cuda_${PV}_${DRIVER_PV}_linux.run"
+
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux"
+IUSE="+cuda debug +doc +examples opencl mpi"
+
+RDEPEND="
+ ~dev-util/nvidia-cuda-toolkit-${PV}
+ media-libs/freeglut
+ examples? (
+ media-libs/freeimage
+ media-libs/glew:0=
+ >=x11-drivers/nvidia-drivers-396.24[uvm]
+ mpi? ( virtual/mpi )
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+S=${WORKDIR}/builds/cuda-samples
+
+QA_EXECSTACK=(
+ opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint
+ opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort
+ opt/cuda/sdk/bin/x86_64/linux/release/cdpSimplePrint
+ opt/cuda/sdk/bin/x86_64/linux/release/cdpSimpleQuicksort
+ )
+
+pkg_setup() {
+ if use cuda || use opencl; then
+ cuda_pkg_setup
+ fi
+}
+
+src_prepare() {
+ export RAWLDFLAGS="$(raw-ldflags)"
+# epatch "${FILESDIR}"/${P}-asneeded.patch
+
+ local file
+ while IFS="" read -d $'\0' -r file; do
+ sed \
+ -e 's:-O[23]::g' \
+ -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \
+ -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \
+ -e "/CC/s:gcc:$(tc-getCC):g" \
+ -e "/GCC/s:g++:$(tc-getCXX):g" \
+ -e "/NVCC /s|\(:=\).*|:= ${EPREFIX}/opt/cuda/bin/nvcc|g" \
+ -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \
+ -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \
+ -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \
+ -e 's:-Wimplicit::g' \
+ -e "s|../../common/lib/linux/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \
+ -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \
+ -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \
+ -i "${file}" || die
+ # -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \
+ done < <(find . -type f -name 'Makefile' -print0)
+
+ rm -rf common/inc/GL || die
+ find . -type f -name '*.a' -delete || die
+
+ eapply_user
+}
+
+src_compile() {
+ use examples || return
+ local myopts=("verbose=1")
+ use debug && myopts+=("dbg=1")
+ export FAKEROOTKEY=1 # Workaround sandbox issue in #462602
+ emake \
+ cuda-install="${EPREFIX}/opt/cuda" \
+ CUDA_PATH="${EPREFIX}/opt/cuda/" \
+ MPI_GCC=10 \
+ "${myopts[@]}"
+}
+
+src_test() {
+ addwrite /dev/nvidiactl
+ addwrite /dev/nvidia0
+
+ local i
+ for i in {0..9}*/*; do
+ emake -C "${i}" run
+ done
+}
+
+src_install() {
+ local f t crap=( *.txt Samples.htm* )
+
+ if use doc; then
+ ebegin "Installing docs ..."
+ while IFS="" read -d $'\0' -r f; do
+ treecopy "${f}" "${ED%/}"/usr/share/doc/${PF}/
+ done < <(find -type f \( -name 'readme.txt' -o -name '*.pdf' \) -print0)
+
+ while IFS="" read -d $'\0' -r f; do
+ docompress -x "${f#${ED%/}}"
+ done < <(find "${ED%/}"/usr/share/doc/${PF}/ -type f -name 'readme.txt' -print0)
+ eend
+ fi
+
+ ebegin "Cleaning before installation..."
+ for f in "${crap[@]}"; do
+ rm -f "${f}" || die
+ done
+ find -type f \( -name '*.o' -o -name '*.pdf' -o -name 'readme.txt' \) -delete || die
+ eend
+
+ ebegin "Moving files..."
+ while IFS="" read -d $'\0' -r f; do
+ t="$(dirname ${f})"
+ if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then
+ continue
+ fi
+ if [[ -x ${f} ]]; then
+ exeinto /opt/cuda/sdk/"${t}"
+ doexe "${f}"
+ else
+ insinto /opt/cuda/sdk/"${t}"
+ doins "${f}"
+ fi
+ done < <(find . -type f -print0)
+ eend
+}
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
deleted file mode 100644
index 70e97f3..0000000
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-AUX cuda-config 512 BLAKE2B fdd0c6f32c9fb49dd2d0864a36a882bed2d20e7e4890b239eb77620d8c8eb7ce280e2b1552e56a91d8e2925453ad3dd34a0159f4b0851b8f073d9ad0fbda5dc1 SHA512 a67f3e34a14ca1c13be8f3f8d345b6c7d881edeae52d737e9aafb9f9807f4dee08e016b8823cb60864961b59f2dd330eb8a1b372178c2451e253acc586ae889a
-EBUILD nvidia-cuda-toolkit-9-r1.ebuild 281 BLAKE2B a642548b9a1886210a68d7ef8bd77947e459b9137daccb08d5828031fc0b4bac917c3594c14f7d408c2d921363cb7786590ad7f8277bc103ec9185835d43ebed SHA512 bbe12344e117f4ea79120aafa11a85cf217e08f987e1228e18af0f9f6e0f68194c73a146e08ca193af4f3de08999b7c54ed754daf6ad32b80fddcc5ff7631d30
-EBUILD nvidia-cuda-toolkit-9.ebuild 225 BLAKE2B bdf5a84d21d4838c918139c249029f964da6a0cdcb1a475af631350d268999c8072ca15dcce63005f2a8b83e08d7eca646892cc207bca70f7b946cd9ae337992 SHA512 822c0fd651a525a38681f879094384cc46eed7fb08bedabcd1790358fc179bb84e71226b9a14a43800c45911baedb32d7bca1afefe20d111912508e565f0ae89
diff --git a/dev-util/nvidia-cuda-toolkit/files/cuda-config b/dev-util/nvidia-cuda-toolkit/files/cuda-config
deleted file mode 100755
index 14064d3..0000000
--- a/dev-util/nvidia-cuda-toolkit/files/cuda-config
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-SUPPORT_GCC_VERSIONS_BY_CUDA="4.4 4.5 4.6 4.7 4.8 4.9 5.4 6.4 7.3"
-
-_print_help() {
- cat <<- EOF
- Usage:
- $(basename $0) [options]
-
- -s | --supported Returns by current CUDA supported gcc versions
- -h | --help Shows this help
-EOF
-}
-
-case ${1} in
- -s|--supported)
- echo "${SUPPORT_GCC_VERSIONS_BY_CUDA}"
- exit 0
- ;;
- -h|--help)
- _print_help
- exit -1
- ;;
- *)
- _print_help
- exit 1
- ;;
-esac
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild
deleted file mode 100644
index 48578a3..0000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9-r1.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-inherit eutils
-
-DESCRIPTION="NVIDIA CUDA Toolkit Override"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"
-
-
-src_install() {
- dobin "${FILESDIR}/cuda-config"
-}
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild
deleted file mode 100644
index 22b66d8..0000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.ebuild
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-inherit eutils
-
-DESCRIPTION="NVIDIA CUDA Toolkit Override"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"
diff --git a/media-libs/taglib/Manifest b/media-libs/taglib/Manifest
index 011a10b..65efcc1 100644
--- a/media-libs/taglib/Manifest
+++ b/media-libs/taglib/Manifest
@@ -1,4 +1,7 @@
AUX taglib-1.10-ds-rusxmms.patch 41838 BLAKE2B 9cdfdf376f08a916bfafd603fe1fb3fb89dd618cc08360cd4d35183e346acab23b24acd393e3249c9c08353e7afe988e4ec0d16bb452ba3ec45a91deb8b43dc6 SHA512 24be668fc9754bba3b39c22b842557176ddc1c964fd6493405838911dc8db6317f610a4ee4fc95a3404904f4512b41a0fee826f64ed9c1eda85192dea6880b64
+AUX taglib-1.11-ds-rusxmms.patch 23162 BLAKE2B 3034dcf046141bb59d35aaed3309a2a031389910a8d510ce0c66b2f65ee88bab389296f0147272e991ec8a8496e0b434249f88da4b583c19e48b332faff2a8ba SHA512 92b469efc5c9310e9debf0951e8d689ce848f28757aa572163b167392259025e12c800167be35f45f40332acc8ae4107d5f02528faf0bb311d31031713abaec0
+AUX taglib-1.11-install-examples.patch 371 BLAKE2B ee42b80e8c6093dbfc4c89c25bcb6bd25e2f5152c14743fa49c6c44a14f93a961f08a4d53337efe0800d98126a8aa58627a330e19386283cc16d8f20c9637262 SHA512 149ce1256ec557ee1e896b56e361f2fcf69633424f9b125666827eda610e84c35bf28e5c3fe5f38d4d87f1eacf977fc5b8b8c2d9c6634997bfe4e4bac122fc37
+AUX taglib-1.11.1_p20181028-version-1.11.2.patch 486 BLAKE2B a0b9021a01268eaeb32cb7a6b333b54df522aaf9d07d9b89870f0dbc38a9648ab9173a916bd8a29537b454631be5cd32c2dfb256ebf2f2b86000fec8d2f32bb6 SHA512 e5c3d814ae7c4b2cb84eded86e909d2db985ec21409767a9bdd502d562b55edf30c74834e2829199f1fd20ca8b1dab832a78b05246ae82fe6ff94cb1266d98d0
AUX taglib-1.6.1-install-examples.patch 581 BLAKE2B 65bc122295b1c28a59a56db7bb9894ee0b6ad6a74083bd5417cd098d5b87f47b4437684a556db311859f6439996451046328e2ada3c43ab3259d62b970e778ff SHA512 8af5b52b33c82f0d4961ad3ef0cd72844f84f442db2638ba0187ba808257e7d0602bc5f9c643252c7217d3119b1dd5a6fbf5f84a364f72c1d9154812b14e383b
AUX taglib-1.9.1-abi-breakage.patch 3888 BLAKE2B 928c61111a3f45dfc6383bf53c3411cfb9ca6851401cd410231b97d4e7a60eb05616a8995e89d8b6e87cb48bf23a7a3cde2e8334ff4af7e529d44f2effecc0f6 SHA512 ec17447f97d83482fbf7fbafd99014344c638436fbadab2144a19679869603106e0f21cdfb738cf77743eb3230d244a81ed93d1bbf62efa1a8a3484d9e43e90b
AUX taglib-1.9.1-bytevector-simpler.patch 3685 BLAKE2B 38018145649747dbf8ffa44dd6eadc86a162d0bedba5d7ab1603cab9cab938efec2015b53841ecdb83b67dc8bf620c19d0052bf82bd19cd3ff130f2ce593b53f SHA512 1d19d40766e8cb74cb60d5b13fb509c56ee1b0d10f622bfea954bbaf2c5a4908c81e026dc07e83764034647818eb875c71a505a6e1425c9d03820d8e0a3a4a11
@@ -6,5 +9,7 @@ AUX taglib-1.9.1-ds-rusxmms-enforce.patch 844 BLAKE2B 3e6fb11c828f6e6860ababcf52
AUX taglib-1.9.1-ds-rusxmms.patch 21026 BLAKE2B 8d92aa3990dcae0c170d60746927e3c581ca2807e512d321f30bc6218667a652a64ef5395d657c6bc635ecc9b26a52865e9fbf09a69455c4f5826f8f48875f29 SHA512 7578e03a6d14c5f09cfd492ddd342f6ea36fd8819e59298f374aefb1be81ec7d2d07b3b8579be8580a3e49060e798f7b34d00324224ad73f8f22baf01a1d480b
AUX taglib-1.9.1-missing-deletes.patch 1194 BLAKE2B 4559e86ea704f16d58e0e5e671c6f35f2062febfa7287a7abfef1eace5fc49f42db2a79d4895b4f7f05a5ec202dfee39876d18ca326d59aef3d47276bfdddf23 SHA512 1cc2796401dc1291b19245bd9a6bde9d77549d7ddab96b99b8e0f95c331a1ba7296f7107bd99f6f789cd04dd412d6e330db099ab49344c4dd1a10ccfef203fd1
AUX taglib-1.9.1-order-big-endian.patch 884 BLAKE2B 9382802fe5bb4d2cf20a5a075ffeb5200b2cec5acfe33eb68031a80b7a1718c7578fe9f091f29be61a13bc7a3ec3ee87f1a54033ab271c56f3cf98de74e71263 SHA512 4f2c751f03e976da64fc1480e369443d724c420198600ae1a5e9e9cab3172289c73d15b66ec0c95165da30e52dff1d956314fd71fb067e10a11c350566671bd3
+DIST taglib-1.11.1_p20181028.tar.gz 1299993 BLAKE2B d281873a87742ba417ea764bb01f9a4c5553a4624d2c257dd82bbb2f0b7e3103ab6ca253f78c0167908f449aac833873ca1cce6f24b1eb5f608131382833262a SHA512 e26439b65ab579455f79e87a94c33a98e17209b31a19b531e5964a2c0ded395c35067655e31ad22b6205149e2e920d7bd145993f064d3ad13e1de8a9f7e37256
DIST taglib-1.9.1.tar.gz 654074 BLAKE2B ce8384a9cc8ddfe93c0b24c695963ed43f70366931eb1f1748d5cb92eac08833154fbd5a05307154581854b4a59a414846a0e411722d56330d1bc51695d2be31 SHA512 17523b7ebdd089520289ae817b07f291be93fd0b9d3b2891eb4860a24e45943e94d25b99250c1ac477de5e51b08c39887ca13fdcc2dce17867eb60d1edb26154
+EBUILD taglib-1.11.1_p20181028-r1.ebuild 1581 BLAKE2B e52944a0cd801ba68626f1c6ca167ecb87b6d1eb79f7e3aa28514dbd2e6f32f47dc4ea1ba2e94bef0680b8b777f58e03455c98d712902431b3716cea15ab1742 SHA512 0995fbfaf6d5ecdd7c33c524ba6ac40d9bc5914b0aae4df1d5fd5cd36a26db61dbdac1e3c5046526f2c49f2323ecd8a03fb619e11b55d1c7369c293196714e9b
EBUILD taglib-1.9.1-r4.ebuild 2264 BLAKE2B 35ded2500e55ca37a3f84ca558222ac29ad6238fd58275e227f64e1a155aee393a3be5e74c8300a8e7182dbbb0ff36ad4d4536254375cdd4a22959acdf4c4964 SHA512 c1e08587ccec0cbe95624d12906f8cbb6f6eb1fdb9d248b8b3e951f58015ba30565d9b710395f434312cab09c44d532144e2abadc8cf3d03dbab2208d9066ae3
diff --git a/media-libs/taglib/files/taglib-1.11-ds-rusxmms.patch b/media-libs/taglib/files/taglib-1.11-ds-rusxmms.patch
new file mode 100644
index 0000000..9f777c8
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.11-ds-rusxmms.patch
@@ -0,0 +1,684 @@
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/config.h.cmake taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/config.h.cmake
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/config.h.cmake 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/config.h.cmake 2019-09-01 08:32:29.569443643 +0200
+@@ -30,6 +30,9 @@
+ /* Indicates whether debug messages are shown even in release mode */
+ #cmakedefine TRACE_IN_RELEASE 1
+
++/* Defined if you have LibRCC from RusXMMS project */
++#cmakedefine HAVE_LIBRCC 1
++
+ #cmakedefine TESTS_DIR "@TESTS_DIR@"
+
+ #endif
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/ConfigureChecks.cmake taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/ConfigureChecks.cmake
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/ConfigureChecks.cmake 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/ConfigureChecks.cmake 2019-09-01 08:32:29.577443787 +0200
+@@ -213,3 +213,5 @@
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(PLATFORM WINRT 1)
+ endif()
++
++SET(HAVE_LIBRCC 1)
+\ No newline at end of file
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/examples/tagreader_c.c taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/examples/tagreader_c.c
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/examples/tagreader_c.c 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/examples/tagreader_c.c 2019-09-01 08:32:29.577443787 +0200
+@@ -38,7 +38,7 @@
+ TagLib_Tag *tag;
+ const TagLib_AudioProperties *properties;
+
+- taglib_set_strings_unicode(FALSE);
++ //taglib_set_strings_unicode(FALSE);
+
+ for(i = 1; i < argc; i++) {
+ printf("******************** \"%s\" ********************\n", argv[i]);
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/examples/tagwriter.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/examples/tagwriter.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/examples/tagwriter.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/examples/tagwriter.cpp 2019-09-01 08:32:29.577443787 +0200
+@@ -115,7 +115,7 @@
+ if(isArgument(argv[i]) && i + 1 < argc && !isArgument(argv[i + 1])) {
+
+ char field = argv[i][1];
+- TagLib::String value = argv[i + 1];
++ TagLib::String value(argv[i + 1], TagLib::String::Locale);
+
+ TagLib::List<TagLib::FileRef>::ConstIterator it;
+ for(it = fileList.begin(); it != fileList.end(); ++it) {
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/CMakeLists.txt taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/CMakeLists.txt
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/CMakeLists.txt 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/CMakeLists.txt 2019-09-01 08:32:29.577443787 +0200
+@@ -41,6 +41,7 @@
+ audioproperties.h
+ taglib_export.h
+ ${CMAKE_CURRENT_BINARY_DIR}/../taglib_config.h
++ toolkit/rccpatch.h
+ toolkit/taglib.h
+ toolkit/tstring.h
+ toolkit/tlist.h
+@@ -312,6 +313,7 @@
+ )
+
+ set(toolkit_SRCS
++ toolkit/rccpatch.cpp
+ toolkit/tstring.cpp
+ toolkit/tstringlist.cpp
+ toolkit/tbytevector.cpp
+@@ -354,7 +356,9 @@
+ add_library(tag ${tag_LIB_SRCS} ${tag_HDRS})
+
+ if(HAVE_ZLIB AND NOT HAVE_ZLIB_SOURCE)
+- target_link_libraries(tag ${ZLIB_LIBRARIES})
++ target_link_libraries(tag rcc ${ZLIB_LIBRARIES})
++else ()
++ target_link_libraries(tag rcc)
+ endif()
+
+ set_target_properties(tag PROPERTIES
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v1/id3v1tag.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v1/id3v1tag.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v1/id3v1tag.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v1/id3v1tag.cpp 2019-09-01 08:32:29.577443787 +0200
+@@ -69,15 +69,18 @@
+
+ String ID3v1::StringHandler::parse(const ByteVector &data) const
+ {
+- return String(data, String::Latin1).stripWhiteSpace();
++ return String(data, String::Latin1ID3).stripWhiteSpace();
+ }
+
+ ByteVector ID3v1::StringHandler::render(const String &s) const
+ {
+- if(s.isLatin1())
+- return s.data(String::Latin1);
+- else
++ if(!s.isLatin1())
++ {
++ if (String::ID3WType(String::Latin1) == String::Latin1)
+ return ByteVector();
++ }
++
++ return s.data(String::Latin1ID3);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+@@ -262,7 +265,7 @@
+ d->track = static_cast<unsigned char>(data[offset + 29]);
+ }
+ else
+- d->comment = data.mid(offset, 30);
++ d->comment = stringHandler->parse(data.mid(offset, 30));
+
+ offset += 30;
+
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/frames/commentsframe.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/frames/commentsframe.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/frames/commentsframe.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/frames/commentsframe.cpp 2019-09-01 08:32:29.578443805 +0200
+@@ -150,10 +150,10 @@
+ return;
+ }
+
+- d->textEncoding = String::Type(data[0]);
++ d->textEncoding = String::ID3Type(data[0]);
+ d->language = data.mid(1, 3);
+
+- int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8 ? 1 : 2;
++ int byteAlign = (d->textEncoding == String::Latin1 || d->textEncoding == String::Latin1ID3 || d->textEncoding == String::Latin1ID3V2 || d->textEncoding == String::UTF8) ? 1 : 2;
+
+ ByteVectorList l = ByteVectorList::split(data.mid(4), textDelimiter(d->textEncoding), byteAlign, 2);
+
+@@ -173,11 +173,13 @@
+ ByteVector v;
+
+ String::Type encoding = d->textEncoding;
++
++ encoding = String::ID3WType(encoding);
+
+ encoding = checkTextEncoding(d->description, encoding);
+ encoding = checkTextEncoding(d->text, encoding);
+
+- v.append(char(encoding));
++ v.append(char(String::ID3RealType(encoding)));
+ v.append(d->language.size() == 3 ? d->language : "XXX");
+ v.append(d->description.data(encoding));
+ v.append(textDelimiter(encoding));
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/frames/textidentificationframe.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/frames/textidentificationframe.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/frames/textidentificationframe.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/frames/textidentificationframe.cpp 2019-09-01 08:32:29.578443805 +0200
+@@ -191,12 +191,12 @@
+
+ // read the string data type (the first byte of the field data)
+
+- d->textEncoding = String::Type(data[0]);
++ d->textEncoding = String::ID3Type(data[0]);
+
+ // split the byte array into chunks based on the string type (two byte delimiter
+ // for unicode encodings)
+
+- int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8 ? 1 : 2;
++ int byteAlign = (d->textEncoding == String::Latin1 || d->textEncoding == String::Latin1ID3 || d->textEncoding == String::Latin1ID3V2 || d->textEncoding == String::UTF8) ? 1 : 2;
+
+ // build a small counter to strip nulls off the end of the field
+
+@@ -227,11 +227,14 @@
+
+ ByteVector TextIdentificationFrame::renderFields() const
+ {
+- String::Type encoding = checkTextEncoding(d->fieldList, d->textEncoding);
++ String::Type encoding = d->textEncoding;
++
++ encoding = String::ID3WType(encoding);
++ encoding = checkTextEncoding(d->fieldList, encoding);
+
+ ByteVector v;
+
+- v.append(char(encoding));
++ v.append(char(String::ID3RealType(encoding)));
+
+ for(StringList::ConstIterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) {
+
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/id3v2frame.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/id3v2frame.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/mpeg/id3v2/id3v2frame.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/mpeg/id3v2/id3v2frame.cpp 2019-09-01 08:32:29.578443805 +0200
+@@ -297,7 +297,7 @@
+ if((encoding == String::UTF8 || encoding == String::UTF16BE) && version != 4)
+ return String::UTF16;
+
+- if(encoding != String::Latin1)
++ if((encoding != String::Latin1)&&(encoding != String::Latin1ID3V2))
+ return encoding;
+
+ for(StringList::ConstIterator it = fields.begin(); it != fields.end(); ++it) {
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/rccpatch.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/rccpatch.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/rccpatch.cpp 1970-01-01 01:00:00.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/rccpatch.cpp 2019-09-01 08:32:29.578443805 +0200
+@@ -0,0 +1,237 @@
++#include <stdlib.h>
++
++#include <string>
++#include "tstring.h"
++#include "tbytevector.h"
++
++//#define RCC_DEBUG
++
++
++#ifndef HAVE_LIBRCC
++# include <config.h>
++#endif
++
++#ifdef HAVE_LIBRCC
++# ifdef RCC_DEBUG
++# include <stdio.h>
++# endif /* RCC_DEBUG */
++# include <librcc.h>
++# include <string.h>
++#endif /* HAVE_LIBRCC */
++
++
++#ifdef HAVE_LIBRCC
++# define ID3_CLASS 0
++# define ID3V2_CLASS 1
++# define UTF_CLASS 2
++# define OUT_CLASS 3
++static rcc_class classes[] = {
++ { "id3", RCC_CLASS_STANDARD, NULL, NULL, "ID3 Encoding", 0 },
++ { "id3v2", RCC_CLASS_STANDARD, "id3", NULL, "ID3 v.2 Encoding", 0 },
++ { "utf", RCC_CLASS_KNOWN, "UTF-8", NULL, "Unicode Encoding", 0},
++ { "out", RCC_CLASS_TRANSLATE_LOCALE, "LC_CTYPE", NULL, "Output Encoding", 0 },
++ { NULL, RCC_CLASS_STANDARD, NULL, NULL, NULL, 0 }
++};
++
++static int rcc_initialized = 0;
++
++static rcc_context ctx = NULL;
++#endif /* HAVE_LIBRCC */
++
++
++void rccTaglibPatchFree() {
++#ifdef HAVE_LIBRCC
++ if (rcc_initialized) {
++ rccFree();
++ rcc_initialized = 0;
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++void rccTaglibPatchInit() {
++#ifdef HAVE_LIBRCC
++ if (rcc_initialized) return;
++ rccInit();
++ rccInitDefaultContext(NULL, 0, 0, classes, 0);
++ rccLoad(NULL, "xmms");
++ rccInitDb4(NULL, NULL, 0);
++ rcc_initialized = 1;
++#endif /* HAVE_LIBRCC */
++}
++
++void rccTaglibPatchSetContext(void *newctx) {
++#ifdef HAVE_LIBRCC
++ if (newctx) {
++ ctx = (rcc_context)newctx;
++ rcc_initialized = 1;
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++static void rccTaglibPatchTryInit() {
++#ifdef HAVE_LIBRCC
++ if (!rcc_initialized) {
++ rccTaglibPatchInit();
++ if (rcc_initialized) atexit(rccTaglibPatchFree);
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++
++TagLib::ByteVector rccTaglibPatchRecodeOutput(const std::string &s) {
++ TagLib::ByteVector v;
++#ifdef HAVE_LIBRCC
++ size_t rlen;
++ char *res;
++
++ rccTaglibPatchTryInit();
++
++ res = rccSizedRecode(ctx, UTF_CLASS, OUT_CLASS, s.c_str(), s.length(), &rlen);
++#ifdef RCC_DEBUG
++ for (const unsigned char *c = (const unsigned char*)s.c_str(); *c; c++) {
++ if (*c > 127) {
++ printf(" Output: %s - %s\n", s.c_str(), res?res:"null");
++ break;
++ }
++ }
++#endif /* RCC_DEBUG */
++
++ if (res) v.setData(res, rlen);
++ else v.setData("", 0);
++ //v.setData(s.c_str(), s.length());
++
++ return v;
++#else
++ v.setData("", 0);
++
++ return v;
++#endif /* HAVE_LIBRCC */
++}
++
++TagLib::ByteVector rccTaglibPatchRecodeOutputID3(const std::string &s, bool v2 = false) {
++ TagLib::ByteVector v;
++#ifdef HAVE_LIBRCC
++ size_t rlen;
++ char *res;
++
++ rccTaglibPatchTryInit();
++
++ res = rccSizedRecode(ctx, UTF_CLASS, v2?ID3V2_CLASS:ID3_CLASS, s.c_str(), s.length(), &rlen);
++#ifdef RCC_DEBUG
++ for (const unsigned char *c = (const unsigned char*)s.c_str(); *c; c++) {
++ if (*c > 127) {
++ printf(" OutputID3(%i): %s - %s\n", v2, s.c_str(), res?res:"null");
++ break;
++ }
++ }
++#endif /* RCC_DEBUG */
++
++ if (res) v.setData(res, rlen);
++ else v.setData("", 0);
++ //v.setData(s.c_str(), s.length());
++
++ return v;
++#else
++ v.setData("", 0);
++
++ return v;
++#endif /* HAVE_LIBRCC */
++}
++
++TagLib::ByteVector rccTaglibPatchRecodeInput(const std::string &s) {
++ TagLib::ByteVector v;
++#ifdef HAVE_LIBRCC
++ size_t rlen;
++ char *res;
++
++ rccTaglibPatchTryInit();
++
++ res = rccSizedRecode(ctx, OUT_CLASS, UTF_CLASS, s.c_str(), s.length(), &rlen);
++#ifdef RCC_DEBUG
++ for (const unsigned char *c = (const unsigned char*)s.c_str(); *c; c++) {
++ if (*c > 127) {
++ printf(" Input: %s - %s\n", s.c_str(), res?res:"null");
++ break;
++ }
++ }
++#endif /* RCC_DEBUG */
++
++ if (res) v.setData(res, rlen);
++ else
++#endif /* HAVE_LIBRCC */
++ v.setData("", 0);
++
++ return v;
++}
++
++TagLib::ByteVector rccTaglibPatchRecodeInputID3(const std::string &s, bool v2 = false) {
++ TagLib::ByteVector v;
++#ifdef HAVE_LIBRCC
++ size_t rlen;
++ char *res;
++
++ rccTaglibPatchTryInit();
++
++ res = rccSizedRecode(ctx, v2?ID3V2_CLASS:ID3_CLASS, UTF_CLASS, s.c_str(), s.length(), &rlen);
++#ifdef RCC_DEBUG
++ for (const unsigned char *c = (const unsigned char*)s.c_str(); *c; c++) {
++ if (*c > 127) {
++ printf(" InputID3(%i): %s - %s\n", v2, s.c_str(), res?res:"null");
++ break;
++ }
++ }
++#endif /* RCC_DEBUG */
++ if (res) v.setData(res, rlen + 1);
++ else
++#endif /* HAVE_LIBRCC */
++ v.setData("", 0);
++
++ return v;
++}
++
++TagLib::String::Type rccTaglibPatchGetLocaleType() {
++#ifdef HAVE_LIBRCC
++ size_t len;
++ char charset[32];
++
++ rccTaglibPatchTryInit();
++ if (!rccLocaleGetCharset(charset, NULL, 31)) {
++ if (!strncmp(charset, "UTF", 3)) {
++ len = strlen(charset);
++
++ if (charset[len-1]=='8') return TagLib::String::UTF8;
++ if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
++ if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
++ if (!strcmp(charset+(len-4),"16BE")) return TagLib::String::UTF16BE;
++ }
++ return TagLib::String::Latin1;
++ }
++#endif /* HAVE_LIBRCC */
++ return TagLib::String::UTF8;
++}
++
++TagLib::String::Type rccTaglibPatchGetID3Type() {
++#ifdef HAVE_LIBRCC
++ size_t len;
++ const char *charset;
++
++ rccTaglibPatchTryInit();
++
++ charset = rccGetCurrentCharsetName(ctx, ID3V2_CLASS);
++ if (charset) {
++ if (!strncmp(charset, "UTF", 3)) {
++ len = strlen(charset);
++
++ if (charset[len-1]=='8') return TagLib::String::UTF8;
++ if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
++ if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
++ if (!strcmp(charset+(len-4),"16BE")) return TagLib::String::UTF16BE;
++ }
++ return TagLib::String::Latin1ID3V2;
++ } else {
++ // Error or no-language configured: If Latin1ID3V2 is returned we normally will use the default unicode encoding unless Latin1 is selected by taglib
++ return TagLib::String::Latin1ID3V2;
++ }
++#endif /* HAVE_LIBRCC */
++ return TagLib::String::Latin1;
++}
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/rccpatch.h taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/rccpatch.h
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/rccpatch.h 1970-01-01 01:00:00.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/rccpatch.h 2019-09-01 08:32:29.578443805 +0200
+@@ -0,0 +1,20 @@
++#ifndef _RCC_PATCH_H
++#define _RCC_PATCH_H
++
++#include <string.h>
++#include "tstring.h"
++#include "tbytevector.h"
++
++void rccTaglibPatchFree();
++void rccTaglibPatchInit();
++void rccTaglibPatchSetContext(void *newctx);
++
++TagLib::ByteVector rccTaglibPatchRecodeOutput(const std::string &s);
++TagLib::ByteVector rccTaglibPatchRecodeInput(const std::string &s);
++TagLib::ByteVector rccTaglibPatchRecodeOutputID3(const std::string &s, bool v2 = false);
++TagLib::ByteVector rccTaglibPatchRecodeInputID3(const std::string &s, bool v2 = false);
++
++TagLib::String::Type rccTaglibPatchGetLocaleType();
++TagLib::String::Type rccTaglibPatchGetID3Type();
++
++#endif /* _RCC_PATCH_H */
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/tstring.cpp taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/tstring.cpp
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/tstring.cpp 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/tstring.cpp 2019-09-01 08:27:18.763821274 +0200
+@@ -33,6 +33,7 @@
+ #include <trefcounter.h>
+ #include <tutils.h>
+
++#include "rccpatch.h"
+ #include "tstring.h"
+
+ namespace
+@@ -48,16 +49,6 @@
+ return String::UTF16BE;
+ }
+
+- // Converts a Latin-1 string into UTF-16(without BOM/CPU byte order)
+- // and copies it to the internal buffer.
+- void copyFromLatin1(std::wstring &data, const char *s, size_t length)
+- {
+- data.resize(length);
+-
+- for(size_t i = 0; i < length; ++i)
+- data[i] = static_cast<unsigned char>(s[i]);
+- }
+-
+ // Converts a UTF-8 string into UTF-16(without BOM/CPU byte order)
+ // and copies it to the internal buffer.
+ void copyFromUTF8(std::wstring &data, const char *s, size_t length)
+@@ -73,6 +64,36 @@
+ debug("String::copyFromUTF8() - UTF8-CPP error: " + message);
+ data.clear();
+ }
++
++ }
++
++ // Converts a Latin-1 string into UTF-16(without BOM/CPU byte order)
++ // and copies it to the internal buffer.
++ void copyFromLatin1(std::wstring &data, const char *s, size_t length, bool prepare, String::Type t)
++ {
++ // librcc conversation
++ if (prepare) {
++ ByteVector v;
++ std::string std_s(s);
++
++ if (t == String::Latin1ID3) v = rccTaglibPatchRecodeInputID3(std_s, false);
++ else if (t == String::Latin1ID3V2) v = rccTaglibPatchRecodeInputID3(std_s, true);
++ else /* Latin1 converted from Locale */ v = rccTaglibPatchRecodeInput(std_s);
++
++ if (v.size()) {
++ copyFromUTF8(data, v.data(), v.size());
++ return;
++ } else {
++ // We don't know if we got UTF-8 encoded string or either rcc is disable or something is failed,
++ // since standard applications are really expecting here Latin1, it is safe to just check if we have violations of UTF8
++ //if (Unicode::isLegalUTF8(s)) t = UTF8;
++ }
++ }
++
++ data.resize(length);
++
++ for(size_t i = 0; i < length; ++i)
++ data[i] = static_cast<unsigned char>(s[i]);
+ }
+
+ // Helper functions to read a UTF-16 character from an array.
+@@ -175,8 +196,11 @@
+ String::String(const std::string &s, Type t) :
+ d(new StringPrivate())
+ {
++ if(t == Locale)
++ t = rccTaglibPatchGetLocaleType();
++
+ if(t == Latin1)
+- copyFromLatin1(d->data, s.c_str(), s.length());
++ copyFromLatin1(d->data, s.c_str(), s.length(), true, t);
+ else if(t == String::UTF8)
+ copyFromUTF8(d->data, s.c_str(), s.length());
+ else {
+@@ -223,8 +247,11 @@
+ String::String(const char *s, Type t) :
+ d(new StringPrivate())
+ {
+- if(t == Latin1)
+- copyFromLatin1(d->data, s, ::strlen(s));
++ if(t == Locale)
++ t = rccTaglibPatchGetLocaleType();
++
++ if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
++ copyFromLatin1(d->data, s, ::strlen(s), true, t);
+ else if(t == String::UTF8)
+ copyFromUTF8(d->data, s, ::strlen(s));
+ else {
+@@ -245,8 +272,11 @@
+ String::String(char c, Type t) :
+ d(new StringPrivate())
+ {
+- if(t == Latin1)
+- copyFromLatin1(d->data, &c, 1);
++ if(t == Locale)
++ t = rccTaglibPatchGetLocaleType();
++
++ if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
++ copyFromLatin1(d->data, &c, 1, true, t);
+ else if(t == String::UTF8)
+ copyFromUTF8(d->data, &c, 1);
+ else {
+@@ -260,8 +290,11 @@
+ if(v.isEmpty())
+ return;
+
+- if(t == Latin1)
+- copyFromLatin1(d->data, v.data(), v.size());
++ if(t == Locale)
++ t = rccTaglibPatchGetLocaleType();
++
++ if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
++ copyFromLatin1(d->data, v.data(), v.size(), true, t);
+ else if(t == UTF8)
+ copyFromUTF8(d->data, v.data(), v.size());
+ else
+@@ -416,8 +449,38 @@
+
+ ByteVector String::data(Type t) const
+ {
+- switch(t)
+- {
++ ByteVector v;
++
++ if (t == Locale) {
++ // The source is either Unicode or real Latin1 (if rcc is bypassed)
++ std::string s = to8Bit(true);
++
++ // In case of UTF8 locale, this probably will return NULL (no recoding needed), but we will take UTF8 path in the next swtich
++ v = rccTaglibPatchRecodeOutput(s);
++ if (v.size()) return v;
++
++ t = rccTaglibPatchGetLocaleType();
++ }
++
++ switch(t) {
++ case Latin1ID3:
++ case Latin1ID3V2:
++ {
++ std::string s = to8Bit(true);
++ if (t == Latin1ID3) v = rccTaglibPatchRecodeOutputID3(s, false);
++ else if (t == Latin1ID3V2) v = rccTaglibPatchRecodeOutputID3(s, true);
++ if (v.size())
++ return v;
++
++ // we don't know if we got NULL because rcc is disabled (error) or UTF8 output is required
++ if ((t == Latin1ID3V2)&&(rccTaglibPatchGetID3Type() == UTF8)) {
++ v.setData(s.c_str(), s.length());
++ } else {
++ for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); it++)
++ v.append(char(*it));
++ }
++ return v;
++ }
+ case Latin1:
+ {
+ ByteVector v(size(), 0);
+@@ -741,7 +804,33 @@
+
+ std::ostream &operator<<(std::ostream &s, const TagLib::String &str)
+ {
+- s << str.to8Bit();
++ TagLib::ByteVector bv = str.data(TagLib::String::Locale);
++ s << bv;
+ return s;
+ }
+
++TagLib::String::Type TagLib::String::ID3Type(int i)
++{
++ if(i == Latin1)
++ return Latin1ID3V2;
++ return Type(i);
++};
++
++TagLib::String::Type TagLib::String::ID3WType(Type type)
++{
++ Type rcc_type = rccTaglibPatchGetID3Type();
++ if((rcc_type == Latin1ID3)||(rcc_type == Latin1ID3V2)||(rcc_type == Latin1)) {
++ if(type == Latin1) return
++ rcc_type;
++ return type;
++ }
++
++ return rcc_type;
++};
++
++TagLib::String::Type TagLib::String::ID3RealType(Type type)
++{
++ if((type == Latin1ID3) || (type == Latin1ID3V2))
++ return Latin1;
++ return type;
++}
+diff -dPNur taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/tstring.h taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/tstring.h
+--- taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c/taglib/toolkit/tstring.h 2018-10-28 14:43:45.000000000 +0100
++++ taglib-5cb589a5b82c13ba8f0542e5e79629da7645cb3c-ds/taglib/toolkit/tstring.h 2019-09-01 08:32:29.579443823 +0200
+@@ -96,6 +96,18 @@
+ */
+ enum Type {
+ /*!
++ * Determine using current locale settings
++ */
++ Locale = -1,
++ /*!
++ * Latin1 for ID3 tags.
++ */
++ Latin1ID3 = 65,
++ /*!
++ * Latin1 for ID3v2 tags.
++ */
++ Latin1ID3V2 = 66,
++ /*!
+ * IS08859-1, or <i>Latin1</i> encoding. 8 bit characters.
+ */
+ Latin1 = 0,
+@@ -117,6 +129,10 @@
+ */
+ UTF16LE = 4
+ };
++
++ static Type ID3Type(int i);
++ static Type ID3WType(Type type);
++ static Type ID3RealType(Type type);
+
+ /*!
+ * Constructs an empty String.
diff --git a/media-libs/taglib/files/taglib-1.11-install-examples.patch b/media-libs/taglib/files/taglib-1.11-install-examples.patch
new file mode 100644
index 0000000..fd676c6
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.11-install-examples.patch
@@ -0,0 +1,13 @@
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -37,3 +37,10 @@
+ add_executable(strip-id3v1 strip-id3v1.cpp)
+ target_link_libraries(strip-id3v1 tag)
+
++INSTALL(TARGETS
++ tagreader tagreader_c tagwriter framelist strip-id3v1
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
++)
++
diff --git a/media-libs/taglib/files/taglib-1.11.1_p20181028-version-1.11.2.patch b/media-libs/taglib/files/taglib-1.11.1_p20181028-version-1.11.2.patch
new file mode 100644
index 0000000..4b8311d
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.11.1_p20181028-version-1.11.2.patch
@@ -0,0 +1,11 @@
+--- a/taglib/toolkit/taglib.h 2018-10-28 14:43:45.000000000 +0100
++++ b/taglib/toolkit/taglib.h 2018-11-17 23:40:39.517716254 +0100
+@@ -30,7 +30,7 @@
+
+ #define TAGLIB_MAJOR_VERSION 1
+ #define TAGLIB_MINOR_VERSION 11
+-#define TAGLIB_PATCH_VERSION 1
++#define TAGLIB_PATCH_VERSION 2
+
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)) || defined(__clang__)
+ #define TAGLIB_IGNORE_MISSING_DESTRUCTOR _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"")
diff --git a/media-libs/taglib/taglib-1.11.1_p20181028-r1.ebuild b/media-libs/taglib/taglib-1.11.1_p20181028-r1.ebuild
new file mode 100644
index 0000000..188d9cd
--- /dev/null
+++ b/media-libs/taglib/taglib-1.11.1_p20181028-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+COMMIT=5cb589a5b82c13ba8f0542e5e79629da7645cb3c
+inherit cmake-multilib flag-o-matic
+
+DESCRIPTION="A library for reading and editing audio meta data"
+HOMEPAGE="https://taglib.github.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MPL-1.1"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+SLOT="0"
+
+#SDS
+IUSE="debug examples test rcc"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? ( >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}] )
+ rcc? ( app-i18n/librcc )
+"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11-install-examples.patch
+ "${FILESDIR}"/${P}-version-1.11.2.patch
+ "${FILESDIR}"/taglib-1.11-ds-rusxmms.patch
+ "${FILESDIR}"/taglib-1.9.1-ds-rusxmms-enforce.patch
+)
+#EDS
+
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/taglib-config
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ sed -e "s/BUILD_TESTS AND NOT BUILD_SHARED_LIBS/BUILD_TESTS/" \
+ -i CMakeLists.txt \
+ -i ConfigureChecks.cmake || die
+
+ # bug 651744
+ append-cxxflags -std=c++11
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_EXAMPLES=$(multilib_native_usex examples)
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_TESTS=$(usex test)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # ctest does not work
+ emake -C "${BUILD_DIR}" check
+}
diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest
new file mode 100644
index 0000000..3a53d74
--- /dev/null
+++ b/sys-devel/kgcc64/Manifest
@@ -0,0 +1,5 @@
+AUX gcc-configure-LANG.patch 2052 BLAKE2B 28c36f4992e41305ee421dade5eaaac34e3bdc523665b03f360f2bc01e8f69e9dc48052edb80dece63ab561e80325b4f125502482eb16f7324f1c03670021550 SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129
+AUX gcc-configure-texinfo.patch 337 BLAKE2B 6408817927f71c5c55a19510a95e1aaad9b56be216ec1c753920b55a435d70579e27ff5bb8ecbeea1b9ff1c8ae62b940fbf10bf876c3d7ecf6cd662d9b693100 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5
+DIST gcc-4.9.3-patches-1.0.tar.bz2 22045 BLAKE2B 6bae91dfc541cb359aeb12394c268c152a956e47088071cb8f24c72ae2d2305da3f2259ee64ee45c14acb2cd98cb759751265e9136d8339fd2328174bd0bdf96 SHA512 557cbe324d708fd9ba2b2da471f9ef04bc88c4e5813c0c1842f6f6034d1e85e93627adb153617b3785cdd0c033831d58fc1b548bd34793d25ddcbd96c3fd1c9c
+DIST gcc-4.9.3.tar.bz2 90006707 BLAKE2B b06c4cd9fe886c362f2cf594017b6652692c1aa3d79a481d56c8be1454b380af8920ca82d0209d7d39558c22e1876434e0f8c960f36e783b19cebc89ec5b2dc4 SHA512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df
+EBUILD kgcc64-4.9.3.ebuild 1257 BLAKE2B 8207d0c03272ad8f2e08483a5d27954b5b9b90b56b2348a8e2efaeef40cef0beefebf308694b4a0e766c5126627641c3d05c40d655b9f5c3a7f5ae1d4cbe0b92 SHA512 126d2eaf7a5b1005d1cad99cab5c39dc4a2e871cb30ddcfa0b36ed49bc0a94189fcd8c27d1d6251a2ebbb8b26414c89500844da9021ecc51a22015c313ee2e49
diff --git a/sys-devel/kgcc64/files/gcc-configure-LANG.patch b/sys-devel/kgcc64/files/gcc-configure-LANG.patch
new file mode 100644
index 0000000..d1b1b03
--- /dev/null
+++ b/sys-devel/kgcc64/files/gcc-configure-LANG.patch
@@ -0,0 +1,64 @@
+The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
+option parsing, it may break.
+
+http://bugs.gentoo.org/103483
+
+--- configure
++++ configure
+@@ -54,6 +54,19 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ unset $as_var
++ fi
++done
++
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+@@ -452,16 +463,6 @@
+ esac
+ done
+
+-# NLS nuisances.
+-# Only set these to C if already set. These must not be set unconditionally
+-# because not all systems understand e.g. LANG=C (notably SCO).
+-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+-# Non-C LC_CTYPE values break the ctype check.
+-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+-
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+@@ -1850,6 +1850,19 @@
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
++ eval \$as_var=C; export \$as_var
++ else
++ unset \$as_var
++ fi
++done
++
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
diff --git a/sys-devel/kgcc64/files/gcc-configure-texinfo.patch b/sys-devel/kgcc64/files/gcc-configure-texinfo.patch
new file mode 100644
index 0000000..ddc098d
--- /dev/null
+++ b/sys-devel/kgcc64/files/gcc-configure-texinfo.patch
@@ -0,0 +1,16 @@
+Chances are quite good that the installed makeinfo is sufficient.
+So ignore false positives where the makeinfo installed is so new
+that it violates the cheesy version grep.
+
+http://bugs.gentoo.org/198182
+
+--- configure
++++ configure
+@@ -3573,6 +3573,6 @@
+ :
+ else
+- MAKEINFO="$MISSING makeinfo"
++ :
+ fi
+ ;;
+
diff --git a/sys-devel/kgcc64/kgcc64-4.9.3.ebuild b/sys-devel/kgcc64/kgcc64-4.9.3.ebuild
new file mode 100644
index 0000000..1f9976f
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-4.9.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+case ${CHOST} in
+ hppa*) CTARGET=hppa64-${CHOST#*-};;
+ mips*) CTARGET=${CHOST/mips/mips64};;
+ powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
+ s390*) CTARGET=${CHOST/s390/s390x};;
+ sparc*) CTARGET=${CHOST/sparc/sparc64};;
+ i?86*) CTARGET=x86_64-${CHOST#*-};;
+esac
+export CTARGET
+TOOLCHAIN_ALLOWED_LANGS="c"
+GCC_TARGET_NO_MULTILIB=true
+
+PATCH_VER="1.0"
+
+inherit eutils toolchain
+
+DESCRIPTION="64bit kernel compiler"
+
+# Works on hppa and mips; all other archs, refer to bug #228115
+KEYWORDS="hppa ~mips"
+
+RDEPEND=">=dev-libs/gmp-4.3.2
+ >=dev-libs/mpfr-2.4.2
+ >=dev-libs/mpc-0.8.1
+ >=sys-devel/gcc-config-1.4"
+# unlike every other target, hppa has not unified the 32/64 bit
+# ports in binutils yet
+DEPEND="${RDEPEND}
+ hppa? ( sys-devel/binutils-hppa64 )
+ !sys-devel/gcc-hppa64
+ !sys-devel/gcc-mips64
+ !sys-devel/gcc-powerpc64
+ !sys-devel/gcc-sparc64
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/bison-1.875"
+
+pkg_postinst() {
+ toolchain_pkg_postinst
+
+ cd "${ROOT}"/usr/bin
+ local x
+ for x in gcc cpp ; do
+ cat <<-EOF >${CTARGET%%-*}-linux-${x}
+ #!/bin/sh
+ exec ${CTARGET}-${x} "\$@"
+ EOF
+ chmod a+rx ${CTARGET%%-*}-linux-${x}
+ done
+}
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 66a5419..3af5e7a 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,2 +1,18 @@
-EBUILD nvidia-drivers-399-r1.ebuild 257 BLAKE2B 17844646e14c2bb30704c57bae45c63a709ce82af7404eff58b4d6afae9a852f449666ef17c0aa879f981bd6a73d2e9ad2ed7e849eb13b4c77eecb11305da685 SHA512 659a4876e8a8f8fd7d7028db6378e8b0cc6a64116823e7aa3e3d1fedf611a467c8d36041bff0021d2d75d0ba9ec34866ac2c92a63519f7931e49527d9918b81a
-EBUILD nvidia-drivers-430.40-r1.ebuild 275 BLAKE2B 9b0eef8d3deb93cccf79d2816115212f69429a45693f876dd2d1ec11b7a0e53016f7c7ae8fea417ad88127b1259a1fd8f949b38c9e633ee8fa0559beef81619a SHA512 67a151b3687cc5416b0fce5c7e9650739ea40f41913f8c10fd7c4642264e708b9302741434a11a4dd8ebadfc66a90940841d95875efebc5c859000983f9bbed1
+AUX 50nvidia-prelink-blacklist 319 BLAKE2B 5751bacd4ce890d08400323da30c2c86fb8a622504cdf70ee091419685d4ad5ff1132a5897288d269cce54d27b9635f884a315fd701ed2747c5f6bdaef3a0eae SHA512 7252b464c45669bb402859ddb2c95f4553a37027870b6aeada3e1dd58fefe7b4713d3486d301177efdcd7559dbc31ceb6078220d5c0187bdc636d817a98e1a41
+AUX 95-nvidia-settings 54 BLAKE2B 0428ef5071f8bf5dc8b7220f9963c4882d6915417d76abd0bf45989b29e04468c33c6facbb9fb0d3c6aadb324a76e3181baaa02c829445d299a2c17f457bb553 SHA512 0fdaff8701598081eeb78defcd140b78f75309ace998df67569a15d0ff653aca7ad0576912bf9a619f42990e6fb35cdb79e21f8181d3cd04dea719d912da8be9
+AUX 95-nvidia-settings-r1 54 BLAKE2B 598067babb48bd0f5680300cf3cbb37ac804edb3131c47510d3350511b918cd47fcf44f1ccd4746e4a41f2f8aa36511f20c2c6f313010e89a79b7869771b9ee6 SHA512 de9edf678c64ca3d10c912397800b2cb651ef9108b33ece97a4cc1e86dad0a9e81986cca6b96cfe80740d9cb433de7ef93f29be45178db714ee408c7f6570ac7
+AUX nvidia-169.07 639 BLAKE2B 00b279e3c338dc84258d8018fe80efc4b87f0fb1fcd61eda0ac2f698897605f4675a3ebb53d8baa3bdfa9f137aff214046464a642113a1b01a8c3e35bf5f99b8 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f
+AUX nvidia-persistenced.conf 250 BLAKE2B 8b3514f981d992d34c949011a25fda5737d85ade831f15481843db14f67494e6f271eb7947a459a28c7991cdeb86092a2a7920e6f40213bcded90b7f9f15dae0 SHA512 9c9562bb15bf4552754dd50a1b01dec5df76f7f5666fba2fff642a169f87e9ed421a260f2258ab469f7e4cd9ef8161653355795624387fe7ad5ae6a0d71e5f46
+AUX nvidia-persistenced.init 650 BLAKE2B 3be9ea563ecb9741bad4de1516ab9cf373c5b412eea52cf4d8e6446ee09f6adee47bcd1f65217c7379b55d99de1966b2335ecdfa940f9c7544cd103992ba280f SHA512 864c90573a033e30d151c9adb9f0f12c5bcba2b5a7eaaa62f86fc11747f13956825fc5acb4fb1fb453a32acefe850e73264a650fafa6014cc96bbc7e3b56fdaa
+AUX nvidia-rmmod.conf 108 BLAKE2B 8a14963d7498c08f22c60f0e7286b66375c22e9db081454d973738bf847bfd4343c82f4e1c529ec6b904ae3e8cf29e2570dd4cf2fbb8c8aa9bd33491d2e4f543 SHA512 cb6b70ba0fc9c6d81d43f31d724538beff79e7e9b02c610485f1e46757d7bf16410d5cb2853d8d67ea6e4da59e7e1687ad14dc4b494415c6db6fab517a03b28b
+AUX nvidia-settings-linker.patch 1048 BLAKE2B a4a0a26d93514c3c43a0bc0db87b5b8dd8c20d0a9f15942db2a2f34662886436371e72c6e033d4bb2eb4d8996962f048144b93c1493149ea603ef71044cbed41 SHA512 11cd04a3efe95046d01c749df9fc055473284cb99a6138768916db841c8fadf2af5c93646b52f7bce6454e43b8621aa518964ef734c18283162fb2671f6dd9f9
+AUX nvidia-settings.desktop 185 BLAKE2B 5fab31cdfad3e882095bf0fb5c3821b5d934992f1d330b80dd825da727b7cf587177f21ad6d2f83eabc6a451c15e2dc4bbe88684deb5892199da53fdef77f428 SHA512 30cab269daf282b9716e53ecf2f8993289e8d4ad05c40d6ddaad3ea6e95477c36a4d65a28d0ec3c1c9c7e845fde140df9012944306f70131a02c9ffef0a9f523
+AUX nvidia-smi.init 545 BLAKE2B f4a0743f1fa5136c9c0f327645d8b66932492f2539b5c2b0bd45d29b2010fff6bbdc9e97b619e67d38bce38104d29fc4d00a9e0efc31b8ff408cb02370785bec SHA512 f7f04a73d646b90cdc14a408f53650324d7c1d7754a1d92acc9a8acaef163bda1eef33acb831df77657786e7ceebe0d7f9d25d2edd57d1590be340ce12fea6e5
+AUX nvidia-udev.sh 185 BLAKE2B cf7a46f2d123d5df46138d9ad12c4c700984fb773acdda93fc4dfe5fe5bfad36db70342ce4a851fc450a90b6ee6e481d8a4f6e38884063be14c4f0d6e15a2329 SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e
+AUX nvidia-udev.sh-r1 285 BLAKE2B 6ea76f2f913b2bc2c9955e7564c770368ea6a0327887684d086040047fb95a0088387c5f87f22bc1f5a093cc79299ad72dd1495719bb344c504a342d03f34db3 SHA512 493b0d5f2698d299e3b8d5782ac7fb8174e7ee93f1dae66bc1161eb4dd16d4db91048444dc6e7bea344960936c0a5c825041f6909af004438d8009a3d3fe71c9
+AUX nvidia-uvm.udev-rule 166 BLAKE2B 235df3e85d37d7bc86ad02e32714dcd9ac569c0813767b4f04470e803a95c66b50917fa830955d729069e1e036cb4438edd56249a1cfda701edde58105857ebd SHA512 1ccfcf425b1343e532567e7afd5e1192b6b57de58a1e8c3ec883ef88ecfe2c44d96ad31944f30aafe1dab4d3c5cb9b889ce8a0145295c851d8dbc31d51fd02a8
+AUX nvidia.udev-rule 462 BLAKE2B d417e0e4f5a64c5cee235f4640554ff1ba4d34590a6c3459fd8b4e10dc7581010c006f96cfd01f2c9a847c79979631f6e5afbef01724d110201377e8f8c75966 SHA512 96f9edaa0b46bea5fce17596f868bea5265b303d7185af6ba81527bbd7b8fdf92de9311317cbde51a29d222083d451c25ab77c3d6837cbc4072a50d9af89aa86
+DIST NVIDIA-FreeBSD-x86_64-435.21.tar.gz 64153630 BLAKE2B fee655cc843c004ac0c1ec85b9417292016a013136e04ad047d2513edbdc7c732561d6bcc4603c658905972dce6618de49d4d6ac583e84fdf212cf45397b48c1 SHA512 2c160c06ca58e3009deb1ba4a4a28d39419e251ced3bfa9a442942f9cce17003d67e8a8bfa23036d3916cc0e66f4bff0fbedaae73db6f10b995235a56d7eba7c
+DIST NVIDIA-Linux-x86_64-435.21.run 144387574 BLAKE2B e9afd6335182a28f5136dbef55195a2f2d8f768376ebc148190a0a82470a34d008ce04170ffc1aab36585605910c1300567a90443b5f58cb46ec3bff6ab9409c SHA512 e83b6dff80434971c0b254815945d485a45c978b8a19994244f50a463658863948b2eac8bc62d667bb10c23f41cf1c3521c409d23ac2ab6a0c0cd094a6e20270
+DIST nvidia-settings-435.21.tar.bz2 1131222 BLAKE2B 855f5c7667f4a5ec0f917fbb017d70ec6ee5e768f7087e77e54a66dea852c471bd1810a2163fb33204e5f381998a27a4254e0a5d2c73e2b6b624813ff8294f24 SHA512 8b408cc70118df3a138a99fe7fc14f6370d500b8ae26888b27b07de22f6fc6eebd65bd437d83ee82e18a1d8ee4cceec601c414b1947302ca808fff48165f31bb
+EBUILD nvidia-drivers-435.21.ebuild 15872 BLAKE2B babf1f0bb26054c93910b9a006a6d0d2d80a5ebed3dc8a987931a020a91ac2337772257f55e1312e73dde1bba972914d450d78331fb4596a452d16cfed2d78a0 SHA512 a14f8ae1c021ed9b8564f8768b046a11a42c24fd7aa152126d30baa6e4603c6fffbf2813ab5c21e76df8dcef255b736165b74748e461bfa6cc89ab9ced4b7997
diff --git a/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist b/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist
new file mode 100644
index 0000000..5e139de
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist
@@ -0,0 +1 @@
+PRELINK_PATH_MASK="/usr/lib{,64}/tls/libnvidia-tls*:/usr/lib{,64}/libnvidia*:/usr/lib{,64}/libGL*:/usr/lib{,64}/opengl/nvidia/*:/usr/lib{,64}/OpenCL/vendors/nvidia/*:/usr/lib{,64}/xorg/modules/drivers/nvidia*:/usr/lib{,64}/libvdpau_nvidia*:/usr/lib{,64}/libXvMCNVIDIA*:/usr/lib{,64}/libcuda*:/usr/lib{,64}/libnvcuvid*"
diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings b/x11-drivers/nvidia-drivers/files/95-nvidia-settings
new file mode 100644
index 0000000..e9d6274
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/95-nvidia-settings
@@ -0,0 +1,2 @@
+#!/bin/sh
+/opt/bin/nvidia-settings --load-config-only
diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 b/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1
new file mode 100644
index 0000000..48c41d8
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/nvidia-settings --load-config-only
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07
new file mode 100644
index 0000000..a96b0cd
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-169.07
@@ -0,0 +1,14 @@
+# Nvidia drivers support
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+
+# To tweak the driver the following options can be used, note that
+# you should be careful, as it could cause instability!! For more
+# options see /usr/share/doc/PACKAGE/README
+#
+# !!! SECURITY WARNING !!!
+# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
+# WHAT YOU ARE DOING.
+# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
+# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
+options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf
new file mode 100644
index 0000000..637ac1a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf
@@ -0,0 +1,8 @@
+# run-time configuration file for /etc/init.d/nvidia-persistenced
+
+# NVPD_USER: The user nvidia-persistenced is intended to run for
+NVPD_USER=""
+
+# ARGS: Additional arguments to set the default persistence mode
+# (see nvidia-persistenced(1))
+ARGS=""
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init
new file mode 100644
index 0000000..f80456d
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid"
+
+start() {
+ if ! [ "${NVPD_USER}x" = x ]; then
+ ebegin "Starting nvidia-persistenced for ${NVPD_USER}"
+ NVPD_USER_ARG="--user ${NVPD_USER}"
+ else
+ ebegin "Starting nvidia-persistenced"
+ fi
+ start-stop-daemon --start --quiet --pidfile ${pidfile} \
+ --background --exec /opt/bin/nvidia-persistenced \
+ -- ${NVPD_USER_ARG} ${ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nvidia-persistenced"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ eend $?
+}
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf b/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf
new file mode 100644
index 0000000..618b9b3
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf
@@ -0,0 +1,3 @@
+# Nvidia UVM support
+
+remove nvidia modprobe -r --ignore-remove nvidia-drm nvidia-modeset nvidia-uvm nvidia
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch b/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch
new file mode 100644
index 0000000..fe9d336
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch
@@ -0,0 +1,22 @@
+--- a/nvidia-settings-@PV@/utils.mk
++++ b/nvidia-settings-@PV@/utils.mk
+@@ -475,7 +475,7 @@
+ define READ_ONLY_OBJECT_FROM_FILE_RULE
+ $$(OUTPUTDIR)/$$(notdir $(1)).o: $(1)
+ $(at_if_quiet)cd $$(dir $(1)); \
+- $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \
++ $$(call quiet_cmd_no_at,NVLD) -r -z noexecstack --format=binary \
+ $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@)
+ $$(call quiet_cmd,OBJCOPY) \
+ --rename-section .data=.rodata,contents,alloc,load,data,readonly \
+--- a/nvidia-settings-@PV@/src/libXNVCtrl/utils.mk
++++ b/nvidia-settings-@PV@/src/libXNVCtrl/utils.mk
+@@ -475,7 +475,7 @@
+ define READ_ONLY_OBJECT_FROM_FILE_RULE
+ $$(OUTPUTDIR)/$$(notdir $(1)).o: $(1)
+ $(at_if_quiet)cd $$(dir $(1)); \
+- $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \
++ $$(call quiet_cmd_no_at,NVLD) -r -z noexecstack --format=binary \
+ $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@)
+ $$(call quiet_cmd,OBJCOPY) \
+ --rename-section .data=.rodata,contents,alloc,load,data,readonly \
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop b/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop
new file mode 100644
index 0000000..b4b452e
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=NVIDIA X Server Settings
+Comment=Configure NVIDIA X Server Settings
+Exec=/usr/bin/nvidia-settings
+Icon=nvidia-settings
+Categories=System;Settings;
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-smi.init b/x11-drivers/nvidia-drivers/files/nvidia-smi.init
new file mode 100644
index 0000000..8ee51e3
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-smi.init
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/nvidia-smi.pid"
+
+depend() {
+ after modules
+}
+
+start() {
+ ebegin "Starting NVIDIA System Management Interface"
+ rm -f ${pidfile}
+ start-stop-daemon --start --quiet --pidfile ${pidfile} \
+ --make-pidfile --background --exec /opt/bin/nvidia-smi -- \
+ -q -l 300
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NVIDIA System Management Interface"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ eend $?
+}
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh
new file mode 100644
index 0000000..9487b08
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]; then
+ echo "Invalid args" >&2
+ exit 1
+fi
+
+case $1 in
+ add|ADD)
+ /opt/bin/nvidia-smi > /dev/null
+ ;;
+ remove|REMOVE)
+ rm -f /dev/nvidia*
+ ;;
+esac
+
+exit 0
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1
new file mode 100644
index 0000000..6579bf7
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]; then
+ echo "Invalid args" >&2
+ exit 1
+fi
+
+case $1 in
+ add|ADD)
+ #hopefully this prevents infinite loops like bug #454740
+ if lsmod | grep -iq nvidia; then
+ /opt/bin/nvidia-smi > /dev/null
+ fi
+ ;;
+ remove|REMOVE)
+ rm -f /dev/nvidia*
+ ;;
+esac
+
+exit 0
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule
new file mode 100644
index 0000000..3df8a3a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule
@@ -0,0 +1 @@
+KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/bin/mknod -m 660 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0; /bin/chgrp video /dev/nvidia-uvm'"
diff --git a/x11-drivers/nvidia-drivers/files/nvidia.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia.udev-rule
new file mode 100644
index 0000000..2eb30bb
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia.udev-rule
@@ -0,0 +1,6 @@
+ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
+# Previously the ACTION was "add|remove" but one user on bug #376527 had a
+# problem until he recompiled udev-171-r5, which is one of the versions I
+# tested with and it was fine. I'm breaking the rules out just to be safe
+# so someone else doesn't have an issue
+ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-399-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-399-r1.ebuild
deleted file mode 100644
index caa8d8b..0000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-399-r1.ebuild
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-inherit eutils
-
-DESCRIPTION="NVIDIA Drivers Override"
-SLOT="0"
-LICENSE="GPL-2 NVIDIA-r2"
-KEYWORDS="amd64 x86"
-
-IUSE="tools static-libs"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-430.40-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-430.40-r1.ebuild
deleted file mode 100644
index 0413d7f..0000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-430.40-r1.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header:
-
-EAPI=6
-
-inherit eutils
-
-DESCRIPTION="NVIDIA Drivers Override"
-SLOT="0/${PV%.*}"
-
-LICENSE="GPL-2 NVIDIA-r2"
-KEYWORDS="amd64 x86"
-
-IUSE="tools static-libs"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-435.21.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-435.21.ebuild
new file mode 100644
index 0000000..a2e7f01
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-435.21.ebuild
@@ -0,0 +1,587 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic linux-info linux-mod multilib-minimal nvidia-driver \
+ portability toolchain-funcs unpacker user udev
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/"
+
+AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+ARM_NV_PACKAGE="NVIDIA-Linux-armv7l-gnueabihf-${PV}"
+
+NV_URI="https://us.download.nvidia.com/XFree86/"
+SRC_URI="
+ amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
+ tools? (
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${PV}.tar.bz2
+ )
+"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0/${PV%.*}"
+KEYWORDS="-* amd64 ~amd64-fbsd"
+RESTRICT="bindist mirror"
+EMULTILIB_PKG="true"
+
+IUSE="acpi compat +driver gtk3 kernel_FreeBSD kernel_linux +kms multilib static-libs +tools uvm wayland +X"
+REQUIRED_USE="
+ tools? ( X )
+ static-libs? ( tools )
+"
+RESTRICT="test"
+
+COMMON="
+ app-eselect/eselect-opencl
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ tools? (
+ dev-libs/atk
+ dev-libs/glib:2
+ dev-libs/jansson
+ gtk3? (
+ x11-libs/gtk+:3
+ )
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf[X]
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ )
+ X? (
+ >=app-eselect/eselect-opengl-1.0.9
+ app-misc/pax-utils
+ )
+"
+DEPEND="
+ ${COMMON}
+ kernel_linux? ( virtual/linux-sources )
+ tools? ( sys-apps/dbus )
+"
+RDEPEND="
+ ${COMMON}
+ acpi? ( sys-power/acpid )
+ tools? ( !media-video/nvidia-settings )
+ wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+ X? (
+ <x11-base/xorg-server-1.20.99:=
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ )
+"
+QA_PREBUILT="opt/* usr/lib*"
+S=${WORKDIR}/
+
+nvidia_drivers_versions_check() {
+ if use amd64 && has_multilib_profile && \
+ [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default ABI"
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux && kernel_is ge 5 3; then
+ ewarn "Gentoo supports kernels which are supported by NVIDIA"
+ ewarn "which are limited to the following kernels:"
+ ewarn "<sys-kernel/gentoo-sources-5.3"
+ ewarn "<sys-kernel/vanilla-sources-5.3"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Do not file a bug report about this."
+ ewarn ""
+ fi
+
+ # Since Nvidia ships many different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # Kernel features/options to check for
+ # SDS
+ # CONFIG_CHECK="!DEBUG_MUTEXES !I2C_NVIDIA_GPU ~!LOCKDEP ~MTRR ~SYSVIPC ~ZONE_DMA"
+ # EDS
+
+ # Now do the above checks
+ use kernel_linux && check_extra_config
+}
+
+pkg_pretend() {
+ nvidia_drivers_versions_check
+}
+
+pkg_setup() {
+ nvidia_drivers_versions_check
+
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use driver && use kernel_linux; then
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel)"
+ use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"
+
+ # This needs to run after MODULE_NAMES (so that the eclass checks
+ # whether the kernel supports loadable modules) but before BUILD_PARAMS
+ # is set (so that KV_DIR is populated).
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC) NV_VERBOSE=1"
+
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ fi
+
+ if use kernel_linux && kernel_is lt 2 6 9; then
+ eerror "You must build this against 2.6.9 or higher kernels."
+ fi
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
+ NV_DOC="${S}/doc"
+ NV_OBJ="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_OBJ="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_configure() {
+ tc-export AR CC LD
+
+ default
+}
+
+src_prepare() {
+ local man_file
+ for man_file in "${NV_MAN}"/*1.gz; do
+ gunzip $man_file || die
+ done
+
+ if use tools; then
+ cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
+ sed -i \
+ -e "s:@PV@:${PV}:g" \
+ "${WORKDIR}"/nvidia-settings-linker.patch || die
+ eapply "${WORKDIR}"/nvidia-settings-linker.patch
+ fi
+
+ default
+
+ if ! [ -f nvidia_icd.json ]; then
+ cp nvidia_icd.json.template nvidia_icd.json || die
+ sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
+ fi
+}
+
+src_compile() {
+ cd "${NV_SRC}"
+ if use kernel_FreeBSD; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use driver && use kernel_linux; then
+ BUILD_TARGETS=module linux-mod_src_compile \
+ KERNELRELEASE="${KV_FULL}" \
+ src="${KERNEL_DIR}"
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/libXNVCtrl \
+ DO_STRIP= \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NV_VERBOSE=1 \
+ OUTPUTDIR=. \
+ RANLIB="$(tc-getRANLIB)"
+
+ emake -C "${S}"/nvidia-settings-${PV}/src \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="$(get_libdir)" \
+ NVLD="$(tc-getLD)" \
+ NVML_ENABLED=0 \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ OUTPUTDIR=.
+ fi
+}
+
+# Install nvidia library:
+# the first parameter is the library to install
+# the second parameter is the provided soversion
+# the third parameter is the target directory if it is not /usr/lib
+donvidia() {
+ # Full path to library
+ nv_LIB="${1}"
+
+ # SOVER to use
+ nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
+
+ # Where to install
+ nv_DEST="${2}"
+
+ # Get just the library name
+ nv_LIBNAME=$(basename "${nv_LIB}")
+
+ if [[ "${nv_DEST}" ]]; then
+ exeinto ${nv_DEST}
+ action="doexe"
+ else
+ nv_DEST="/usr/$(get_libdir)"
+ action="dolib.so"
+ fi
+
+ # Install the library
+ ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
+
+ # If the library has a SONAME and SONAME does not match the library name,
+ # then we need to create a symlink
+ if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER} \
+ || die "failed to create ${nv_DEST}/${nv_SOVER} symlink"
+ fi
+
+ dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so} \
+ || die "failed to create ${nv_LIBNAME/.so*/.so} symlink"
+}
+
+src_install() {
+ if use driver && use kernel_linux; then
+ linux-mod_src_install
+
+ # Add the aliases
+ # This file is tweaked with the appropriate video group in
+ # pkg_preinst, see bug #491414
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ if use uvm; then
+ doins "${FILESDIR}"/nvidia-rmmod.conf
+ udev_newrules "${FILESDIR}"/nvidia-uvm.udev-rule 99-nvidia-uvm.rules
+ else
+ sed -e 's|nvidia-uvm ||g' "${FILESDIR}"/nvidia-rmmod.conf \
+ > "${T}"/nvidia-rmmod.conf || die
+ doins "${T}"/nvidia-rmmod.conf
+ fi
+
+ # Ensures that our device nodes are created when not using X
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}"/nvidia-udev.sh-r1 nvidia-udev.sh
+ udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use kernel_FreeBSD; then
+ if use x86-fbsd; then
+ insinto /boot/modules
+ doins "${S}/src/nvidia.kld"
+ fi
+
+ exeinto /boot/modules
+ doexe "${S}/src/nvidia.ko"
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
+
+ # NVIDIA framebuffer capture library
+ donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
+
+ # NVIDIA video encode/decode <-> CUDA
+ if use kernel_linux; then
+ donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
+ donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
+ fi
+
+ if use X; then
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11}/nvidia_drv.so
+
+ # Xorg GLX driver
+ donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} \
+ /usr/$(get_libdir)/xorg/modules/extensions
+
+ # Xorg nvidia.conf
+ if has_version '>=x11-base/xorg-server-1.16'; then
+ insinto /usr/share/X11/xorg.conf.d
+ newins {,50-}nvidia-drm-outputclass.conf
+ fi
+
+ insinto /usr/share/glvnd/egl_vendor.d
+ doins ${NV_X11}/10_nvidia.json
+ fi
+
+ if use wayland; then
+ insinto /usr/share/egl/egl_external_platform.d
+ doins ${NV_X11}/10_nvidia_wayland.json
+ fi
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins ${NV_OBJ}/nvidia.icd
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+
+ if use X; then
+ doexe ${NV_OBJ}/nvidia-xconfig
+
+ insinto /etc/vulkan/icd.d
+ doins nvidia_icd.json
+ fi
+
+ if use kernel_linux; then
+ doexe ${NV_OBJ}/nvidia-cuda-mps-control
+ doexe ${NV_OBJ}/nvidia-cuda-mps-server
+ doexe ${NV_OBJ}/nvidia-debugdump
+ doexe ${NV_OBJ}/nvidia-persistenced
+ doexe ${NV_OBJ}/nvidia-smi
+
+ # install nvidia-modprobe setuid and symlink in /usr/bin (bug #505092)
+ doexe ${NV_OBJ}/nvidia-modprobe
+ fowners root:video /opt/bin/nvidia-modprobe
+ fperms 4710 /opt/bin/nvidia-modprobe
+ dosym /{opt,usr}/bin/nvidia-modprobe
+
+ doman nvidia-cuda-mps-control.1
+ doman nvidia-modprobe.1
+ doman nvidia-persistenced.1
+ newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
+ newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
+ newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
+ fi
+
+ if use tools; then
+ emake -C "${S}"/nvidia-settings-${PV}/src/ \
+ DESTDIR="${D}" \
+ DO_STRIP= \
+ GTK3_AVAILABLE=$(usex gtk3 1 0) \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ NV_USE_BUNDLED_LIBJANSSON=0 \
+ NV_VERBOSE=1 \
+ OUTPUTDIR=. \
+ PREFIX=/usr \
+ install
+
+ if use static-libs; then
+ dolib.a "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins "${S}"/nvidia-settings-${PV}/src/libXNVCtrl/*.h
+ fi
+
+ insinto /usr/share/nvidia/
+ doins nvidia-application-profiles-${PV}-key-documentation
+
+ insinto /etc/nvidia
+ newins \
+ nvidia-application-profiles-${PV}-rc nvidia-application-profiles-rc
+
+ # There is no icon in the FreeBSD tarball.
+ use kernel_FreeBSD || \
+ doicon ${NV_OBJ}/nvidia-settings.png
+
+ domenu "${FILESDIR}"/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ dobin ${NV_OBJ}/nvidia-bug-report.sh
+
+ if has_multilib_profile && use multilib; then
+ local OABI=${ABI}
+ for ABI in $(get_install_abis); do
+ src_install-libs
+ done
+ ABI=${OABI}
+ unset OABI
+ else
+ src_install-libs
+ fi
+
+ is_final_abi || die "failed to iterate through all ABIs"
+
+ # Documentation
+ if use kernel_FreeBSD; then
+ dodoc "${NV_DOC}/README"
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}"/nvidia-smi.1
+ use X && doman "${NV_MAN}"/nvidia-xconfig.1
+ use tools && doman "${NV_MAN}"/nvidia-settings.1
+ doman "${NV_MAN}"/nvidia-cuda-mps-control.1
+ fi
+
+ readme.gentoo_create_doc
+
+ docinto html
+ dodoc -r ${NV_DOC}/html/*
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+ local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
+ local nv_libdir="${NV_OBJ}"
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "x86" ]]; then
+ nv_libdir="${NV_OBJ}"/32
+ fi
+
+ if use X; then
+ NV_GLX_LIBRARIES=(
+ "libEGL.so.$( [[ ${ABI} == "amd64" ]] && usex compat ${NV_SOVER} 1.1.0 || echo 1.1.0) ${GL_ROOT}"
+ "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGL.so.1.7.0 ${GL_ROOT}"
+ "libGLESv1_CM.so.1.2.0 ${GL_ROOT}"
+ "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLESv2.so.2.1.0 ${GL_ROOT}"
+ "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLX.so.0 ${GL_ROOT}"
+ "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
+ "libGLdispatch.so.0 ${GL_ROOT}"
+ "libOpenCL.so.1.0.0 ${CL_ROOT}"
+ "libOpenGL.so.0 ${GL_ROOT}"
+ "libcuda.so.${NV_SOVER}"
+ "libnvcuvid.so.${NV_SOVER}"
+ "libnvidia-compiler.so.${NV_SOVER}"
+ "libnvidia-eglcore.so.${NV_SOVER}"
+ "libnvidia-encode.so.${NV_SOVER}"
+ "libnvidia-fatbinaryloader.so.${NV_SOVER}"
+ "libnvidia-fbc.so.${NV_SOVER}"
+ "libnvidia-glcore.so.${NV_SOVER}"
+ "libnvidia-glsi.so.${NV_SOVER}"
+ "libnvidia-glvkspirv.so.${NV_SOVER}"
+ "libnvidia-ifr.so.${NV_SOVER}"
+ "libnvidia-opencl.so.${NV_SOVER}"
+ "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
+ "libvdpau_nvidia.so.${NV_SOVER}"
+ )
+
+ if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-egl-wayland.so.1.1.3"
+ )
+ fi
+
+ if use kernel_FreeBSD; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux; then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-ml.so.${NV_SOVER}"
+ "libnvidia-tls.so.${NV_SOVER}"
+ )
+ fi
+
+ if use kernel_linux && has_multilib_profile && [[ ${ABI} == "amd64" ]];
+ then
+ NV_GLX_LIBRARIES+=(
+ "libnvidia-cbl.so.${NV_SOVER}"
+ "libnvidia-rtcore.so.${NV_SOVER}"
+ "libnvoptix.so.${NV_SOVER}"
+ )
+ fi
+
+ for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
+ donvidia "${nv_libdir}"/${NV_LIB}
+ done
+ fi
+}
+
+pkg_preinst() {
+ if use driver && use kernel_linux; then
+ linux-mod_pkg_preinst
+
+ local videogroup="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "${videogroup}" ]; then
+ eerror "Failed to determine the video group gid"
+ die "Failed to determine the video group gid"
+ else
+ sed -i \
+ -e "s:PACKAGE:${PF}:g" \
+ -e "s:VIDEOGID:${videogroup}:" \
+ "${D}"/etc/modprobe.d/nvidia.conf || die
+ fi
+ fi
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use driver && use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ readme.gentoo_print_elog
+
+ if ! use X; then
+ elog "You have elected to not install the X.org driver. Along with"
+ elog "this the OpenGL libraries and VDPAU libraries were not"
+ elog "installed. Additionally, once the driver is loaded your card"
+ elog "and fan will run at max speed which may not be desirable."
+ elog "Use the 'nvidia-smi' init script to have your card and fan"
+ elog "speed scale appropriately."
+ elog
+ fi
+ if ! use tools; then
+ elog "USE=tools controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. Optionally you can install"
+ elog "media-video/nvidia-settings"
+ elog
+ fi
+}
+
+pkg_prerm() {
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use driver && use kernel_linux && linux-mod_pkg_postrm
+ use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
diff --git a/x11-libs/vte/Manifest b/x11-libs/vte/Manifest
index ed66318..995d988 100644
--- a/x11-libs/vte/Manifest
+++ b/x11-libs/vte/Manifest
@@ -1,4 +1,9 @@
-AUX vte-0.30.1-alt-meta.patch 2490 RMD160 33e285f9288bf9f320e3e6d247b15abca20b55c0 SHA1 5f611947b0c7de2e21ab3f8f3f4387f32160e56a SHA256 31a46fee8fe59bd1d6df54bc502b608fe80da57bf3786e2dc6e9856a4e793ed6
-AUX vte-0.30.1-ds-mc.diff 1477 RMD160 3ea015dd3dec285f4acfa5b8ca75d3ece52b3c7d SHA1 ec9ec963d39599c07dcba927e6a202b82e05f3bc SHA256 01e56bf5a801ce641ff3873b34b01a073b6daf2ca4fb112801ad810a405f7418
-DIST vte-0.30.1.tar.xz 951688 RMD160 f4de2cf9a1fdeb583cb849eed3d231ae8450369c SHA1 e8d4894f3acb572519e59baf621856e7ffb3e1fa SHA256 bbe421de3015935c22f685eea0eb8be2c1fecd5021c1f822996b8f0a282f6b64
-EBUILD vte-0.30.1-r3.ebuild 1501 RMD160 dfa92453aa8059b76860247bff3aef2c652fcc33 SHA1 aa08a9b365cf35af440b105709ecfe4ef7a876ad SHA256 3ff50d644c744067e2498f7035f1f74ed66780015a587b965f65c1a4769321c3
+AUX 0.54.4-vala-0.44-compat.patch 883 BLAKE2B ecf653b7d37d731eace38d8bd1b52d9b6420fa46c67ce0090e0d0e2d4c48aa03f1951438db6bfe62a5e0094d080605d0cb51d71247d133307d47c98b6bd45f7a SHA512 9aa4961497931d7d18f7107b6101aa04dbbc034e45313272154e7e685166e565022e025e407ff56a95661e7c1bf135d68023ed0d513ceb0a6b6f83a43292d161
+AUX vte-0.30.1-alt-meta.patch 2490 BLAKE2B b5046bea09bb7fee5f03eaaa0c88f88a9e05c3d4f97fa8d6b4ecfbaec8a35bf1989c0461c1ec1d31e1b22c9d35688775a30f34134028bcd4fdcae1b7d40129c4 SHA512 69ed3038f3dcbbd09709667caff5692e4e11e30926bc7692cdbbdef2bb1ae4584ef64b824b5afcb3c57c237a3c0db4d9588ec36778d0994a546b1e6f74c2e430
+AUX vte-0.30.1-ds-mc.diff 1477 BLAKE2B 21d43cb4dda44f546936e37c2e59a750e8786efa539b2d42c538aa10998dd3395677ed6e71ccb72cc0361dbcb860cfd1e9efed875cfc8208a1b47cbc7c29e2d8 SHA512 f734e6ace70067f339a32ad1aff2021e964913be5e9ebf2359e46228877843346d7f4853c139343c9931509c74f07bd4179c665dc799831b37f92868dbc10767
+AUX vte-0.56.2-ds-mc.diff 2939 BLAKE2B f1f9e04f1811748587c9e09f1910a2db683a731509c28026a38a6959bcc52d220d713fd9a5addf3096ebcceaf2e46ab6fd4f58344dbf021d6f75ee2c4194ae86 SHA512 bb8be88ca0dd909c09e81fc8e11485da488a4c1875d7c9e82c129d6dbab884ee2de45a5ecbbbc4aa316822d278552875586e4d40acfe4131b4f25be2ee63bafb
+DIST vte-0.30.1.tar.xz 951688 BLAKE2B eb9ccec9f9b8757aaa7c8ead0e5aaebaa092fa3c89d5dfbc1fb13e3644baadce39bd50d2e2bcacc6b6c3b156bffad3b0a85e8342082d897a29755904cfd8736e SHA512 b7e601f207fe87c56826b093904a27f90e51e8992707d5978ec058fb91c1c790287af8bc2594b8149f4a69223cff2f2c73bf13a43507f4ac37df7c3faee69e60
+DIST vte-0.54.1-command-notify.patch.xz 3428 BLAKE2B 75b0c22720276300be2e49e8444aa68fed77fb7a6cc6b0e93a5c2d41257626bd60ff1084d68579769cb3d85e7ec567927591746de48e860b138d0c1f24f64cc7 SHA512 a53da569f8168c8e9e21e186dcfc00bf9fdb78a0c767ba35033c1c1e4f836406b4d9bf70ee3e071f6c749fd6f72101a6960d201617bd0bc23021e1eeaac6fd0c
+DIST vte-0.56.2.tar.xz 1099972 BLAKE2B 137d30b90ff8d955acb87b6262e171531c0720f102f8c07b4ee3758323bf7ff9f50b4032f5ebeee573b00a7836a78fa0d6fe0469b7e0deeeb27da94e6ee7e294 SHA512 8327a77abdfd97d7feda358e767046054ee24f9302c9187f2979e22c0034d4a6e9bf271fc327b866a43b404d7fe50ac36d1a4aebd58340744bdde24ecaa415ad
+EBUILD vte-0.30.1-r3.ebuild 1501 BLAKE2B f85e07c8881861da95f37d4aacbee0b229d8f3fafcfaad9841cfd66944cb03b4984644d06b7a1d3ea54279a27fcf8ef4da8db25703dd03ffab8c53e995e015ea SHA512 6639c6c3e2a6d65bdf76b2c9fd1e8908eb84b08290314c60c5df52b89f070adbed1ecb2b01dec91e4a0c7cf290ef2850d97878d46461362b69173df9adfbdfba
+EBUILD vte-0.56.2.ebuild 2444 BLAKE2B e59678d92461acace4c3c141887aa7e70f31e4319e4279f816758c3200e036914eaaab2bd2a80942ed0038746fcee42495239cc8e505fab9a6461f3e8f313346 SHA512 33c2f6763c8cea42f8e98de4ecfaf068f90094b702a2b756e40d7f1b842a4b329df0c2b5e31f26fd50be0ac8d7b67c9d9efaf0505dac00d952c64550b18f08b4
diff --git a/x11-libs/vte/files/0.54.4-vala-0.44-compat.patch b/x11-libs/vte/files/0.54.4-vala-0.44-compat.patch
new file mode 100644
index 0000000..5da32be
--- /dev/null
+++ b/x11-libs/vte/files/0.54.4-vala-0.44-compat.patch
@@ -0,0 +1,29 @@
+From 53690d5cee51bdb7c3f7680d3c22b316b1086f2c Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz@ubuntu.com>
+Date: Sat, 1 Dec 2018 19:04:59 +0100
+Subject: [PATCH] vala: Fix build with vala 0.43+ git master due to empty
+ struct definition
+
+This should get a proper refactoring as the FIXME suggests.
+
+See https://gitlab.gnome.org/GNOME/vte/issues/76
+---
+ bindings/vala/app.vala | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
+index 8663d63c..a534e76b 100644
+--- a/bindings/vala/app.vala
++++ b/bindings/vala/app.vala
+@@ -819,6 +819,8 @@ class App : Gtk.Application
+
+ public struct Options
+ {
++ //FIXME Merge this struct into App class
++ public int dummy;
+ public static bool audible = false;
+ public static string? command = null;
+ private static string? cjk_ambiguous_width_string = null;
+--
+2.20.1
+
diff --git a/x11-libs/vte/files/vte-0.56.2-ds-mc.diff b/x11-libs/vte/files/vte-0.56.2-ds-mc.diff
new file mode 100644
index 0000000..cfa411e
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.56.2-ds-mc.diff
@@ -0,0 +1,82 @@
+Description: DarkSoft mc patches
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ vte2.91 (0.56.2-1ubuntu1~19.04.1) disco; urgency=medium
+ .
+ * Backport bugfix release to disco (LP: #1827207)
+Author: Iain Lane <iain.lane@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1827207
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2019-07-07
+
+--- vte2.91-0.56.2.orig/ChangeLog
++++ vte2.91-0.56.2/ChangeLog
+@@ -1,3 +1,9 @@
++Author: Suren A. Chilingaryan <csa@suren.me>
++Date: Sun Jul 7 11:16:00 2019 +0200
++
++ mc integration
++
++
+ commit 9a079492ea698f573dfc7129f1c79e4a865803b4
+ Author: Christian Persch <chpe@src.gnome.org>
+ Date: Sat Apr 20 19:41:46 2019 +0200
+--- vte2.91-0.56.2.orig/src/vte.cc
++++ vte2.91-0.56.2/src/vte.cc
+@@ -4763,7 +4763,9 @@ Terminal::widget_key_press(GdkEventKey *
+ break;
+ case GDK_KEY_KP_Insert:
+ case GDK_KEY_Insert:
+- if (m_modifiers & GDK_SHIFT_MASK) {
++ //printf("%lx %s\n", modifiers, terminal->window_title);
++ if (strncmp(vte_terminal_get_window_title(m_terminal), "mc", 2)) {
++ if (m_modifiers & GDK_SHIFT_MASK) {
+ if (m_modifiers & GDK_CONTROL_MASK) {
+ emit_paste_clipboard();
+ handled = TRUE;
+@@ -4773,11 +4775,29 @@ Terminal::widget_key_press(GdkEventKey *
+ handled = TRUE;
+ suppress_meta_esc = TRUE;
+ }
+- } else if (m_modifiers & GDK_CONTROL_MASK) {
++ } else if (m_modifiers & GDK_CONTROL_MASK) {
+ emit_copy_clipboard();
+ handled = TRUE;
+ suppress_meta_esc = TRUE;
++ }
+ }
++
++ if ((m_modifiers & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
++ widget_paste(GDK_SELECTION_PRIMARY);
++ handled = TRUE;
++ suppress_meta_esc = TRUE;
++ } else if (m_modifiers & (GDK_MOD1_MASK|GDK_META_MASK|0x2000)) {
++ if (m_modifiers & GDK_CONTROL_MASK) {
++ emit_copy_clipboard();
++ handled = TRUE;
++ suppress_meta_esc = TRUE;
++ } else if (m_modifiers & GDK_SHIFT_MASK) {
++ widget_paste(GDK_SELECTION_PRIMARY);
++ handled = TRUE;
++ suppress_meta_esc = TRUE;
++ }
++ }
++
+ break;
+ /* Keypad/motion keys. */
+ case GDK_KEY_KP_Up:
diff --git a/x11-libs/vte/vte-0.56.2.ebuild b/x11-libs/vte/vte-0.56.2.ebuild
new file mode 100644
index 0000000..855df81
--- /dev/null
+++ b/x11-libs/vte/vte-0.56.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.32"
+
+inherit gnome2 vala
+
+DESCRIPTION="Library providing a virtual terminal emulator widget"
+HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/VTE"
+
+LICENSE="LGPL-2+"
+SLOT="2.91"
+IUSE="+crypt debug glade +introspection vala vanilla"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+REQUIRED_USE="vala? ( introspection )"
+
+SRC_URI="${SRC_URI} !vanilla? ( https://dev.gentoo.org/~leio/distfiles/${PN}-0.54.1-command-notify.patch.xz )"
+
+RDEPEND="
+ >=dev-libs/glib-2.40:2
+ >=dev-libs/libpcre2-10.21
+ >=x11-libs/gtk+-3.16:3[introspection?]
+ >=x11-libs/pango-1.22.0
+
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+
+ crypt? ( >=net-libs/gnutls-3.2.7:0= )
+ glade? ( >=dev-util/glade-3.9:3.10 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.0:= )
+"
+DEPEND="${RDEPEND}
+ dev-libs/libxml2:2
+ dev-util/glib-utils
+ >=dev-util/gtk-doc-am-1.13
+ >=dev-util/intltool-0.35
+ sys-devel/gettext
+ virtual/pkgconfig
+
+ vala? ( $(vala_depend) )
+"
+RDEPEND="${RDEPEND}
+ !x11-libs/vte:2.90[glade]
+"
+
+src_prepare() {
+ if ! use vanilla; then
+ # First half of http://pkgs.fedoraproject.org/cgit/rpms/vte291.git/tree/vte291-command-notify-scroll-speed.patch
+ # Adds OSC 777 support for desktop notifications in gnome-terminal or elsewhere
+ eapply "${WORKDIR}"/${PN}-0.54.1-command-notify.patch
+ fi
+
+ # Fix bindings test compilation with vala:0.44 and newer - https://gitlab.gnome.org/GNOME/vte/issues/76
+# eapply "${FILESDIR}"/0.54.4-vala-0.44-compat.patch
+#SDS
+ eapply "${FILESDIR}"/${PN}-0.56.2-ds-mc.diff || die
+#EDS
+
+ use vala && vala_src_prepare
+
+ # build fails because of -Werror with gcc-5.x
+ sed -e 's#-Werror=format=2#-Wformat=2#' -i configure || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf=""
+
+ if [[ ${CHOST} == *-interix* ]]; then
+ myconf="${myconf} --disable-Bsymbolic"
+
+ # interix stropts.h is empty...
+ export ac_cv_header_stropts_h=no
+ fi
+
+ gnome2_src_configure \
+ --disable-static \
+ --with-gtk=3.0 \
+ --with-iconv \
+ $(use_enable debug) \
+ $(use_enable glade glade-catalogue) \
+ $(use_with crypt gnutls) \
+ $(use_enable introspection) \
+ $(use_enable vala) \
+ ${myconf}
+}
+
+src_install() {
+ gnome2_src_install
+ mv "${ED}"/etc/profile.d/vte{,-${SLOT}}.sh || die
+}