forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: https://bugs.gentoo.org/832528 Bug: https://bugs.gentoo.org/712962 Bug: https://bugs.gentoo.org/868132 Signed-off-by: Andrew Ammerlaan <[email protected]>
- Loading branch information
1 parent
7b296d8
commit 9e97c03
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
DIST avogadrolibs-1.95.1.tar.gz 11015910 BLAKE2B 27cb43a22e489c0279e1ed912b1e81f3c850983f367ffb89bef3a63d11204cbf761f2bce6501988ed5ef9b21b44cc5194dad4367da3ae6af65efd0cec5e7d711 SHA512 b4734c732b1686eba74055c4834fef2f9fb66d4a67cd1199c84e81965c3f6e783911e7c7c8d09386c4ff9f1322bab91fe490d3606784ae49acf5531a65a58beb | ||
DIST avogadrolibs-1.97.0.tar.gz 11456702 BLAKE2B 2f9229a0525dc151ef636c4c101ea21d3713efb033f6a007c43689bfd078b07081d695bb3ec32715c3ccf9d67e7bb85a617a08eeb0e6fc8c80e479a3cb3f1553 SHA512 a0ad3ba294db5f0fff35087ff0f616fdcaefc7b4abfa470c9fd26326ad14f73e3584c18a7111b671998d8a23a50091307520f01f79295fc7ea52ae2d78716c7e | ||
DIST avogadrolibs-crystals-1.0.1.tar.gz 151829 BLAKE2B 0a1353392a4c087977452f50ffb7db0b2976a2993651b6f7e0df7a9ce6fa8f7960223cac2916dd9f667d37518b85606d73d05e86f7489193a6a609700fc60223 SHA512 c5d6500d8472807b8d2e62888e4a09279c6aeafec81bc4981edaa74e36724b1e7f0381250c79ad297f9f0331bcb5cd8a45fce3f13ad65b9870e901a6424c0650 | ||
DIST avogadrolibs-molecules-1.0.0.tar.gz 206924 BLAKE2B 70eea3d5eb440ab2c7f29c56111f2b8cf780cc84983aa145bc4f2fe144c981978218333ba3c33cf1f620dd3180cca706dfa4e94ffaee6167f89bd3e372172218 SHA512 06891ea7ad3e65c5b0c0ad73ea01916478fcd13fd9ff0d6905d28159678a50371ba9fa2c1f68ef32604dee0c2165de29bd5d50ffbc345bfe752ef0bcb13126f2 | ||
DIST linux64-genXrdPattern-avogadrolibs-1.95.1 7480152 BLAKE2B dca8285c41aadfaa20c72f337e0f02db8ee07ce30c11ae84bf3aa7bd0b2220273d33f484d63f761d41a8946c6a0b77a0fb27906c480bcae01ae49b1531ae5cbb SHA512 538bde12e1e52600a21640d5907f43fcc853c6f3c111880f39eb238093e3d1358ccdfa1f45e944ec8b8e5ee3c2dff269cefe5334db5d73300e6ca327c95520b8 | ||
DIST linux64-genXrdPattern-avogadrolibs-1.97.0 7480152 BLAKE2B dca8285c41aadfaa20c72f337e0f02db8ee07ce30c11ae84bf3aa7bd0b2220273d33f484d63f761d41a8946c6a0b77a0fb27906c480bcae01ae49b1531ae5cbb SHA512 538bde12e1e52600a21640d5907f43fcc853c6f3c111880f39eb238093e3d1358ccdfa1f45e944ec8b8e5ee3c2dff269cefe5334db5d73300e6ca327c95520b8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit cmake | ||
|
||
DESCRIPTION="Advanced molecule editor and visualizer 2 - libraries" | ||
HOMEPAGE="https://www.openchemistry.org/ https://github.com/OpenChemistry/avogadrolibs" | ||
SRC_URI=" | ||
https://github.com/OpenChemistry/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz | ||
https://github.com/OpenChemistry/molecules/archive/refs/tags/1.0.0.tar.gz -> ${PN}-molecules-1.0.0.tar.gz | ||
https://github.com/OpenChemistry/crystals/archive/refs/tags/1.0.1.tar.gz -> ${PN}-crystals-1.0.1.tar.gz | ||
vtk? ( https://github.com/psavery/genXrdPattern/releases/download/1.0-static/linux64-genXrdPattern -> linux64-genXrdPattern-${P} )" | ||
|
||
LICENSE="BSD GPL-2+" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" | ||
IUSE="archive doc hdf5 qt5 test vtk" | ||
RESTRICT="!test? ( test )" | ||
REQUIRED_USE="vtk? ( qt5 )" | ||
|
||
# TODO: Not yet packaged: | ||
# sci-libs/libmsym (https://github.com/mcodev31/libmsym) | ||
RDEPEND=" | ||
>=sci-chemistry/molequeue-0.7 | ||
archive? ( app-arch/libarchive:= ) | ||
hdf5? ( sci-libs/hdf5:= ) | ||
qt5? ( | ||
dev-qt/qtconcurrent:5 | ||
dev-qt/qtcore:5 | ||
dev-qt/qtgui:5 | ||
dev-qt/qtnetwork:5 | ||
dev-qt/qtsvg:5 | ||
dev-qt/qtwidgets:5 | ||
media-libs/glew:0= | ||
virtual/opengl | ||
) | ||
vtk? ( sci-libs/vtk[qt5,views] )" | ||
DEPEND="${RDEPEND} | ||
dev-cpp/eigen:3 | ||
test? ( dev-cpp/gtest )" | ||
BDEPEND=" | ||
doc? ( app-doc/doxygen[dot] ) | ||
qt5? ( dev-qt/linguist-tools:5 )" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/"${PN}-1.91.0_pre20180406-bundled-genxrdpattern.patch | ||
"${FILESDIR}/"${PN}-1.95.1-tests.patch | ||
) | ||
|
||
src_unpack() { | ||
default | ||
|
||
if use vtk; then | ||
cp "${DISTDIR}"/linux64-genXrdPattern-${P} "${WORKDIR}/genXrdPattern" || die | ||
fi | ||
|
||
# hardcoded assumptions in | ||
# avogadro/qtplugins/insertfragment/CMakeLists.txt | ||
mv crystals-1.0.1 crystals || die | ||
mv molecules-1.0.0 molecules || die | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DUSE_LIBARCHIVE=$(usex archive) | ||
-DBUILD_DOCUMENTATION=$(usex doc) | ||
-DUSE_HDF5=$(usex hdf5) | ||
-DENABLE_TRANSLATIONS=$(usex qt5) | ||
-DUSE_OPENGL=$(usex qt5) | ||
-DUSE_QT=$(usex qt5) | ||
-DENABLE_TESTING=$(usex test) | ||
-DUSE_VTK=$(usex vtk) | ||
# disabled libraries | ||
-DUSE_PYTHON=OFF | ||
-DUSE_PROTOCALL=OFF | ||
-DUSE_MMTF=OFF | ||
-DUSE_LIBMSYM=OFF | ||
# find_package(Spglib) completely broken | ||
-DUSE_SPGLIB=OFF | ||
) | ||
use qt5 && mycmakeargs+=( | ||
-DBUILD_GPL_PLUGINS=ON | ||
-DBUILD_STATIC_PLUGINS=ON | ||
-DOpenGL_GL_PREFERENCE=GLVND | ||
) | ||
use vtk && mycmakeargs+=( | ||
-DBUNDLED_GENXRDPATTERN="${WORKDIR}/genXrdPattern" | ||
) | ||
|
||
cmake_src_configure | ||
} |