public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthias Maier" <tamiko@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/files/, sci-libs/libsc/
Date: Mon, 14 Feb 2022 00:51:21 +0000 (UTC)	[thread overview]
Message-ID: <1644799875.fc1125212d7c3f05146818f6870d48521231fda4.tamiko@gentoo> (raw)

commit:     fc1125212d7c3f05146818f6870d48521231fda4
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 14 00:15:02 2022 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 00:51:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc112521

sci-libs/libsc: version bump to 2.8.3

With the switch to CMake the new version should now obey all compiler
and linker flag overrides.

Closes: https://bugs.gentoo.org/794859
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/libsc/Manifest                            |  1 +
 .../libsc/files/libsc-2.8.3-fix_build_system.patch | 41 ++++++++++++++
 sci-libs/libsc/files/libsc-2.8.3-set_version.patch | 44 +++++++++++++++
 sci-libs/libsc/libsc-2.8.3.ebuild                  | 65 ++++++++++++++++++++++
 4 files changed, 151 insertions(+)

diff --git a/sci-libs/libsc/Manifest b/sci-libs/libsc/Manifest
index f5ddaed8843d..05ef5652e9e8 100644
--- a/sci-libs/libsc/Manifest
+++ b/sci-libs/libsc/Manifest
@@ -1,2 +1,3 @@
 DIST libsc-2.3.1.tar.gz 344456 BLAKE2B cee44d07372162aecc8104257d1c5d4935d60030ceae4041ae4c5110f491b48b7709c55af0286b2a1fc5df2d7883b2ab4499c3884162b779fb9aaa86fbc5822c SHA512 02e160ad6fb4e674a9de2a41cfef6727d470a17c184e7b0310fe3e39f1112f4c643ca35a62377562caf1e8cc753cd5c0f5f996fba24b115498b01d16c140080a
 DIST libsc-2.3.3.tar.gz 345177 BLAKE2B c9077cfe7af3eb8bfb34cf655fa8e49658f1ce0b866b58398fc7bae305ac276b002c83d930a20df1bdf52a22645ebb1698d51a937ce56db993d36ef68d640e8a SHA512 b51d08a987d7c8a83eaae0be98a078a4a9160b9141b482015110534ddac075337c81f54f3efa4f8a8bce54e31565a6323aad37e35674c1d40686d4ab3747ed6b
+DIST libsc-2.8.3.tar.gz 360755 BLAKE2B 2d7e3a16b97de551678ebb33f362e1ef7ebb0bcbf8d00b1a5317bfbf6732cf7bb9be2d215c79395809f3c616c23da5236c4f0f436a7b8bb07171141aaf08bbb3 SHA512 9def8850898f2d7d7a6ffaffd0872bc18af28026407356a1fe10f2b4f6d4a32ae6febe59c91cfa8817969624f995d48f64e0d5424b475e3a4c501338f4de70de

diff --git a/sci-libs/libsc/files/libsc-2.8.3-fix_build_system.patch b/sci-libs/libsc/files/libsc-2.8.3-fix_build_system.patch
new file mode 100644
index 000000000000..b5bdc734ab55
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.3-fix_build_system.patch
@@ -0,0 +1,41 @@
+https://github.com/cburstedde/libsc/pull/54
+https://github.com/cburstedde/libsc/pull/55
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2ce08e2..a588beb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,8 @@ HOMEPAGE_URL https://www.p4est.org/
+ DESCRIPTION "The SC library supports parallel scientific applications."
+ VERSION ${PROJECT_VERSION})
+ 
++set(CMAKE_POSITION_INDEPENDENT_CODE ON)
++
+ include(CTest)
+ 
+ include(cmake/options.cmake)
+@@ -28,8 +30,7 @@ if(MPI_FOUND)
+ endif()
+ 
+ # --- libb64
+-add_library(libb64 OBJECT libb64/cencode.c libb64/cdecode.c
+-                          libb64/b64dec.c libb64/b64enc.c)
++add_library(libb64 OBJECT libb64/cencode.c libb64/cdecode.c)
+ target_include_directories(libb64 PRIVATE libb64)
+ 
+ # --- sc
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a588beb..aff0eca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -64,8 +64,8 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/ ${PROJECT_SOURCE_DIR}/src/sc_builti
+ 
+ install(TARGETS sc
+   EXPORT ${PROJECT_NAME}Targets
+-  ARCHIVE DESTINATION lib
+-  LIBRARY DESTINATION lib)
++  ARCHIVE DESTINATION ${library_reldir}
++  LIBRARY DESTINATION ${library_reldir})
+ 
+ add_subdirectory(src)
+ 

