audit: github.com/o/r/pull/n/commits/sha.patch -> sha.patch

This commit is contained in:
Wouter Deconinck 2024-05-15 14:35:10 -05:00
parent b968046c66
commit 5bd7da2cad
18 changed files with 7696 additions and 20 deletions

View File

@ -0,0 +1,35 @@
From efc9c176a7a8c512b3f37d079dec8c25ac1b7389 Mon Sep 17 00:00:00 2001
From: Mikael Simberg <mikael.simberg@iki.fi>
Date: Mon, 4 Dec 2023 09:24:14 +0100
Subject: [PATCH] Add missing cstdint includes to scal.{cpp,h}
---
include/dlaf/blas/scal.h | 1 +
src/blas/scal.cpp | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/dlaf/blas/scal.h b/include/dlaf/blas/scal.h
index 028480482a..a4aac4cce6 100644
--- a/include/dlaf/blas/scal.h
+++ b/include/dlaf/blas/scal.h
@@ -11,6 +11,7 @@
#pragma once
#include <complex>
+#include <cstdint>
/// @file
/// Provides overloads for mixed real complex variants of scal missing in blaspp.
diff --git a/src/blas/scal.cpp b/src/blas/scal.cpp
index 16ac5d1d60..9074a07718 100644
--- a/src/blas/scal.cpp
+++ b/src/blas/scal.cpp
@@ -8,6 +8,8 @@
// SPDX-License-Identifier: BSD-3-Clause
//
+#include <cstdint>
+
#include <blas/config.h>
#include <blas/mangling.h>

View File

@ -127,9 +127,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
depends_on(f"pika cuda_arch={arch}", when=f"cuda_arch={arch}")
depends_on(f"umpire cuda_arch={arch}", when=f"cuda_arch={arch}")
# https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch
patch(
"https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1",
sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
"efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch",
when="@:0.3 %gcc@13:",
)
# https://github.com/spack/spack/issues/41511

View File

@ -0,0 +1,22 @@
From f60aa1ff89f8fb596b4a6a4c70aa7d557803db87 Mon Sep 17 00:00:00 2001
From: Tal Ben-Nun <talbn@llnl.gov>
Date: Wed, 26 Jul 2023 13:31:56 -0700
Subject: [PATCH] Fix CMake search for unzipper
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b45cb6d2b2..3d2d760443 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -470,7 +470,7 @@ endif()
function(unpack_db db_bzip2_file)
set(KERNELS_DIR "${CMAKE_SOURCE_DIR}/src/kernels")
STRING(REPLACE ".bz2" "" db_file "${db_bzip2_file}")
- find_program(UNZIPPER lbunzip2 bunzip2)
+ find_program(UNZIPPER NAMES lbunzip2 bunzip2)
if(EXISTS "${db_file}")
message(STATUS "WARNING: ${db_file} already exists and will be overwritten")
endif()

View File

@ -57,9 +57,9 @@ class MiopenHip(CMakePackage):
patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:5.7")
patch("0002-add-include-dir-miopen-hip-6.0.0.patch", when="@6.0")
patch("0002-add-include-dir-miopen-hip-6.1.0.patch", when="@6.1")
# https://github.com/ROCm/MIOpen/pull/2276/commits/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch
patch(
"https://github.com/ROCm/MIOpen/pull/2276/commits/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
sha256="c777d9f4cd2bbfec632b38620c0f70bb0cce8da1",
"f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch",
when="@5.7",
)

View File

@ -0,0 +1,24 @@
From 183396e51a6771d5d2b43f22b0d2a9a91785e533 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 22 Jun 2023 11:29:03 -0500
Subject: [PATCH] fix: append existing PYTHONPATH to CMAKE_PYTHON_PATH
This addresses #3500. It approaches it slightly differently than the code included there, in order to behave correctly when `PYTHONPATH` is not set and to remain within the CMake version 3.6 minimum (prevents `JOIN`).
---
src/mlpack/bindings/python/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mlpack/bindings/python/CMakeLists.txt b/src/mlpack/bindings/python/CMakeLists.txt
index e4b34744748..971cf727d88 100644
--- a/src/mlpack/bindings/python/CMakeLists.txt
+++ b/src/mlpack/bindings/python/CMakeLists.txt
@@ -203,6 +203,9 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE}
"${PYTHON_INSTALL_PREFIX}"
OUTPUT_VARIABLE CMAKE_PYTHON_PATH)
string(STRIP "${CMAKE_PYTHON_PATH}" CMAKE_PYTHON_PATH)
+if (DEFINED ENV{PYTHONPATH})
+ string(APPEND CMAKE_PYTHON_PATH : $ENV{PYTHONPATH})
+endif ()
install(CODE "set(ENV{PYTHONPATH} ${CMAKE_PYTHON_PATH})")
install(CODE "set(PYTHON_EXECUTABLE \"${PYTHON_EXECUTABLE}\")")
install(CODE "set(CMAKE_BINARY_DIR \"${CMAKE_BINARY_DIR}\")")

