[crux-commits] ports/contrib (3.6): transcode: fixed build against gcc10

crux at crux.nu crux at crux.nu
Sun Feb 21 14:22:06 UTC 2021


commit df9250a6e28b9bdd4f596e1e03ee08efe607c542
Author: Tim Biermann <tbier at posteo.de>
Date:   Sun Feb 21 14:01:02 2021 +0000

    transcode: fixed build against gcc10

diff --git a/transcode/.signature b/transcode/.signature
index a5587abe9..323b55926 100644
--- a/transcode/.signature
+++ b/transcode/.signature
@@ -1,6 +1,6 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3x5kyE5FxhFRmVQ2rTevqGVdrh/0VKpswzTQe8GJcqN6GW8uHgUddldk6HNhy5RXDLMRpasB7vL5detqjdPpkgI=
-SHA256 (Pkgfile) = 35be5a676166dbca201e8386c8082178e1ba5853c66bcf677cfef5fe5b2a091b
+RWSagIOpLGJF36imBsL8X9qO6sUmqpdsH9RGMLS4M1EEJWcO6iL4A8TUQmPfPo5N95+a5GsiN1Z1OBHpzHoRiZfa2BB7WG12AAE=
+SHA256 (Pkgfile) = cde234e028de4be3bc1aaa3cf91b88acd5e424542158271602f53dc0f959112d
 SHA256 (.footprint) = 641ca436b78556e30ba420a8c14e3b56bd42f60b0af346f6c310c6857e58ba23
 SHA256 (transcode-1.1.7.tar.bz2) = 1e4e72d8e0dd62a80b8dd90699f5ca64c9b0cb37a5c9325c184166a9654f0a92
 SHA256 (subtitleripper-0.3-4.tgz) = 8af6c2ebe55361900871c731ea1098b1a03efa723cd29ee1d471435bd21f3ac4
@@ -8,4 +8,6 @@ SHA256 (subtitleripper-0.3.4-linkingorder.patch) = fe79f5aa9626cd39346f805d2514e
 SHA256 (subtitleripper-0.3.4-respect-ldflags.patch) = 3e31fa7baac3c1ca929e2601d08a7e2cc68baf18791d2daedc7cea3132029944
 SHA256 (transcode-ffmpeg3.patch) = 728ec3101039d98116275e36ea5cf0434a23a0bb82aca830ea9612fb9d16b062
 SHA256 (transcode-ffmpeg4.patch) = 2cc680666f705685a9fdc54b5a377e7728765bde6ed83c43b835634e27767721
+SHA256 (transcode-glibc-2.32.patch) = 8f7aa89be3bc38a42fe664e8f2c0e519158cb4e55b7f99f176f1622c2718b641
+SHA256 (transcode-gcc10.patch) = 13ad4d06ca5b98ef66c4e0699d92023727cd7936ef1c4bf7691e3a611c6bb786
 SHA256 (transcode-imagemagick7.patch) = 4ede15540ea6932954ac332c12dde130bf48e7e4773d1e04d3c3f23038c6ac51
diff --git a/transcode/Pkgfile b/transcode/Pkgfile
index 523686604..a0ac719bc 100644
--- a/transcode/Pkgfile
+++ b/transcode/Pkgfile
@@ -6,15 +6,17 @@
 
 name=transcode
 version=1.1.7
