* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/
@ 2021-06-07 16:41 Matthias Maier
0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maier @ 2021-06-07 16:41 UTC (permalink / raw
To: gentoo-commits
commit: cb560121a2ba971e17e1ba9b5bd57baed1e1b41b
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 7 16:23:52 2021 +0000
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Jun 7 16:41:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb560121
sci-libs/libsc: add soname back
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
sci-libs/libsc/files/libsc-2.3-add_soname.patch | 13 +++++++++++++
sci-libs/libsc/libsc-2.3.1.ebuild | 1 +
2 files changed, 14 insertions(+)
diff --git a/sci-libs/libsc/files/libsc-2.3-add_soname.patch b/sci-libs/libsc/files/libsc-2.3-add_soname.patch
new file mode 100644
index 00000000000..61e8d56fa44
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.3-add_soname.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9d030d5..decbea8 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -43,7 +43,7 @@ src_libsc_la_SOURCES = \
+ $(libsc_internal_headers) \
+ $(libsc_compiled_sources)
+ src_libsc_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSC_CPPFLAGS)
+-## src_libsc_la_LDFLAGS = -release $(VERSION)
++src_libsc_la_LDFLAGS = -release $(VERSION)
+ LDADD += @top_builddir@/src/libsc.la
+
+ nodist_include_HEADERS += $(libsc_generated_headers)
diff --git a/sci-libs/libsc/libsc-2.3.1.ebuild b/sci-libs/libsc/libsc-2.3.1.ebuild
index 7033e904a98..e84c20273cf 100644
--- a/sci-libs/libsc/libsc-2.3.1.ebuild
+++ b/sci-libs/libsc/libsc-2.3.1.ebuild
@@ -39,6 +39,7 @@ DEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-2.3-autoconf_lua_version.patch
+ "${FILESDIR}"/${PN}-2.3-add_soname.patch
)
DOCS=( AUTHORS NEWS README )
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/
@ 2023-02-01 19:27 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2023-02-01 19:27 UTC (permalink / raw
To: gentoo-commits
commit: 406d3fc821c6be208814445bc2ad98bed3c2e9b4
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 15:54:11 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 1 19:26:39 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406d3fc8
sci-libs/libsc: drop 2.3.1-r1, 2.3.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
sci-libs/libsc/Manifest | 2 -
sci-libs/libsc/files/libsc-2.3-add_soname.patch | 13 ---
.../files/libsc-2.3-autoconf_lua_version.patch | 64 -------------
sci-libs/libsc/libsc-2.3.1-r1.ebuild | 100 ---------------------
sci-libs/libsc/libsc-2.3.3.ebuild | 100 ---------------------
sci-libs/libsc/metadata.xml | 3 -
6 files changed, 282 deletions(-)
diff --git a/sci-libs/libsc/Manifest b/sci-libs/libsc/Manifest
index 05ef5652e9e8..d14ff4ef580d 100644
--- a/sci-libs/libsc/Manifest
+++ b/sci-libs/libsc/Manifest
@@ -1,3 +1 @@
-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.3-add_soname.patch b/sci-libs/libsc/files/libsc-2.3-add_soname.patch
deleted file mode 100644
index 61e8d56fa44d..000000000000
--- a/sci-libs/libsc/files/libsc-2.3-add_soname.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 9d030d5..decbea8 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -43,7 +43,7 @@ src_libsc_la_SOURCES = \
- $(libsc_internal_headers) \
- $(libsc_compiled_sources)
- src_libsc_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSC_CPPFLAGS)
--## src_libsc_la_LDFLAGS = -release $(VERSION)
-+src_libsc_la_LDFLAGS = -release $(VERSION)
- LDADD += @top_builddir@/src/libsc.la
-
- nodist_include_HEADERS += $(libsc_generated_headers)
diff --git a/sci-libs/libsc/files/libsc-2.3-autoconf_lua_version.patch b/sci-libs/libsc/files/libsc-2.3-autoconf_lua_version.patch
deleted file mode 100644
index 9881d0aa6227..000000000000
--- a/sci-libs/libsc/files/libsc-2.3-autoconf_lua_version.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/config/sc_include.m4 b/config/sc_include.m4
-index f6f7873..3befe0e 100644
---- a/config/sc_include.m4
-+++ b/config/sc_include.m4
-@@ -281,8 +281,7 @@ AC_DEFUN([SC_CHECK_LIBRARIES],
- [
- SC_REQUIRE_LIB([m], [fabs])
- SC_CHECK_LIB([z], [adler32_combine], [ZLIB], [$1])
--SC_CHECK_LIB([lua53 lua5.3 lua52 lua5.2 lua51 lua5.1 lua lua5], [lua_createtable],
-- [LUA], [$1])
-+SC_CHECK_LIB([$LUA_IMPL], [lua_createtable], [LUA], [$1])
- SC_CHECK_BLAS_LAPACK([$1])
- SC_BUILTIN_ALL_PREFIX([$1])
- SC_CHECK_PTHREAD([$1])
-diff --git a/configure.ac b/configure.ac
-index ce462e0..b291685 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -78,7 +78,7 @@ echo "o---------------------------------------"
- AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/select.h sys/stat.h])
- AC_CHECK_HEADERS([linux/videodev2.h])
- AC_CHECK_HEADERS([execinfo.h signal.h sys/time.h sys/types.h time.h])
--AC_CHECK_HEADERS([lua.h lua5.1/lua.h lua5.2/lua.h lua5.3/lua.h])
-+AC_CHECK_HEADERS([$LUA_IMPL/lua.h])
-
- echo "o---------------------------------------"
- echo "| Checking functions"
-diff --git a/src/sc_lua.h b/src/sc_lua.h
-index 770b52f..a6db175 100644
---- a/src/sc_lua.h
-+++ b/src/sc_lua.h
-@@ -30,29 +30,9 @@
-
- SC_EXTERN_C_BEGIN;
-
--#ifdef SC_HAVE_LUA5_3_LUA_H
--#include <lua5.3/lua.h>
--#include <lua5.3/lualib.h>
--#include <lua5.3/lauxlib.h>
--#else
--#ifdef SC_HAVE_LUA5_2_LUA_H
--#include <lua5.2/lua.h>
--#include <lua5.2/lualib.h>
--#include <lua5.2/lauxlib.h>
--#else
--#ifdef SC_HAVE_LUA5_1_LUA_H
--#include <lua5.1/lua.h>
--#include <lua5.1/lualib.h>
--#include <lua5.1/lauxlib.h>
--#else
--#ifdef SC_HAVE_LUA_H
--#include <lua.h>
--#include <lualib.h>
--#include <lauxlib.h>
--#endif
--#endif
--#endif
--#endif
-+#include <@LUA_IMPL@/lua.h>
-+#include <@LUA_IMPL@/lualib.h>
-+#include <@LUA_IMPL@/lauxlib.h>
-
- SC_EXTERN_C_END;
-
diff --git a/sci-libs/libsc/libsc-2.3.1-r1.ebuild b/sci-libs/libsc/libsc-2.3.1-r1.ebuild
deleted file mode 100644
index 6728d0cadb05..000000000000
--- a/sci-libs/libsc/libsc-2.3.1-r1.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..3} )
-
-inherit autotools lua-single 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 romio threads"
-REQUIRED_USE="
- ${LUA_REQUIRED_USE}
- romio? ( mpi )"
-
-RDEPEND="
- ${LUA_DEPS}
- sys-apps/util-linux
- virtual/blas
- virtual/lapack
- mpi? ( virtual/mpi[romio?] )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.3-autoconf_lua_version.patch
- "${FILESDIR}"/${PN}-2.3-add_soname.patch
-)
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
- lua-single_pkg_setup
-}
-
-src_prepare() {
- default
-
- sed -i -e "s/@LUA_IMPL@/${ELUA}/" "${S}"/src/sc_lua.h || die
-
- # Inject a version number into the build system
- echo "${PV}" > "${S}"/.tarball-version || die
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- $(use_enable debug)
- $(use_enable mpi)
- $(use_enable openmp openmp)
- $(use_enable romio mpiio)
- $(use_enable threads pthread)
- --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
- --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
- )
- econf LUA_IMPL="${ELUA}" "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if use examples; then
- docinto examples
- dodoc -r example/*
- docompress -x /usr/share/doc/${PF}/examples
- else
- # Remove compiled example binaries in case of -examples:
- rm -r "${ED}"/usr/bin || die "rm failed"
- fi
-
- # Remove ac files, bug #619806
- rm -r "${ED}"/usr/share/aclocal || die "rm failed"
-
- # Fix wrong installation paths:
- dodir /usr/share/libsc
- mv "${ED}"/etc/* "${ED}"/usr/share/libsc || die "mv failed"
- rmdir "${ED}"/etc/ || die "rmdir failed"
- mv "${ED}"/usr/share/ini/* "${ED}"/usr/share/libsc || die "mv failed"
- rmdir "${ED}"/usr/share/ini || die "rmdir failed"
-
- # no static archives
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sci-libs/libsc/libsc-2.3.3.ebuild b/sci-libs/libsc/libsc-2.3.3.ebuild
deleted file mode 100644
index 6728d0cadb05..000000000000
--- a/sci-libs/libsc/libsc-2.3.3.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..3} )
-
-inherit autotools lua-single 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 romio threads"
-REQUIRED_USE="
- ${LUA_REQUIRED_USE}
- romio? ( mpi )"
-
-RDEPEND="
- ${LUA_DEPS}
- sys-apps/util-linux
- virtual/blas
- virtual/lapack
- mpi? ( virtual/mpi[romio?] )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.3-autoconf_lua_version.patch
- "${FILESDIR}"/${PN}-2.3-add_soname.patch
-)
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
- [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
- lua-single_pkg_setup
-}
-
-src_prepare() {
- default
-
- sed -i -e "s/@LUA_IMPL@/${ELUA}/" "${S}"/src/sc_lua.h || die
-
- # Inject a version number into the build system
- echo "${PV}" > "${S}"/.tarball-version || die
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- $(use_enable debug)
- $(use_enable mpi)
- $(use_enable openmp openmp)
- $(use_enable romio mpiio)
- $(use_enable threads pthread)
- --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
- --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
- )
- econf LUA_IMPL="${ELUA}" "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if use examples; then
- docinto examples
- dodoc -r example/*
- docompress -x /usr/share/doc/${PF}/examples
- else
- # Remove compiled example binaries in case of -examples:
- rm -r "${ED}"/usr/bin || die "rm failed"
- fi
-
- # Remove ac files, bug #619806
- rm -r "${ED}"/usr/share/aclocal || die "rm failed"
-
- # Fix wrong installation paths:
- dodir /usr/share/libsc
- mv "${ED}"/etc/* "${ED}"/usr/share/libsc || die "mv failed"
- rmdir "${ED}"/etc/ || die "rmdir failed"
- mv "${ED}"/usr/share/ini/* "${ED}"/usr/share/libsc || die "mv failed"
- rmdir "${ED}"/usr/share/ini || die "rmdir failed"
-
- # no static archives
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sci-libs/libsc/metadata.xml b/sci-libs/libsc/metadata.xml
index 9267d0132a0b..ff1113592d21 100644
--- a/sci-libs/libsc/metadata.xml
+++ b/sci-libs/libsc/metadata.xml
@@ -13,9 +13,6 @@
The SC Library provides support for parallel scientific applications.
This support library is primarily used by <pkg>sci-libs/p4est</pkg>.
</longdescription>
- <use>
- <flag name="romio">Build with support for the ROMIO MPI-IO component</flag>
- </use>
<upstream>
<remote-id type="github">cburstedde/libsc</remote-id>
</upstream>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/
@ 2023-06-19 18:26 Matthias Maier
0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maier @ 2023-06-19 18:26 UTC (permalink / raw
To: gentoo-commits
commit: ca942b500cd74be4ef39a90a282d6ba6870826a0
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 17:33:43 2023 +0000
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 18:26:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca942b50
sci-libs/libsc: add 2.8.5
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
sci-libs/libsc/Manifest | 1 +
.../files/libsc-2.8.5-do_not_compile_zlib-ng.patch | 57 +++++++++
.../libsc/files/libsc-2.8.5-fix_build_system.patch | 25 ++++
sci-libs/libsc/files/libsc-2.8.5-set_version.patch | 49 ++++++++
.../files/libsc-2.8.5-use_zlib-ng_symbols.patch | 135 +++++++++++++++++++++
sci-libs/libsc/libsc-2.8.5.ebuild | 69 +++++++++++
6 files changed, 336 insertions(+)
diff --git a/sci-libs/libsc/Manifest b/sci-libs/libsc/Manifest
index d14ff4ef580d..af1e9c81cb76 100644
--- a/sci-libs/libsc/Manifest
+++ b/sci-libs/libsc/Manifest
@@ -1 +1,2 @@
DIST libsc-2.8.3.tar.gz 360755 BLAKE2B 2d7e3a16b97de551678ebb33f362e1ef7ebb0bcbf8d00b1a5317bfbf6732cf7bb9be2d215c79395809f3c616c23da5236c4f0f436a7b8bb07171141aaf08bbb3 SHA512 9def8850898f2d7d7a6ffaffd0872bc18af28026407356a1fe10f2b4f6d4a32ae6febe59c91cfa8817969624f995d48f64e0d5424b475e3a4c501338f4de70de
+DIST libsc-2.8.5.tar.gz 401520 BLAKE2B 28f74c03dc9a6238c254683585e3a6e372718bbf147f1a1bfe051d9a9079491650eca645bb695ce4c36920dda459904be6f9d41fb53163952d9076302072e181 SHA512 d7854a77cb574531d410c978af5768782d6201c730a3248371a822172cb99fe0b2efc8c2e4f495160924fb867ed77ab1b9ac17a1db349d8a6495228698cf970b
diff --git a/sci-libs/libsc/files/libsc-2.8.5-do_not_compile_zlib-ng.patch b/sci-libs/libsc/files/libsc-2.8.5-do_not_compile_zlib-ng.patch
new file mode 100644
index 000000000000..fb0ce0de7dbb
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.5-do_not_compile_zlib-ng.patch
@@ -0,0 +1,57 @@
+diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
+index 5ca9f6d..86b9035 100644
+--- a/cmake/zlib.cmake
++++ b/cmake/zlib.cmake
+@@ -1,51 +1,8 @@
+ # build Zlib to ensure compatibility.
+ # We use Zlib 2.x for speed and robustness.
+ include(GNUInstallDirs)
+-include(ExternalProject)
+
+-set(ZLIB_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
+-
+-if(BUILD_SHARED_LIBS)
+- if(WIN32)
+- set(ZLIB_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}zlib1${CMAKE_SHARED_LIBRARY_SUFFIX})
+- else()
+- set(ZLIB_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
+- endif()
+-else()
+- if(MSVC)
+- set(ZLIB_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}zlibstatic${CMAKE_STATIC_LIBRARY_SUFFIX})
+- else()
+- set(ZLIB_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX})
+- endif()
+-endif()
+-
+-set(zlib_cmake_args
+--DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+--DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+--DCMAKE_BUILD_TYPE=Release
+--DZLIB_COMPAT:BOOL=on
+--DZLIB_ENABLE_TESTS:BOOL=off
+--DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+--DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+-)
+-
+-ExternalProject_Add(ZLIB
+-GIT_REPOSITORY https://github.com/zlib-ng/zlib-ng.git
+-GIT_TAG 2.0.6
+-GIT_SHALLOW true
+-CMAKE_ARGS ${zlib_cmake_args}
+-BUILD_BYPRODUCTS ${ZLIB_LIBRARIES}
+-TLS_VERIFY true
+-CONFIGURE_HANDLED_BY_BUILD ON
+-INACTIVITY_TIMEOUT 60
+-)
+-
+-# --- imported target
+-
+-file(MAKE_DIRECTORY ${ZLIB_INCLUDE_DIRS})
+-# avoid race condition
++find_library(ZLIB_LIBRARIES NAMES z-ng)
+
+ add_library(ZLIB::ZLIB INTERFACE IMPORTED GLOBAL)
+-add_dependencies(ZLIB::ZLIB ZLIB) # to avoid include directory race condition
+ target_link_libraries(ZLIB::ZLIB INTERFACE ${ZLIB_LIBRARIES})
+-target_include_directories(ZLIB::ZLIB INTERFACE ${ZLIB_INCLUDE_DIRS})
diff --git a/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch b/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch
new file mode 100644
index 000000000000..6adfbf31c997
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 87af1b1..82cb357 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)
++
+ enable_testing()
+
+ include(cmake/options.cmake)
+@@ -57,7 +59,10 @@ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING PATTERN "*.h"
+ )
+
+-install(TARGETS sc EXPORT ${PROJECT_NAME}-targets)
++install(TARGETS sc EXPORT ${PROJECT_NAME}-targets
++ARCHIVE DESTINATION ${library_reldir}
++LIBRARY DESTINATION ${library_reldir}
++)
+
+ add_subdirectory(src)
+ add_subdirectory(example)
diff --git a/sci-libs/libsc/files/libsc-2.8.5-set_version.patch b/sci-libs/libsc/files/libsc-2.8.5-set_version.patch
new file mode 100644
index 000000000000..061081a0da9e
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.5-set_version.patch
@@ -0,0 +1,49 @@
+diff --git a/cmake/git.cmake b/cmake/git.cmake
+index f88e984..f04f52b 100644
+--- a/cmake/git.cmake
++++ b/cmake/git.cmake
+@@ -1,39 +1,5 @@
+-# --- extract version from Git
+-
+-set(PROJECT_MAJOR 0)
+-set(PROJECT_MINOR 0)
+-set(PROJECT_PATCH 0)
+-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(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH}.999)
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR})
+- endif()
+-endif()
++set(git_version 2.8.5)
++set(PROJECT_MAJOR 2)
++set(PROJECT_MINOR 8)
++set(PROJECT_PATCH 5)
++set(PROJECT_VERSION 2.8.5)
diff --git a/sci-libs/libsc/files/libsc-2.8.5-use_zlib-ng_symbols.patch b/sci-libs/libsc/files/libsc-2.8.5-use_zlib-ng_symbols.patch
new file mode 100644
index 000000000000..74827050243b
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.5-use_zlib-ng_symbols.patch
@@ -0,0 +1,135 @@
+diff --git a/src/sc_containers.c b/src/sc_containers.c
+index 47c86d7..b9a1979 100644
+--- a/src/sc_containers.c
++++ b/src/sc_containers.c
+@@ -23,7 +23,7 @@
+
+ #include <sc_containers.h>
+ #ifdef SC_HAVE_ZLIB
+-#include <zlib.h>
++#include <zlib-ng.h>
+ #endif
+
+ /* array routines */
+@@ -636,13 +636,13 @@ sc_array_checksum (sc_array_t * array)
+ unsigned int crc;
+ size_t bytes;
+
+- crc = adler32 (0, Z_NULL, 0);
++ crc = zng_adler32 (0, Z_NULL, 0);
+ if (array->elem_count == 0) {
+ return crc;
+ }
+
+ bytes = array->elem_count * array->elem_size;
+- crc = adler32 (crc, (const Bytef *) array->array, bytes);
++ crc = zng_adler32 (crc, (const Bytef *) array->array, bytes);
+
+ return crc;
+ #else
+diff --git a/src/sc_io.c b/src/sc_io.c
+index a7ed413..bc2df7d 100644
+--- a/src/sc_io.c
++++ b/src/sc_io.c
+@@ -25,7 +25,7 @@
+ #include <sc_puff.h>
+ #include <libb64.h>
+ #ifdef SC_HAVE_ZLIB
+-#include <zlib.h>
++#include <zlib-ng.h>
+ #endif
+
+ #ifndef SC_ENABLE_MPIIO
+@@ -706,7 +706,7 @@ sc_io_encode_zlib (sc_array_t *data, sc_array_t *out,
+ #ifndef SC_HAVE_ZLIB
+ input_compress_bound = sc_io_noncompress_bound (input_size);
+ #else
+- input_compress_bound = compressBound ((uLong) input_size);
++ input_compress_bound = zng_compressBound ((uLong) input_size);
+ #endif /* SC_HAVE_ZLIB */
+ sc_array_init_count (&compressed, 1,
+ SC_IO_ENCODE_INFO_LEN + input_compress_bound);
+@@ -715,9 +715,9 @@ sc_io_encode_zlib (sc_array_t *data, sc_array_t *out,
+ sc_io_noncompress (compressed.array + SC_IO_ENCODE_INFO_LEN,
+ input_compress_bound, data->array, input_size);
+ #else
+- zrv = compress2 ((Bytef *) compressed.array + SC_IO_ENCODE_INFO_LEN,
+- &input_compress_bound, (Bytef *) data->array,
+- (uLong) input_size, zlib_compression_level);
++ zrv = zng_compress2 ((Bytef *) compressed.array + SC_IO_ENCODE_INFO_LEN,
++ &input_compress_bound, (Bytef *) data->array,
++ (uLong) input_size, zlib_compression_level);
+ SC_CHECK_ABORT (zrv == Z_OK, "Error on zlib compression");
+ #endif /* SC_HAVE_ZLIB */
+
+@@ -993,9 +993,9 @@ sc_io_decode (sc_array_t *data, sc_array_t *out,
+ }
+ #else
+ uncompsize = (uLong) encoded_size;
+- zrv = uncompress ((Bytef *) out->array, &uncompsize,
+- (Bytef *) (compressed.array + SC_IO_ENCODE_INFO_LEN),
+- ocnt - SC_IO_ENCODE_INFO_LEN);
++ zrv = zng_uncompress ((Bytef *) out->array, &uncompsize,
++ (Bytef *) (compressed.array + SC_IO_ENCODE_INFO_LEN),
++ ocnt - SC_IO_ENCODE_INFO_LEN);
+ if (zrv != Z_OK) {
+ SC_LERROR ("zlib uncompress error\n");
+ goto decode_error;
+@@ -1120,9 +1120,9 @@ sc_vtk_write_compressed (FILE * vtkfile, char *numeric_data,
+ base64_init_encodestate (&encode_state);
+ for (theblock = 0; theblock < numregularblocks; ++theblock) {
+ comp_length = code_length;
+- retval = compress2 ((Bytef *) comp_data, &comp_length,
+- (const Bytef *) (numeric_data + theblock * blocksize),
+- (uLong) blocksize, Z_BEST_COMPRESSION);
++ retval = zng_compress2 ((Bytef *) comp_data, &comp_length,
++ (const Bytef *) (numeric_data + theblock * blocksize),
++ (uLong) blocksize, Z_BEST_COMPRESSION);
+ SC_CHECK_ZLIB (retval);
+ compression_header[3 + theblock] = comp_length;
+ base_length = base64_encode_block (comp_data, comp_length,
+@@ -1135,9 +1135,9 @@ sc_vtk_write_compressed (FILE * vtkfile, char *numeric_data,
+ /* write odd-sized last block if necessary */
+ if (lastsize > 0) {
+ comp_length = code_length;
+- retval = compress2 ((Bytef *) comp_data, &comp_length,
+- (const Bytef *) (numeric_data + theblock * blocksize),
+- (uLong) lastsize, Z_BEST_COMPRESSION);
++ retval = zng_compress2 ((Bytef *) comp_data, &comp_length,
++ (const Bytef *) (numeric_data + theblock * blocksize),
++ (uLong) lastsize, Z_BEST_COMPRESSION);
+ SC_CHECK_ZLIB (retval);
+ compression_header[3 + theblock] = comp_length;
+ base_length = base64_encode_block (comp_data, comp_length,
+diff --git a/test/test_builtin.c b/test/test_builtin.c
+index 371aff6..9a99c2d 100644
+--- a/test/test_builtin.c
++++ b/test/test_builtin.c
+@@ -27,7 +27,7 @@
+
+ /* truthfully, the libraries below are not builtin anymore */
+ #ifdef SC_HAVE_ZLIB
+-#include <zlib.h>
++#include <zlib-ng.h>
+ #endif
+
+ static int
+@@ -87,13 +87,13 @@ test_zlib (void)
+ char b3[BUFSIZ];
+ uLong adler0, adler1, adler2, adler3a, adler3b;
+
+- adler0 = adler32 (0L, Z_NULL, 0);
+- adler1 = adler32 (adler0, (const Bytef *) b1, l1);
+- adler2 = adler32 (adler0, (const Bytef *) b2, l2);
+- adler3a = adler32_combine (adler1, adler2, l2);
++ adler0 = zng_adler32 (0L, Z_NULL, 0);
++ adler1 = zng_adler32 (adler0, (const Bytef *) b1, l1);
++ adler2 = zng_adler32 (adler0, (const Bytef *) b2, l2);
++ adler3a = zng_adler32_combine (adler1, adler2, l2);
+
+ snprintf (b3, BUFSIZ, "%s%s", b1, b2);
+- adler3b = adler32 (adler0, (const Bytef *) b3, l1 + l2);
++ adler3b = zng_adler32 (adler0, (const Bytef *) b3, l1 + l2);
+
+ return adler3a != adler3b;
+ }
diff --git a/sci-libs/libsc/libsc-2.8.5.ebuild b/sci-libs/libsc/libsc-2.8.5.ebuild
new file mode 100644
index 000000000000..e6f5712f4c17
--- /dev/null
+++ b/sci-libs/libsc/libsc-2.8.5.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 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-ng
+ 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
+ "${FILESDIR}"/${P}-do_not_compile_zlib-ng.patch
+ "${FILESDIR}"/${P}-use_zlib-ng_symbols.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/cmake || die "rm failed"
+
+ 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"
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-19 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 18:26 [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/ Matthias Maier
-- strict thread matches above, loose matches on Subject: below --
2023-02-01 19:27 Andreas Sturmlechner
2021-06-07 16:41 Matthias Maier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox