commit 7b6d1ab6071c68c71a56601da8ef6ef210218bc8
Author: Jan Rękorajski <[email protected]>
Date:   Fri Dec 27 00:59:25 2024 +0100

    - split x32 specific and 32bit generic format string fixes
    - disable arch-specific abi warning

 format-string.patch       | 153 ++++++++++++++++++++++++++++++++++++++++++++++
 no-arch-abi-warning.patch |  12 ++++
 obs-studio.spec           |   6 ++
 x32.patch                 | 151 ---------------------------------------------
 4 files changed, 171 insertions(+), 151 deletions(-)
---
diff --git a/obs-studio.spec b/obs-studio.spec
index 8db3772..fc2a120 100644
--- a/obs-studio.spec
+++ b/obs-studio.spec
@@ -26,6 +26,8 @@ Patch2:               x32.patch
 Patch3:                sign-compare.patch
 Patch4:                x11-linkage.patch
 Patch5:                luajit-lua52.patch
+Patch6:                no-arch-abi-warning.patch
+Patch7:                format-string.patch
 URL:           https://obsproject.com/
 BuildRequires: ImageMagick-devel
 BuildRequires: OpenGL-GLX-devel
@@ -126,6 +128,8 @@ Pliki nagłówkowe OBS Studio.
 %patch -P 3 -p1
 %patch -P 4 -p1
 %patch -P 5 -p1
+%patch -P 6 -p1
+%patch -P 7 -p1
 
 %build
 export OBS_MULTIARCH_SUFFIX="%(echo "%{_lib}" | sed -e 's/^lib//')"
@@ -218,7 +222,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-filters.so
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-nvenc.so
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-outputs.so
+%ifarch %{x8664} x32
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-qsv11.so
+%endif
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-transitions.so
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-vst.so
 %attr(755,root,root) %{_libdir}/obs-plugins/obs-x264.so
