1
0
forked from ports/contrib

tightvnc: fixed build against gcc10

This commit is contained in:
Tim Biermann 2021-02-21 14:19:19 +00:00
parent df9250a6e2
commit 023db8a44e
Signed by untrusted user: tb
GPG Key ID: 42F8B4E30B673606
5 changed files with 123 additions and 3 deletions

View File

@ -1,6 +1,9 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3/0/+q08V3J/IHmmewPx8PY0Bilx8JeoBpYdOpF5WWtJLdJj00p7T9pbloaT58yL5esnr4pcgm4LjlcWlq+TFAU=
SHA256 (Pkgfile) = 8f7cb1163e55538b17213c1dcd7659a37ad3e86dddd5a255883d49b77dae6772
RWSagIOpLGJF39A6Ypvbbygi7GBTznss4Bc5ppwoNWj3hiaL0Wpa3LTi2EWFf6p62tNzF+n6pTesLkfq34JsvRV83cQdRHthIQQ=
SHA256 (Pkgfile) = 145348a31efe865da5197093d25681101196b81b568f09b41c34fb3fe380f479
SHA256 (.footprint) = c5ea0bdb7bb7ac1f4cb2f4e583a3090847bc7cc4e178e7ae8a355aa4e373cb6d
SHA256 (tightvnc-1.3.10_unixsrc.tar.bz2) = f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d
SHA256 (tightvnc-config.patch) = 250ec0e14e997114c09a9cd1af85a7132bcdf77f7618e44f4acb5840366d867c
SHA256 (ftbfs-with-binutils-236.patch) = fb61f0fc0bb066e30a975e87a5036e6476fd297163706254dc2408ea1160e752
SHA256 (fix-deprecated_BSD+SVID-option.patch) = 03885a2a0edee5c66036c96bc2a5bad42bfa29f0512aebb11621bf9e038c2ec2
SHA256 (ftbfs-gcc-10.patch) = 5f0d2e42e1062382c6e53967ae619ffd05a522e04675e3a193d2faca3f69d7dc

View File

@ -8,11 +8,16 @@ name=tightvnc
version=1.3.10
release=3
source=(http://download.sourceforge.net/vnc-tight/$name-${version}_unixsrc.tar.bz2 \
$name-config.patch)
$name-config.patch ftbfs-with-binutils-236.patch \
fix-deprecated_BSD+SVID-option.patch ftbfs-gcc-10.patch)
build() {
cd vnc_unixsrc
patch -p0 -i $SRC/$name-config.patch
# grabbed from debian bullseye (testing)
patch -p1 -i $SRC/ftbfs-with-binutils-236.patch
patch -p1 -i $SRC/fix-deprecated_BSD+SVID-option.patch
patch -p1 -i $SRC/ftbfs-gcc-10.patch
xmkmf -a

View File

@ -0,0 +1,26 @@
Description: Replace _BSD_SOURCE and _SVID_SOURCE by _DEFAULT_SOURCE
Warnings say "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE".
Forwarded: no
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2020-06-12
--- a/Xvnc/config/cf/linux.cf
+++ b/Xvnc/config/cf/linux.cf
@@ -94,7 +94,7 @@
(LinuxCLibMajorVersion == 5 && LinuxCLibMinorVersion == 99)
#define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
-D_POSIX_SOURCE -D_XOPEN_SOURCE=500L \
- -D_BSD_SOURCE -D_SVID_SOURCE
+ -D_DEFAULT_SOURCE
#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
#if !defined(AlphaArchitecture)
#define HasPosixThreads YES
@@ -108,7 +108,7 @@
#endif
#else
#define LinuxSourceDefines -D_POSIX_SOURCE \
- -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE
+ -D_DEFAULT_SOURCE -DX_LOCALE
#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#ifndef HasLibCrypt
#define HasLibCrypt NO

View File

@ -0,0 +1,43 @@
Description: Ensure tightvnc builds with gcc-10
Apply the measure suggested on https://gcc.gnu.org/gcc-10/porting_to.html.
For further documentation refer to
https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html.
Bug-Debian: https://bugs.debian.org/957878
Forwarded: no
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2020-07-24
--- a/Xvnc/programs/Xserver/cfb/cfballpriv.c
+++ b/Xvnc/programs/Xserver/cfb/cfballpriv.c
@@ -42,8 +42,8 @@
#include "cfbmskbits.h"
#include "mibstore.h"
-int cfbWindowPrivateIndex;
-int cfbGCPrivateIndex;
+int cfbWindowPrivateIndex __attribute__((common));
+int cfbGCPrivateIndex __attribute__((common));
#ifdef CFB_NEED_SCREEN_PRIVATE
int cfbScreenPrivateIndex;
#endif
--- a/Xvnc/programs/Xserver/cfb/cfbbitblt.c
+++ b/Xvnc/programs/Xserver/cfb/cfbbitblt.c
@@ -666,7 +666,7 @@
#endif
/* shared among all different cfb depths through linker magic */
-RegionPtr (*cfbPuntCopyPlane)();
+RegionPtr (*cfbPuntCopyPlane)() __attribute__((common));
RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
pGC, srcx, srcy, width, height, dstx, dsty, bitPlane)
--- a/Xvnc/programs/Xserver/hw/xfree86/common/compiler.h
+++ b/Xvnc/programs/Xserver/hw/xfree86/common/compiler.h
@@ -265,7 +265,7 @@
#else /* defined(linux) && defined(__alpha__) */
#if defined(__mips__)
-unsigned int IOPortBase; /* Memory mapped I/O port area */
+unsigned int IOPortBase __attribute__((common)); /* Memory mapped I/O port area */
static __inline__ void
outb(port, val)

View File

@ -0,0 +1,43 @@
Description: Fix FTBFS with binutils version >= 2.36
Thanks to Matthias Klose <doko@debian.org> for pointing this out.
Origin: http://launchpadlibrarian.net/521074457/tightvnc_1%3A1.3.10-1_1%3A1.3.10-1ubuntu1.diff.gz
Bug-Debian: http://bugs.debian.org/981734
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2021-02-03
--- a/Xvnc/config/cf/Imake.tmpl
+++ b/Xvnc/config/cf/Imake.tmpl
@@ -598,21 +598,21 @@
#if HasLargeTmp || SystemV4
#define ArCmd ArCmdBase cq
#else
-#define ArCmd ArCmdBase clq
+#define ArCmd ArCmdBase cq
#endif
#endif
#ifndef ArAddCmd
#if HasLargeTmp || SystemV4
#define ArAddCmd ArCmdBase ru
#else
-#define ArAddCmd ArCmdBase rul
+#define ArAddCmd ArCmdBase ru
#endif
#endif
#ifndef ArExtCmd
#if HasLargeTmp || SystemV4
#define ArExtCmd ArCmdBase x
#else
-#define ArExtCmd ArCmdBase xl
+#define ArExtCmd ArCmdBase x
#endif
#endif
#ifndef BootstrapCFlags
--- a/Xvnc/config/util/crayar.sh
+++ b/Xvnc/config/util/crayar.sh
@@ -4,6 +4,6 @@
if cray2; then
bld cr $lib `lorder $* | tsort`
else
- ar clq $lib $*
+ ar cq $lib $*
fi