sci-misc/boinc: Simplify the init script

It is no longer neccessary to maintain CUDA/OpenCL symlinks.

[ flow: remove sed which became effectless ]

Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Modified-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Sven Eden
2022-07-27 13:41:27 +02:00
committed by Florian Schmaus
parent 237775050e
commit b19f0b8c64
3 changed files with 0 additions and 51 deletions

View File

@@ -161,7 +161,6 @@ src_install() {
rm -r "${ED}"/etc || die "rm failed"
find "${D}" -name '*.la' -delete || die "Removing .la files failed"
sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.init.in > ${PN}.init || die
newinitd ${PN}.init ${PN}
newconfd "${FILESDIR}"/${PN}.conf ${PN}
}

View File

@@ -164,7 +164,6 @@ src_install() {
rm -r "${ED}"/etc || die "rm failed"
find "${D}" -name '*.la' -delete || die "Removing .la files failed"
sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.init.in > ${PN}.init || die
newinitd ${PN}.init ${PN}
newconfd "${FILESDIR}"/${PN}.conf ${PN}
}

View File

@@ -41,53 +41,6 @@ create_work_directory() {
return 0
}
fix_lib_symlinks() {
local src="$1"
local tgt="$2"
# If the source does not exist, we can not do anything
if [ ! -f "${src}" ] ; then
return 1
fi
# Check whether the symlink is already there and in order
if [ -L "${tgt}" ] ; then
if [ -f "${tgt}" ] ; then
return 0
fi
# Remove broken symlink
if ! rm -f "${tgt}"; then
eerror "Removing '${tgt}' failed!"
return 1
fi
fi
# symlink the correct path
if ! ln -snf "${src}" "${tgt}"; then
eerror "Symlinking '${src}' to '${tgt}' failed!"
return 1
fi
return 0
}
cuda_check() {
local libsource="/opt/cuda/@libdir@/libcudart.so"
local libtarget="${RUNTIMEDIR}/libcudart.so"
fix_lib_symlinks "${libsource}" "${libtarget}" || return 1
return 0
}
opencl_check() {
local libsource="/usr/@libdir@/libOpenCL.so"
local libtarget="${RUNTIMEDIR}/libOpenCL.so"
fix_lib_symlinks "${libsource}" "${libtarget}" || return 1
return 0
}
env_check() {
# Make sure the configuration is sane
: ${USER:="boinc"}
@@ -120,8 +73,6 @@ env_check() {
start_pre() {
env_check || return 1
create_work_directory || return 1
cuda_check || einfo "CUDA not supported"
opencl_check || einfo "OpenCL not supported"
if [ ! -f "${RUNTIMEDIR}/lockfile" ]; then
einfo "File \"${RUNTIMEDIR}/lockfile\" does not exist, assuming first run."