diff --git a/format-string.patch b/format-string.patch
new file mode 100644
index 0000000..3ec8237
--- /dev/null
+++ b/format-string.patch
@@ -0,0 +1,153 @@
+--- obs-studio-31.0.0/libobs/obs-output.c.orig 2024-12-26 23:35:00.153332094 
+0100
++++ obs-studio-31.0.0/libobs/obs-output.c      2024-12-26 23:36:56.276665465 
+0100
+@@ -1494,7 +1494,11 @@
+ 
+       struct caption_track_data *ctrack = 
output->caption_tracks[out->track_idx];
+       if (!ctrack) {
++#if defined(__ILP32__)
++              blog(LOG_DEBUG, "Caption track for index: %u has not been 
initialized", out->track_idx);
++#else
+               blog(LOG_DEBUG, "Caption track for index: %lu has not been 
initialized", out->track_idx);
++#endif
+               return false;
+       }
+ 
+@@ -1702,12 +1706,20 @@
+                               }
+                       }
+                       if (found_ept == false) {
++#if defined(__ILP32__)
++                              blog(LOG_DEBUG, "%s: Track %u encoder packet 
timing for PTS%" PRId64 " not found.",
++#else
+                               blog(LOG_DEBUG, "%s: Track %lu encoder packet 
timing for PTS%" PRId64 " not found.",
++#endif
+                                    __FUNCTION__, out.track_idx, out.pts);
+                       }
+               } else {
+                       // encoder_packet_times should not be empty; log if so.
++#if defined(__ILP32__)
++                      blog(LOG_DEBUG, "%s: Track %u encoder packet timing 
array empty.", __FUNCTION__,
++#else
+                       blog(LOG_DEBUG, "%s: Track %lu encoder packet timing 
array empty.", __FUNCTION__,
++#endif
+                            out.track_idx);
+               }
+       }
+--- obs-studio-31.0.0/plugins/obs-nvenc/nvenc.c.orig   2024-12-26 
23:55:28.883332170 +0100
++++ obs-studio-31.0.0/plugins/obs-nvenc/nvenc.c        2024-12-26 
23:59:49.099998914 +0100
+@@ -378,9 +378,17 @@
+       if (vbr)
+               dstr_catf(&log, "\tmax_bitrate:  %d\n", max_bitrate);
+       if (cqp)
++#if defined(__ILP32__)
++              dstr_catf(&log, "\tcqp:          %lld\n", enc->props.cqp);
++#else 
+               dstr_catf(&log, "\tcqp:          %ld\n", enc->props.cqp);
++#endif
+       if (cqvbr) {
++#if defined(__ILP32__)
++              dstr_catf(&log, "\tcq:           %lld\n", 
enc->props.target_quality);
++#else 
+               dstr_catf(&log, "\tcq:           %ld\n", 
enc->props.target_quality);
++#endif
+       }
+ 
+       dstr_catf(&log, "\tkeyint:       %d\n", gop_size);
+@@ -390,13 +398,22 @@
+       dstr_catf(&log, "\tprofile:      %s\n", enc->props.profile);
+       dstr_catf(&log, "\twidth:        %d\n", enc->cx);
+       dstr_catf(&log, "\theight:       %d\n", enc->cy);
++#if defined(__ILP32__)
++      dstr_catf(&log, "\tb-frames:     %lld\n", enc->props.bf);
++      dstr_catf(&log, "\tb-ref-mode:   %lld\n", enc->props.bframe_ref_mode);
++#else 
+       dstr_catf(&log, "\tb-frames:     %ld\n", enc->props.bf);
+       dstr_catf(&log, "\tb-ref-mode:   %ld\n", enc->props.bframe_ref_mode);
++#endif
+       dstr_catf(&log, "\tlookahead:    %s (%d frames)\n", lookahead ? "true" 
: "false", rc_lookahead);
+       dstr_catf(&log, "\taq:           %s\n", 
enc->props.adaptive_quantization ? "true" : "false");
+ 
+       if (enc->props.split_encode) {
++#if defined(__ILP32__)
++              dstr_catf(&log, "\tsplit encode: %lld\n", 
enc->props.split_encode);
++#else 
+               dstr_catf(&log, "\tsplit encode: %ld\n", 
enc->props.split_encode);
++#endif
+       }
+       if (enc->props.opts.count)
+               dstr_catf(&log, "\tuser opts:    %s\n", enc->props.opts_str);
+--- obs-studio-31.0.0/UI/obs-app-theming.cpp.orig      2024-12-27 
00:19:42.779999070 +0100
++++ obs-studio-31.0.0/UI/obs-app-theming.cpp   2024-12-27 00:24:51.099999085 
+0100
+@@ -555,7 +555,11 @@
+ 
+       QStringList args = var.value.toStringList();
+       if (args.length() != 3) {
++#if defined(__ILP32__)
++              blog(LOG_ERROR, "calc() had invalid number of arguments: %d 
(%s)", args.length(),
++#else
+               blog(LOG_ERROR, "calc() had invalid number of arguments: %lld 
(%s)", args.length(),
++#endif
+                    QT_TO_UTF8(args.join(", ")));
+               return "'Invalid expression'";
+       }
+--- obs-studio-31.0.0/shared/bpm/bpm.c.org     2024-12-27 00:27:44.626665761 
+0100
++++ obs-studio-31.0.0/shared/bpm/bpm.c 2024-12-27 00:13:58.196665720 +0100
+@@ -17,7 +21,11 @@
+                          const struct encoder_packet_time *ept, struct 
metrics_data *m_track)
+ {
+       if (!output || !pkt || !ept || !m_track) {
++#if defined(__ILP32__)
++              blog(LOG_DEBUG, "%s: Null arguments for track %u", 
__FUNCTION__, pkt->track_idx);
++#else
+               blog(LOG_DEBUG, "%s: Null arguments for track %lu", 
__FUNCTION__, pkt->track_idx);
++#endif
+               return false;
+       }
+ 
+@@ -118,7 +126,11 @@
+        * with "--verbose" and "--unfiltered_log".
+        */
+       blog(LOG_DEBUG,
++#if defined(__ILP32__)
++           "BPM: %s, trk %u: [CTS|FER-CTS|FERC-FER|PIR-CTS]:[%" PRIu64 " 
ms|%" PRIu64 " ms|%" PRIu64 " us|%" PRIu64
++#else
+            "BPM: %s, trk %lu: [CTS|FER-CTS|FERC-FER|PIR-CTS]:[%" PRIu64 " 
ms|%" PRIu64 " ms|%" PRIu64 " us|%" PRIu64
++#endif
+            " ms], [dts|pts]:[%" PRId64 "|%" PRId64 "], 
S[R:O:D:L],R[I:S:O]:%d:%d:%d:%d:%d:%d:%d",
+            obs_encoder_get_name(pkt->encoder), pkt->track_idx, ept->cts / 
1000000, (ept->fer - ept->cts) / 1000000,
+            (ept->ferc - ept->fer) / 1000, (ept->pir - ept->cts) / 1000000, 
pkt->dts, pkt->pts,
+@@ -323,14 +335,22 @@
+       bool av1 = false;
+ 
+       if (!m_track) {
++#if defined(__ILP32__)
++              blog(LOG_DEBUG, "Metrics track for index: %u had not be 
initialized", out->track_idx);
++#else
+               blog(LOG_DEBUG, "Metrics track for index: %lu had not be 
initialized", out->track_idx);
++#endif
+               return false;
+       }
+ 
+       // Update the metrics for this track
+       if (!update_metrics(output, out, ept, m_track)) {
+               // Something went wrong; log it and return
++#if defined(__ILP32__)
++              blog(LOG_DEBUG, "update_metrics() for track index: %u failed", 
out->track_idx);
++#else
+               blog(LOG_DEBUG, "update_metrics() for track index: %lu failed", 
out->track_idx);
++#endif
+               return false;
+       }
+ 
+@@ -569,7 +589,11 @@
+       if (pkt->type == OBS_ENCODER_VIDEO && pkt->keyframe) {
+               /* Video packet must have pkt_timing supplied for BPM */
+               if (!pkt_time) {
++#if defined(__ILP32__)
++                      blog(LOG_DEBUG, "%s: Packet timing missing for track 
%d, PTS %" PRId64, __FUNCTION__,
++#else
+                       blog(LOG_DEBUG, "%s: Packet timing missing for track 
%ld, PTS %" PRId64, __FUNCTION__,
++#endif
+                            pkt->track_idx, pkt->pts);
+                       return;
+               }
diff --git a/no-arch-abi-warning.patch b/no-arch-abi-warning.patch
new file mode 100644
index 0000000..a691ff2
--- /dev/null
+++ b/no-arch-abi-warning.patch
@@ -0,0 +1,12 @@
+--- obs-studio-31.0.0/cmake/linux/compilerconfig.cmake~        2024-12-07 
00:21:55.000000000 +0100
++++ obs-studio-31.0.0/cmake/linux/compilerconfig.cmake 2024-12-27 
00:42:07.449999208 +0100
+@@ -60,6 +60,9 @@
+ endif()
+ 
+ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
++  # Disable warning for 
https://github.com/WarmUpTill/SceneSwitcher/issues/1091
++  add_compile_options(-Wno-error=psabi)
++
+   # * Disable false-positive warning in GCC 12.1.0 and later
+   # * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562
+   if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1.0)
diff --git a/x32.patch b/x32.patch
index 43a5e96..e5d308c 100644
--- a/x32.patch
+++ b/x32.patch
@@ -12,84 +12,6 @@
                     buf.timestamp.tv_usec, buf.index, buf.flags, buf.sequence, 
buf.length, buf.bytesused);
  
                out.timestamp = timeval2ns(buf.timestamp);
---- obs-studio-31.0.0/libobs/obs-output.c.orig 2024-12-26 23:35:00.153332094 
+0100
-+++ obs-studio-31.0.0/libobs/obs-output.c      2024-12-26 23:36:56.276665465 
+0100
-@@ -1494,7 +1494,11 @@
- 
-       struct caption_track_data *ctrack = 
output->caption_tracks[out->track_idx];
-       if (!ctrack) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              blog(LOG_DEBUG, "Caption track for index: %u has not been 
initialized", out->track_idx);
-+#else
-               blog(LOG_DEBUG, "Caption track for index: %lu has not been 
initialized", out->track_idx);
-+#endif
-               return false;
-       }
- 
-@@ -1702,12 +1706,20 @@
-                               }
-                       }
-                       if (found_ept == false) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+                              blog(LOG_DEBUG, "%s: Track %u encoder packet 
timing for PTS%" PRId64 " not found.",
-+#else
-                               blog(LOG_DEBUG, "%s: Track %lu encoder packet 
timing for PTS%" PRId64 " not found.",
-+#endif
-                                    __FUNCTION__, out.track_idx, out.pts);
-                       }
-               } else {
-                       // encoder_packet_times should not be empty; log if so.
-+#if defined(__x86_64__) && defined(__ILP32__)
-+                      blog(LOG_DEBUG, "%s: Track %u encoder packet timing 
array empty.", __FUNCTION__,
-+#else
-                       blog(LOG_DEBUG, "%s: Track %lu encoder packet timing 
array empty.", __FUNCTION__,
-+#endif
-                            out.track_idx);
-               }
-       }
---- obs-studio-31.0.0/plugins/obs-nvenc/nvenc.c.orig   2024-12-26 
23:55:28.883332170 +0100
-+++ obs-studio-31.0.0/plugins/obs-nvenc/nvenc.c        2024-12-26 
23:59:49.099998914 +0100
-@@ -378,9 +378,17 @@
-       if (vbr)
-               dstr_catf(&log, "\tmax_bitrate:  %d\n", max_bitrate);
-       if (cqp)
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              dstr_catf(&log, "\tcqp:          %lld\n", enc->props.cqp);
-+#else 
-               dstr_catf(&log, "\tcqp:          %ld\n", enc->props.cqp);
-+#endif
-       if (cqvbr) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              dstr_catf(&log, "\tcq:           %lld\n", 
enc->props.target_quality);
-+#else 
-               dstr_catf(&log, "\tcq:           %ld\n", 
enc->props.target_quality);
-+#endif
-       }
- 
-       dstr_catf(&log, "\tkeyint:       %d\n", gop_size);
-@@ -390,13 +398,22 @@
-       dstr_catf(&log, "\tprofile:      %s\n", enc->props.profile);
-       dstr_catf(&log, "\twidth:        %d\n", enc->cx);
-       dstr_catf(&log, "\theight:       %d\n", enc->cy);
-+#if defined(__x86_64__) && defined(__ILP32__)
-+      dstr_catf(&log, "\tb-frames:     %lld\n", enc->props.bf);
-+      dstr_catf(&log, "\tb-ref-mode:   %lld\n", enc->props.bframe_ref_mode);
-+#else 
-       dstr_catf(&log, "\tb-frames:     %ld\n", enc->props.bf);
-       dstr_catf(&log, "\tb-ref-mode:   %ld\n", enc->props.bframe_ref_mode);
-+#endif
-       dstr_catf(&log, "\tlookahead:    %s (%d frames)\n", lookahead ? "true" 
: "false", rc_lookahead);
-       dstr_catf(&log, "\taq:           %s\n", 
enc->props.adaptive_quantization ? "true" : "false");
- 
-       if (enc->props.split_encode) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              dstr_catf(&log, "\tsplit encode: %lld\n", 
enc->props.split_encode);
-+#else 
-               dstr_catf(&log, "\tsplit encode: %ld\n", 
enc->props.split_encode);
-+#endif
-       }
-       if (enc->props.opts.count)
-               dstr_catf(&log, "\tuser opts:    %s\n", enc->props.opts_str);
 --- obs-studio-31.0.0/plugins/obs-qsv11/common_utils_linux.cpp.orig    