-release=5
+release=6
 source=(
 	https://crux.ster.zone/downloads/$name/$name-$version.tar.bz2
 	#https://bitbucket.org/france/transcode-tcforge/downloads/$name-$version.tar.bz2
 	http://downloads.sourceforge.net/project/subtitleripper/subtitleripper/subtitleripper-0.3-4/subtitleripper-0.3-4.tgz
 	subtitleripper-0.3.4-linkingorder.patch
-        subtitleripper-0.3.4-respect-ldflags.patch
+	subtitleripper-0.3.4-respect-ldflags.patch
 	transcode-ffmpeg3.patch
 	transcode-ffmpeg4.patch
+	transcode-glibc-2.32.patch
+	transcode-gcc10.patch
 	transcode-imagemagick7.patch)
 
 build() {
@@ -25,6 +27,8 @@ build() {
 	patch -p 1 -i $SRC/transcode-ffmpeg3.patch
 	patch -p 1 -i $SRC/transcode-ffmpeg4.patch
 	patch -p 1 -i $SRC/transcode-imagemagick7.patch
+	patch -p 1 -i $SRC/transcode-glibc-2.32.patch
+	patch -p 1 -i $SRC/transcode-gcc10.patch
 
 	sed \
 	-e 's|freetype/ftglyph.h|freetype2/freetype/ftglyph.h|' \
diff --git a/transcode/transcode-gcc10.patch b/transcode/transcode-gcc10.patch
new file mode 100644
index 000000000..fcee415de
--- /dev/null
+++ b/transcode/transcode-gcc10.patch
@@ -0,0 +1,48 @@
+--- a/import/demux_pass.c
++++ b/import/demux_pass.c
+@@ -32,8 +32,6 @@
+ #include "packets.h"
+ 
+ 
+-int gop, gop_pts, gop_cnt;
+-
+ /* if you listen carefully, then you can hear the desesperate
+  * whisper of this code calling for a rewrite. Or for a redesign.
+  * Or both. --  FR
+--- a/import/extract_ac3.c
++++ b/import/extract_ac3.c
+@@ -334,7 +334,6 @@
+ FILE *fd;
+ 
+ #define MAX_BUF 4096
+-char audio[MAX_BUF];
+ 
+ 
+ /* from ac3scan.c */
+@@ -472,6 +471,8 @@
+ void extract_ac3(info_t *ipipe)
+ {
+ 
++    char audio[MAX_BUF];
++
+     int error=0;
+ 
+     avi_t *avifile;
+--- a/import/extract_mp3.c
++++ b/import/extract_mp3.c
+@@ -243,7 +243,6 @@
+ }
+ 
+ #define MAX_BUF 4096
+-char audio[MAX_BUF];
+ 
+ /* ------------------------------------------------------------
+  *
+@@ -258,6 +257,7 @@
+ 
+ void extract_mp3(info_t *ipipe)
+ {
++    char audio[MAX_BUF];
+ 
+     int error=0;
+ 
diff --git a/transcode/transcode-glibc-2.32.patch b/transcode/transcode-glibc-2.32.patch
new file mode 100644
index 000000000..8b5ea837a
--- /dev/null
+++ b/transcode/transcode-glibc-2.32.patch
@@ -0,0 +1,47 @@
+--- transcode-1.1.7/import/v4l/import_v4l2.c.orig       2020-08-28 08:28:44.311434934 +0000
++++ transcode-1.1.7/import/v4l/import_v4l2.c    2020-08-28 08:41:19.279323984 +0000
+@@ -455,7 +455,7 @@
+         tc_log_warn(MOD_NAME,
+                     "driver does not support cropping"
+                     "(ioctl(VIDIOC_CROPCAP) returns \"%s\"), disabled",
+-                    errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++                    strerror(errno));
+         return TC_ERROR;
+     }
+     if (verbose_flag > TC_INFO) {
+@@ -485,7 +485,7 @@
+         tc_log_warn(MOD_NAME,
+                     "driver does not support inquiring cropping"
+                     " parameters (ioctl(VIDIOC_G_CROP) returns \"%s\")",
+-                    errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++                    strerror(errno));
+         return -1;
+     }
+ 
+@@ -513,7 +513,7 @@
+             tc_log_warn(MOD_NAME,
+                         "driver does not support inquering cropping"
+                         " parameters (ioctl(VIDIOC_G_CROP) returns \"%s\")",
+-                        errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++                        strerror(errno));
+             return -1;
+         }
+         if (verbose_flag > TC_INFO) {
+@@ -613,7 +613,7 @@
+     if (err < 0) {
+         if (verbose_flag) {
+             tc_log_warn(MOD_NAME, "driver does not support setting parameters (ioctl(VIDIOC_S_PARM) returns \"%s\")",
+-                        errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++                        strerror(errno));
+         }
+     }
+     return TC_OK;
+@@ -628,7 +628,7 @@
+     err = ioctl(vs->video_fd, VIDIOC_G_STD, &stdid);
+     if (err < 0) {
+         tc_log_warn(MOD_NAME, "driver does not support get std (ioctl(VIDIOC_G_STD) returns \"%s\")",
+-                    errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++                    strerror(errno));
+         memset(&stdid, 0, sizeof(v4l2_std_id));
+     }
+ 


More information about the crux-commits mailing list