diff --git a/sci-libs/libsc/files/libsc-2.8.3-set_version.patch b/sci-libs/libsc/files/libsc-2.8.3-set_version.patch
new file mode 100644
index 000000000000..dcd63994cc67
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.3-set_version.patch
@@ -0,0 +1,44 @@
+diff --git a/cmake/git.cmake b/cmake/git.cmake
+index dd6009e..7c5c8f3 100644
+--- a/cmake/git.cmake
++++ b/cmake/git.cmake
+@@ -1,36 +1,3 @@
+ # --- extract version from Git
+ 
+-set(PROJECT_VERSION 0.0.0)
+-find_program(GIT_VERSION_GEN NAMES git-version-gen
+-             PATHS ${CMAKE_SOURCE_DIR}/build-aux NO_DEFAULT_PATH)
+-if(GIT_VERSION_GEN)
+-  execute_process(COMMAND ${GIT_VERSION_GEN} .tarball_version
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-    RESULT_VARIABLE _err
+-    OUTPUT_VARIABLE git_version
+-    OUTPUT_STRIP_TRAILING_WHITESPACE)
+-endif()
+-if(_err EQUAL 0)
+-  if(git_version MATCHES
+-                 "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.].*")
+-    set(_major "${CMAKE_MATCH_1}")
+-    set(_minor "${CMAKE_MATCH_2}")
+-    set(_patch "${CMAKE_MATCH_3}")
+-    set(PROJECT_VERSION ${_major}.${_minor}.${_patch}.999)
+-  elseif(git_version MATCHES
+-                 "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+-    set(_major "${CMAKE_MATCH_1}")
+-    set(_minor "${CMAKE_MATCH_2}")
+-    set(_patch "${CMAKE_MATCH_3}")
+-    set(PROJECT_VERSION ${_major}.${_minor}.${_patch})
+-  elseif(git_version MATCHES
+-                 "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+-    set(_major "${CMAKE_MATCH_1}")
+-    set(_minor "${CMAKE_MATCH_2}")
+-    set(PROJECT_VERSION ${_major}.${_minor})
+-  elseif(git_version MATCHES
+-                 "^(0|[1-9][0-9]*)")
+-    set(_major "${CMAKE_MATCH_1}")
+-    set(PROJECT_VERSION ${_major})
+-  endif()
+-endif()
++set(PROJECT_VERSION 2.8.3)
+
+

diff --git a/sci-libs/libsc/libsc-2.8.3.ebuild b/sci-libs/libsc/libsc-2.8.3.ebuild
new file mode 100644
index 000000000000..9ed5ecf5c58f
--- /dev/null
+++ b/sci-libs/libsc/libsc-2.8.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Support for parallel scientific applications"
+HOMEPAGE="http://www.p4est.org/"
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/cburstedde/${PN}.git"
+	EGIT_BRANCH="develop"
+else
+	SRC_URI="https://github.com/cburstedde/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="debug examples mpi openmp threads"
+
+RDEPEND="
+	sys-apps/util-linux
+	sys-libs/zlib
+	virtual/blas
+	virtual/lapack
+	mpi? ( virtual/mpi[romio] )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-set_version.patch
+	"${FILESDIR}"/${P}-fix_build_system.patch
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-Dmpi="$(usex mpi)"
+		-Dopenmp="$(usex openmp)"
+		-Dlibrary_reldir="$(get_libdir)"
+	)
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	rm -r "${ED}"/usr/include/getopt.h \
+		"${ED}"/usr/include/getopt_int.h \
+		"${ED}"/usr/include/sc_builtin || die "rm failed"
+
+	mv "${ED}"/usr/share/docs/SC/* "${ED}"/usr/share/doc/${P}/ || die "mv failed"
+	rm -r "${ED}"/usr/share/docs || die "rm failed"
+}


             reply	other threads:[~2022-02-14  0:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  0:51 Matthias Maier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-04 18:10 [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/files/, sci-libs/libsc/ Matthias Maier
2023-07-15  2:15 Matthias Maier
2023-06-20  0:45 Matthias Maier
2022-02-14  0:51 Matthias Maier
2021-08-04 17:40 David Seifert
2021-06-07 16:41 Matthias Maier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1644799875.fc1125212d7c3f05146818f6870d48521231fda4.tamiko@gentoo \
    --to=tamiko@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox