From 1454a351a07b91cab11666936ac8f7c11a9b6033 Mon Sep 17 00:00:00 2001 From: jperkin Date: Fri, 15 May 2020 15:20:50 +0000 Subject: eureka: Avoid sys/time.h SEC pollution. Remove BROKEN_ON_PLATFORM for SunOS. --- games/eureka/Makefile | 13 +----- games/eureka/distinfo | 5 +- games/eureka/patches/patch-src_e__basis.cc | 31 +++++++++++++ games/eureka/patches/patch-src_e__objects.cc | 31 +++++++++++++ games/eureka/patches/patch-src_ui__replace.cc | 67 +++++++++++++++++++++++++++ 5 files changed, 134 insertions(+), 13 deletions(-) create mode 100644 games/eureka/patches/patch-src_e__basis.cc create mode 100644 games/eureka/patches/patch-src_e__objects.cc create mode 100644 games/eureka/patches/patch-src_ui__replace.cc (limited to 'games') diff --git a/games/eureka/Makefile b/games/eureka/Makefile index 15f52e32ed3..f3c7ad130f7 100644 --- a/games/eureka/Makefile +++ b/games/eureka/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2020/05/15 14:59:53 micha Exp $ +# $NetBSD: Makefile,v 1.5 2020/05/15 15:20:50 jperkin Exp $ DISTNAME= eureka-1.27b-source # Some macOS patches were added after the release of 1.27 but unfortunately @@ -14,17 +14,6 @@ HOMEPAGE= https://sourceforge.net/projects/eureka-editor/ COMMENT= Doom/Heretic/Hexen map editor LICENSE= gnu-gpl-v2 -# Error on SmartOS 20200130T160054Z/x86_64: -# [...] -# src/e_basis.cc:1200:57: error: expected ',' or '...' before numeric constant -# 1200 | static void ChecksumSector(crc32_c& crc, const Sector * SEC) -# | ^~~ -# src/e_basis.cc: In function 'void ChecksumSector(crc32_c&, const Sector*)': -# src/e_basis.cc:1202:12: error: base operand of '->' is not a pointer -# 1202 | crc += SEC->floorh; -# | ^~ -BROKEN_ON_PLATFORM= SunOS-*-* - # Makefile declares "-std=c++03" USE_LANGUAGES= c++03 USE_TOOLS+= gmake diff --git a/games/eureka/distinfo b/games/eureka/distinfo index 8e0665d3e18..6397ee197bd 100644 --- a/games/eureka/distinfo +++ b/games/eureka/distinfo @@ -1,8 +1,11 @@ -$NetBSD: distinfo,v 1.3 2020/04/27 18:38:44 micha Exp $ +$NetBSD: distinfo,v 1.4 2020/05/15 15:20:50 jperkin Exp $ SHA1 (eureka-1.27b-source.tar.gz) = 0ba0f2c30c1758722198c0dac99ca25e1143dd20 RMD160 (eureka-1.27b-source.tar.gz) = fdc7c7a68962a8131c13d3d97ded55c5f5e40ef3 SHA512 (eureka-1.27b-source.tar.gz) = 4b2ce44a99acbe1b9dd2cf31ee5c3307f5f667422ba18bee8c3f9858e9244ee05c48e96b5afa4cdf65dfd079bca19a5693b6d123b5563549d1f84ca03137eb5e Size (eureka-1.27b-source.tar.gz) = 1159366 bytes +SHA1 (patch-src_e__basis.cc) = fd9afa393fde9cf77a8f6232cd9fdbde2fe18cad +SHA1 (patch-src_e__objects.cc) = 85b7504c699ba19dbff5f2bd5eca062d3926fc9a SHA1 (patch-src_m__files.cc) = 5bdfaefa324408632a8e649c8994479e7ec00ae1 SHA1 (patch-src_main.cc) = 7c107f89e64ec2de5588880c71ba0e24b1aaf354 +SHA1 (patch-src_ui__replace.cc) = 9d88f7ea489571c520895e1995dd28bc8cc3df53 diff --git a/games/eureka/patches/patch-src_e__basis.cc b/games/eureka/patches/patch-src_e__basis.cc new file mode 100644 index 00000000000..881101bbfb8 --- /dev/null +++ b/games/eureka/patches/patch-src_e__basis.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-src_e__basis.cc,v 1.1 2020/05/15 15:20:50 jperkin Exp $ + +Avoid sys/time.h SEC pollution. + +--- src/e_basis.cc.orig 2020-02-14 01:04:52.000000000 +0000 ++++ src/e_basis.cc +@@ -1197,16 +1197,16 @@ static void ChecksumVertex(crc32_c& crc, + crc += V->raw_y; + } + +-static void ChecksumSector(crc32_c& crc, const Sector * SEC) ++static void ChecksumSector(crc32_c& crc, const Sector * sect) + { +- crc += SEC->floorh; +- crc += SEC->ceilh; +- crc += SEC->light; +- crc += SEC->type; +- crc += SEC->tag; ++ crc += sect->floorh; ++ crc += sect->ceilh; ++ crc += sect->light; ++ crc += sect->type; ++ crc += sect->tag; + +- crc += SEC->FloorTex(); +- crc += SEC->CeilTex(); ++ crc += sect->FloorTex(); ++ crc += sect->CeilTex(); + } + + static void ChecksumSideDef(crc32_c& crc, const SideDef * S) diff --git a/games/eureka/patches/patch-src_e__objects.cc b/games/eureka/patches/patch-src_e__objects.cc new file mode 100644 index 00000000000..9de89c84559 --- /dev/null +++ b/games/eureka/patches/patch-src_e__objects.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-src_e__objects.cc,v 1.1 2020/05/15 15:20:50 jperkin Exp $ + +Avoid sys/time.h SEC pollution. + +--- src/e_objects.cc.orig 2020-02-02 13:45:57.000000000 +0000 ++++ src/e_objects.cc +@@ -901,16 +901,16 @@ static void TransferThingProperties(int + + static void TransferSectorProperties(int src_sec, int dest_sec) + { +- const Sector * SEC = Sectors[src_sec]; ++ const Sector * sect = Sectors[src_sec]; + +- BA_ChangeSEC(dest_sec, Sector::F_FLOORH, SEC->floorh); +- BA_ChangeSEC(dest_sec, Sector::F_FLOOR_TEX, SEC->floor_tex); +- BA_ChangeSEC(dest_sec, Sector::F_CEILH, SEC->ceilh); +- BA_ChangeSEC(dest_sec, Sector::F_CEIL_TEX, SEC->ceil_tex); ++ BA_ChangeSEC(dest_sec, Sector::F_FLOORH, sect->floorh); ++ BA_ChangeSEC(dest_sec, Sector::F_FLOOR_TEX, sect->floor_tex); ++ BA_ChangeSEC(dest_sec, Sector::F_CEILH, sect->ceilh); ++ BA_ChangeSEC(dest_sec, Sector::F_CEIL_TEX, sect->ceil_tex); + +- BA_ChangeSEC(dest_sec, Sector::F_LIGHT, SEC->light); +- BA_ChangeSEC(dest_sec, Sector::F_TYPE, SEC->type); +- BA_ChangeSEC(dest_sec, Sector::F_TAG, SEC->tag); ++ BA_ChangeSEC(dest_sec, Sector::F_LIGHT, sect->light); ++ BA_ChangeSEC(dest_sec, Sector::F_TYPE, sect->type); ++ BA_ChangeSEC(dest_sec, Sector::F_TAG, sect->tag); + } + + diff --git a/games/eureka/patches/patch-src_ui__replace.cc b/games/eureka/patches/patch-src_ui__replace.cc new file mode 100644 index 00000000000..71f84bf00be --- /dev/null +++ b/games/eureka/patches/patch-src_ui__replace.cc @@ -0,0 +1,67 @@ +$NetBSD: patch-src_ui__replace.cc,v 1.1 2020/05/15 15:20:50 jperkin Exp $ + +Avoid sys/time.h SEC pollution. + +--- src/ui_replace.cc.orig 2020-02-02 13:48:48.000000000 +0000 ++++ src/ui_replace.cc +@@ -1514,18 +1514,18 @@ bool UI_FindAndReplace::Match_LineDef(in + + bool UI_FindAndReplace::Match_Sector(int idx) + { +- const Sector *SEC = Sectors[idx]; ++ const Sector *sect = Sectors[idx]; + +- if (! Filter_Tag(SEC->tag)) ++ if (! Filter_Tag(sect->tag)) + return false; + + const char *pattern = find_match->value(); + + if (!filter_toggle->value() || o_floors->value()) +- if (Pattern_Match(SEC->FloorTex(), pattern)) ++ if (Pattern_Match(sect->FloorTex(), pattern)) + return true; + +- const char *ceil_tex = SEC->CeilTex(); ++ const char *ceil_tex = sect->CeilTex(); + + if (!filter_toggle->value() || (!is_sky(ceil_tex) && o_ceilings->value()) + || ( is_sky(ceil_tex) && o_skies->value()) ) +@@ -1552,15 +1552,15 @@ bool UI_FindAndReplace::Match_LineType(i + + bool UI_FindAndReplace::Match_SectorType(int idx) + { +- const Sector *SEC = Sectors[idx]; ++ const Sector *sect = Sectors[idx]; + + int mask = (Features.gen_sectors == 2) ? 255 : + (Features.gen_sectors) ? 31 : 65535; + +- if (! find_numbers->get(SEC->type & mask)) ++ if (! find_numbers->get(sect->type & mask)) + return false; + +- if (! Filter_Tag(SEC->tag)) ++ if (! Filter_Tag(sect->tag)) + return false; + + return true; +@@ -1746,15 +1746,15 @@ void UI_FindAndReplace::Replace_LineDef( + + void UI_FindAndReplace::Replace_Sector(int idx, int new_tex) + { +- const Sector *SEC = Sectors[idx]; ++ const Sector *sect = Sectors[idx]; + + const char *pattern = find_match->value(); + + if (!filter_toggle->value() || o_floors->value()) +- if (Pattern_Match(SEC->FloorTex(), pattern)) ++ if (Pattern_Match(sect->FloorTex(), pattern)) + BA_ChangeSEC(idx, Sector::F_FLOOR_TEX, new_tex); + +- const char *ceil_tex = SEC->CeilTex(); ++ const char *ceil_tex = sect->CeilTex(); + + if (!filter_toggle->value() || (!is_sky(ceil_tex) && o_ceilings->value()) + || ( is_sky(ceil_tex) && o_skies->value()) ) -- cgit v1.2.3