1 |
commit: 41ed1fd94c2ef4ab44e3c65aa04214e09e767d90 |
2 |
Author: Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de> |
3 |
AuthorDate: Sat Mar 3 12:18:07 2012 +0000 |
4 |
Commit: Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de> |
5 |
CommitDate: Sat Mar 3 12:18:07 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=41ed1fd9 |
7 |
|
8 |
fixed banned dosed, added more comments |
9 |
|
10 |
--- |
11 |
sci-mathematics/petsc/petsc-3.2_p6.ebuild | 17 +++++++++++++---- |
12 |
1 files changed, 13 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/sci-mathematics/petsc/petsc-3.2_p6.ebuild b/sci-mathematics/petsc/petsc-3.2_p6.ebuild |
15 |
index d82206c..643e146 100644 |
16 |
--- a/sci-mathematics/petsc/petsc-3.2_p6.ebuild |
17 |
+++ b/sci-mathematics/petsc/petsc-3.2_p6.ebuild |
18 |
@@ -110,6 +110,10 @@ src_configure(){ |
19 |
} |
20 |
|
21 |
src_install(){ |
22 |
+ # petsc install structure is very different from |
23 |
+ # installing headers to /usr/include/petsc and lib to /usr/lib |
24 |
+ # it also installs many unneeded executables and scripts |
25 |
+ # so manual install is easier than cleanup after "emake install" |
26 |
insinto /usr/include/"${PN}" |
27 |
doins "${S}"/include/*.h "${S}"/include/*.hh |
28 |
insinto /usr/include/"${PN}/${PETSC_ARCH}"/include |
29 |
@@ -122,14 +126,16 @@ src_install(){ |
30 |
doins "${S}"/conf/{variables,rules,test} |
31 |
insinto /usr/include/"${PN}/${PETSC_ARCH}"/conf |
32 |
doins "${S}/${PETSC_ARCH}"/conf/{petscrules,petscvariables,RDict.db} |
33 |
- |
34 |
insinto /usr/include/"${PN}"/private |
35 |
doins "${S}"/include/private/*.h |
36 |
|
37 |
- dosed "s:${S}:/usr:g" /usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h |
38 |
- dosed "s:${PETSC_ARCH}/lib:$(get_libdir):g" /usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h |
39 |
- dosed "s:INSTALL_DIR =.*:INSTALL_DIR = /usr:" /usr/include/"${PN}/${PETSC_ARCH}"/conf/petscvariables |
40 |
+ # fix configuration files: replace ${S} by installed location |
41 |
+ sed -i "s:${S}:/usr:g" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h |
42 |
+ sed -i "s:${PETSC_ARCH}/lib:$(get_libdir):g" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h |
43 |
+ sed -i "s:INSTALL_DIR =.*:INSTALL_DIR = /usr:" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/conf/petscvariables |
44 |
|
45 |
+ # add information about installation directory and |
46 |
+ # PETSC_ARCH to environmental variables |
47 |
cat >> "${T}"/99petsc <<- EOF |
48 |
PETSC_ARCH=${PETSC_ARCH} |
49 |
PETSC_DIR=/usr/include/${PN} |
50 |
@@ -153,4 +159,7 @@ pkg_postinst() { |
51 |
elog "The petsc ebuild is still under development." |
52 |
elog "Help us improve the ebuild in:" |
53 |
elog "http://bugs.gentoo.org/show_bug.cgi?id=53386" |
54 |
+ elog "Note that PETSC_ARCH may be dropped in future since " \ |
55 |
+ "upstream now also supports installations without " \ |
56 |
+ "different subdirectories." |
57 |
} |