mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-13 00:53:02 -04:00
dev-libs/ftl: fix intall build type as release instead of debug
As make options were not passed on install phase it recompiled library in as BUILD=debug mode instead of 'release'. Also gfortran command called directly as on install phase it wasn't passed into make command. Now build type and some other parameters passed in src_prepare instead of src_compile and src_insall. Closes: https://bugs.gentoo.org/785739 Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
@@ -34,10 +34,33 @@ pkg_setup() {
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
case $(tc-getFC) in
|
||||
*gfortran* )
|
||||
sed -i -e '/gnu)/,/COMPILER =/ s:gfortran:'"$(tc-getFC)"':' \
|
||||
-e '/gnu)/,/^\tFLAGS =/ s:(BUILDDIR):(BUILDDIR) '"${FCFLAGS}"':' \
|
||||
-e '/gnu)/,/CXXCOMPILER =/ s:g++:'"$(tc-getCXX)"':' \
|
||||
-e '/gnu)/,/CXXFLAGS =/ s:CXXFLAGS = .*:CXXFLAGS = '"${CXXFLAGS}"':' \
|
||||
makefile || die
|
||||
;;
|
||||
*ifort* )
|
||||
sed -i -e '/^PLATFORM/ s:gnu:intel:' \
|
||||
-e '/intel)/,/COMPILER =/ s:ifort:'"$(tc-getFC)"':' \
|
||||
-e '/intel)/,/^\tFLAGS =/ s:(BUILDDIR):(BUILDDIR) '"${FCFLAGS}"':' \
|
||||
-e '/intel)/,/CXXCOMPILER =/ s:g++:'"$(tc-getCXX)"':' \
|
||||
-e '/intel)/,/CXXFLAGS =/ s:CXXFLAGS = .*:CXXFLAGS = '"${CXXFLAGS}"':' \
|
||||
makefile || die
|
||||
;;
|
||||
* )
|
||||
die "Sorry, GNU gfortran or Intel ifort are currently supported in the ebuild"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Replase install PREFIX, LIBDIR, add library soname
|
||||
sed -i -e 's:PREFIX ?= /usr/local:PREFIX ?= '"${ED}"'/usr/:' \
|
||||
sed -i -e '/^BUILD ?=/s:debug:release:' \
|
||||
-e 's:PREFIX ?= /usr/local:PREFIX ?= '"${ED}"'/usr/:' \
|
||||
-e 's:(PREFIX)/lib:(PREFIX)/'"$(get_libdir)"':' \
|
||||
-e 's:SOLDFLAGS = -shared:SOLDFLAGS = -shared -Wl,-soname=libftl.so.1 '"${LDFLAGS}"':' makefile || die
|
||||
-e 's:SOLDFLAGS = -shared:SOLDFLAGS = -shared -Wl,-soname=libftl.so.1 '"${LDFLAGS}"':' \
|
||||
makefile || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
@@ -45,13 +68,7 @@ src_configure() {
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
BUILD=release \
|
||||
USE_PCRE=$(usex pcre true false) \
|
||||
COMPILER="$(tc-getFC)" \
|
||||
FLAGS="${FCFLAGS}" \
|
||||
CXXCOMPILER="$(tc-getCXX)" \
|
||||
CXXFLAGS="${CXXFLAGS}"
|
||||
emake USE_PCRE=$(usex pcre true false)
|
||||
}
|
||||
|
||||
src_test() {
|
||||
|
||||
Reference in New Issue
Block a user