Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/itpp/, sci-libs/itpp/files/
Date: Wed, 02 Mar 2022 04:24:28
Message-Id: 1646195048.81e3309856b2cd2cea8ef4a7c6809fbfbf0ae9ea.sam@gentoo
1 commit: 81e3309856b2cd2cea8ef4a7c6809fbfbf0ae9ea
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 2 04:24:08 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 2 04:24:08 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81e33098
7
8 sci-libs/itpp: update EAPI 6 -> 8
9
10 Bug: https://bugs.gentoo.org/834293
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../itpp/files/itpp-4.3.1-use-GNUInstallDirs.patch | 116 +++++++++++++++++++++
14 sci-libs/itpp/itpp-4.3.1-r2.ebuild | 40 +++++++
15 2 files changed, 156 insertions(+)
16
17 diff --git a/sci-libs/itpp/files/itpp-4.3.1-use-GNUInstallDirs.patch b/sci-libs/itpp/files/itpp-4.3.1-use-GNUInstallDirs.patch
18 new file mode 100644
19 index 000000000000..4fa9c464e4e5
20 --- /dev/null
21 +++ b/sci-libs/itpp/files/itpp-4.3.1-use-GNUInstallDirs.patch
22 @@ -0,0 +1,116 @@
23 +From 3ed973b46b50015108a9577a51feec503f06025f Mon Sep 17 00:00:00 2001
24 +From: Sam James <sam@g.o>
25 +Date: Wed, 2 Mar 2022 04:10:20 +0000
26 +Subject: [PATCH] Use GNUInstallDirs
27 +
28 +---
29 + CMakeLists.txt | 4 ----
30 + itpp-config.cmake.in | 2 +-
31 + itpp.pc.cmake.in | 2 +-
32 + itpp/CMakeLists.txt | 23 ++++++++++++-----------
33 + 4 files changed, 14 insertions(+), 17 deletions(-)
34 +
35 +diff --git a/CMakeLists.txt b/CMakeLists.txt
36 +index a2c6958..cd661d1 100644
37 +--- a/CMakeLists.txt
38 ++++ b/CMakeLists.txt
39 +@@ -172,12 +172,8 @@ endif()
40 + option(ITPP_SHARED_LIB "Building IT++ as shared library" on)
41 + #set library name here to be available for all targets
42 + if (ITPP_SHARED_LIB)
43 +- if ((CMAKE_BUILD_TYPE STREQUAL Release) OR (NOT CMAKE_BUILD_TYPE))
44 + set (libitpp_target itpp)
45 + set (CMAKE_CXX_FLAGS "-DNDEBUG ${CMAKE_CXX_FLAGS}")
46 +- else()
47 +- set (libitpp_target itpp_debug)
48 +- endif()
49 + else()
50 + set (libitpp_target itpp_static)
51 + endif()
52 +diff --git a/itpp-config.cmake.in b/itpp-config.cmake.in
53 +index d24b57f..7d31753 100644
54 +--- a/itpp-config.cmake.in
55 ++++ b/itpp-config.cmake.in
56 +@@ -2,7 +2,7 @@
57 +
58 + prefix=@CMAKE_INSTALL_PREFIX@
59 + exec_prefix=${prefix}
60 +-libdir=${exec_prefix}/lib
61 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
62 + includedir=${prefix}/include
63 +
64 + debug_flag=no
65 +diff --git a/itpp.pc.cmake.in b/itpp.pc.cmake.in
66 +index d92ce96..ac62b88 100644
67 +--- a/itpp.pc.cmake.in
68 ++++ b/itpp.pc.cmake.in
69 +@@ -1,6 +1,6 @@
70 + prefix=@CMAKE_INSTALL_PREFIX@
71 + exec_prefix=@CMAKE_INSTALL_PREFIX@
72 +-libdir=@CMAKE_INSTALL_PREFIX@/lib
73 ++libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
74 + includedir=@CMAKE_INSTALL_PREFIX@/include
75 +
76 + Name: @PACKAGE_NAME@
77 +diff --git a/itpp/CMakeLists.txt b/itpp/CMakeLists.txt
78 +index e8c78d3..ee8f587 100644
79 +--- a/itpp/CMakeLists.txt
80 ++++ b/itpp/CMakeLists.txt
81 +@@ -24,6 +24,7 @@
82 + # with IT++. If not, see <http://www.gnu.org/licenses/>.
83 + #
84 + # -------------------------------------------------------------------------
85 ++include(GNUInstallDirs)
86 +
87 + file ( GLOB ITPP_SRCS
88 + "base/*.cpp"
89 +@@ -68,18 +69,18 @@ set_target_properties(${libitpp_target} PROPERTIES VERSION ${LIBITPP_VERSION_STR
90 +
91 + #library
92 + install(TARGETS ${libitpp_target}
93 +- RUNTIME DESTINATION bin
94 +- LIBRARY DESTINATION lib
95 +- ARCHIVE DESTINATION lib)
96 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
97 ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
98 ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
99 +
100 + #headers
101 +-install(DIRECTORY ${CMAKE_SOURCE_DIR}/itpp DESTINATION include FILES_MATCHING PATTERN "*.h")
102 ++install(DIRECTORY ${CMAKE_SOURCE_DIR}/itpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")
103 + if (WIN32 AND NOT MINGW)
104 +- install(FILES ${CMAKE_BINARY_DIR}/itpp/config_msvc.h DESTINATION include/itpp)
105 ++ install(FILES ${CMAKE_BINARY_DIR}/itpp/config_msvc.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/itpp)
106 + else()
107 +- install(FILES ${CMAKE_BINARY_DIR}/itpp/config.h DESTINATION include/itpp)
108 ++ install(FILES ${CMAKE_BINARY_DIR}/itpp/config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/itpp)
109 + endif()
110 +-install(FILES ${CMAKE_BINARY_DIR}/itpp/itexports.h DESTINATION include/itpp)
111 ++install(FILES ${CMAKE_BINARY_DIR}/itpp/itexports.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/itpp)
112 +
113 + #extra files (MATLAB and python)
114 + install(FILES ${CMAKE_SOURCE_DIR}/extras/itsave.m
115 +@@ -97,7 +98,7 @@ if (HTML_DOCS AND DOXYGEN_FOUND)
116 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
117 + COMMENT "Generating API documentation with Doxygen" VERBATIM)
118 + file(COPY ${CMAKE_SOURCE_DIR}/doc/images/itpp_logo.png DESTINATION ${CMAKE_BINARY_DIR}/html)
119 +- install(DIRECTORY ${CMAKE_BINARY_DIR}/html DESTINATION share/doc/itpp)
120 ++ install(DIRECTORY ${CMAKE_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/itpp)
121 + endif()
122 +
123 + #itpp-config script for UNIX-like systems
124 +@@ -108,8 +109,8 @@ if (UNIX)
125 + configure_file(${CMAKE_SOURCE_DIR}/itpp-config.cmake.in ${CMAKE_BINARY_DIR}/itpp-config @ONLY)
126 + configure_file(${CMAKE_SOURCE_DIR}/itpp-config.1.cmake.in ${CMAKE_BINARY_DIR}/itpp-config.1 @ONLY)
127 + configure_file(${CMAKE_SOURCE_DIR}/itpp.pc.cmake.in ${CMAKE_BINARY_DIR}/itpp.pc @ONLY)
128 +- install(FILES ${CMAKE_BINARY_DIR}/itpp-config DESTINATION bin PERMISSIONS OWNER_READ OWNER_EXECUTE
129 ++ install(FILES ${CMAKE_BINARY_DIR}/itpp-config DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_EXECUTE
130 + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
131 +- install(FILES ${CMAKE_BINARY_DIR}/itpp-config.1 DESTINATION share/man/man1)
132 +- install(FILES ${CMAKE_BINARY_DIR}/itpp.pc DESTINATION lib/pkgconfig)
133 ++ install(FILES ${CMAKE_BINARY_DIR}/itpp-config.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
134 ++ install(FILES ${CMAKE_BINARY_DIR}/itpp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
135 + endif()
136 +--
137 +2.35.1
138 +
139
140 diff --git a/sci-libs/itpp/itpp-4.3.1-r2.ebuild b/sci-libs/itpp/itpp-4.3.1-r2.ebuild
141 new file mode 100644
142 index 000000000000..545434c5022b
143 --- /dev/null
144 +++ b/sci-libs/itpp/itpp-4.3.1-r2.ebuild
145 @@ -0,0 +1,40 @@
146 +# Copyright 1999-2022 Gentoo Authors
147 +# Distributed under the terms of the GNU General Public License v2
148 +
149 +EAPI=8
150 +
151 +inherit cmake
152 +
153 +DESCRIPTION="C++ library of mathematical, signal processing and communication"
154 +HOMEPAGE="http://itpp.sourceforge.net/"
155 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
156 +
157 +LICENSE="GPL-3"
158 +SLOT="0"
159 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
160 +IUSE="doc"
161 +
162 +RDEPEND="sci-libs/fftw:3.0=
163 + virtual/blas
164 + virtual/lapack"
165 +DEPEND="${RDEPEND}"
166 +BDEPEND="virtual/pkgconfig
167 + doc? (
168 + app-doc/doxygen
169 + virtual/latex-base
170 + )"
171 +
172 +DOCS=( ChangeLog NEWS AUTHORS README )
173 +
174 +PATCHES=(
175 + "${FILESDIR}"/${PN}-4.3.1-use-GNUInstallDirs.patch
176 +)
177 +
178 +src_configure() {
179 + local mycmakeargs=(
180 + -DBLA_VENDOR=Generic
181 + -DHTML_DOCS=$(usex doc)
182 + )
183 +
184 + cmake_src_configure
185 +}