Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kalzium/files/, kde-apps/kalzium/
Date: Fri, 18 Jan 2019 11:01:20
Message-Id: 1547809256.46111e1999ba8aef000edb69e7ea110922cff989.asturm@gentoo
1 commit: 46111e1999ba8aef000edb69e7ea110922cff989
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 17 10:33:58 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 18 11:00:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46111e19
7
8 kde-apps/kalzium: Add missing avogadro[qt5] USE, fix cmake
9
10 Package-Manager: Portage-2.3.56, Repoman-2.3.12
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 kde-apps/kalzium/files/kalzium-18.12.1-deps.patch | 79 +++++++++++++++++++++++
14 kde-apps/kalzium/kalzium-18.12.1-r1.ebuild | 62 ++++++++++++++++++
15 2 files changed, 141 insertions(+)
16
17 diff --git a/kde-apps/kalzium/files/kalzium-18.12.1-deps.patch b/kde-apps/kalzium/files/kalzium-18.12.1-deps.patch
18 new file mode 100644
19 index 00000000000..f0a1a834bc5
20 --- /dev/null
21 +++ b/kde-apps/kalzium/files/kalzium-18.12.1-deps.patch
22 @@ -0,0 +1,79 @@
23 +From dd38aba1dfbc18c8e094fce2f8b167d0e12e93fb Mon Sep 17 00:00:00 2001
24 +From: Andreas Sturmlechner <asturm@g.o>
25 +Date: Thu, 17 Jan 2019 10:45:42 +0100
26 +Subject: [PATCH] Qt5OpenGL is only required in optional compoundviewer
27 +
28 +Add missing search for Qt5Xml
29 +Add missing Qt5Widgets to compoundviewer target_link_libraries
30 +Remove Qt5OpenGL from libscience target_link_libraries, not used
31 +---
32 + CMakeLists.txt | 7 ++++---
33 + compoundviewer/CMakeLists.txt | 3 ++-
34 + libscience/CMakeLists.txt | 2 +-
35 + 3 files changed, 7 insertions(+), 5 deletions(-)
36 +
37 +diff --git a/CMakeLists.txt b/CMakeLists.txt
38 +index a48c9046..9c55aafe 100644
39 +--- a/CMakeLists.txt
40 ++++ b/CMakeLists.txt
41 +@@ -42,12 +42,12 @@ configure_file(
42 + include_directories(${AvogadroLibs_INCLUDE_DIRS})
43 +
44 + find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
45 +- Widgets
46 +- Script
47 + Core
48 + Gui
49 +- OpenGL
50 ++ Script
51 + Svg
52 ++ Widgets
53 ++ Xml
54 + )
55 +
56 + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
57 +@@ -92,6 +92,7 @@ add_definitions(-DUSING_DYNAMIC_LIBS)
58 + endif(MSVC)
59 +
60 + if (OPENBABEL2_FOUND AND AvogadroLibs_FOUND AND EIGEN3_FOUND)
61 ++ find_package(Qt5OpenGL ${QT_MIN_VERSION} REQUIRED)
62 + find_package(KF5NewStuff REQUIRED)
63 + # avoid compilerwarnings about redefinitions
64 + # todo: use check_function_exits() ?
65 +diff --git a/compoundviewer/CMakeLists.txt b/compoundviewer/CMakeLists.txt
66 +index d6f6f4ab..54734a02 100644
67 +--- a/compoundviewer/CMakeLists.txt
68 ++++ b/compoundviewer/CMakeLists.txt
69 +@@ -1,7 +1,7 @@
70 + include_directories(
71 + ${CMAKE_CURRENT_BINARY_DIR}/..
72 + ${EIGEN3_INCLUDE_DIR}
73 +- ${OPENBABEL2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIRS}
74 ++ ${OPENBABEL2_INCLUDE_DIR}
75 + ${AvogadroLibs_INCLUDE_DIRS}
76 + ${PROJECT_SOURCE_DIR}/compoundviewer
77 + )
78 +@@ -21,6 +21,7 @@ target_link_libraries(compoundviewer
79 + KF5::CoreAddons
80 + Qt5::OpenGL
81 + Qt5::Gui
82 ++ Qt5::Widgets
83 + ${OPENBABEL2_LIBRARIES}
84 + AvogadroQtGui
85 + AvogadroQtOpenGL
86 +diff --git a/libscience/CMakeLists.txt b/libscience/CMakeLists.txt
87 +index f25e4090..4d4d6979 100644
88 +--- a/libscience/CMakeLists.txt
89 ++++ b/libscience/CMakeLists.txt
90 +@@ -16,7 +16,7 @@ set(science_LIB_SRCS
91 +
92 + add_library(science SHARED ${science_LIB_SRCS})
93 +
94 +-target_link_libraries(science Qt5::OpenGL Qt5::Xml KF5::UnitConversion KF5::WidgetsAddons KF5::KDELibs4Support)
95 ++target_link_libraries(science Qt5::Xml KF5::UnitConversion KF5::WidgetsAddons KF5::KDELibs4Support)
96 + set_target_properties(science PROPERTIES VERSION ${KALZIUMLIB_VERSION} SOVERSION ${KALZIUMLIB_SOVERSION} )
97 + install(TARGETS science ${INSTALL_TARGETS_DEFAULT_ARGS})
98 +
99 +--
100 +2.20.1
101 +
102
103 diff --git a/kde-apps/kalzium/kalzium-18.12.1-r1.ebuild b/kde-apps/kalzium/kalzium-18.12.1-r1.ebuild
104 new file mode 100644
105 index 00000000000..aac0fcfa4cc
106 --- /dev/null
107 +++ b/kde-apps/kalzium/kalzium-18.12.1-r1.ebuild
108 @@ -0,0 +1,62 @@
109 +# Copyright 1999-2019 Gentoo Authors
110 +# Distributed under the terms of the GNU General Public License v2
111 +
112 +EAPI=6
113 +
114 +KDE_HANDBOOK="forceoptional"
115 +inherit kde5 flag-o-matic
116 +
117 +DESCRIPTION="Periodic table of the elements"
118 +HOMEPAGE="https://www.kde.org/applications/education/kalzium https://edu.kde.org/kalzium/"
119 +KEYWORDS="~amd64 ~x86"
120 +IUSE="editor solver"
121 +
122 +DEPEND="
123 + $(add_frameworks_dep kcompletion)
124 + $(add_frameworks_dep kconfig)
125 + $(add_frameworks_dep kconfigwidgets)
126 + $(add_frameworks_dep kcoreaddons)
127 + $(add_frameworks_dep kdelibs4support)
128 + $(add_frameworks_dep khtml)
129 + $(add_frameworks_dep ki18n)
130 + $(add_frameworks_dep kio)
131 + $(add_frameworks_dep kitemviews)
132 + $(add_frameworks_dep kplotting)
133 + $(add_frameworks_dep ktextwidgets)
134 + $(add_frameworks_dep kunitconversion)
135 + $(add_frameworks_dep kwidgetsaddons)
136 + $(add_frameworks_dep kxmlgui)
137 + $(add_qt_dep qtgui)
138 + $(add_qt_dep qtscript)
139 + $(add_qt_dep qtsvg)
140 + $(add_qt_dep qtwidgets)
141 + $(add_qt_dep qtxml)
142 + editor? (
143 + $(add_qt_dep qtopengl)
144 + $(add_frameworks_dep knewstuff)
145 + dev-cpp/eigen:3
146 + sci-chemistry/openbabel
147 + sci-libs/avogadrolibs
148 + )
149 + solver? ( dev-ml/facile[ocamlopt] )
150 +"
151 +RDEPEND="${DEPEND}
152 + sci-chemistry/chemical-mime-data
153 +"
154 +
155 +PATCHES=( "${FILESDIR}/${P}-deps.patch" )
156 +
157 +src_configure() {
158 + # Fix missing finite()
159 + [[ ${CHOST} == *-solaris* ]] && append-cppflags -DHAVE_IEEEFP_H
160 +
161 + local mycmakeargs=(
162 + $(cmake-utils_use_find_package editor Eigen3)
163 + $(cmake-utils_use_find_package editor AvogadroLibs)
164 + $(cmake-utils_use_find_package editor OpenBabel2)
165 + $(cmake-utils_use_find_package solver OCaml)
166 + $(cmake-utils_use_find_package solver Libfacile)
167 + )
168 +
169 + kde5_src_configure
170 +}