79 lines
2.2 KiB
Bash
79 lines
2.2 KiB
Bash
# Copyright 1999-2022 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
inherit cmake
|
|
|
|
DESCRIPTION="SCIP Optimization Suite"
|
|
HOMEPAGE="https://scipopt.org"
|
|
|
|
SRC_URI="https://scipopt.org/${P}.tgz"
|
|
KEYWORDS="~amd64"
|
|
|
|
RESTRICT="fetch"
|
|
|
|
LICENSE="GPL-2+ GPL-3+ Boost-1.0 BSD"
|
|
SLOT="0"
|
|
IUSE=""
|
|
|
|
COMMON_DEPEND="
|
|
!sci-libs/bliss
|
|
dev-libs/gmp
|
|
sci-libs/metis
|
|
sci-libs/mumps[metis]
|
|
sci-libs/ipopt[mumps]
|
|
"
|
|
DEPEND="${COMMON_DEPEND}"
|
|
RDEPEND="${COMMON_DEPEND}"
|
|
BDEPEND=""
|
|
|
|
src_prepare() {
|
|
cmake_src_prepare
|
|
|
|
# Sanitize library installation paths
|
|
sed -i -e 's@BINARY_DIR}/lib@BINARY_DIR}/'"$(get_libdir)"'@' \
|
|
-e 's@CMAKE_INSTALL_PREFIX}/lib@CMAKE_INSTALL_PREFIX}/'"$(get_libdir)"'@' \
|
|
"${S}"/soplex/CMakeLists.txt \
|
|
"${S}"/soplex/src/CMakeLists.txt \
|
|
"${S}"/scip/src/bliss/CMakeLists.txt \
|
|
"${S}"/scip/src/CMakeLists.txt \
|
|
"${S}"/scip/CMakeLists.txt \
|
|
"${S}"/ug/CMakeLists.txt \
|
|
"${S}"/zimpl/CMakeLists.txt \
|
|
"${S}"/gcg/CMakeLists.txt \
|
|
"${S}"/gcg/src/CMakeLists.txt \
|
|
"${S}"/papilo/CMakeLists.txt \
|
|
"${S}"/papilo/binaries/CMakeLists.txt \
|
|
|| die "Sed failed"
|
|
}
|
|
|
|
src_configure() {
|
|
cmake_src_configure
|
|
|
|
# Sanitize library installation paths
|
|
sed -i -e 's@INSTALL_PREFIX}/lib@INSTALL_PREFIX}/'"$(get_libdir)"'@' \
|
|
"${S}"_build/soplex/src/cmake_install.cmake \
|
|
"${S}"_build/scip/src/cmake_install.cmake \
|
|
"${S}"_build/scip/src/bliss/cmake_install.cmake \
|
|
"${S}"_build/papilo/cmake_install.cmake \
|
|
"${S}"_build/zimpl/src/cmake_install.cmake \
|
|
"${S}"_build/gcg/src/cmake_install.cmake \
|
|
|| die "Sed failed"
|
|
}
|
|
|
|
src_install() {
|
|
cmake_src_install
|
|
|
|
# Sanitize library installation paths
|
|
sed -i -e 's@/usr/lib@/usr/'"$(get_libdir)"'@' \
|
|
-e 's@_PREFIX}/lib@_PREFIX}/'"$(get_libdir)"'@g' \
|
|
"${D}"/usr/$(get_libdir)/cmake/Bliss/BlissConfig{,-gentoo}.cmake \
|
|
"${D}"/usr/$(get_libdir)/cmake/gcg/gcg-targets{,-gentoo}.cmake \
|
|
"${D}"/usr/$(get_libdir)/cmake/papilo/papilo-targets{,-gentoo}.cmake \
|
|
"${D}"/usr/$(get_libdir)/cmake/scip/scip-targets{,-gentoo}.cmake \
|
|
"${D}"/usr/$(get_libdir)/cmake/soplex/soplex-targets{,-gentoo}.cmake \
|
|
"${D}"/usr/$(get_libdir)/cmake/zimpl/zimpl-targets{,-gentoo}.cmake \
|
|
|| die "Sed failed"
|
|
}
|