From 06a5fa6da374cc3dafd95295c5e7448f1cea9f88 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Tue, 6 Apr 2021 22:01:59 +0000 Subject: Tue Apr 6 22:01:59 UTC 2021 a/sysvinit-scripts-2.1-noarch-41.txz: Rebuilt. rc.S: don't clear /var/run. Thanks to upnort. kde/digikam-7.2.0-x86_64-2.txz: Rebuilt. Recompiled against opencv-4.5.2 (apparently the ABI changed). Thanks to etienne. --- source/a/FTBFSlog | 3 + source/a/file/file.SlackBuild | 11 +- .../1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch | 33 + .../2f62d5544d13ca32dc09504ec70358db581e9e65.patch | 61 ++ .../576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch | 32 + .../64dcffa715049351327851c8b5a6f3430a32ff39.patch | 102 +++ .../6b34436ac766dae64749b8d14f18c6910be40131.patch | 26 + .../9e2becec20d023409a1671bf10a682f699350e85.patch | 22 + .../f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch | 159 +++++ source/a/libblockdev/libblockdev.SlackBuild | 3 + source/a/libblockdev/libblockdev.glib-2.68.0.diff | 11 + source/a/sysvinit-scripts/scripts/rc.S | 2 - .../a/sysvinit-scripts/sysvinit-scripts.SlackBuild | 2 +- source/ap/linuxdoc-tools/linuxdoc-tools.build | 16 + source/kde/kde/build/digikam | 2 +- source/l/FTBFSlog | 3 + source/l/graphene/graphene.SlackBuild | 2 +- source/l/libbluray/libbluray.SlackBuild | 2 +- .../a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch | 102 +++ .../speech-dispatcher/speech-dispatcher.SlackBuild | 3 + source/tcl/tk/tk.SlackBuild | 4 +- source/x/FTBFSlog | 4 + source/x/fcitx-anthy/fcitx-anthy.SlackBuild | 2 +- .../x/fcitx-configtool/fcitx-configtool.SlackBuild | 3 +- source/x/fcitx/fcitx.SlackBuild | 2 +- source/x/x11/build/xf86-input-libinput | 2 +- source/xap/FTBFSlog | 3 + .../0d775547f0e7cf7529538704814469e1db5496f2.patch | 25 - .../495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch | 280 -------- source/xap/pan/pan.SlackBuild | 4 +- source/xap/pan/pan.glib-2.68.0.diff | 743 +++++++++++++++++++++ 31 files changed, 1349 insertions(+), 320 deletions(-) create mode 100644 source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch create mode 100644 source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch create mode 100644 source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch create mode 100644 source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch create mode 100644 source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch create mode 100644 source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch create mode 100644 source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch create mode 100644 source/a/libblockdev/libblockdev.glib-2.68.0.diff create mode 100644 source/l/speech-dispatcher/a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch delete mode 100644 source/xap/pan/0d775547f0e7cf7529538704814469e1db5496f2.patch delete mode 100644 source/xap/pan/495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch create mode 100644 source/xap/pan/pan.glib-2.68.0.diff (limited to 'source') diff --git a/source/a/FTBFSlog b/source/a/FTBFSlog index 58e0ffb09..b40091357 100644 --- a/source/a/FTBFSlog +++ b/source/a/FTBFSlog @@ -1,3 +1,6 @@ +Tue Apr 6 18:09:15 UTC 2021 + libblockdev: Fix build with glib-2.68.0. Thanks to nobodino. ++--------------------------+ Sun Jan 17 20:10:50 UTC 2021 mkinitrd: upgrade busybox to fix missing stime in newer glibc. +--------------------------+ diff --git a/source/a/file/file.SlackBuild b/source/a/file/file.SlackBuild index 2554d14b0..e70f55a1f 100755 --- a/source/a/file/file.SlackBuild +++ b/source/a/file/file.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=file VERSION=${VERSION:-$(echo file-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -100,6 +100,15 @@ zcat $CWD/file.PT_DYNAMIC.is.dynamically.linked.diff.gz | patch -p1 -E --verbose zcat $CWD/file.zisofs.magic.gz >> magic/Magdir/compress zcat $CWD/file.crdaregbin.magic.gz >> magic/Magdir/crdaregbin +# Add some regression fixes from upstream: +zcat $CWD/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch.gz | patch -p1 --verbose || exit 1 + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ diff --git a/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch b/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch new file mode 100644 index 000000000..47c8c2aed --- /dev/null +++ b/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch @@ -0,0 +1,33 @@ +From 1c677c04c0fa43ecfeccdb9705dbbd19fb356891 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 4 Apr 2021 21:02:19 +0000 +Subject: [PATCH] Don't count each byte encounter as 1, count the total number + of bytes found (Anatol Belski). This makes it behave like 5.39. + +--- + src/encoding.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/encoding.c b/src/encoding.c +index c8b404390..c66703bb6 100644 +--- a/src/encoding.c ++++ b/src/encoding.c +@@ -35,7 +35,7 @@ + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: encoding.c,v 1.27 2021/02/05 21:33:49 christos Exp $") ++FILE_RCSID("@(#)$File: encoding.c,v 1.28 2021/04/04 21:02:19 christos Exp $") + #endif /* lint */ + + #include "magic.h" +@@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \ + } \ + u = 0; \ + for (i = 0; i < __arraycount(dist); i++) { \ +- if (dist[i]) \ +- u++; \ ++ u+= dist[i]; \ + } \ + if (u < 3) \ + return 0; \ diff --git a/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch b/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch new file mode 100644 index 000000000..61919d5c7 --- /dev/null +++ b/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch @@ -0,0 +1,61 @@ +From 2f62d5544d13ca32dc09504ec70358db581e9e65 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Wed, 31 Mar 2021 19:51:14 +0000 +Subject: [PATCH] Improve 8086 relocatable detection (Joerg Jenderek) + +--- + magic/Magdir/xenix | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/magic/Magdir/xenix b/magic/Magdir/xenix +index 3e248de26..d5ab69e5d 100644 +--- a/magic/Magdir/xenix ++++ b/magic/Magdir/xenix +@@ -1,6 +1,6 @@ + + #------------------------------------------------------------------------------ +-# $File: xenix,v 1.12 2021/02/23 00:51:10 christos Exp $ ++# $File: xenix,v 1.13 2021/03/31 19:51:14 christos Exp $ + # xenix: file(1) magic for Microsoft Xenix + # + # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small +@@ -13,25 +13,35 @@ + # + 0 string core core file (Xenix) + # URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix ++# http://fileformats.archiveteam.org/wiki/OMF + # Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf + # Update: Joerg Jenderek + # recordtype~TranslatorHEADerRecord + 0 byte 0x80 +-# GRR: line above is too general as it catches also Extensible storage engine DataBase ++# GRR: line above is too general as it catches also Extensible storage engine DataBase, ++# all lif files like forth.lif hpcc88.lif lex90b.lif ( See ./lif) ++# and all compressed DEGAS low-res bitmaps like: MUNCHIE.PC1 PIDER1.PC1 + # skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3 + >1 uleshort <1022 + # skip examples like GAME.PICTURE Strange.Pic by looking for positive record length + >>1 uleshort >0 + # skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positive string length + >>>3 ubyte >0 +-# skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c" +->>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft) ++# skip examples like OMBRE.6 with "UUUUUU" name by looking for valid high second record type ++>>>>(1.s+3) ubyte >0x6D 8086 relocatable (Microsoft) + #!:mime application/octet-stream + !:mime application/x-object +-!:ext o/a ++!:ext obj/o/a ++# T-module name often source name like "hello.c" or "jmppm32.asm" in JMPPM32.OBJ or ++# "kbhit" in KBHITS.OBJ or "CAUSEWAY_KERNAL" in CWAPI.OBJ + >>>>>3 pstring x \b, "%s" ++# data length probably lower 256 according to TrID obj_omf.trid.xml ++>>>>>1 uleshort x \b, 1st record data length %u + # checksum + #>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x ++# second recordtype: 96h~LNAMES 88h~COMENT 8CH~EXTDEF ++>>>>>(1.s+3) ubyte x \b, 2nd record type 0x%x ++>>>>>(1.s+4) uleshort x \b, 2nd record data length %u + 0 leshort 0xff65 x.out + >2 string __.SYMDEF randomized + >0 byte x archive diff --git a/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch b/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch new file mode 100644 index 000000000..1e80ac99d --- /dev/null +++ b/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch @@ -0,0 +1,32 @@ +From 576d713ec955faafdc9d7b783f3f4c27b7bc1793 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Tue, 6 Apr 2021 15:43:11 +0000 +Subject: [PATCH] Add more ash paths from Cormac Stephenson + +--- + magic/Magdir/commands | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/magic/Magdir/commands b/magic/Magdir/commands +index 10f8d2b20..5f6be0cce 100644 +--- a/magic/Magdir/commands ++++ b/magic/Magdir/commands +@@ -1,6 +1,6 @@ + + #------------------------------------------------------------------------------ +-# $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $ ++# $File: commands,v 1.64 2021/04/06 15:43:11 christos Exp $ + # commands: file(1) magic for various shells and interpreters + # + #0 string/w : shell archive or script for antique kernel text +@@ -38,6 +38,10 @@ + 0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable + !:mime text/x-shellscript + ++0 string/wt #!\ /bin/ash Neil Brown's ash script text executable ++!:mime text/x-shellscript ++0 string/wt #!\ /usr/bin/ash Neil Brown's ash script text executable ++!:mime text/x-shellscript + 0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable + !:mime text/x-shellscript + 0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable diff --git a/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch b/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch new file mode 100644 index 000000000..f026891fb --- /dev/null +++ b/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch @@ -0,0 +1,102 @@ +From 64dcffa715049351327851c8b5a6f3430a32ff39 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 4 Apr 2021 18:24:34 +0000 +Subject: [PATCH] Add arm-coff (Mark Harmstone) + +--- + magic/Magdir/arm | 41 +++++++++++++++++++++++++++++++++++++++++ + magic/Magdir/coff | 7 ++++++- + magic/Makefile.am | 3 ++- + 3 files changed, 49 insertions(+), 2 deletions(-) + create mode 100644 magic/Magdir/arm + +diff --git a/magic/Magdir/arm b/magic/Magdir/arm +new file mode 100644 +index 000000000..8869d1928 +--- /dev/null ++++ b/magic/Magdir/arm +@@ -0,0 +1,41 @@ ++#------------------------------------------------------------------------------ ++# $File: arm,v 1.1 2021/04/04 18:24:34 christos Exp $ ++# arm: file(1) magic for ARM COFF ++# ++# https://docs.microsoft.com/en-us/windows/win32/debug/pe-format ++ ++# Aarch64 ++0 leshort 0xaa64 ++# test for unused flag bits in f_flags ++>18 uleshort&0x8E80 0 ++# use little endian variant of subroutine to ++# display name+variables+flags for common object formated files ++>>0 use display-coff ++!:strength -10 ++ ++# ARM ++0 leshort 0x01c0 ++# test for unused flag bits in f_flags ++>18 uleshort&0x8E80 0 ++# use little endian variant of subroutine to ++# display name+variables+flags for common object formated files ++>>0 use display-coff ++!:strength -10 ++ ++# ARM Thumb ++0 leshort 0x01c2 ++# test for unused flag bits in f_flags ++>18 uleshort&0x8E80 0 ++# use little endian variant of subroutine to ++# display name+variables+flags for common object formated files ++>>0 use display-coff ++!:strength -10 ++ ++# ARMv7 Thumb ++0 leshort 0x01c4 ++# test for unused flag bits in f_flags ++>18 uleshort&0x8E80 0 ++# use little endian variant of subroutine to ++# display name+variables+flags for common object formated files ++>>0 use display-coff ++!:strength -10 +diff --git a/magic/Magdir/coff b/magic/Magdir/coff +index 18e7b665e..5063bc19e 100644 +--- a/magic/Magdir/coff ++++ b/magic/Magdir/coff +@@ -1,6 +1,6 @@ + + #------------------------------------------------------------------------------ +-# $File: coff,v 1.4 2021/02/10 00:37:02 christos Exp $ ++# $File: coff,v 1.5 2021/04/04 18:24:34 christos Exp $ + # coff: file(1) magic for Common Object Files not specific to known cpu types or manufactures + # + # COFF +@@ -34,6 +34,11 @@ + # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680313(v=vs.85).aspx + >>>>0 uleshort 0x0200 Intel ia64 + >>>>0 uleshort 0x8664 Intel amd64 ++# ARM COFF (./arm) ++>>>>0 uleshort 0xaa64 Aarch64 ++>>>>0 uleshort 0x01c0 ARM ++>>>>0 uleshort 0x01c2 ARM Thumb ++>>>>0 uleshort 0x01c4 ARMv7 Thumb + # TODO for other COFFs + #>>>>0 uleshort 0xABCD COFF_TEMPLATE + >>>>0 default x +diff --git a/magic/Makefile.am b/magic/Makefile.am +index 0eb5865b7..75d39bbde 100644 +--- a/magic/Makefile.am ++++ b/magic/Makefile.am +@@ -1,5 +1,5 @@ + # +-# $File: Makefile.am,v 1.166 2021/03/14 16:24:18 christos Exp $ ++# $File: Makefile.am,v 1.167 2021/04/04 18:24:34 christos Exp $ + # + MAGIC_FRAGMENT_BASE = Magdir + MAGIC_DIR = $(top_srcdir)/magic +@@ -29,6 +29,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ + $(MAGIC_FRAGMENT_DIR)/applix \ + $(MAGIC_FRAGMENT_DIR)/apt \ + $(MAGIC_FRAGMENT_DIR)/archive \ ++$(MAGIC_FRAGMENT_DIR)/arm \ + $(MAGIC_FRAGMENT_DIR)/asf \ + $(MAGIC_FRAGMENT_DIR)/assembler \ + $(MAGIC_FRAGMENT_DIR)/asterix \ diff --git a/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch b/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch new file mode 100644 index 000000000..78f7d31c6 --- /dev/null +++ b/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch @@ -0,0 +1,26 @@ +From 6b34436ac766dae64749b8d14f18c6910be40131 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Mon, 5 Apr 2021 16:36:14 +0000 +Subject: [PATCH] remove "u" from the pattern (Joerg Jenderek) + +--- + magic/Magdir/mail.news | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/magic/Magdir/mail.news b/magic/Magdir/mail.news +index 3a2eeb962..6a2229107 100644 +--- a/magic/Magdir/mail.news ++++ b/magic/Magdir/mail.news +@@ -1,5 +1,5 @@ + #------------------------------------------------------------------------------ +-# $File: mail.news,v 1.26 2021/03/21 14:37:03 christos Exp $ ++# $File: mail.news,v 1.27 2021/04/05 16:36:14 christos Exp $ + # mail.news: file(1) magic for mail and news + # + # Unfortunately, saved netnews also has From line added in some news software. +@@ -81,4 +81,4 @@ + # File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format + # From: Stephen Gildea + 0 string CRYPTED\003\007 Dovecot encrypted message +->9 byte xu \b, dcrypt version %d ++>9 byte x \b, dcrypt version %d diff --git a/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch b/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch new file mode 100644 index 000000000..9fa3ab4f0 --- /dev/null +++ b/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch @@ -0,0 +1,22 @@ +From 9e2becec20d023409a1671bf10a682f699350e85 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 4 Apr 2021 21:03:43 +0000 +Subject: [PATCH] Encoding bug fix. + +--- + ChangeLog | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/ChangeLog b/ChangeLog +index 23a93cf4b..2238ba6f8 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++2021-04-04 17:02 Christos Zoulas ++ ++ * count the total bytes found not the total byte positions ++ in order to determine encoding (Anatol Belski) ++ + 2021-03-30 20:21 Christos Zoulas + + * release 5.40 diff --git a/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch b/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch new file mode 100644 index 000000000..c0cbf3cb8 --- /dev/null +++ b/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch @@ -0,0 +1,159 @@ +From f06015040e7ffb3be21bb7622f9f8291b749aaf9 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 4 Apr 2021 17:46:17 +0000 +Subject: [PATCH] Fix regression after unsigned/signed printing changes by + making types unsigned (Richard W.M. Jones) + +--- + magic/Magdir/filesystems | 54 +++++++++++++++++++-------------------- + magic/Magdir/linux | 30 +++++++++++----------- + tests/Makefile.am | 1 + + tests/ext4.result | 1 + + tests/ext4.testfile | Bin 0 -> 2048 bytes + 5 files changed, 44 insertions(+), 42 deletions(-) + create mode 100644 tests/ext4.result + create mode 100644 tests/ext4.testfile + +diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems +index 0cb45cbfe..81966d6cc 100644 +--- a/magic/Magdir/filesystems ++++ b/magic/Magdir/filesystems +@@ -1,5 +1,5 @@ + #------------------------------------------------------------------------------ +-# $File: filesystems,v 1.140 2021/02/23 00:51:10 christos Exp $ ++# $File: filesystems,v 1.141 2021/04/04 17:46:17 christos Exp $ + # filesystems: file(1) magic for different filesystems + # + 0 name partid +@@ -1739,12 +1739,12 @@ + >>>0x464 lelong >0x0000007 ext4 filesystem data + # else large INCOMPAT? + >>0x460 lelong >0x000003f ext4 filesystem data +->0x468 belong x \b, UUID=%08x +->0x46c beshort x \b-%04x +->0x46e beshort x \b-%04x +->0x470 beshort x \b-%04x +->0x472 belong x \b-%08x +->0x476 beshort x \b%04x ++>0x468 ubelong x \b, UUID=%08x ++>0x46c ubeshort x \b-%04x ++>0x46e ubeshort x \b-%04x ++>0x470 ubeshort x \b-%04x ++>0x472 ubelong x \b-%08x ++>0x476 ubeshort x \b%04x + >0x478 string >0 \b, volume name "%s" + # General flags for any ext* fs + >0x460 lelong &0x0000004 (needs journal recovery) +@@ -1767,12 +1767,12 @@ + + # f2fs filesystem - Tuomas Tynkkynen + 0x400 lelong 0xF2F52010 F2FS filesystem +->0x46c belong x \b, UUID=%08x +->0x470 beshort x \b-%04x +->0x472 beshort x \b-%04x +->0x474 beshort x \b-%04x +->0x476 belong x \b-%08x +->0x47a beshort x \b%04x ++>0x46c ubelong x \b, UUID=%08x ++>0x470 ubeshort x \b-%04x ++>0x472 ubeshort x \b-%04x ++>0x474 ubeshort x \b-%04x ++>0x476 ubelong x \b-%08x ++>0x47a ubeshort x \b%04x + >0x147c lestring16 x \b, volume name "%s" + + # Minix filesystems - Juan Cespedes +@@ -2296,20 +2296,20 @@ + >>0x10060 string >\0 lockproto %s) + + # Russell Coker +-0x10040 string _BHRfS_M BTRFS Filesystem +->0x1012b string >\0 label "%s", +->0x10090 lelong x sectorsize %d, +->0x10094 lelong x nodesize %d, +->0x10098 lelong x leafsize %d, +->0x10020 belong x UUID=%08x- +->0x10024 beshort x \b%04x- +->0x10026 beshort x \b%04x- +->0x10028 beshort x \b%04x- +->0x1002a beshort x \b%04x +->0x1002c belong x \b%08x, +->0x10078 lequad x %lld/ +->0x10070 lequad x \b%lld bytes used, +->0x10088 lequad x %lld devices ++0x10040 string _BHRfS_M BTRFS Filesystem ++>0x1012b string >\0 label "%s", ++>0x10090 lelong x sectorsize %d, ++>0x10094 lelong x nodesize %d, ++>0x10098 lelong x leafsize %d, ++>0x10020 ubelong x UUID=%08x- ++>0x10024 ubeshort x \b%04x- ++>0x10026 ubeshort x \b%04x- ++>0x10028 ubeshort x \b%04x- ++>0x1002a ubeshort x \b%04x ++>0x1002c ubelong x \b%08x, ++>0x10078 lequad x %lld/ ++>0x10070 lequad x \b%lld bytes used, ++>0x10088 lequad x %lld devices + + # dvdisaster's .ecc + # From: "Nelson A. de Oliveira" +diff --git a/magic/Magdir/linux b/magic/Magdir/linux +index 693cef6f5..f25243e20 100644 +--- a/magic/Magdir/linux ++++ b/magic/Magdir/linux +@@ -1,6 +1,6 @@ + + #------------------------------------------------------------------------------ +-# $File: linux,v 1.77 2021/02/24 23:05:02 christos Exp $ ++# $File: linux,v 1.78 2021/04/04 17:46:17 christos Exp $ + # linux: file(1) magic for Linux files + # + # Values for Linux/i386 binaries, from Daniel Quinlan +@@ -83,20 +83,20 @@ + + # format v1, supported since 1998 + 0 name linux-swap +->0x400 lelong 1 little endian, version %u, +->>0x404 lelong x size %u pages, +->>0x408 lelong x %u bad pages, +->0x400 belong 1 big endian, version %u, +->>0x404 belong x size %u pages, +->>0x408 belong x %u bad pages, +->0x41c string \0 no label, +->0x41c string >\0 LABEL=%s, +->0x40c belong x UUID=%08x +->0x410 beshort x \b-%04x +->0x412 beshort x \b-%04x +->0x414 beshort x \b-%04x +->0x416 belong x \b-%08x +->0x41a beshort x \b%04x ++>0x400 lelong 1 little endian, version %u, ++>>0x404 lelong x size %u pages, ++>>0x408 lelong x %u bad pages, ++>0x400 belong 1 big endian, version %u, ++>>0x404 belong x size %u pages, ++>>0x408 belong x %u bad pages, ++>0x41c string \0 no label, ++>0x41c string >\0 LABEL=%s, ++>0x40c ubelong x UUID=%08x ++>0x410 ubeshort x \b-%04x ++>0x412 ubeshort x \b-%04x ++>0x414 ubeshort x \b-%04x ++>0x416 ubelong x \b-%08x ++>0x41a ubeshort x \b%04x + + 0xff6 string SWAPSPACE2 Linux swap file, 4k page size, + >0 use linux-swap +diff --git a/tests/Makefile.am b/tests/Makefile.am +index b38a25b3d..a63c2f65a 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -7,6 +7,7 @@ regex-eol.magic \ + CVE-2014-1943.testfile \ + JW07022A.mp3.testfile \ + escapevel.testfile \ ++ext4.testfile \ + fit-map-data.testfile \ + gedcom.testfile \ + hddrawcopytool.testfile \ diff --git a/source/a/libblockdev/libblockdev.SlackBuild b/source/a/libblockdev/libblockdev.SlackBuild index 812f29226..ccf0cc0fa 100755 --- a/source/a/libblockdev/libblockdev.SlackBuild +++ b/source/a/libblockdev/libblockdev.SlackBuild @@ -79,6 +79,9 @@ rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 cd $PKGNAM-$VERSION || exit 1 +# Fix build with glib-2.68.0: +zcat $CWD/libblockdev.glib-2.68.0.diff.gz | patch -p1 --verbose || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ diff --git a/source/a/libblockdev/libblockdev.glib-2.68.0.diff b/source/a/libblockdev/libblockdev.glib-2.68.0.diff new file mode 100644 index 000000000..029f70fb2 --- /dev/null +++ b/source/a/libblockdev/libblockdev.glib-2.68.0.diff @@ -0,0 +1,11 @@ +--- ./src/plugins/vdo.c.orig 2021-01-11 04:48:35.000000000 -0600 ++++ ./src/plugins/vdo.c 2021-04-06 12:57:27.128009876 -0500 +@@ -81,7 +81,7 @@ + } + + BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) { +- return g_memdup (stats, sizeof (BDVDOStats)); ++ return g_memdup2 (stats, sizeof (BDVDOStats)); + } + + diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S index aa40bac1b..904065463 100644 --- a/source/a/sysvinit-scripts/scripts/rc.S +++ b/source/a/sysvinit-scripts/scripts/rc.S @@ -369,8 +369,6 @@ else /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep " ${dev} " ; done fi -# This should be empty as it's just a mountpoint now: -rm -rf /var/run/* # Bind mount /run to /var/run: mount -o bind /run /var/run diff --git a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild index 6245ae083..d97b63e28 100755 --- a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild +++ b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=sysvinit-scripts VERSION=${VERSION:-2.1} ARCH=noarch -BUILD=${BUILD:-40} +BUILD=${BUILD:-41} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/ap/linuxdoc-tools/linuxdoc-tools.build b/source/ap/linuxdoc-tools/linuxdoc-tools.build index 2a30a4bb3..32ecd3ce7 100755 --- a/source/ap/linuxdoc-tools/linuxdoc-tools.build +++ b/source/ap/linuxdoc-tools/linuxdoc-tools.build @@ -329,6 +329,10 @@ patch --verbose -p1 < ../opensp-sigsegv.patch || exit 1 patch --verbose -p1 < ../opensp-manpage.patch || exit 1 patch --verbose -p1 < ../opensp-nodeids.patch || exit 1 +# Refresh libtool for new architecture definitions: +find . -name config.guess -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.guess '{}' +find . -name config.sub -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.sub '{}' + # Configure without optimisation. OpenSP & OpenJade # are sensitive to optimisations, resulting in segfaults, # particularly on the ARM platform. Apparently -O1 will work but @@ -415,6 +419,10 @@ xz -dc $CWD/sources/openjade-1.3.2-gcc46.patch.xz | patch -p1 --verbose || exit # Migrate from Perl 4 'getopts' function which was deprecated in Perl 5.16: sed -i -e '/getopts/{N;s#&G#g#;s#do .getopts.pl.;##;}' -e '/use POSIX/ause Getopt::Std;' msggen.pl +# Refresh libtool for new architecture definitions: +find . -name config.guess -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.guess '{}' +find . -name config.sub -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.sub '{}' + # Configure: CXXFLAGS="$SLKCFLAGS -fno-lifetime-dse" \ ./configure \ @@ -541,6 +549,10 @@ for i in \ ; do patch --verbose -p1 < ../$i done || exit 1 +# Refresh libtool for new architecture definitions: +find . -name config.guess -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.guess '{}' +find . -name config.sub -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.sub '{}' + # Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -1046,6 +1058,10 @@ for i in \ ; do patch --verbose -p1 < ../$i done || exit 1 +# Refresh libtool for new architecture definitions: +find . -name config.guess -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.guess '{}' +find . -name config.sub -print0 | xargs -0i cp -favv /usr/share/libtool/build-aux/config.sub '{}' + # Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/source/kde/kde/build/digikam b/source/kde/kde/build/digikam index d00491fd7..0cfbf0888 100644 --- a/source/kde/kde/build/digikam +++ b/source/kde/kde/build/digikam @@ -1 +1 @@ -1 +2 diff --git a/source/l/FTBFSlog b/source/l/FTBFSlog index ed91b7452..aa234b8cd 100644 --- a/source/l/FTBFSlog +++ b/source/l/FTBFSlog @@ -1,3 +1,6 @@ +Tue Apr 6 18:11:11 UTC 2021 + speech-dispatcher: Fix build with glib-2.68.0. Thanks to nobodino and ponce. ++--------------------------+ Sun Apr 4 19:03:17 UTC 2021 qt5-webkit: Patched to fix building with glib-2.68.0. Thanks to nobodino and ponce. diff --git a/source/l/graphene/graphene.SlackBuild b/source/l/graphene/graphene.SlackBuild index 76b408bbf..f229fc6e8 100755 --- a/source/l/graphene/graphene.SlackBuild +++ b/source/l/graphene/graphene.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=graphene VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/l/libbluray/libbluray.SlackBuild b/source/l/libbluray/libbluray.SlackBuild index 87ac37750..13e1a3419 100755 --- a/source/l/libbluray/libbluray.SlackBuild +++ b/source/l/libbluray/libbluray.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=libbluray VERSION=${VERSION:-$(echo libbluray-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d- | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} if [ -z "$ARCH" ]; then case "$( uname -m )" in diff --git a/source/l/speech-dispatcher/a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch b/source/l/speech-dispatcher/a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch new file mode 100644 index 000000000..b4f7a840f --- /dev/null +++ b/source/l/speech-dispatcher/a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch @@ -0,0 +1,102 @@ +From a2faab416e42cbdf3d73f98578a89eb7a235e25a Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Tue, 2 Feb 2021 14:50:23 -0600 +Subject: [PATCH] Fix build after glib e38982df + +glib.h now includes when building as C++. But kali.cpp +includes it (via module_utils.h) inside an extern "C" block. This is +illegal. + +Best practice is to use extern "C" in project header files, not around +include statements. So let's do that. module_utils.h already includes +glib.h, so we can use G_BEGIN_DECLS/G_END_DECLS there. spd_audio.h does +not, so I decided to write out the usual boilerplate, as including all +of glib.h just for G_BEGIN_DECLS/G_END_DECLS seemed like overkill. +Finally, I'll move config.h at the very top of kali.cpp, since I'm +touching this code anyway and that is the usual place to put it. + +This is the minimum viable change required for speech-dispatcher to +build with glib master. As long as speech-dispatcher is combining C and +C++, it would be advisible to use extern "C" in all headers that declare +C functions and might be included from C++. +--- + src/modules/kali.cpp | 10 +++++----- + src/modules/module_utils.h | 4 ++++ + src/modules/spd_audio.h | 8 ++++++++ + 3 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/src/modules/kali.cpp b/src/modules/kali.cpp +index 193975d8..7b497626 100644 +--- a/src/modules/kali.cpp ++++ b/src/modules/kali.cpp +@@ -21,21 +21,21 @@ + * $Id: kali.c,v 1.59 2008-06-09 10:38:02 hanke Exp $ + */ + ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ + #include + #include + #include + #include +-extern "C" { +-#ifdef HAVE_CONFIG_H +-#include +-#endif ++ + #include + #include "spd_audio.h" + + #include + + #include "module_utils.h" +-} + #define MODULE_NAME "kali" + #define MODULE_VERSION "0.0" + #define DEBUG_MODULE 1 +diff --git a/src/modules/module_utils.h b/src/modules/module_utils.h +index 6081e7e1..e82850b2 100644 +--- a/src/modules/module_utils.h ++++ b/src/modules/module_utils.h +@@ -41,6 +41,8 @@ + #include + #include "spd_audio.h" + ++G_BEGIN_DECLS ++ + typedef struct SPDMarks { + unsigned num; + unsigned allocated; +@@ -420,4 +422,6 @@ char *module_getvoice(char *language, SPDVoiceType voice); + gboolean module_existsvoice(char *voicename); + char *module_getdefaultvoice(void); + ++G_END_DECLS ++ + #endif /* #ifndef __MODULE_UTILS_H */ +diff --git a/src/modules/spd_audio.h b/src/modules/spd_audio.h +index 25045e2f..b9de3cd5 100644 +--- a/src/modules/spd_audio.h ++++ b/src/modules/spd_audio.h +@@ -28,6 +28,10 @@ + + #define SPD_AUDIO_LIB_PREFIX "spd_" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + AudioID *spd_audio_open(char *name, void **pars, char **error); + + int spd_audio_play(AudioID * id, AudioTrack track, AudioFormat format); +@@ -47,4 +51,8 @@ void spd_audio_set_loglevel(AudioID * id, int level); + + char const *spd_audio_get_playcmd(AudioID * id); + ++#ifdef __cplusplus ++} ++#endif ++ + #endif /* ifndef #__SPD_AUDIO_H */ diff --git a/source/l/speech-dispatcher/speech-dispatcher.SlackBuild b/source/l/speech-dispatcher/speech-dispatcher.SlackBuild index b6f0ee30f..9ef0055c3 100755 --- a/source/l/speech-dispatcher/speech-dispatcher.SlackBuild +++ b/source/l/speech-dispatcher/speech-dispatcher.SlackBuild @@ -90,6 +90,9 @@ find -L . \ sed -i "s/cicero //g" configure.ac sed -i "s/sd_cicero//g" src/modules/Makefile.am +# Fix build with glib-2.68.0: +zcat $CWD/a2faab416e42cbdf3d73f98578a89eb7a235e25a.patch.gz | patch -p1 --verbose || exit 1 + autoreconf -vif || exit 1 CFLAGS="$SLKCFLAGS" \ diff --git a/source/tcl/tk/tk.SlackBuild b/source/tcl/tk/tk.SlackBuild index 38e52d071..c025b44ed 100755 --- a/source/tcl/tk/tk.SlackBuild +++ b/source/tcl/tk/tk.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=tk VERSION=${VERSION:-8.6.11.1} # See also version number 8.6 in the symlinks below...) -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -73,7 +73,7 @@ cd $TMP rm -rf tk8.6.11 tk$VERSION tar xvf $CWD/tk$VERSION-src.tar.?z || exit 1 cd tk$VERSION || cd tk8.6.11 || exit 1 -sed -i -e "s#^TK_LIBRARY='\$(prefix)/lib/#TK_LIBRARY='\$(libdir)/#" \ +sed -i -e "s#TK_LIBRARY='\$(prefix)/lib/#TK_LIBRARY='\$(libdir)/#" \ unix/configure chown -R root:root . diff --git a/source/x/FTBFSlog b/source/x/FTBFSlog index e7c6293ba..51d321af9 100644 --- a/source/x/FTBFSlog +++ b/source/x/FTBFSlog @@ -1,3 +1,7 @@ +Tue Apr 6 18:07:59 UTC 2021 + fcitx: Remove -fPIC to fix build (it uses it anyway). Thanks to nobodino. + fcitx-configtool: Remove -fPIC to fix build. Thanks to nobodino. ++--------------------------+ Sat Jan 30 02:44:45 UTC 2021 fcitx-libpinyin: fix building against libpinyin-2.6.0 with upstream patch. Thanks to nobodino for the report. diff --git a/source/x/fcitx-anthy/fcitx-anthy.SlackBuild b/source/x/fcitx-anthy/fcitx-anthy.SlackBuild index 2ccfcf585..6c60c2043 100755 --- a/source/x/fcitx-anthy/fcitx-anthy.SlackBuild +++ b/source/x/fcitx-anthy/fcitx-anthy.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=fcitx-anthy VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d- | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} diff --git a/source/x/fcitx-configtool/fcitx-configtool.SlackBuild b/source/x/fcitx-configtool/fcitx-configtool.SlackBuild index 92ac59fd9..1452ecb03 100755 --- a/source/x/fcitx-configtool/fcitx-configtool.SlackBuild +++ b/source/x/fcitx-configtool/fcitx-configtool.SlackBuild @@ -51,7 +51,7 @@ elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O2" LIBDIRSUFFIX="64" elif [ "$ARCH" = "armv7hl" ]; then SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" @@ -89,6 +89,7 @@ find . \ mkdir build cd build cmake \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_C_FLAGS:STRING=${SLKCFLAGS} \ -DCMAKE_CXX_FLAGS:STRING=${SLKCFLAGS} \ -DCMAKE_INSTALL_PREFIX=/usr \ diff --git a/source/x/fcitx/fcitx.SlackBuild b/source/x/fcitx/fcitx.SlackBuild index 474a2e6f4..ddbcc2c96 100755 --- a/source/x/fcitx/fcitx.SlackBuild +++ b/source/x/fcitx/fcitx.SlackBuild @@ -54,7 +54,7 @@ elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O2" LIBDIRSUFFIX="64" elif [ "$ARCH" = "armv7hl" ]; then SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" diff --git a/source/x/x11/build/xf86-input-libinput b/source/x/x11/build/xf86-input-libinput index 00750edc0..d00491fd7 100644 --- a/source/x/x11/build/xf86-input-libinput +++ b/source/x/x11/build/xf86-input-libinput @@ -1 +1 @@ -3 +1 diff --git a/source/xap/FTBFSlog b/source/xap/FTBFSlog index 82df57f0e..af5588c89 100644 --- a/source/xap/FTBFSlog +++ b/source/xap/FTBFSlog @@ -1,3 +1,6 @@ +Tue Apr 6 18:10:12 UTC 2021 + pan: Fix build with glib-2.68.0. Thanks to nobodino and ponce. ++--------------------------+ Tue Jan 19 01:20:27 UTC 2021 seamonkey: patch to fix build with Rust 1.48.0. Thanks to USUARIONUEVO and nobodino. diff --git a/source/xap/pan/0d775547f0e7cf7529538704814469e1db5496f2.patch b/source/xap/pan/0d775547f0e7cf7529538704814469e1db5496f2.patch deleted file mode 100644 index 80dc04877..000000000 --- a/source/xap/pan/0d775547f0e7cf7529538704814469e1db5496f2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0d775547f0e7cf7529538704814469e1db5496f2 Mon Sep 17 00:00:00 2001 -From: Detlef Graef -Date: Sun, 5 Jul 2020 08:54:35 +0200 -Subject: [PATCH] Remove empty line from file posting.xml - ---- - pan/data-impl/profiles.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pan/data-impl/profiles.cc b/pan/data-impl/profiles.cc -index e999fda..4053cae 100644 ---- a/pan/data-impl/profiles.cc -+++ b/pan/data-impl/profiles.cc -@@ -240,7 +240,7 @@ ProfilesImpl :: serialize (std::ostream& out) const - } - out << indent(--depth) << "\n"; - } -- out << indent(--depth) << "\n\n"; -+ out << indent(--depth) << "\n"; - out << indent(--depth) << "\n"; - } - --- -GitLab - diff --git a/source/xap/pan/495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch b/source/xap/pan/495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch deleted file mode 100644 index 6b876d1ed..000000000 --- a/source/xap/pan/495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch +++ /dev/null @@ -1,280 +0,0 @@ -From 495bfb2eb9228b5b5cef8b50e11af577e4b473f8 Mon Sep 17 00:00:00 2001 -From: Detlef Graef -Date: Sun, 5 Jul 2020 08:47:54 +0200 -Subject: [PATCH] Fix for GMime3 build (Posting error). Issues #103 and #114 - ---- - pan/gui/post-ui.cc | 176 ++++++++++++++++++++++++++++++++------------- - 1 file changed, 126 insertions(+), 50 deletions(-) - -diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc -index 8769ec5..eb21384 100644 ---- a/pan/gui/post-ui.cc -+++ b/pan/gui/post-ui.cc -@@ -1598,86 +1598,178 @@ namespace - GMimeMessage* - PostUI :: new_message_from_ui (Mode mode, bool copy_body) - { -+#ifdef HAVE_GMIME_30 - - GMimeMessage * msg(0); -- msg = g_mime_message_new (false); -+ msg = g_mime_message_new (true); -+ const char * charset_cstr = _charset.c_str(); - - // headers from the ui: From - const Profile profile (get_current_profile ()); - std::string s; - profile.get_from_header (s); --#ifdef HAVE_GMIME_30 -- g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_SENDER, NULL, s.c_str()); -+ g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_FROM, profile.username.c_str(), profile.address.c_str()); -+ -+ // headers from the ui: Subject -+ const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry))); -+ if (cpch) { -+ g_mime_message_set_subject (msg, cpch, charset_cstr); -+ } -+ -+ // headers from the ui: To -+ const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry))); -+ if (!to.empty()) -+ pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str); -+ -+ // headers from the ui: Newsgroups -+ const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry))); -+ if (!groups.empty()) -+ g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, charset_cstr); -+ -+ // headers from the ui: Followup-To -+ const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry))); -+ if (!followupto.empty()) -+ g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, charset_cstr); -+ -+ // headers from the ui: Reply-To -+ const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry))); -+ if (!replyto.empty()) -+ g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, charset_cstr); -+ -+ // headers from posting profile(via prefs): X-Face -+ if (!profile.xface.empty()) -+ { -+ std::string f; -+ f += " " + profile.xface; -+ g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), charset_cstr); -+ } -+ -+ // add the 'hidden headers' (references) -+ const gchar * h_key_str; -+ foreach_const (str2str_t, _hidden_headers, it) -+ if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0)) -+ { -+ h_key_str = it->first.c_str(); -+ if ( g_ascii_strncasecmp (h_key_str, "Content", 7) ) -+ { -+ g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), charset_cstr); -+ } -+ } -+ -+ // build headers from the 'more headers' entry field -+ std::map headers; -+ GtkTextBuffer * buf (_headers_buf); -+ GtkTextIter start, end; -+ gtk_text_buffer_get_bounds (buf, &start, &end); -+ char * pch = gtk_text_buffer_get_text (buf, &start, &end, false); -+ StringView key, val, v(pch); -+ v.trim (); -+ while (v.pop_token (val, '\n') && val.pop_token(key,':')) { -+ key.trim (); -+ val.eat_chars (1); -+ val.trim (); -+ std::string key_str (key.to_string()); -+ if (extra_header_is_editable (key, val)) -+ g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), -+ val.to_string().c_str(), charset_cstr); -+ } -+ g_free (pch); -+ -+ // User-Agent -+ if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true)) -+ g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), charset_cstr); -+ -+ // Message-ID for single text-only posts -+ if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) { -+ const std::string message_id = generate_message_id(profile); -+ pan_g_mime_message_set_message_id (msg, message_id.c_str()); -+ } -+ -+ // body & charset -+ { -+ std::string body; -+ if (copy_body) body = get_body(); -+ -+ GMimeStream * stream = g_mime_stream_mem_new_with_buffer (body.c_str(), body.size()); -+ -+ const std::string charset ((mode==POSTING && !_charset.empty()) ? _charset : "UTF-8"); -+ if (charset != "UTF-8") { -+ // add a wrapper to convert from UTF-8 to $charset -+ GMimeStream * tmp = g_mime_stream_filter_new (stream); -+ g_object_unref (stream); -+ GMimeFilter * filter = g_mime_filter_charset_new ("UTF-8", charset.c_str()); -+ g_mime_stream_filter_add (GMIME_STREAM_FILTER(tmp), filter); -+ g_object_unref (filter); -+ stream = tmp; -+ } -+ GMimeDataWrapper * content_object = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_DEFAULT); -+ g_object_unref (stream); -+ GMimePart * part = g_mime_part_new (); -+ g_mime_part_set_content (part, content_object); -+ -+ pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str()); -+ GMimeContentType * type = g_mime_content_type_parse (NULL, pch); -+ g_free (pch); -+ g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted. -+ -+ if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc); -+ -+ g_object_unref (content_object); -+ g_mime_message_set_mime_part (msg, GMIME_OBJECT(part)); -+ g_object_unref (part); -+ } -+ -+ return msg; -+ - #else -+ -+ GMimeMessage * msg(0); -+ msg = g_mime_message_new (false); -+ -+ // headers from the ui: From -+ const Profile profile (get_current_profile ()); -+ std::string s; -+ profile.get_from_header (s); - g_mime_message_set_sender (msg, s.c_str()); --#endif - - // headers from the ui: Subject - const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry))); - if (cpch) { --#ifdef HAVE_GMIME_30 -- g_mime_message_set_subject (msg, cpch, NULL); --#else - g_mime_message_set_subject (msg, cpch); --#endif - } - - // headers from the ui: To - const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry))); - if (!to.empty()) --#ifdef HAVE_GMIME_30 -- pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str); --#else - pan_g_mime_message_add_recipients_from_string (msg, GMIME_RECIPIENT_TYPE_TO, to.str); --#endif - - // headers from the ui: Newsgroups - const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry))); - if (!groups.empty()) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str); --#endif - - // headers from the ui: Followup-To - const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry))); - if (!followupto.empty()) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str); --#endif - - // headers from the ui: Reply-To - const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry))); - if (!replyto.empty()) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str); --#endif - - // headers from posting profile(via prefs): X-Face - if (!profile.xface.empty()) - { - std::string f; - f += " " + profile.xface; --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str()); --#endif - } - - // add the 'hidden headers' - foreach_const (str2str_t, _hidden_headers, it) - if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0)) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str()); --#endif - - // build headers from the 'more headers' entry field - std::map headers; -@@ -1693,23 +1785,14 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body) - val.trim (); - std::string key_str (key.to_string()); - if (extra_header_is_editable (key, val)) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), -- val.to_string().c_str(), NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), - val.to_string().c_str()); --#endif - } - g_free (pch); - - // User-Agent - if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true)) --#ifdef HAVE_GMIME_30 -- g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), NULL); --#else - g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent()); --#endif - - // Message-ID for single text-only posts - if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) { -@@ -1738,19 +1821,10 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body) - g_object_unref (stream); - GMimePart * part = g_mime_part_new (); - pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str()); -- --#ifdef HAVE_GMIME_30 -- GMimeContentType * type = g_mime_content_type_parse (NULL, pch); --#else - GMimeContentType * type = g_mime_content_type_new_from_string (pch); --#endif - g_free (pch); - g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted. --#ifdef HAVE_GMIME_30 -- g_mime_part_set_content(part, content_object); --#else - g_mime_part_set_content_object (part, content_object); --#endif - if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc); - g_object_unref (content_object); - g_mime_message_set_mime_part (msg, GMIME_OBJECT(part)); -@@ -1758,6 +1832,8 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body) - } - - return msg; -+ -+#endif - } - - void --- -GitLab - diff --git a/source/xap/pan/pan.SlackBuild b/source/xap/pan/pan.SlackBuild index 1881feee9..b3a8a3bfc 100755 --- a/source/xap/pan/pan.SlackBuild +++ b/source/xap/pan/pan.SlackBuild @@ -75,8 +75,8 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -zcat $CWD/0d775547f0e7cf7529538704814469e1db5496f2.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/495bfb2eb9228b5b5cef8b50e11af577e4b473f8.patch.gz | patch -p1 --verbose || exit 1 +# Fix gmime3 errors and building with glib-2.68.0: +zcat $CWD/pan.glib-2.68.0.diff.gz | patch -p1 --verbose || exit 1 # Configure: CFLAGS="$SLKCFLAGS" \ diff --git a/source/xap/pan/pan.glib-2.68.0.diff b/source/xap/pan/pan.glib-2.68.0.diff new file mode 100644 index 000000000..e02f28ca3 --- /dev/null +++ b/source/xap/pan/pan.glib-2.68.0.diff @@ -0,0 +1,743 @@ +diff -aurN pan-0.146/pan/data/article-cache.cc pan-0.146-mod/pan/data/article-cache.cc +--- pan-0.146/pan/data/article-cache.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/data/article-cache.cc 2021-04-05 18:50:26.132408821 +0200 +@@ -26,12 +26,10 @@ + #include + #include + #include +- +- #include +- #include +- #include + } +- ++#include ++#include ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/data/article-cache.h pan-0.146-mod/pan/data/article-cache.h +--- pan-0.146/pan/data/article-cache.h 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/data/article-cache.h 2021-04-05 18:49:41.686408990 +0200 +@@ -22,9 +22,7 @@ + + #include + #include +-extern "C" { +- #include // for guint64 +-} ++#include // for guint64 + #include + #include + +diff -aurN pan-0.146/pan/data-impl/data-impl.cc pan-0.146-mod/pan/data-impl/data-impl.cc +--- pan-0.146/pan/data-impl/data-impl.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/data-impl/data-impl.cc 2021-04-05 18:59:43.045406696 +0200 +@@ -22,10 +22,8 @@ + **************/ + + #include +-extern "C" { +- #include +- #include // for g_build_filename +-} ++#include ++#include // for g_build_filename + #include + #include + #include +diff -aurN pan-0.146/pan/data-impl/profiles.cc pan-0.146-mod/pan/data-impl/profiles.cc +--- pan-0.146/pan/data-impl/profiles.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/data-impl/profiles.cc 2021-04-05 07:03:32.546986596 +0200 +@@ -240,7 +240,7 @@ + } + out << indent(--depth) << "\n"; + } +- out << indent(--depth) << "\n\n"; ++ out << indent(--depth) << "\n"; + out << indent(--depth) << "\n"; + } + +diff -aurN pan-0.146/pan/general/file-util.cc pan-0.146-mod/pan/general/file-util.cc +--- pan-0.146/pan/general/file-util.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/general/file-util.cc 2021-04-05 18:44:45.568410120 +0200 +@@ -27,13 +27,12 @@ + #include + #include + #include +- #include +- #include + #ifndef G_OS_WIN32 + #include + #endif + } +- ++#include ++#include + #include "debug.h" + #include "log.h" + #include "messages.h" +diff -aurN pan-0.146/pan/general/file-util.h pan-0.146-mod/pan/general/file-util.h +--- pan-0.146/pan/general/file-util.h 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/general/file-util.h 2021-04-05 18:43:33.527410395 +0200 +@@ -25,9 +25,9 @@ + extern "C" { + #include + #include +- #include +- #include + } ++#include ++#include + #include + + #define g_freopen freopen +diff -aurN pan-0.146/pan/general/line-reader.cc pan-0.146-mod/pan/general/line-reader.cc +--- pan-0.146/pan/general/line-reader.cc 2017-12-23 20:51:55.000000000 +0100 ++++ pan-0.146-mod/pan/general/line-reader.cc 2021-04-05 18:45:43.352409899 +0200 +@@ -1,9 +1,7 @@ + #include + #include + #include +-extern "C"{ +- #include +-} ++#include + #include + #include "file-util.h" + #include "line-reader.h" +diff -aurN pan-0.146/pan/general/text-match.cc pan-0.146-mod/pan/general/text-match.cc +--- pan-0.146/pan/general/text-match.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/general/text-match.cc 2021-04-05 18:46:30.698409719 +0200 +@@ -20,9 +20,9 @@ + #include + extern "C" { + #include +- #include +- #include + } ++#include ++#include + #include "debug.h" + #include "log.h" + #include "text-match.h" +diff -aurN pan-0.146/pan/gui/actions.cc pan-0.146-mod/pan/gui/actions.cc +--- pan-0.146/pan/gui/actions.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/actions.cc 2021-04-05 19:03:23.526405855 +0200 +@@ -18,11 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include "gtk-compat.h" +-} +- ++#include "gtk-compat.h" ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/gui/dl-headers-ui.cc pan-0.146-mod/pan/gui/dl-headers-ui.cc +--- pan-0.146/pan/gui/dl-headers-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/dl-headers-ui.cc 2021-04-05 19:04:01.884405709 +0200 +@@ -18,11 +18,9 @@ + */ + + #include +-extern "C" { +- #include +- #include +- #include "gtk-compat.h" +-} ++#include ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/group-prefs.cc pan-0.146-mod/pan/gui/group-prefs.cc +--- pan-0.146/pan/gui/group-prefs.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/group-prefs.cc 2021-04-05 19:04:41.030405560 +0200 +@@ -21,8 +21,8 @@ + #include + #include // chmod + #include // chmod +- #include + } ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/gui/group-prefs-dialog.cc pan-0.146-mod/pan/gui/group-prefs-dialog.cc +--- pan-0.146/pan/gui/group-prefs-dialog.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/group-prefs-dialog.cc 2021-04-05 19:05:19.236405414 +0200 +@@ -19,13 +19,13 @@ + + #include + extern "C" { +- #include +- #include +- #include "gtk-compat.h" + #ifdef HAVE_GTKSPELL + #include + #endif + } ++#include ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/gui.cc pan-0.146-mod/pan/gui/gui.cc +--- pan-0.146/pan/gui/gui.cc 2019-05-04 18:10:27.000000000 +0200 ++++ pan-0.146-mod/pan/gui/gui.cc 2021-04-05 19:00:49.351406443 +0200 +@@ -25,9 +25,9 @@ + extern "C" { + #include // for chmod + #include // for chmod +- #include + #include + } ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/gui/header-pane.cc pan-0.146-mod/pan/gui/header-pane.cc +--- pan-0.146/pan/gui/header-pane.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/header-pane.cc 2021-04-05 19:06:37.048405117 +0200 +@@ -19,10 +19,9 @@ + + extern "C" { + #include +- #include +- #include "gtk-compat.h" +- #include "gtk-compat.h" + } ++#include "gtk-compat.h" ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/gui/post-ui.cc pan-0.146-mod/pan/gui/post-ui.cc +--- pan-0.146/pan/gui/post-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/post-ui.cc 2021-04-05 07:03:32.564986261 +0200 +@@ -1598,86 +1598,178 @@ + GMimeMessage* + PostUI :: new_message_from_ui (Mode mode, bool copy_body) + { ++#ifdef HAVE_GMIME_30 + + GMimeMessage * msg(0); +- msg = g_mime_message_new (false); ++ msg = g_mime_message_new (true); ++ const char * charset_cstr = _charset.c_str(); + + // headers from the ui: From + const Profile profile (get_current_profile ()); + std::string s; + profile.get_from_header (s); +-#ifdef HAVE_GMIME_30 +- g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_SENDER, NULL, s.c_str()); ++ g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_FROM, profile.username.c_str(), profile.address.c_str()); ++ ++ // headers from the ui: Subject ++ const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry))); ++ if (cpch) { ++ g_mime_message_set_subject (msg, cpch, charset_cstr); ++ } ++ ++ // headers from the ui: To ++ const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry))); ++ if (!to.empty()) ++ pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str); ++ ++ // headers from the ui: Newsgroups ++ const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry))); ++ if (!groups.empty()) ++ g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, charset_cstr); ++ ++ // headers from the ui: Followup-To ++ const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry))); ++ if (!followupto.empty()) ++ g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, charset_cstr); ++ ++ // headers from the ui: Reply-To ++ const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry))); ++ if (!replyto.empty()) ++ g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, charset_cstr); ++ ++ // headers from posting profile(via prefs): X-Face ++ if (!profile.xface.empty()) ++ { ++ std::string f; ++ f += " " + profile.xface; ++ g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), charset_cstr); ++ } ++ ++ // add the 'hidden headers' (references) ++ const gchar * h_key_str; ++ foreach_const (str2str_t, _hidden_headers, it) ++ if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0)) ++ { ++ h_key_str = it->first.c_str(); ++ if ( g_ascii_strncasecmp (h_key_str, "Content", 7) ) ++ { ++ g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), charset_cstr); ++ } ++ } ++ ++ // build headers from the 'more headers' entry field ++ std::map headers; ++ GtkTextBuffer * buf (_headers_buf); ++ GtkTextIter start, end; ++ gtk_text_buffer_get_bounds (buf, &start, &end); ++ char * pch = gtk_text_buffer_get_text (buf, &start, &end, false); ++ StringView key, val, v(pch); ++ v.trim (); ++ while (v.pop_token (val, '\n') && val.pop_token(key,':')) { ++ key.trim (); ++ val.eat_chars (1); ++ val.trim (); ++ std::string key_str (key.to_string()); ++ if (extra_header_is_editable (key, val)) ++ g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), ++ val.to_string().c_str(), charset_cstr); ++ } ++ g_free (pch); ++ ++ // User-Agent ++ if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true)) ++ g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), charset_cstr); ++ ++ // Message-ID for single text-only posts ++ if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) { ++ const std::string message_id = generate_message_id(profile); ++ pan_g_mime_message_set_message_id (msg, message_id.c_str()); ++ } ++ ++ // body & charset ++ { ++ std::string body; ++ if (copy_body) body = get_body(); ++ ++ GMimeStream * stream = g_mime_stream_mem_new_with_buffer (body.c_str(), body.size()); ++ ++ const std::string charset ((mode==POSTING && !_charset.empty()) ? _charset : "UTF-8"); ++ if (charset != "UTF-8") { ++ // add a wrapper to convert from UTF-8 to $charset ++ GMimeStream * tmp = g_mime_stream_filter_new (stream); ++ g_object_unref (stream); ++ GMimeFilter * filter = g_mime_filter_charset_new ("UTF-8", charset.c_str()); ++ g_mime_stream_filter_add (GMIME_STREAM_FILTER(tmp), filter); ++ g_object_unref (filter); ++ stream = tmp; ++ } ++ GMimeDataWrapper * content_object = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_DEFAULT); ++ g_object_unref (stream); ++ GMimePart * part = g_mime_part_new (); ++ g_mime_part_set_content (part, content_object); ++ ++ pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str()); ++ GMimeContentType * type = g_mime_content_type_parse (NULL, pch); ++ g_free (pch); ++ g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted. ++ ++ if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc); ++ ++ g_object_unref (content_object); ++ g_mime_message_set_mime_part (msg, GMIME_OBJECT(part)); ++ g_object_unref (part); ++ } ++ ++ return msg; ++ + #else ++ ++ GMimeMessage * msg(0); ++ msg = g_mime_message_new (false); ++ ++ // headers from the ui: From ++ const Profile profile (get_current_profile ()); ++ std::string s; ++ profile.get_from_header (s); + g_mime_message_set_sender (msg, s.c_str()); +-#endif + + // headers from the ui: Subject + const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry))); + if (cpch) { +-#ifdef HAVE_GMIME_30 +- g_mime_message_set_subject (msg, cpch, NULL); +-#else + g_mime_message_set_subject (msg, cpch); +-#endif + } + + // headers from the ui: To + const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry))); + if (!to.empty()) +-#ifdef HAVE_GMIME_30 +- pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str); +-#else + pan_g_mime_message_add_recipients_from_string (msg, GMIME_RECIPIENT_TYPE_TO, to.str); +-#endif + + // headers from the ui: Newsgroups + const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry))); + if (!groups.empty()) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str); +-#endif + + // headers from the ui: Followup-To + const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry))); + if (!followupto.empty()) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str); +-#endif + + // headers from the ui: Reply-To + const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry))); + if (!replyto.empty()) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str); +-#endif + + // headers from posting profile(via prefs): X-Face + if (!profile.xface.empty()) + { + std::string f; + f += " " + profile.xface; +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str()); +-#endif + } + + // add the 'hidden headers' + foreach_const (str2str_t, _hidden_headers, it) + if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0)) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str()); +-#endif + + // build headers from the 'more headers' entry field + std::map headers; +@@ -1693,23 +1785,14 @@ + val.trim (); + std::string key_str (key.to_string()); + if (extra_header_is_editable (key, val)) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), +- val.to_string().c_str(), NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(), + val.to_string().c_str()); +-#endif + } + g_free (pch); + + // User-Agent + if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true)) +-#ifdef HAVE_GMIME_30 +- g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), NULL); +-#else + g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent()); +-#endif + + // Message-ID for single text-only posts + if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) { +@@ -1738,19 +1821,10 @@ + g_object_unref (stream); + GMimePart * part = g_mime_part_new (); + pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str()); +- +-#ifdef HAVE_GMIME_30 +- GMimeContentType * type = g_mime_content_type_parse (NULL, pch); +-#else + GMimeContentType * type = g_mime_content_type_new_from_string (pch); +-#endif + g_free (pch); + g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted. +-#ifdef HAVE_GMIME_30 +- g_mime_part_set_content(part, content_object); +-#else + g_mime_part_set_content_object (part, content_object); +-#endif + if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc); + g_object_unref (content_object); + g_mime_message_set_mime_part (msg, GMIME_OBJECT(part)); +@@ -1758,6 +1832,8 @@ + } + + return msg; ++ ++#endif + } + + void +diff -aurN pan-0.146/pan/gui/prefs-ui.cc pan-0.146-mod/pan/gui/prefs-ui.cc +--- pan-0.146/pan/gui/prefs-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/prefs-ui.cc 2021-04-05 19:07:26.592404928 +0200 +@@ -18,10 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include "gtk-compat.h" +-} ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/progress-view.cc pan-0.146-mod/pan/gui/progress-view.cc +--- pan-0.146/pan/gui/progress-view.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/progress-view.cc 2021-04-05 19:08:01.207404796 +0200 +@@ -18,9 +18,7 @@ + */ + + #include +-extern "C" { +- #include "gtk-compat.h" +-} ++#include "gtk-compat.h" + #include + #include + #include "progress-view.h" +diff -aurN pan-0.146/pan/gui/save-attach-ui.cc pan-0.146-mod/pan/gui/save-attach-ui.cc +--- pan-0.146/pan/gui/save-attach-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/save-attach-ui.cc 2021-04-05 19:09:43.571404405 +0200 +@@ -18,10 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include "gtk-compat.h" +-} ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/save-ui.cc pan-0.146-mod/pan/gui/save-ui.cc +--- pan-0.146/pan/gui/save-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/save-ui.cc 2021-04-05 19:08:49.801404611 +0200 +@@ -18,10 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include "gtk-compat.h" +-} ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/score-add-ui.cc pan-0.146-mod/pan/gui/score-add-ui.cc +--- pan-0.146/pan/gui/score-add-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/score-add-ui.cc 2021-04-05 19:10:11.844404298 +0200 +@@ -20,9 +20,7 @@ + #include + #include + #include +-extern "C" { +- #include +-} ++#include + #include + #include + #include "hig.h" +diff -aurN pan-0.146/pan/gui/score-view-ui.cc pan-0.146-mod/pan/gui/score-view-ui.cc +--- pan-0.146/pan/gui/score-view-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/score-view-ui.cc 2021-04-05 19:10:51.159404148 +0200 +@@ -18,10 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include "gtk-compat.h" +-} ++#include ++#include "gtk-compat.h" + #include + #include "pad.h" + #include "score-add-ui.h" +diff -aurN pan-0.146/pan/gui/server-ui.cc pan-0.146-mod/pan/gui/server-ui.cc +--- pan-0.146/pan/gui/server-ui.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/server-ui.cc 2021-04-05 19:11:30.464403998 +0200 +@@ -21,12 +21,9 @@ + #include + #include + #include +-extern "C" { +- #include +- #include +- #include "gtk-compat.h" +-} +- ++#include ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/gui/task-pane.cc pan-0.146-mod/pan/gui/task-pane.cc +--- pan-0.146/pan/gui/task-pane.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/gui/task-pane.cc 2021-04-05 19:12:05.829403863 +0200 +@@ -18,11 +18,9 @@ + */ + + #include +-extern "C" { +- #include +- #include +- #include "gtk-compat.h" +-} ++#include ++#include ++#include "gtk-compat.h" + #include + #include + #include +diff -aurN pan-0.146/pan/tasks/nntp.cc pan-0.146-mod/pan/tasks/nntp.cc +--- pan-0.146/pan/tasks/nntp.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/nntp.cc 2021-04-05 18:57:01.768407312 +0200 +@@ -22,10 +22,8 @@ + #include + #include // abort, atoi, strtoul + #include // snprintf +-extern "C" { +- #include +- #include +-} ++#include ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/tasks/socket.cc pan-0.146-mod/pan/tasks/socket.cc +--- pan-0.146/pan/tasks/socket.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/socket.cc 2021-04-05 18:58:43.178406925 +0200 +@@ -21,9 +21,7 @@ + #include + #include + #include +-extern "C" { +- #include +-} ++#include + #include + #include + #include "socket.h" +diff -aurN pan-0.146/pan/tasks/task-groups.cc pan-0.146-mod/pan/tasks/task-groups.cc +--- pan-0.146/pan/tasks/task-groups.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/task-groups.cc 2021-04-05 18:52:54.804408254 +0200 +@@ -20,9 +20,9 @@ + #include + #include + extern "C" { +- #include + #include + } ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/tasks/task-post.cc pan-0.146-mod/pan/tasks/task-post.cc +--- pan-0.146/pan/tasks/task-post.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/task-post.cc 2021-04-05 18:54:43.554407839 +0200 +@@ -18,9 +18,7 @@ + */ + + #include +-extern "C" { +- #include +-} ++#include + #include "task-post.h" + #include + #include +diff -aurN pan-0.146/pan/tasks/task-xover.cc pan-0.146-mod/pan/tasks/task-xover.cc +--- pan-0.146/pan/tasks/task-xover.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/task-xover.cc 2021-04-05 18:55:26.528407675 +0200 +@@ -26,10 +26,9 @@ + #define PROTOTYPES + #include + #include ++} + #include + #include +-} +- + #include + #include + #include +diff -aurN pan-0.146/pan/tasks/task-xoverinfo.cc pan-0.146-mod/pan/tasks/task-xoverinfo.cc +--- pan-0.146/pan/tasks/task-xoverinfo.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/tasks/task-xoverinfo.cc 2021-04-05 18:56:10.119407509 +0200 +@@ -24,10 +24,10 @@ + #define PROTOTYPES + #include + #include +- #include +- #include + #include + } ++#include ++#include + #include + #include + #include +diff -aurN pan-0.146/pan/usenet-utils/filter-info.cc pan-0.146-mod/pan/usenet-utils/filter-info.cc +--- pan-0.146/pan/usenet-utils/filter-info.cc 2017-12-29 18:15:47.000000000 +0100 ++++ pan-0.146-mod/pan/usenet-utils/filter-info.cc 2021-04-05 18:48:09.801409341 +0200 +@@ -18,10 +18,8 @@ + */ + + #include +-extern "C" { +- #include +- #include +-} ++#include ++#include + #include + #include "filter-info.h" + +diff -aurN pan-0.146/README.windows pan-0.146-mod/README.windows +--- pan-0.146/README.windows 2019-10-12 21:57:23.000000000 +0200 ++++ pan-0.146-mod/README.windows 1970-01-01 01:00:00.000000000 +0100 +@@ -1,16 +0,0 @@ +- +- http://pan.rebelbase.com/download/releases/0.146/ +- has a full list of changes since the previous release. +- +- On Windows, Pan requires GTK 2.16.0 or higher, which can be found at +- . +- +- Found a bug? Have a suggestion? +- Send feedback to the pan-users@nongnu.org mailing list. +- +- Information on building Pan on Windows can be found at +- . +- +- See the following page for more information on Pan builds for Windows: +- . +- -- cgit v1.2.3