mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
sci-electronics/ngspice: rev bump to address several QA issues
Closes: https://bugs.gentoo.org/699292 Closes: https://bugs.gentoo.org/699280 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
This commit is contained in:
@@ -48,6 +48,8 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use tcl; then
|
||||
if use examples; then
|
||||
find examples/tclspice -type f -iname \*tcl -or -iname \*.sh |
|
||||
@@ -61,7 +63,6 @@ src_prepare() {
|
||||
fi
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
eautoreconf
|
||||
multibuild_copy_sources
|
||||
}
|
||||
@@ -71,53 +72,62 @@ src_configure() {
|
||||
}
|
||||
|
||||
ngspice_configure() {
|
||||
pushd "${BUILD_DIR}"
|
||||
local myeconfargs
|
||||
|
||||
pushd "${BUILD_DIR}" &>/dev/null || die
|
||||
|
||||
local myconf
|
||||
if use debug; then
|
||||
myconf="--enable-debug \
|
||||
--enable-ftedebug \
|
||||
--enable-cpdebug \
|
||||
--enable-sensdebug \
|
||||
--enable-asdebug \
|
||||
--enable-stepdebug \
|
||||
--enable-pzdebug"
|
||||
myeconfargs=(
|
||||
--enable-debug
|
||||
--enable-ftedebug
|
||||
--enable-cpdebug
|
||||
--enable-sensdebug
|
||||
--enable-asdebug
|
||||
--enable-stepdebug
|
||||
--enable-pzdebug
|
||||
)
|
||||
else
|
||||
myconf="--disable-debug \
|
||||
--disable-ftedebug \
|
||||
--disable-cpdebug \
|
||||
--disable-sensdebug \
|
||||
--disable-asdebug \
|
||||
--disable-stepdebug \
|
||||
--disable-pzdebug"
|
||||
myeconfargs=(
|
||||
--disable-debug
|
||||
--disable-ftedebug
|
||||
--disable-cpdebug
|
||||
--disable-sensdebug
|
||||
--disable-asdebug
|
||||
--disable-stepdebug
|
||||
--disable-pzdebug
|
||||
)
|
||||
fi
|
||||
|
||||
# As of December 2017, these do not compile
|
||||
myconf="${myconf} \
|
||||
--disable-blktmsdebug \
|
||||
--disable-smltmsdebug"
|
||||
myeconfargs+=(
|
||||
--disable-blktmsdebug
|
||||
--disable-smltmsdebug
|
||||
)
|
||||
|
||||
myconf="${myconf} \
|
||||
--enable-xspice \
|
||||
--enable-cider \
|
||||
--disable-dependency-tracking \
|
||||
--disable-rpath \
|
||||
$(use_enable openmp) \
|
||||
$(use_with fftw fftw3) \
|
||||
$(use_with readline)"
|
||||
myeconfargs+=(
|
||||
--enable-xspice
|
||||
--enable-cider
|
||||
--disable-dependency-tracking
|
||||
--disable-rpath
|
||||
$(use_enable openmp)
|
||||
$(use_with fftw fftw3)
|
||||
$(use_with readline)
|
||||
)
|
||||
|
||||
if [ "${MULTIBUILD_VARIANT}" == "shared" ]; then
|
||||
myconf="${myconf} \
|
||||
--with-ngshared"
|
||||
elif [ "${MULTIBUILD_VARIANT}" == "tcl" ]; then
|
||||
myconf="${myconf} \
|
||||
--with-tcl"
|
||||
if [[ "${MULTIBUILD_VARIANT}" == "shared" ]]; then
|
||||
myeconfargs+=( --with-ngshared )
|
||||
elif [[ "${MULTIBUILD_VARIANT}" == "tcl" ]]; then
|
||||
myeconfargs+=( --with-tcl="${EPREFIX}/usr/$(get_libdir)" )
|
||||
else
|
||||
myconf="${myconf} \
|
||||
$(use_enable deprecated oldapps) \
|
||||
$(use_with X x)"
|
||||
myeconfargs+=(
|
||||
$(use_enable deprecated oldapps)
|
||||
$(use_with X x)
|
||||
)
|
||||
fi
|
||||
|
||||
econf ${myconf}
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
popd &>/dev/null || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
@@ -125,18 +135,20 @@ src_compile() {
|
||||
}
|
||||
|
||||
ngspice_compile() {
|
||||
pushd "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}" &>/dev/null || die
|
||||
default
|
||||
popd &>/dev/null || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant ngspice_install
|
||||
|
||||
# merge the installations of all variants
|
||||
local v
|
||||
for v in "${MULTIBUILD_VARIANTS[@]}" ; do
|
||||
cp -a "${D}_${v}"/* "${D}" || die "Failed to combine multibuild installations"
|
||||
rm -rf "${D}_${v}"
|
||||
cp -a "${ED}/tmp/${v}"/* "${ED}" || die "Failed to combine multibuild installations"
|
||||
done
|
||||
rm -rf "${ED}/tmp" || die
|
||||
|
||||
use tcl && DOCS+=( README.tcl )
|
||||
use shared && DOCS+=( README.shared-xspice )
|
||||
@@ -145,7 +157,9 @@ src_install() {
|
||||
default
|
||||
|
||||
if use examples; then
|
||||
use tcl || rm -rf examples/tclspice
|
||||
if ! use tcl; then
|
||||
rm -rf examples/tclspice || die
|
||||
fi
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r examples
|
||||
@@ -153,26 +167,28 @@ src_install() {
|
||||
}
|
||||
|
||||
ngspice_install() {
|
||||
pushd "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}" &>/dev/null || die
|
||||
|
||||
emake DESTDIR="${D}_${MULTIBUILD_VARIANT}" install
|
||||
emake DESTDIR="${ED}/tmp/${MULTIBUILD_VARIANT}" install
|
||||
|
||||
# Strip shared-library and Tcl-module builds to the bare minimum;
|
||||
# all the support files will have been handled by the 'binaries' build.
|
||||
if [ "${MULTIBUILD_VARIANT}" != "binaries" ]; then
|
||||
rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/bin{,.debug}
|
||||
rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/share
|
||||
rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la
|
||||
rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug}
|
||||
if [[ "${MULTIBUILD_VARIANT}" != "binaries" ]]; then
|
||||
rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/bin{,.debug} || die
|
||||
rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/share || die
|
||||
rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la || die
|
||||
rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug} || die
|
||||
fi
|
||||
|
||||
popd &>/dev/null || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! use debug; then
|
||||
# tests can be only executed for the binaries variant
|
||||
pushd "${WORKDIR}/${P}-binaries"
|
||||
pushd "${WORKDIR}/${P}-binaries" &>/dev/null || die
|
||||
virtx default
|
||||
popd
|
||||
popd &>/dev/null || die
|
||||
else
|
||||
# https://sourceforge.net/p/ngspice/bugs/353/
|
||||
ewarn
|
||||
Reference in New Issue
Block a user