summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/lldb/lldb-12.0.1.ebuild2
-rw-r--r--dev-util/nvidia-cuda-toolkit/Manifest1
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.2.ebuild252
-rw-r--r--dev-util/plan9port/Manifest2
-rw-r--r--dev-util/plan9port/files/plan9port-noexecstack.patch35
-rw-r--r--dev-util/plan9port/metadata.xml3
-rw-r--r--dev-util/plan9port/plan9port-0_pre20210321.ebuild (renamed from dev-util/plan9port/plan9port-0_pre20200526.ebuild)32
-rw-r--r--dev-util/plan9port/plan9port-9999.ebuild126
8 files changed, 280 insertions, 173 deletions
diff --git a/dev-util/lldb/lldb-12.0.1.ebuild b/dev-util/lldb/lldb-12.0.1.ebuild
index 3a7e6aeefe20..0193002eee6f 100644
--- a/dev-util/lldb/lldb-12.0.1.ebuild
+++ b/dev-util/lldb/lldb-12.0.1.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm arm64 ~x86"
IUSE="+libedit lzma ncurses +python test"
REQUIRED_USE=${PYTHON_REQUIRED_USE}
RESTRICT="test"
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
index 1d6709e8f539..0afbfad0db53 100644
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ b/dev-util/nvidia-cuda-toolkit/Manifest
@@ -4,3 +4,4 @@ DIST cuda_11.2.2_460.32.03_linux.run 3057439068 BLAKE2B c3f3cd9eaaa4f91eb8080e7c
DIST cuda_11.3.1_465.19.01_linux.run 3158494112 BLAKE2B 0316c6a9bf062f2503c94604b51dea9a8d19c516e304e43ccdbc79f305a242664b7f029f7b7086edd7adc37d92a3bae074f005b3be412e1361917794cb824686 SHA512 e2db8b4dcb5f6aee2c3e8a8a6848186cdcdd7cd9d5f4bfd069bd3dc2ea500797c66a4592f0e28dcbee6c3611d1f88b6fda6afcd734aa9ef45f4aa17a1527aedb
DIST cuda_11.4.0_470.42.01_linux.run 3773273383 BLAKE2B 2e466728b6ca9d17dc3caadce13b58c8ba1464c2adeb09739f428aea96f5794c87bf84ca2b81c1019d45223ff5e519503d798032a800a370c7e41517d790f5c4 SHA512 17165102e7f64da77588fd47feeee5ce3f3151a2b482bdc005427ad77ada5d0ff5a51dcd40a27a467cd5988968469476ba90b0191aed993806d284833a08ccb1
DIST cuda_11.4.1_470.57.02_linux.run 3796641626 BLAKE2B da6a454bb1765833af8c01f2106a1e0f3e33a6a91354a527006fd0335655872b499bb51662c8e224437368ee37c3bf15f0cf0c4bccc02750e46480ceb6b84677 SHA512 a7a2415e6a0ce6a841e15fccc5c6126d8f134ebb7045e11e49d136aed264c236b91cc959320f763d0d7d878d9d83e09310a51c0ac30c926007dae07242a952de
+DIST cuda_11.4.2_470.57.02_linux.run 3833993301 BLAKE2B b12710da9f31e3255f31dd6b0dab8545463983a4cd1c4432bea027d4e5cc4d1ad9183e09b70ac4ea19c7d3e959df0d19bb41ea896d726e877fd3917a3045a9a4 SHA512 50c80141bfe458aa7216173d9d548f25ade03c68fff59ffe63f842773e5afba7635fb8fd79eda416507e1e88b5fe28b39ac8bdc66b168c73a72995824af5c689
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.2.ebuild
new file mode 100644
index 000000000000..c929782ee396
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.2.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs toolchain-funcs unpacker
+
+DRIVER_PV="470.57.02"
+
+DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
+HOMEPAGE="https://developer.nvidia.com/cuda-zone"
+SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run"
+S="${WORKDIR}"
+
+LICENSE="NVIDIA-CUDA"
+SLOT="0/${PV}"
+KEYWORDS="-* ~amd64 ~amd64-linux"
+IUSE="debugger nsight profiler vis-profiler sanitizer"
+RESTRICT="bindist mirror"
+
+BDEPEND=""
+RDEPEND="
+ <sys-devel/gcc-12_pre[cxx]
+ >=x11-drivers/nvidia-drivers-${DRIVER_PV}
+ debugger? (
+ dev-libs/openssl
+ sys-libs/libtermcap-compat
+ sys-libs/ncurses-compat:5[tinfo]
+ )
+ vis-profiler? (
+ dev-libs/openssl
+ >=virtual/jre-1.8:*
+ )"
+
+QA_PREBUILT="opt/cuda/*"
+CHECKREQS_DISK_BUILD="6800M"
+
+pkg_setup() {
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ # ATTENTION: change requires revbump
+ local cuda_supported_gcc="8.5 9.4 9.5 10.3 10.4 11.1 11.2 11.3"
+
+ sed \
+ -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
+ "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
+
+ default
+}
+
+src_install() {
+ local cudadir=/opt/cuda
+ local ecudadir="${EPREFIX}${cudadir}"
+ local pathextradirs ldpathextradirs
+ dodir ${cudadir}
+ into ${cudadir}
+
+ # Install standard sub packages
+ local builddirs=(
+ builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust}
+ builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg}
+ $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "")
+ $(usex vis-profiler "builds/cuda_nvvp" "")
+ $(usex debugger "builds/cuda_gdb" "")
+ )
+
+ local d f
+ for d in "${builddirs[@]}"; do
+ ebegin "Installing ${d}"
+ [[ -d ${d} ]] || die "Directory does not exist: ${d}"
+
+ if [[ -d ${d}/bin ]]; then
+ for f in ${d}/bin/*; do
+ if [[ -f ${f} ]]; then
+ dobin "${f}"
+ else
+ insinto ${cudadir}/bin
+ doins -r "${f}"
+ fi
+ done
+ fi
+
+ insinto ${cudadir}
+ if [[ -d ${d}/targets ]]; then
+ doins -r "${d}"/targets
+ fi
+ if [[ -d ${d}/share ]]; then
+ doins -r "${d}"/share
+ fi
+ if [[ -d ${d}/extras ]]; then
+ doins -r "${d}"/extras
+ fi
+ eend
+ done
+ dobin "${T}"/cuda-config
+
+ doins builds/EULA.txt
+ # nvml and nvvm need special handling
+ ebegin "Installing nvvm"
+ doins -r builds/cuda_nvcc/nvvm
+ fperms +x ${cudadir}/nvvm/bin/cicc
+ eend
+
+ ebegin "Installing nvml"
+ doins -r builds/cuda_nvml_dev/nvml
+ eend
+
+ if use sanitizer; then
+ ebegin "Installing sanitizer"
+ dobin builds/integration/Sanitizer/compute-sanitizer
+ doins -r builds/cuda_sanitizer_api/compute-sanitizer
+ # special handling for the executable
+ fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer
+ eend
+ fi
+
+ use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64"
+
+ if use vis-profiler; then
+ ebegin "Installing libnvvp"
+ doins -r builds/cuda_nvvp/libnvvp
+ # special handling for the executable
+ fperms +x ${cudadir}/libnvvp/nvvp
+ eend
+ pathextradirs+=":${ecudadir}/libnvvp"
+ fi
+
+ if use nsight; then
+ local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
+ ebegin "Installing ${ncu_dir}"
+ mv builds/nsight_compute builds/${ncu_dir} || die
+ doins -r builds/${ncu_dir}
+
+ # check this list on every bump
+ local exes=(
+ ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess
+ ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter
+ ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui
+ ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin
+ ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper
+ ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper
+ ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu
+ )
+
+ dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli}
+ eend
+
+ local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
+ ebegin "Installing ${nsys_dir}"
+ mv builds/nsight_systems builds/${nsys_dir} || die
+ doins -r builds/${nsys_dir}
+
+ # check this list on every bump
+ exes+=(
+ ${nsys_dir}/host-linux-x64/nsys-ui
+ ${nsys_dir}/host-linux-x64/nsys-ui.bin
+ ${nsys_dir}/host-linux-x64/ResolveSymbols
+ ${nsys_dir}/host-linux-x64/ImportNvtxt
+ ${nsys_dir}/host-linux-x64/CrashReporter
+ ${nsys_dir}/host-linux-x64/QdstrmImporter
+ ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess
+ ${nsys_dir}/target-linux-x64/nsys
+ ${nsys_dir}/target-linux-x64/launcher
+ ${nsys_dir}/target-linux-x64/nvgpucs
+ ${nsys_dir}/target-linux-x64/nsys-launcher
+ ${nsys_dir}/target-linux-x64/sqlite3
+ ${nsys_dir}/target-linux-x64/python/bin/python
+ )
+
+ dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui}
+ eend
+
+ # nsight scripts and binaries need to have their executable bit set, #691284
+ for f in "${exes[@]}"; do
+ fperms +x ${cudadir}/${f}
+ done
+
+ # remove foreign archs (triggers SONAME warning, #749903)
+ rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die
+ rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die
+ rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die
+
+ # TODO: unbundle qt5
+ # TODO: unbundle boost
+ # TODO: unbundle icu
+ # TODO: unbundle openssl
+ # TODO: unbundle mesa
+ # TODO: unbundle libz
+ # TODO: unbundle libstdc++
+ # TODO: unbundle libSshClient
+ # TODO: unbundle sqlite
+ # TODO: unbundle libpfm ?
+ fi
+
+ # Add include and lib symlinks
+ dosym targets/x86_64-linux/include ${cudadir}/include
+ dosym targets/x86_64-linux/lib ${cudadir}/lib64
+
+ newenvd - 99cuda <<-EOF
+ PATH=${ecudadir}/bin${pathextradirs}
+ ROOTPATH=${ecudadir}/bin
+ LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs}
+ EOF
+
+ # Cuda prepackages libraries, don't revdep-build on them
+ insinto /etc/revdep-rebuild
+ newins - 80${PN} <<-EOF
+ SEARCH_DIRS_MASK="${ecudadir}"
+ EOF
+ # TODO: Add pkgconfig files for installed libraries
+}
+
+pkg_postinst_check() {
+ local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)"
+ local b="0.0"
+ local v
+ for v in ${a}; do
+ ver_test "${v}" -gt "${b}" && b="${v}"
+ done
+
+ # if gcc and if not gcc-version is at least greatest supported
+ if tc-is-gcc && \
+ ver_test $(gcc-version) -gt "${b}"; then
+ ewarn
+ ewarn "gcc > ${b} will not work with CUDA"
+ ewarn "Make sure you set an earlier version of gcc with gcc-config"
+ ewarn "or append --compiler-bindir= pointing to a gcc bindir like"
+ ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
+ ewarn "to the nvcc compiler flags"
+ ewarn
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ pkg_postinst_check
+ fi
+
+ if use profiler || use nsight; then
+ einfo
+ einfo "nvidia-drivers restrict access to performance counters."
+ einfo "You'll need to either run profiling tools (nvprof, nsight) "
+ einfo "using sudo (needs cap SYS_ADMIN) or add the following line to "
+ einfo "a modprobe configuration file "
+ einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): "
+ einfo
+ einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0"
+ einfo
+ fi
+}
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
index 09b8c7cbe5fa..26110d5f298a 100644
--- a/dev-util/plan9port/Manifest
+++ b/dev-util/plan9port/Manifest
@@ -1 +1 @@
-DIST plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.tar.gz 23445647 BLAKE2B 4cb0f08fc404c5618c4be0d7e5710e6a8a32fbe010d28a879b1f9575118256492a3ed2b9b744c35dbbb6c6deae405c05fd7b6606254fb94fc2b40b3a8d14fa71 SHA512 4d9f6ce66d3eebb311cbbb0ec27c01d99cc0e19c6ac8a1c511ff00070c085a349b637048cd0066240af975e90f527388dbeba58f4591bf7dcaa673ee5564430f
+DIST plan9port-88a87fadae6629932d9c160f53ad5d79775f8f94.tar.gz 23413373 BLAKE2B 6145dd77c9e4b33ebc6d68f42ed69e320e8bfcaae474a16afb3a62e30c13a39117d7013f3cc075eb48c95a5600c4fdb457e45f65f7b25ad2acc7b19dc9cf8e64 SHA512 f008969274e790238b58ebd0d0dcfaa730557daf974797f8c4014c36ac39995b330db9c6d658655358fdb2be64905b83c35e2287b7cd66b2d3249e1da1a3e119
diff --git a/dev-util/plan9port/files/plan9port-noexecstack.patch b/dev-util/plan9port/files/plan9port-noexecstack.patch
index aff60d07a989..20aecce2515a 100644
--- a/dev-util/plan9port/files/plan9port-noexecstack.patch
+++ b/dev-util/plan9port/files/plan9port-noexecstack.patch
@@ -3,44 +3,9 @@ Remove unneeded executable stack
Assembly routines in libthread and libmp use an executable stack by
default. This is not needed and can be removed using --noexecstack.
-The plan9port 9a wrapper wrapper needs to be modified to pass flags to the
-underlying assembler first though..
-
Patch by Andy Spencer
http://code.swtch.com/plan9port/issue/76/
---- a/bin/9a
-+++ b/bin/9a
-@@ -1,10 +1,5 @@
- #!/bin/sh
-
--if [ $# != 1 ]; then
-- echo 'usage: 9a file.s' 1>&2
-- exit 1
--fi
--
- test -f $PLAN9/config && . $PLAN9/config
-
- aflags=""
-@@ -17,5 +12,16 @@
- ;;
- esac
-
--out=`echo $1 | sed 's/\.s$//;s/$/.o/'`
--exec as $aflags -o $out $1
-+for arg; do
-+ case $arg in
-+ -*)
-+ opts="$opts $arg"
-+ ;;
-+ *.s)
-+ src=$arg
-+ dst=$(echo $arg | sed 's/\.s/\.o/')
-+ ;;
-+ esac
-+done
-+
-+exec as $aflags $opts -o $dst $src
--- a/src/mkhdr
+++ b/src/mkhdr
@@ -13,7 +13,7 @@
diff --git a/dev-util/plan9port/metadata.xml b/dev-util/plan9port/metadata.xml
index 55972715d554..88a2007180f5 100644
--- a/dev-util/plan9port/metadata.xml
+++ b/dev-util/plan9port/metadata.xml
@@ -10,5 +10,8 @@
environment - also know as Plan 9 from User Space.
</longdescription>
+ <use>
+ <flag name="freefonts">Don't install BigelowHolmes fonts</flag>
+ </use>
<origin>gentoo-staging</origin>
</pkgmetadata> \ No newline at end of file
diff --git a/dev-util/plan9port/plan9port-0_pre20200526.ebuild b/dev-util/plan9port/plan9port-0_pre20210321.ebuild
index dff9e3605a98..4b5f80a4b8b6 100644
--- a/dev-util/plan9port/plan9port-0_pre20200526.ebuild
+++ b/dev-util/plan9port/plan9port-0_pre20210321.ebuild
@@ -1,22 +1,25 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multiprocessing toolchain-funcs readme.gentoo-r1
-MY_HASH="a6ad39aaaa36b8aadc5c35bfc803afbde32918c0"
+MY_HASH="88a87fadae6629932d9c160f53ad5d79775f8f94"
MY_P="${PN}-${MY_HASH}"
DESCRIPTION="Port of many Plan 9 programs and libraries"
HOMEPAGE="https://9fans.github.io/plan9port/
https://github.com/9fans/plan9port"
SRC_URI="https://github.com/9fans/${PN}/archive/${MY_HASH}.tar.gz -> ${MY_P}.tar.gz"
-
-LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+S="${WORKDIR}/${MY_P}"
+LICENSE="
+ MIT RSA Apache-2.0 public-domain BitstreamVera BZIP2
+ !freefonts? ( BigelowHolmes )
+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="X aqua truetype"
+IUSE="X aqua freefonts truetype"
REQUIRED_USE="?? ( X aqua )"
DEPEND="
@@ -34,8 +37,6 @@ PATCHES=(
"${FILESDIR}/${PN}-builderr.patch"
)
-S="${WORKDIR}/${MY_P}"
-
PLAN9="/opt/plan9"
EPLAN9="${EPREFIX}${PLAN9}"
QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
@@ -56,10 +57,19 @@ DISABLE_AUTOFORMATTING="yes"
src_prepare() {
default
+ if use freefonts; then
+ pushd font || die
+ rm -r big5 fixed jis luc{,m,sans} misc naga10 pelm shinonome || die
+ popd || die
+ rm -r postscript/font/luxi || die
+ fi
+
case "${CHOST}" in
- *apple*)
- sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
- die "Failed to sed AFLAGS" ;;
+ *apple*)
+ sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
+ die "Failed to sed AFLAGS" ;;
+ *)
+ rm -rf mac || die
esac
# don't hardcode /bin and /usr/bin in PATH
@@ -114,6 +124,8 @@ src_compile() {
src_install() {
readme.gentoo_create_doc
+ rm -rf src || die
+
# do* plays with the executable bit, and we should not modify them
dodir "${PLAN9}"
cp -a * "${ED}${PLAN9}" || die "cp failed"
diff --git a/dev-util/plan9port/plan9port-9999.ebuild b/dev-util/plan9port/plan9port-9999.ebuild
deleted file mode 100644
index 4c1e286476b1..000000000000
--- a/dev-util/plan9port/plan9port-9999.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multiprocessing toolchain-funcs git-r3 readme.gentoo-r1
-
-DESCRIPTION="Port of many Plan 9 programs and libraries"
-HOMEPAGE="https://9fans.github.io/plan9port/
- https://github.com/9fans/plan9port"
-EGIT_REPO_URI="https://github.com/9fans/${PN}.git"
-
-LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
-SLOT="0"
-IUSE="X aqua truetype"
-REQUIRED_USE="?? ( X aqua )"
-
-DEPEND="
- X? ( x11-apps/xauth )
- truetype? (
- media-libs/freetype
- media-libs/fontconfig
- )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-noexecstack.patch"
- "${FILESDIR}/${PN}-cflags.patch"
- "${FILESDIR}/${PN}-builderr.patch"
-)
-
-PLAN9="/opt/plan9"
-EPLAN9="${EPREFIX}${PLAN9}"
-QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
-
-DOC_CONTENTS="Plan 9 from User Space has been successfully installed into
-${PLAN9}. Your PLAN9 and PATH environment variables have
-also been appropriately set, please use env-update and
-source /etc/profile to bring that into immediate effect.
-
-Please note that ${PLAN9}/bin has been appended to the
-*end* or your PATH to prevent conflicts. To use the Plan9
-versions of common UNIX tools, use the absolute path:
-${PLAN9}/bin or the 9 command (eg: 9 troff)
-
-Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
-DISABLE_AUTOFORMATTING="yes"
-
-src_prepare() {
- default
-
- case "${CHOST}" in
- *apple*)
- sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
- die "Failed to sed AFLAGS" ;;
- esac
-
- # don't hardcode /bin and /usr/bin in PATH
- sed -i '/PATH/s,/bin:/usr/bin:,,' INSTALL || die "sed on INSTALL failed"
-
- # don't hardcode /usr/{,local/}include and prefix /usr/include/*
- sed -Ei -e 's,-I/usr(|/local)/include ,,g' \
- -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" \
- src/cmd/fontsrv/freetyperules.sh INSTALL $(find -name makefile) ||
- die "sed failed"
-
- # Fix paths, done in place of ./INSTALL -c
- einfo "Fixing hard-coded /usr/local/plan9 paths"
- sed -i "s,/usr/local/plan9,${EPLAN9},g" $(grep -lr /usr/local/plan9) ||
- die "sed failed"
-}
-
-src_configure() {
- local -a myconf=(
- CC9="$(tc-getCC)"
- CC9FLAGS="'${CFLAGS} ${LDFLAGS}'"
- )
-
- if use X; then
- myconf+=( WSYSTYPE=x11 )
- elif use aqua; then
- local wsystype="$(awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}' \
- <<< "${MACOSX_DEPLOYMENT_TARGET}")"
- myconf+=( WSYSTYPE="${wsystype}" )
- else
- myconf+=( WSYSTYPE=nowsys )
- fi
-
- if use truetype; then
- myconf+=( FONTSRV=fontsrv )
- else
- myconf+=( FONTSRV= )
- fi
-
- printf '%s\n' "${myconf[@]}" >> LOCAL.config ||
- die "cannot create configuration"
-}
-
-src_compile() {
- # The INSTALL script builds mk then [re]builds everything using that
- einfo "Compiling Plan 9 from User Space can take a very long time"
- einfo "depending on the speed of your computer. Please be patient!"
- NPROC="$(makeopts_jobs)" ./INSTALL -b ||
- die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
-}
-
-src_install() {
- readme.gentoo_create_doc
-
- # do* plays with the executable bit, and we should not modify them
- dodir "${PLAN9}"
- cp -a * "${ED}${PLAN9}" || die "cp failed"
-
- # build the environment variables and install them in env.d
- newenvd - 60plan9 <<-EOF
- PLAN9="${EPLAN9}"
- PATH="${EPLAN9}/bin"
- ROOTPATH="${EPLAN9}/bin"
- MANPATH="${EPLAN9}/man"
- EOF
-}
-
-pkg_postinst() {
- readme.gentoo_print_elog
-}