View File

@ -63,9 +63,9 @@ class Mlpack(CMakePackage):
depends_on("r-testthat")
depends_on("r-pkgbuild")
# https://github.com/mlpack/mlpack/pull/3502/commits/183396e51a6771d5d2b43f22b0d2a9a91785e533.patch
patch(
"https://github.com/mlpack/mlpack/pull/3502/commits/183396e51a6771d5d2b43f22b0d2a9a91785e533.patch?full_index=1",
sha256="eaa1791ca874201cca5fb661f44e0038f9996b2d02dac6c71d42935eac56a2b4",
"183396e51a6771d5d2b43f22b0d2a9a91785e533.patch",
when="@4:4.2.0",
)

View File

@ -0,0 +1,284 @@
From 759620a3b7b787c960a7e414ba26ab5497817d40 Mon Sep 17 00:00:00 2001
From: Pei Jia <jiapei@longervision.com>
Date: Sat, 9 Dec 2023 23:52:07 -0800
Subject: [PATCH] It looks ffmpeg is a must for OSG? Now, compatible with
ffmpeg-6.0.1
---
.../OpenCASCADE/ReaderWriterOpenCASCADE.cpp | 2 +-
src/osgPlugins/ffmpeg/FFmpegDecoder.cpp | 8 +++----
src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp | 14 ++++++-----
src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp | 1 +
src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp | 23 +++++++++++--------
src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp | 7 +++---
src/osgPlugins/ffmpeg/FFmpegHeaders.hpp | 1 +
src/osgPlugins/ffmpeg/FFmpegPacket.hpp | 2 +-
src/osgPlugins/ffmpeg/FFmpegParameters.hpp | 4 ++--
src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp | 3 ++-
10 files changed, 37 insertions(+), 28 deletions(-)
diff --git a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp
index 91a14220016..a43ca5d511e 100644
--- a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp
+++ b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp
@@ -211,7 +211,7 @@ osg::ref_ptr<osg::Geometry> ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet
{
// populate vertex list
// Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3
- gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation());
+ gp_Pnt pt = (triangulation->Node(j)).Transformed(transformation * location.Transformation());
vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z()));
// populate color list
diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp
index 4de143d2279..dd58b662b5f 100644
--- a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp
+++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp
@@ -62,7 +62,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet
{
// Open video file
AVFormatContext * p_format_context = 0;
- AVInputFormat *iformat = 0;
+ const AVInputFormat *iformat = 0;
if (filename.compare(0, 5, "/dev/")==0)
{
@@ -304,9 +304,9 @@ bool FFmpegDecoder::readNextPacketNormal()
else
{
// Make the packet data available beyond av_read_frame() logical scope.
- if ((error = av_dup_packet(&packet)) < 0) {
- OSG_FATAL << "av_dup_packet() returned " << AvStrError(error) << std::endl;
- throw std::runtime_error("av_dup_packet() failed");
+ if ((error = av_packet_make_refcounted(&packet)) < 0) {
+ OSG_FATAL << "av_packet_make_refcounted() returned " << AvStrError(error) << std::endl;
+ throw std::runtime_error("av_packet_make_refcounted() failed");
}
m_pending_packet = FFmpegPacket(packet);
diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
index 636bddd2546..5e8db3dc0ba 100644
--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
@@ -40,17 +40,17 @@ static int decode_audio(AVCodecContext *avctx, int16_t *samples,
avpkt.size = buf_size;
AVFrame *frame = av_frame_alloc();
- int ret, got_frame = 0;
+ int ret;
if (!frame)
return AVERROR(ENOMEM);
- ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt);
+ ret = avcodec_receive_frame(avctx, frame);
#ifdef USE_AVRESAMPLE // libav's AVFrame structure does not contain a 'channels' field
- if (ret >= 0 && got_frame) {
+ if (ret >= 0) {
#else
- if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) {
+ if (ret >= 0 && frame->channels>0) {
#endif
int ch, plane_size;
int planar = av_sample_fmt_is_planar(avctx->sample_fmt);
@@ -151,7 +151,9 @@ void FFmpegDecoderAudio::open(AVStream * const stream, FFmpegParameters* paramet
return;
m_stream = stream;
- m_context = stream->codec;
+ m_codecpar = stream->codecpar;
+ const AVCodec* p_codec = avcodec_find_decoder(m_codecpar->codec_id);
+ m_context = avcodec_alloc_context3(p_codec);
m_in_sample_rate = m_context->sample_rate;
m_in_nb_channels = m_context->channels;
@@ -214,7 +216,7 @@ printf("### CONVERTING from sample format %s TO %s\n\t\tFROM %d TO %d channels\n
throw std::runtime_error("invalid audio codec");;
// Find the decoder for the audio stream
- AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id);
+ p_codec = avcodec_find_decoder(m_context->codec_id);
if (p_codec == 0)
throw std::runtime_error("avcodec_find_decoder() failed");
diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp
index 9f1b968ccbd..f2f9b3407fb 100644
--- a/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp
+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp
@@ -59,6 +59,7 @@ class FFmpegDecoderAudio : public OpenThreads::Thread
PacketQueue & m_packets;
FFmpegClocks & m_clocks;
AVStream * m_stream;
+ AVCodecParameters * m_codecpar;
AVCodecContext * m_context;
FFmpegPacket m_packet;
const uint8_t * m_packet_data;
diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
index 25df979a045..b5214e11f00 100644
--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
@@ -62,7 +62,9 @@ FFmpegDecoderVideo::~FFmpegDecoderVideo()
void FFmpegDecoderVideo::open(AVStream * const stream)
{
m_stream = stream;
- m_context = stream->codec;
+ m_codecpar = stream->codecpar;
+ const AVCodec* p_codec = avcodec_find_decoder(m_codecpar->codec_id);
+ m_context = avcodec_alloc_context3(p_codec);
// Trust the video size given at this point
// (avcodec_open seems to sometimes return a 0x0 size)
@@ -99,11 +101,12 @@ void FFmpegDecoderVideo::open(AVStream * const stream)
// Allocate converted RGB frame
m_frame_rgba.reset(av_frame_alloc());
- m_buffer_rgba[0].resize(avpicture_get_size(AV_PIX_FMT_RGB24, width(), height()));
+ m_buffer_rgba[0].resize(av_image_get_buffer_size(AV_PIX_FMT_RGB24, width(), height(), 1));
m_buffer_rgba[1].resize(m_buffer_rgba[0].size());
// Assign appropriate parts of the buffer to image planes in m_frame_rgba
- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height());
+ AVFrame *avf = m_frame_rgba.get();
+ av_image_fill_arrays(avf->data, avf->linesize, &(m_buffer_rgba[0])[0], AV_PIX_FMT_RGB24, width(), height(), 1);
// Override get_buffer()/release_buffer() from codec context in order to retrieve the PTS of each frame.
m_context->opaque = this;
@@ -169,7 +172,7 @@ void FFmpegDecoderVideo::decodeLoop()
int frame_finished = 0;
// We want to use the entire packet since some codecs will require extra information for decoding
- const int bytes_decoded = avcodec_decode_video2(m_context, m_frame.get(), &frame_finished, &(packet.packet));
+ const int bytes_decoded = avcodec_receive_frame(m_context, m_frame.get());
if (bytes_decoded < 0)
throw std::runtime_error("avcodec_decode_video failed()");
@@ -283,7 +286,7 @@ void FFmpegDecoderVideo::findAspectRatio()
m_pixel_aspect_ratio = ratio;
}
-int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src,
+int FFmpegDecoderVideo::convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src,
int src_pix_fmt, int src_width, int src_height)
{
osg::Timer_t startTick = osg::Timer::instance()->tick();
@@ -334,11 +337,11 @@ void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled)
return;
#endif
- AVPicture * const src = (AVPicture *) m_frame.get();
- AVPicture * const dst = (AVPicture *) m_frame_rgba.get();
+ AVFrame * const src = (AVFrame *) m_frame.get();
+ AVFrame * const dst = (AVFrame *) m_frame_rgba.get();
- // Assign appropriate parts of the buffer to image planes in m_frame_rgba
- avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height());
+ // Assign appropriate parts of the buffer to image planes in m_frame_rgba
+ av_image_fill_arrays(dst->data, dst->linesize, &(m_buffer_rgba[m_writeBuffer])[0], AV_PIX_FMT_RGB24, width(), height(), 1);
// Convert YUVA420p (i.e. YUV420p plus alpha channel) using our own routine
@@ -370,7 +373,7 @@ void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled)
-void FFmpegDecoderVideo::yuva420pToRgba(AVPicture * const dst, AVPicture * const src, int width, int height)
+void FFmpegDecoderVideo::yuva420pToRgba(AVFrame * const dst, AVFrame * const src, int width, int height)
{
convert(dst, AV_PIX_FMT_RGB24, src, m_context->pix_fmt, width, height);
diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp
index 778c1a9b8cb..ffbfaaf6a36 100644
--- a/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp
+++ b/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp
@@ -88,9 +88,9 @@ class FFmpegDecoderVideo : public OpenThreads::Thread
void findAspectRatio();
void publishFrame(double delay, bool audio_disabled);
double synchronizeVideo(double pts);
- void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height);
+ void yuva420pToRgba(AVFrame *dst, AVFrame *src, int width, int height);
- int convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src,
+ int convert(AVFrame *dst, int dst_pix_fmt, AVFrame *src,
int src_pix_fmt, int src_width, int src_height);
@@ -100,8 +100,9 @@ class FFmpegDecoderVideo : public OpenThreads::Thread
PacketQueue & m_packets;
FFmpegClocks & m_clocks;
AVStream * m_stream;
+ AVCodecParameters * m_codecpar;
AVCodecContext * m_context;
- AVCodec * m_codec;
+ const AVCodec * m_codec;
const uint8_t * m_packet_data;
int m_bytes_remaining;
int64_t m_packet_pts;
diff --git a/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp b/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp
index fd9bd2c923d..4c107093106 100644
--- a/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp
+++ b/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp
@@ -44,6 +44,7 @@ extern "C"
#endif
#include <libavutil/mathematics.h>
+#include <libavutil/imgutils.h>
#ifdef USE_SWSCALE
#include <libswscale/swscale.h>
diff --git a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp
index e06bd8bb6d3..94cc13b1b6b 100644
--- a/src/osgPlugins/ffmpeg/FFmpegPacket.hpp
+++ b/src/osgPlugins/ffmpeg/FFmpegPacket.hpp
@@ -42,7 +42,7 @@ namespace osgFFmpeg
void clear()
{
if (packet.data != 0)
- av_free_packet(&packet);
+ av_packet_unref(&packet);
release();
}
diff --git a/src/osgPlugins/ffmpeg/FFmpegParameters.hpp b/src/osgPlugins/ffmpeg/FFmpegParameters.hpp
index ebfc17f6b6d..1b8dd287eb5 100644
--- a/src/osgPlugins/ffmpeg/FFmpegParameters.hpp
+++ b/src/osgPlugins/ffmpeg/FFmpegParameters.hpp
@@ -20,7 +20,7 @@ class FFmpegParameters : public osg::Referenced
bool isFormatAvailable() const { return m_format!=NULL; }
- AVInputFormat* getFormat() { return m_format; }
+ const AVInputFormat* getFormat() { return m_format; }
AVDictionary** getOptions() { return &m_options; }
void setContext(AVIOContext* context) { m_context = context; }
AVIOContext* getContext() { return m_context; }
@@ -29,7 +29,7 @@ class FFmpegParameters : public osg::Referenced
protected:
- AVInputFormat* m_format;
+ const AVInputFormat* m_format;
AVIOContext* m_context;
AVDictionary* m_options;
};
diff --git a/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp b/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
index f468ee81f27..2041bb55068 100644
--- a/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
+++ b/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
@@ -25,6 +25,7 @@
(LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR==20 && LIBAVCODEC_VERSION_MICRO >= 1)
#define USE_AV_LOCK_MANAGER
#endif
+#undef USE_AV_LOCK_MANAGER
extern "C" {
@@ -118,7 +119,7 @@ class ReaderWriterFFmpeg : public osgDB::ReaderWriter
av_lockmgr_register(&lockMgr);
#endif
// Register all FFmpeg formats/codecs
- av_register_all();
+ // av_register_all(); // Omit after ffmpeg 4.0
avformat_network_init();
}

View File

@ -82,9 +82,9 @@ class Openscenegraph(CMakePackage):
# patch submitted for inclusion in OpenSceneGraph for extending compatibility
# with ffmpeg from versions up to 4 to versions 5 & 6
# https://github.com/openscenegraph/OpenSceneGraph/pull/1281/commits/759620a3b7b787c960a7e414ba26ab5497817d40.patch
patch(
"https://github.com/openscenegraph/OpenSceneGraph/pull/1281/commits/759620a3b7b787c960a7e414ba26ab5497817d40.patch?full_index=1",
sha256="b8f588d1fba9361127a7d5127e0720a4d64f44ef021515d1d67d77dcacdef8fd",
"759620a3b7b787c960a7e414ba26ab5497817d40.patch",
when="@3.6:",
)
patch("glibc-jasper.patch", when="@3.4%gcc")

View File

@ -0,0 +1,50 @@
From 3039f932aaf212bcf2f14a3f2fd00dbfb881e46b Mon Sep 17 00:00:00 2001
From: Lourens Veen <l.veen@esciencecenter.nl>
Date: Mon, 21 Nov 2022 09:15:34 +0100
Subject: [PATCH] Fix shared object ABI exports (#5144)
---
src/libprotobuf-lite.map | 2 ++
src/libprotobuf.map | 2 ++
src/libprotoc.map | 2 ++
3 files changed, 6 insertions(+)
diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map
index 391554669481..a1853ca6cbf2 100644
--- a/src/libprotobuf-lite.map
+++ b/src/libprotobuf-lite.map
@@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
+ scc_info_*;
+ descriptor_table_*;
local:
*;
diff --git a/src/libprotobuf.map b/src/libprotobuf.map
index 391554669481..a1853ca6cbf2 100644
--- a/src/libprotobuf.map
+++ b/src/libprotobuf.map
@@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
+ scc_info_*;
+ descriptor_table_*;
local:
*;
diff --git a/src/libprotoc.map b/src/libprotoc.map
index 391554669481..a1853ca6cbf2 100644
--- a/src/libprotoc.map
+++ b/src/libprotoc.map
@@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
+ scc_info_*;
+ descriptor_table_*;
local:
*;

View File

@ -109,10 +109,10 @@ class Protobuf(CMakePackage):
)
# fix build on Centos 8, see also https://github.com/protocolbuffers/protobuf/issues/5144
# https://github.com/protocolbuffers/protobuf/pull/11032/commits/3039f932aaf212bcf2f14a3f2fd00dbfb881e46b.patch
patch(
"https://github.com/protocolbuffers/protobuf/pull/11032/commits/3039f932aaf212bcf2f14a3f2fd00dbfb881e46b.patch?full_index=1",
"3039f932aaf212bcf2f14a3f2fd00dbfb881e46b.patch",
when="@3.4:3.21",
sha256="cefc4bf4aadf9ca33a336b2aa6d0d82006b6563e85122ae8cfb70345f85321dd",
)
patch("msvc-abseil-target-namespace.patch", when="@3.22 %msvc")

View File

@ -0,0 +1,97 @@
From 30059dac4eb832e58ab2109db84508b294ba366d Mon Sep 17 00:00:00 2001
From: Jonathan Ringer <jonringer117@gmail.com>
Date: Thu, 17 Oct 2019 16:54:16 -0700
Subject: [PATCH] Fix packaging for setuptools>=41.4
---
MANIFEST.in | 1 +
astor/VERSION | 1 +
astor/__init__.py | 5 ++++-
setup.cfg | 3 ++-
setup.py | 16 +---------------
5 files changed, 9 insertions(+), 17 deletions(-)
create mode 100644 astor/VERSION
diff --git a/MANIFEST.in b/MANIFEST.in
index b12a6fe..81e72d5 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,4 @@
include README.rst AUTHORS LICENSE CHANGES
include setuputils.py
+include astor/VERSION
recursive-include tests *.py
diff --git a/astor/VERSION b/astor/VERSION
new file mode 100644
index 0000000..a3df0a6
--- /dev/null
+++ b/astor/VERSION
@@ -0,0 +1 @@
+0.8.0
diff --git a/astor/__init__.py b/astor/__init__.py
index 3b02983..bdedaef 100644
--- a/astor/__init__.py
+++ b/astor/__init__.py
@@ -9,6 +9,7 @@
"""
+import os
import warnings
from .code_gen import SourceGenerator, to_source # NOQA
@@ -19,7 +20,9 @@
from .op_util import symbol_data # NOQA
from .tree_walk import TreeWalk # NOQA
-__version__ = '0.8.0'
+ROOT = os.path.dirname(__file__)
+with open(os.path.join(ROOT, 'VERSION')) as version_file:
+ __version__ = version_file.read().strip()
parse_file = code_to_ast.parse_file
diff --git a/setup.cfg b/setup.cfg
index 1baf6fc..a43634f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,6 +2,7 @@
name = astor
description = Read/rewrite/write Python ASTs
long_description = file:README.rst
+version = file: astor/VERSION
author = Patrick Maupin
author_email = pmaupin@gmail.com
platforms = Independent
@@ -40,7 +41,7 @@ test_suite = nose.collector
[options.packages.find]
exclude = tests
-[wheel]
+[bdist_wheel]
universal = 1
[build-system]
diff --git a/setup.py b/setup.py
index 4a111b5..6068493 100644
--- a/setup.py
+++ b/setup.py
@@ -1,17 +1,3 @@
-import os
-import sys
-
from setuptools import setup
-from setuptools.config import read_configuration
-
-from setuputils import find_version
-
-
-def here(*paths):
- return os.path.join(os.path.dirname(__file__), *paths)
-
-config = read_configuration(here('setup.cfg'))
-config['metadata']['version'] = find_version(here('astor', '__init__.py'))
-config['options'].update(config['metadata'])
-setup(**config['options'])
+setup()

View File

@ -24,8 +24,8 @@ class PyAstor(PythonPackage):
# Build fails with newer versions of setuptools
# https://github.com/berkerpeksag/astor/issues/162
# https://github.com/berkerpeksag/astor/pull/163
# https://github.com/berkerpeksag/astor/pull/163/commits/30059dac4eb832e58ab2109db84508b294ba366d.patch
patch(
"https://github.com/berkerpeksag/astor/pull/163/commits/30059dac4eb832e58ab2109db84508b294ba366d.patch?full_index=1",
sha256="edc5eeddabe153b08e938f52edaeb2d880ee3128082967f310db0f98510fe6e0",
"30059dac4eb832e58ab2109db84508b294ba366d.patch",
when="@0.8.0",
)

View File

@ -0,0 +1,141 @@
From 47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25 Mon Sep 17 00:00:00 2001
From: Chris White <white238@llnl.gov>
Date: Tue, 10 Jan 2023 14:32:55 -0800
Subject: [PATCH] fixes for downstream users of umpire where relative paths
were not being relative to umpire's install prefix
---
src/tpl/CMakeLists.txt | 46 +++++++++++--------
src/umpire/interface/c_fortran/CMakeLists.txt | 19 +++++---
2 files changed, 41 insertions(+), 24 deletions(-)
diff --git a/src/tpl/CMakeLists.txt b/src/tpl/CMakeLists.txt
index 6803f0a41..60269f882 100644
--- a/src/tpl/CMakeLists.txt
+++ b/src/tpl/CMakeLists.txt
@@ -50,7 +50,13 @@ target_include_directories(
umpire_tpl_json
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
+
+blt_convert_to_system_includes(TARGET umpire_tpl_json)
+
+target_include_directories(
+ umpire_tpl_json
+ INTERFACE
$<INSTALL_INTERFACE:include>)
install(FILES
@@ -64,8 +70,6 @@ install(TARGETS
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
-blt_patch_target(NAME umpire_tpl_json
- TREAT_INCLUDES_AS_SYSTEM ON)
#
# CLI11 Option Parsing Headers
@@ -82,7 +86,13 @@ target_include_directories(
umpire_tpl_CLI11
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
+
+blt_convert_to_system_includes(TARGET umpire_tpl_CLI11)
+
+target_include_directories(
+ umpire_tpl_CLI11
+ INTERFACE
$<INSTALL_INTERFACE:include>)
install(FILES
@@ -96,9 +106,6 @@ install(TARGETS
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
-blt_patch_target(NAME umpire_tpl_CLI11
- TREAT_INCLUDES_AS_SYSTEM ON)
-
add_subdirectory(umpire/judy)
if (NOT TARGET camp)
@@ -153,7 +160,14 @@ target_include_directories(
umpire_tpl_fmt
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
+
+# Avoid warnings from fmt (so we can still use -Werror)
+blt_convert_to_system_includes(TARGET umpire_tpl_fmt)
+
+target_include_directories(
+ umpire_tpl_fmt
+ INTERFACE
$<INSTALL_INTERFACE:include>)
if (C_COMPILER_FAMILY_IS_XL)
@@ -168,21 +182,17 @@ if (C_COMPILER_FAMILY_IS_PGI)
set(_fmt_warning_disable_flag
"--diag_suppress 1625;--diag_suppress 185;--diag_suppress 811;--diag_suppress 186")
- if (ENABLE_FORTRAN)
+ if (ENABLE_FORTRAN)
target_compile_options(umpire_tpl_fmt
INTERFACE
$<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:${_fmt_warning_disable_flag}>)
- else ()
- target_compile_options(umpire_tpl_fmt
- INTERFACE
- ${_fmt_warning_disable_flag})
- endif ()
+ else ()
+ target_compile_options(umpire_tpl_fmt
+ INTERFACE
+ ${_fmt_warning_disable_flag})
+ endif ()
endif ()
-# Avoid warnings from fmt (so we can still use -Werror)
-blt_patch_target(NAME umpire_tpl_fmt
- TREAT_INCLUDES_AS_SYSTEM ON)
-
if (C_COMPILER_FAMILY_IS_GNU)
target_compile_options(umpire_tpl_fmt
INTERFACE
diff --git a/src/umpire/interface/c_fortran/CMakeLists.txt b/src/umpire/interface/c_fortran/CMakeLists.txt
index cf0d6932f..ab675adf3 100644
--- a/src/umpire/interface/c_fortran/CMakeLists.txt
+++ b/src/umpire/interface/c_fortran/CMakeLists.txt
@@ -57,15 +57,22 @@ target_include_directories(
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
- $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${CMAKE_Fortran_MODULE_DIRECTORY}>>
- $<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:include/umpire>> # for Fortran module files
$<INSTALL_INTERFACE:include>)
install(FILES
${umpire_interface_c_fortran_headers}
DESTINATION include/umpire/interface/c_fortran)
-install(DIRECTORY
- ${CMAKE_Fortran_MODULE_DIRECTORY}/
- DESTINATION include/umpire
- FILES_MATCHING PATTERN "*.mod")
+if(UMPIRE_ENABLE_FORTRAN)
+ target_include_directories(
+ umpire_interface
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
+ $<INSTALL_INTERFACE:include/umpire>)
+
+ install(DIRECTORY
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/
+ DESTINATION include/umpire
+ FILES_MATCHING PATTERN "*.mod")
+endif()
+

View File

@ -156,16 +156,16 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
)
# https://github.com/LLNL/Umpire/pull/805
# https://github.com/LLNL/Umpire/pull/805/commits/47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25.patch
patch(
"https://github.com/LLNL/Umpire/pull/805/commits/47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25.patch?full_index=1",
sha256="7ed5d2c315a3b31e339f664f6108e32d7cb4cb8e9f22e5c78a65ba02625ccc09",
"47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25.patch",
when="@2022.10.0",
)
# https://github.com/LLNL/Umpire/pull/816
# https://github.com/LLNL/Umpire/pull/816/commits/2292d1d6078f6d9523b7ad0886ffa053644569d5.patch
patch(
"https://github.com/LLNL/Umpire/pull/816/commits/2292d1d6078f6d9523b7ad0886ffa053644569d5.patch?full_index=1",
sha256="0f43cad7cdaec3c225ab6414ab9f81bd405a1157abf5a508e515bcb6ca53326d",
"2292d1d6078f6d9523b7ad0886ffa053644569d5.patch",
when="@2022.10.0",
)

View File

@ -0,0 +1,60 @@
From 4a084e03575da65f254917ef5d8eb39074abd3fc Mon Sep 17 00:00:00 2001
From: Jun Tang <juntangc@amazon.com>
Date: Tue, 27 Jun 2023 21:35:32 +0000
Subject: [PATCH] add default for Arm Compiler
---
arch/configure.defaults | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/configure.defaults b/arch/configure.defaults
index e7a9836226..8151a37481 100644
--- a/arch/configure.defaults
+++ b/arch/configure.defaults
@@ -2123,6 +2123,46 @@ NETCDFPAR_BUILD = CONFIGURE_NETCDFPAR_BUILD
#insert new stanza here
+###########################################################
+#ARCH Linux aarch64, GCC compiler OpenMPI # serial smpar dmpar dm+sm
+#
+DESCRIPTION = armclang ($SFC/$SCC): Aarch64
+DMPARALLEL =
+OMPCPP = -fopenmp
+OMP = -fopenmp
+OMPCC = -fopenmp
+SFC = armflang
+SCC = armclang
+CCOMP = armclang
+DM_FC = mpif90
+DM_CC = mpicc -DMPI2_SUPPORT
+FC = CONFIGURE_FC
+CC = CONFIGURE_CC
+LD = $(FC)
+RWORDSIZE = CONFIGURE_RWORDSIZE
+PROMOTION =
+ARCH_LOCAL =
+CFLAGS_LOCAL = -w -O3 -c
+LDFLAGS_LOCAL = -fopenmp
+FCOPTIM = -Ofast -mcpu=native -funroll-loops
+FCREDUCEDOPT = $(FCOPTIM)
+FCNOOPT = -O0 -fopenmp -frecursive
+FCDEBUG = -g $(FCNOOPT)
+FORMAT_FIXED = -ffixed-form -ffixed-line-length-0
+FORMAT_FREE = -ffree-form -ffree-line-length-0
+FCSUFFIX =
+BYTESWAPIO = -fconvert=big-endian -frecord-marker=4
+FCBASEOPTS = -w $(FORMAT_FREE) $(BYTESWAPIO)
+MODULE_SRCH_FLAG= -I$(WRF_SRC_ROOT_DIR)/main
+TRADFLAG = -traditional-cpp
+CPP = /lib/cpp CONFIGURE_CPPFLAGS
+AR = ar
+ARFLAGS = ru
+M4 = m4 -B 14000
+RANLIB = ranlib
+RLFLAGS =
+CC_TOOLS = $(SCC)
+
###########################################################
#ARCH Linux aarch64, GCC compiler OpenMPI # serial smpar dmpar dm+sm
#

View File

@ -0,0 +1,31 @@
From 6087d9192f7f91967147e50f5bc8b9e49310cf98 Mon Sep 17 00:00:00 2001
From: Jun Tang <juntangc@amazon.com>
Date: Sat, 1 Jul 2023 15:05:59 +0000
Subject: [PATCH] add two flags for acfl default
---
arch/configure.defaults | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/configure.defaults b/arch/configure.defaults
index 8151a37481..6915681dcb 100644
--- a/arch/configure.defaults
+++ b/arch/configure.defaults
@@ -2142,7 +2142,7 @@ LD = $(FC)
RWORDSIZE = CONFIGURE_RWORDSIZE
PROMOTION =
ARCH_LOCAL =
-CFLAGS_LOCAL = -w -O3 -c
+CFLAGS_LOCAL = -w -O3 -c -Wno-implicit-function-declaration -Wno-int-conversion -Wno-implicit-int
LDFLAGS_LOCAL = -fopenmp
FCOPTIM = -Ofast -mcpu=native -funroll-loops
FCREDUCEDOPT = $(FCOPTIM)
@@ -2161,7 +2161,7 @@ ARFLAGS = ru
M4 = m4 -B 14000
RANLIB = ranlib
RLFLAGS =
-CC_TOOLS = $(SCC)
+CC_TOOLS = $(SCC) -Wno-implicit-function-declaration -Wno-int-conversion -Wno-implicit-int
###########################################################
#ARCH Linux aarch64, GCC compiler OpenMPI # serial smpar dmpar dm+sm

View File

@ -215,14 +215,14 @@ class Wrf(Package):
when="@4.3.1",
)
# Add ARM compiler support
# https://github.com/wrf-model/WRF/pull/1888/commits/4a084e03575da65f254917ef5d8eb39074abd3fc.patch
patch(
"https://github.com/wrf-model/WRF/pull/1888/commits/4a084e03575da65f254917ef5d8eb39074abd3fc.patch",
sha256="c522c4733720df9a18237c06d8ab6199fa9674d78375b644aec7017cb38af9c5",
"4a084e03575da65f254917ef5d8eb39074abd3fc.patch",
when="@4.5: %arm",
)
# https://github.com/wrf-model/WRF/pull/1888/commits/6087d9192f7f91967147e50f5bc8b9e49310cf98.patch
patch(
"https://github.com/wrf-model/WRF/pull/1888/commits/6087d9192f7f91967147e50f5bc8b9e49310cf98.patch",
sha256="f82a18cf7334e0cbbfdf4ef3aa91ca26d4a372709f114ce0116b3fbb136ffac6",
"6087d9192f7f91967147e50f5bc8b9e49310cf98.patch",
when="@4.5: %arm",
)