From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 43161158009 for ; Mon, 19 Jun 2023 18:26:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78A1EE08DB; Mon, 19 Jun 2023 18:26:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 601A6E08DB for ; Mon, 19 Jun 2023 18:26:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6F556340E0A for ; Mon, 19 Jun 2023 18:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 831B1A9B for ; Mon, 19 Jun 2023 18:26:43 +0000 (UTC) From: "Matthias Maier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthias Maier" Message-ID: <1687199193.ca942b500cd74be4ef39a90a282d6ba6870826a0.tamiko@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/libsc/Manifest sci-libs/libsc/files/libsc-2.8.5-do_not_compile_zlib-ng.patch sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch sci-libs/libsc/files/libsc-2.8.5-set_version.patch sci-libs/libsc/files/libsc-2.8.5-use_zlib-ng_symbols.patch sci-libs/libsc/libsc-2.8.5.ebuild X-VCS-Directories: sci-libs/libsc/files/ sci-libs/libsc/ X-VCS-Committer: tamiko X-VCS-Committer-Name: Matthias Maier X-VCS-Revision: ca942b500cd74be4ef39a90a282d6ba6870826a0 X-VCS-Branch: master Date: Mon, 19 Jun 2023 18:26:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f229e5a8-1407-4418-bcbc-97bcd643abd4 X-Archives-Hash: ca9d9c4fd606efe428f43a249ccd51c0 commit: ca942b500cd74be4ef39a90a282d6ba6870826a0 Author: Matthias Maier gentoo org> AuthorDate: Mon Jun 19 17:33:43 2023 +0000 Commit: Matthias Maier gentoo 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 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 + #ifdef SC_HAVE_ZLIB +-#include ++#include + #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 + #include + #ifdef SC_HAVE_ZLIB +-#include ++#include + #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 ++#include + #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" +}