Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/ngspice/
Date: Mon, 04 Nov 2019 19:10:22
Message-Id: 1572894596.2a4e51b6503983e26e91c51df2bd0d0284ccc74b.whissi@gentoo
1 commit: 2a4e51b6503983e26e91c51df2bd0d0284ccc74b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 4 18:45:25 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 4 19:09:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a4e51b6
7
8 sci-electronics/ngspice: rev bump to address several QA issues
9
10 Closes: https://bugs.gentoo.org/699292
11 Closes: https://bugs.gentoo.org/699280
12 Package-Manager: Portage-2.3.78, Repoman-2.3.17
13 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
14
15 .../{ngspice-31.ebuild => ngspice-31-r1.ebuild} | 122 ++++++++++++---------
16 1 file changed, 69 insertions(+), 53 deletions(-)
17
18 diff --git a/sci-electronics/ngspice/ngspice-31.ebuild b/sci-electronics/ngspice/ngspice-31-r1.ebuild
19 similarity index 59%
20 rename from sci-electronics/ngspice/ngspice-31.ebuild
21 rename to sci-electronics/ngspice/ngspice-31-r1.ebuild
22 index d51fbae4f13..e5e3414ba86 100644
23 --- a/sci-electronics/ngspice/ngspice-31.ebuild
24 +++ b/sci-electronics/ngspice/ngspice-31-r1.ebuild
25 @@ -48,6 +48,8 @@ pkg_setup() {
26 }
27
28 src_prepare() {
29 + default
30 +
31 if use tcl; then
32 if use examples; then
33 find examples/tclspice -type f -iname \*tcl -or -iname \*.sh |
34 @@ -61,7 +63,6 @@ src_prepare() {
35 fi
36 fi
37
38 - eapply_user
39 eautoreconf
40 multibuild_copy_sources
41 }
42 @@ -71,53 +72,62 @@ src_configure() {
43 }
44
45 ngspice_configure() {
46 - pushd "${BUILD_DIR}"
47 + local myeconfargs
48 +
49 + pushd "${BUILD_DIR}" &>/dev/null || die
50
51 - local myconf
52 if use debug; then
53 - myconf="--enable-debug \
54 - --enable-ftedebug \
55 - --enable-cpdebug \
56 - --enable-sensdebug \
57 - --enable-asdebug \
58 - --enable-stepdebug \
59 - --enable-pzdebug"
60 + myeconfargs=(
61 + --enable-debug
62 + --enable-ftedebug
63 + --enable-cpdebug
64 + --enable-sensdebug
65 + --enable-asdebug
66 + --enable-stepdebug
67 + --enable-pzdebug
68 + )
69 else
70 - myconf="--disable-debug \
71 - --disable-ftedebug \
72 - --disable-cpdebug \
73 - --disable-sensdebug \
74 - --disable-asdebug \
75 - --disable-stepdebug \
76 - --disable-pzdebug"
77 + myeconfargs=(
78 + --disable-debug
79 + --disable-ftedebug
80 + --disable-cpdebug
81 + --disable-sensdebug
82 + --disable-asdebug
83 + --disable-stepdebug
84 + --disable-pzdebug
85 + )
86 fi
87 +
88 # As of December 2017, these do not compile
89 - myconf="${myconf} \
90 - --disable-blktmsdebug \
91 - --disable-smltmsdebug"
92 -
93 - myconf="${myconf} \
94 - --enable-xspice \
95 - --enable-cider \
96 - --disable-dependency-tracking \
97 - --disable-rpath \
98 - $(use_enable openmp) \
99 - $(use_with fftw fftw3) \
100 - $(use_with readline)"
101 -
102 - if [ "${MULTIBUILD_VARIANT}" == "shared" ]; then
103 - myconf="${myconf} \
104 - --with-ngshared"
105 - elif [ "${MULTIBUILD_VARIANT}" == "tcl" ]; then
106 - myconf="${myconf} \
107 - --with-tcl"
108 + myeconfargs+=(
109 + --disable-blktmsdebug
110 + --disable-smltmsdebug
111 + )
112 +
113 + myeconfargs+=(
114 + --enable-xspice
115 + --enable-cider
116 + --disable-dependency-tracking
117 + --disable-rpath
118 + $(use_enable openmp)
119 + $(use_with fftw fftw3)
120 + $(use_with readline)
121 + )
122 +
123 + if [[ "${MULTIBUILD_VARIANT}" == "shared" ]]; then
124 + myeconfargs+=( --with-ngshared )
125 + elif [[ "${MULTIBUILD_VARIANT}" == "tcl" ]]; then
126 + myeconfargs+=( --with-tcl="${EPREFIX}/usr/$(get_libdir)" )
127 else
128 - myconf="${myconf} \
129 - $(use_enable deprecated oldapps) \
130 - $(use_with X x)"
131 + myeconfargs+=(
132 + $(use_enable deprecated oldapps)
133 + $(use_with X x)
134 + )
135 fi
136
137 - econf ${myconf}
138 + econf "${myeconfargs[@]}"
139 +
140 + popd &>/dev/null || die
141 }
142
143 src_compile() {
144 @@ -125,18 +135,20 @@ src_compile() {
145 }
146
147 ngspice_compile() {
148 - pushd "${BUILD_DIR}"
149 + pushd "${BUILD_DIR}" &>/dev/null || die
150 default
151 + popd &>/dev/null || die
152 }
153
154 src_install() {
155 multibuild_foreach_variant ngspice_install
156
157 # merge the installations of all variants
158 + local v
159 for v in "${MULTIBUILD_VARIANTS[@]}" ; do
160 - cp -a "${D}_${v}"/* "${D}" || die "Failed to combine multibuild installations"
161 - rm -rf "${D}_${v}"
162 + cp -a "${ED}/tmp/${v}"/* "${ED}" || die "Failed to combine multibuild installations"
163 done
164 + rm -rf "${ED}/tmp" || die
165
166 use tcl && DOCS+=( README.tcl )
167 use shared && DOCS+=( README.shared-xspice )
168 @@ -145,7 +157,9 @@ src_install() {
169 default
170
171 if use examples; then
172 - use tcl || rm -rf examples/tclspice
173 + if ! use tcl; then
174 + rm -rf examples/tclspice || die
175 + fi
176
177 insinto /usr/share/${PN}
178 doins -r examples
179 @@ -153,26 +167,28 @@ src_install() {
180 }
181
182 ngspice_install() {
183 - pushd "${BUILD_DIR}"
184 + pushd "${BUILD_DIR}" &>/dev/null || die
185
186 - emake DESTDIR="${D}_${MULTIBUILD_VARIANT}" install
187 + emake DESTDIR="${ED}/tmp/${MULTIBUILD_VARIANT}" install
188
189 # Strip shared-library and Tcl-module builds to the bare minimum;
190 # all the support files will have been handled by the 'binaries' build.
191 - if [ "${MULTIBUILD_VARIANT}" != "binaries" ]; then
192 - rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/bin{,.debug}
193 - rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/share
194 - rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la
195 - rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug}
196 + if [[ "${MULTIBUILD_VARIANT}" != "binaries" ]]; then
197 + rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/bin{,.debug} || die
198 + rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/share || die
199 + rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la || die
200 + rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug} || die
201 fi
202 +
203 + popd &>/dev/null || die
204 }
205
206 src_test() {
207 if ! use debug; then
208 # tests can be only executed for the binaries variant
209 - pushd "${WORKDIR}/${P}-binaries"
210 + pushd "${WORKDIR}/${P}-binaries" &>/dev/null || die
211 virtx default
212 - popd
213 + popd &>/dev/null || die
214 else
215 # https://sourceforge.net/p/ngspice/bugs/353/
216 ewarn