1 |
commit: 1ff3993d8f1a6f32f498c9077232f0da87b0a7ae |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat May 7 07:22:50 2022 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Sat May 7 07:22:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ff3993d |
7 |
|
8 |
octaveforge.eclass: inline configure, eautoreconf |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
eclass/octaveforge.eclass | 30 ++++++++++++++++++++---------- |
13 |
1 file changed, 20 insertions(+), 10 deletions(-) |
14 |
|
15 |
diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass |
16 |
index d02072fd5..67eb8aece 100644 |
17 |
--- a/eclass/octaveforge.eclass |
18 |
+++ b/eclass/octaveforge.eclass |
19 |
@@ -41,10 +41,7 @@ OCT_PKGDIR="${OCT_ROOT}/packages" |
20 |
# full path to octave binary |
21 |
OCT_BIN="$(type -p octave)" |
22 |
|
23 |
-SRC_URI=" |
24 |
- mirror://sourceforge/octave/${P}.tar.gz |
25 |
- ${REPO_URI}/packages/package_configure.in -> octaveforge_configure |
26 |
-" |
27 |
+SRC_URI="mirror://sourceforge/octave/${P}.tar.gz" |
28 |
SLOT="0" |
29 |
|
30 |
# @FUNCTION: octaveforge_src_unpack |
31 |
@@ -60,16 +57,17 @@ octaveforge_src_unpack() { |
32 |
|
33 |
# @FUNCTION: octaveforge_src_prepare |
34 |
# @DESCRIPTION: |
35 |
-# function to add octaveforge specific makefile and configure and run autogen.sh if available |
36 |
+# function to add octaveforge specific makefile and configure and reconfigure if possible |
37 |
octaveforge_src_prepare() { |
38 |
- cp "${DISTDIR}/octaveforge_configure" "${S}/configure" || die |
39 |
+ _generate_configure |
40 |
|
41 |
- chmod 0755 "${S}/configure" || die |
42 |
- if [[ -e "${S}/src/autogen.sh" ]]; then |
43 |
- pushd "${S}/src" || die |
44 |
+ pushd "${S}/src" || die |
45 |
+ if [[ -e "${S}/src/configure.ac" ]]; then |
46 |
+ eautoreconf |
47 |
+ elif [[ -e "${S}/src/autogen.sh" ]]; then |
48 |
./autogen.sh || die 'failed to run autogen.sh' |
49 |
- popd || die |
50 |
fi |
51 |
+ popd || die |
52 |
if [[ -e "${S}/src/Makefile" ]]; then |
53 |
sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.' |
54 |
fi |
55 |
@@ -215,3 +213,15 @@ octaveforge_pkg_postrm() { |
56 |
octavecommand() { |
57 |
"${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1" |
58 |
} |
59 |
+ |
60 |
+_generate_configure() { |
61 |
+ cat << EOF > configure || die |
62 |
+#! /bin/sh -f |
63 |
+ |
64 |
+if [ -e src/configure ]; then |
65 |
+ cd src |
66 |
+ ./configure $* |
67 |
+fi |
68 |
+EOF |
69 |
+ chmod 0755 "configure" || die |
70 |
+} |