2024-12-07 00:21:55.000000000 +0100
 +++ obs-studio-31.0.0/plugins/obs-qsv11/common_utils_linux.cpp 2024-12-27 
00:01:45.876665615 +0100
 @@ -509,7 +509,11 @@
@@ -104,20 +26,6 @@
                obs_leave_graphics();
                return;
        }
---- obs-studio-31.0.0/UI/obs-app-theming.cpp.orig      2024-12-27 
00:19:42.779999070 +0100
-+++ obs-studio-31.0.0/UI/obs-app-theming.cpp   2024-12-27 00:24:51.099999085 
+0100
-@@ -555,7 +555,11 @@
- 
-       QStringList args = var.value.toStringList();
-       if (args.length() != 3) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              blog(LOG_ERROR, "calc() had invalid number of arguments: %d 
(%s)", args.length(),
-+#else
-               blog(LOG_ERROR, "calc() had invalid number of arguments: %lld 
(%s)", args.length(),
-+#endif
-                    QT_TO_UTF8(args.join(", ")));
-               return "'Invalid expression'";
-       }
 --- obs-studio-31.0.0/shared/bpm/bpm.c.org     2024-12-27 00:27:44.626665761 
+0100
 +++ obs-studio-31.0.0/shared/bpm/bpm.c 2024-12-27 00:13:58.196665720 +0100
 @@ -9,7 +9,11 @@
