Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions sci-mathematics/cipi/cipi-1.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

DESCRIPTION="Computing information projections iteratively"
HOMEPAGE="https://github.com/tom111/cipi"
SRC_URI="https://github.com/tom111/cipi/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="doc"

DEPEND="
dev-libs/boost:=
doc? ( virtual/latex-base )"
RDEPEND="${DEPEND}"

DOCS="AUTHORS README"

CMAKE_IN_SOURCE_BUILD="yes"

PATCHES=(
"${FILESDIR}/${P}-boost.patch"
)

src_prepare() {
cmake_src_prepare
append-ldflags -Wl,--copy-dt-needed-entries
}

src_configure() {
mycmakeargs=(
-DENABLE_DOC=$(usex doc ON OFF)
)

cmake_src_configure
}

pkg_postinst() {
elog
elog "The sample PARAM file has been installed to /usr/share/${PN}-${PV}"
elog
if use doc; then
elog "A pdf manual has been installed to /usr/share/${PN}-${PV}"
fi
}
11 changes: 11 additions & 0 deletions sci-mathematics/cipi/files/cipi-1.0-boost.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/CMakeLists.txt 2024-02-16 21:36:58.808186061 +0100
+++ b/src/CMakeLists.txt 2024-02-16 21:36:55.288131610 +0100
@@ -8,7 +8,7 @@
Message("Boost found" ${Boost_LIBRARY_DIR})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
#MESSAGE("Boost was found" ${Boost_INCLUDE_DIR})
- TARGET_LINK_LIBRARIES (cipi boost_thread-mt)
+ TARGET_LINK_LIBRARIES (cipi boost_thread)
ENDIF (Boost_FOUND)

INSTALL(PROGRAMS cipi DESTINATION bin)