@@ -132,62 +40,3 @@
        m_time->valid = true;
  }
  
-@@ -17,7 +21,11 @@
-                          const struct encoder_packet_time *ept, struct 
metrics_data *m_track)
- {
-       if (!output || !pkt || !ept || !m_track) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              blog(LOG_DEBUG, "%s: Null arguments for track %u", 
__FUNCTION__, pkt->track_idx);
-+#else
-               blog(LOG_DEBUG, "%s: Null arguments for track %lu", 
__FUNCTION__, pkt->track_idx);
-+#endif
-               return false;
-       }
- 
-@@ -118,7 +126,11 @@
-        * with "--verbose" and "--unfiltered_log".
-        */
-       blog(LOG_DEBUG,
-+#if defined(__x86_64__) && defined(__ILP32__)
-+           "BPM: %s, trk %u: [CTS|FER-CTS|FERC-FER|PIR-CTS]:[%" PRIu64 " 
ms|%" PRIu64 " ms|%" PRIu64 " us|%" PRIu64
-+#else
-            "BPM: %s, trk %lu: [CTS|FER-CTS|FERC-FER|PIR-CTS]:[%" PRIu64 " 
ms|%" PRIu64 " ms|%" PRIu64 " us|%" PRIu64
-+#endif
-            " ms], [dts|pts]:[%" PRId64 "|%" PRId64 "], 
S[R:O:D:L],R[I:S:O]:%d:%d:%d:%d:%d:%d:%d",
-            obs_encoder_get_name(pkt->encoder), pkt->track_idx, ept->cts / 
1000000, (ept->fer - ept->cts) / 1000000,
-            (ept->ferc - ept->fer) / 1000, (ept->pir - ept->cts) / 1000000, 
pkt->dts, pkt->pts,
-@@ -323,14 +335,22 @@
-       bool av1 = false;
- 
-       if (!m_track) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              blog(LOG_DEBUG, "Metrics track for index: %u had not be 
initialized", out->track_idx);
-+#else
-               blog(LOG_DEBUG, "Metrics track for index: %lu had not be 
initialized", out->track_idx);
-+#endif
-               return false;
-       }
- 
-       // Update the metrics for this track
-       if (!update_metrics(output, out, ept, m_track)) {
-               // Something went wrong; log it and return
-+#if defined(__x86_64__) && defined(__ILP32__)
-+              blog(LOG_DEBUG, "update_metrics() for track index: %u failed", 
out->track_idx);
-+#else
-               blog(LOG_DEBUG, "update_metrics() for track index: %lu failed", 
out->track_idx);
-+#endif
-               return false;
-       }
- 
-@@ -569,7 +589,11 @@
-       if (pkt->type == OBS_ENCODER_VIDEO && pkt->keyframe) {
-               /* Video packet must have pkt_timing supplied for BPM */
-               if (!pkt_time) {
-+#if defined(__x86_64__) && defined(__ILP32__)
-+                      blog(LOG_DEBUG, "%s: Packet timing missing for track 
%d, PTS %" PRId64, __FUNCTION__,
-+#else
-                       blog(LOG_DEBUG, "%s: Packet timing missing for track 
%ld, PTS %" PRId64, __FUNCTION__,
-+#endif
-                            pkt->track_idx, pkt->pts);
-                       return;
-               }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/obs-studio.git/commitdiff/7b6d1ab6071c68c71a56601da8ef6ef210218bc8

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to