From b83e82c4d46297f4fbe56dc8b6e149637d5d90fd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 29 Apr 2023 11:14:34 +0100 Subject: gentoo auto-resync : 29:04:2023 - 11:14:33 --- games-action/Manifest.gz | Bin 14539 -> 14539 bytes games-action/astromenace/Manifest | 2 + .../astromenace/astromenace-1.4.2-r1.ebuild | 61 +++++++ .../astromenace/files/astromenace-1.4.2-odr.patch | 203 +++++++++++++++++++++ 4 files changed, 266 insertions(+) create mode 100644 games-action/astromenace/astromenace-1.4.2-r1.ebuild create mode 100644 games-action/astromenace/files/astromenace-1.4.2-odr.patch (limited to 'games-action') diff --git a/games-action/Manifest.gz b/games-action/Manifest.gz index 46f6ddd692d3..c836f02e2f7e 100644 Binary files a/games-action/Manifest.gz and b/games-action/Manifest.gz differ diff --git a/games-action/astromenace/Manifest b/games-action/astromenace/Manifest index ad8fa33400e5..4e8ec6b9d804 100644 --- a/games-action/astromenace/Manifest +++ b/games-action/astromenace/Manifest @@ -1,6 +1,8 @@ AUX astromenace-1.4.2-gcc13.patch 2539 BLAKE2B 428235161f0493ee737f7771ff9a513d256b203794b835701821f2217903c5ef2cde7fc7d2767722734cb69b0f6eee75c8b0db133dc9a3ee95904c83f68389df SHA512 4661861aabd8b5ad163ab52270a6d321ecdcdbe43f0a445b2cd2d17da18d8d45003f132c827577951d330cc35b031e56a09765ea88b2b1302b7857b2f5e33ddb +AUX astromenace-1.4.2-odr.patch 9302 BLAKE2B 7255138bfb45da0ea23495ae359add6aed05702fffd8d47ed659631075ca09d2274e74c0c8d9641502f83c1e3fe77a9b084c48ab83c47be079cdf0b47a2a15c5 SHA512 f471475f67e1829483f82d0e50047d0a38f1a52167521177e800c9ec291016ec60fe27fe1b2f0a3971f9ca09112ce14c0535058b430121da19326892810622b5 DIST astromenace-1.4.1.tar.gz 68041500 BLAKE2B a6e0c98feae200440bc3e3bd0e3338325ce7953f4e4241d69e1d3b6cc3aaef54c1966f62b08a27aef2a6f6b1ee028e8c7c78788aabc2622bcc1eeab10186c428 SHA512 408fd8a9fcc51d0cdfd31d77bc1c05b079b3248622a252e73e1145db9715b3a331eef5fde295c3390143fb7bb2f88460d374eddea719b6452577bf5e83bd14c1 DIST astromenace-1.4.2.tar.gz 68061933 BLAKE2B 79511ee920eb182a428688a22b5adaa7719d574ffbd9807ebea46a036ea7de85f87aee8f927cfb8458178ed8b9c4ad61dad281196469cf6f648aa6580303fff6 SHA512 6a41c987295ff7201b2a9fa748b2b246c5d61bf4ae39668e614fbec377abfe08387a66182059c0e87d1c8395aa224ae396535b0f41a0be720fc57d319249e8b0 EBUILD astromenace-1.4.1-r1.ebuild 1276 BLAKE2B 9f92f146909dd5fb3f3859de671c9f080b1f8494f9e02ff4b8be586f6acde13d097f1dcdeb85d1f131f51bba33c4759e12e3e071731991d269915a73cbecf8a9 SHA512 fc5159f04aa9ff26abe8776a7e8b8aa3449e7a4063515d0ecf54a46d472c6ca9f520201a7785a433a284a1fc7b5669276660845215242a7ccbf8782e8a591c04 +EBUILD astromenace-1.4.2-r1.ebuild 1314 BLAKE2B 7827cdfac4915ec554d80a1d7b3fe8492650eaf41cd8c8a83c9eea36cc3e9e86405af567b14b5939146de5ad86066a0320825057845473d280cfba196a5fa02d SHA512 0714cb1117647357e8d2cb8971d6aa1b1b6f86270f53d3f80626eff201b9c4718514ba7934a1c99b8f6eab280dfb4a24f8081547cec26b7902549a5f209f4c58 EBUILD astromenace-1.4.2.ebuild 1291 BLAKE2B 12064dec1f6604d5ee66172aef314e1f7fee9149946d9d5d12ca0b2389cca8ed8ca3e6eed8761a57814e021d7280c0f9e96a7d00914b96c701f1dd11f1e1092f SHA512 87daf10d0ffcf6abca879dcf9097b8c175f2b9094d053ef15c1fe08abbf837ef2ccb0e6b7f31a3b423488f7c8706fb712fcd9308690ed2e0bc03d08c69b3321e MISC metadata.xml 400 BLAKE2B 094b553349913f412a30608ad5ba9b4a33bc6171bb2ce008a9d96fc0ee79852021d4c01aa73f8cb90b00062c5a9c3398225ba6d55813636ea8dda923a77c22fb SHA512 434d3928707571b568e25b014a279de54e891644542774b9fa2c83882ad5309ba26efa6bfe7fbf583924d3b38f923b39e6f977f732c9e6341f8af169962c57f6 diff --git a/games-action/astromenace/astromenace-1.4.2-r1.ebuild b/games-action/astromenace/astromenace-1.4.2-r1.ebuild new file mode 100644 index 000000000000..0a7245e6d20e --- /dev/null +++ b/games-action/astromenace/astromenace-1.4.2-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake desktop xdg + +DESCRIPTION="Hardcore 3D space scroll-shooter with spaceship upgrade possibilities" +HOMEPAGE="https://viewizard.com" +SRC_URI="https://github.com/viewizard/astromenace/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3 GPL-3+ CC-BY-SA-4.0 OFL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + media-libs/freealut + media-libs/freetype:2 + media-libs/libogg + media-libs/libsdl2[joystick,video] + media-libs/libvorbis + media-libs/openal + virtual/glu + virtual/opengl + x11-libs/libXinerama +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-gcc13.patch + "${FILESDIR}"/${P}-odr.patch +) + +src_prepare() { + cmake_src_prepare + + # no messing with CXXFLAGS please. + sed -i -e '/-Os/d' CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( -DDATADIR="${EPREFIX}/usr/share/${PN}" ) + + cmake_src_configure +} + +src_install() { + # As of 1.4.2, the CMake install target is better, but still needs porting + # to GNUInstallDirs. + dobin "${BUILD_DIR}"/astromenace + + insinto /usr/share/${PN} + doins "${BUILD_DIR}"/gamedata.vfs + + newicon -s 128 share/astromenace_128.png ${PN}.png + newicon -s 64 share/astromenace_64.png ${PN}.png + + einstalldocs + + make_desktop_entry "${PN}" AstroMenace +} diff --git a/games-action/astromenace/files/astromenace-1.4.2-odr.patch b/games-action/astromenace/files/astromenace-1.4.2-odr.patch new file mode 100644 index 000000000000..974edab4c0d3 --- /dev/null +++ b/games-action/astromenace/files/astromenace-1.4.2-odr.patch @@ -0,0 +1,203 @@ +From 710b35e786e5fe940a00b59c17eb638ec05a7a97 Mon Sep 17 00:00:00 2001 +From: Mikhail Kurinnoi +Date: Fri, 28 Apr 2023 20:31:57 +0300 +Subject: [PATCH] Fix "violates the C++ One Definition Rule errors" during + build. Related to https://bugs.gentoo.org/858515 + +--- + CMakeLists.txt | 1 + + src/menu/dialog.cpp | 10 +++--- + src/menu/menu_information.cpp | 8 ++--- + src/menu/menu_workshop_weaponry.cpp | 53 ++++++++++++++++------------- + 4 files changed, 40 insertions(+), 32 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80210a66..7902931b 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,6 +190,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weffc++") + #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion") ++#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing") + + # AppleClang 8.1.0.8020042 don't support this flag + IF(NOT (MACOS AND ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +diff --git a/src/menu/dialog.cpp b/src/menu/dialog.cpp +index a2e0469f..68da945c 100644 +--- a/src/menu/dialog.cpp ++++ b/src/menu/dialog.cpp +@@ -71,16 +71,16 @@ float StartHideTransp = 1.0f; + // what should draw in dialogue 6,7,8 + std::weak_ptr DialogSpaceShip{}; + extern std::weak_ptr WorkshopFighterGame; // player's ship "holder" in shipyard menu +-char *GetShipGroupTitle(int Num); +-char *GetWorkshopShipName(int Num); ++const char *GetShipGroupTitle(int Num); ++const char *GetWorkshopShipName(int Num); + + cWeapon *DialogWeapon = nullptr; +-char *GetWeaponName(int Num); +-char *GetWeaponGroupTitle(int Num); ++const char *GetWeaponName(int Num); ++const char *GetWeaponGroupTitle(int Num); + + // internal system number... 1-20 + int DialogSystem = 0; +-char *GetSystemName(int Num); ++const char *GetSystemName(int Num); + float GetShipEngineSystemEnergyUse(int Num); + float GetShipProtectionSystemEnergyUse(int Num); + float GetShipRechargeEnergy(int Num); +diff --git a/src/menu/menu_information.cpp b/src/menu/menu_information.cpp +index ee41014e..8579a49b 100644 +--- a/src/menu/menu_information.cpp ++++ b/src/menu/menu_information.cpp +@@ -53,10 +53,10 @@ std::weak_ptr InfoMine{}; + std::weak_ptr InfoGroundObject{}; + + +-char *GetWeaponGroupTitle(int Num); +-char *GetWeaponName(int Num); +-char *GetShipGroupTitle(int Num); +-char *GetWorkshopShipName(int Num); ++const char *GetWeaponGroupTitle(int Num); ++const char *GetWeaponName(int Num); ++const char *GetShipGroupTitle(int Num); ++const char *GetWorkshopShipName(int Num); + + + +diff --git a/src/menu/menu_workshop_weaponry.cpp b/src/menu/menu_workshop_weaponry.cpp +index ff90eb4a..0a0a74f3 100644 +--- a/src/menu/menu_workshop_weaponry.cpp ++++ b/src/menu/menu_workshop_weaponry.cpp +@@ -48,7 +48,7 @@ namespace viewizard { + namespace astromenace { + + extern std::weak_ptr WorkshopFighterGame; +-extern cWeapon *WorkshopNewWeapon; ++extern std::weak_ptr WorkshopNewWeapon; + extern int CurrentWorkshopNewWeapon; + extern float CurrentDeviationSum; + extern sVECTOR3D WorkShopPointCamera; +@@ -545,8 +545,12 @@ void ShipSlotWeapon(int SlotNum, int X, int Y) + if (DragWeapon && sharedWorkshopFighterGame->WeaponSlots[SlotNum].Type >= DragWeaponLevel) { + CanOn = true; + } +- if (!DragWeapon && sharedWorkshopFighterGame->WeaponSlots[SlotNum].Type >= WorkshopNewWeapon->WeaponLevel) { +- CanOn = true; ++ ++ if (auto sharedWorkshopNewWeapon = WorkshopNewWeapon.lock()) ++ { ++ if (!DragWeapon && sharedWorkshopFighterGame->WeaponSlots[SlotNum].Type >= sharedWorkshopNewWeapon->WeaponLevel) { ++ CanOn = true; ++ } + } + + +@@ -561,8 +565,8 @@ void ShipSlotWeapon(int SlotNum, int X, int Y) + if (sharedWorkshopFighterGame->WeaponSlots[i].Type < DragWeaponLevel) { + NeedAlert = true; + } +- } else { +- if (sharedWorkshopFighterGame->WeaponSlots[i].Type < WorkshopNewWeapon->WeaponLevel) { ++ } else if (auto sharedWorkshopNewWeapon = WorkshopNewWeapon.lock()) { ++ if (sharedWorkshopFighterGame->WeaponSlots[i].Type < sharedWorkshopNewWeapon->WeaponLevel) { + NeedAlert = true; + } + } +@@ -1045,7 +1049,10 @@ void Workshop_Weaponry() + { + sRECT SrcRect, DstRect; + +- ++ auto sharedWorkshopNewWeapon = WorkshopNewWeapon.lock(); ++ if (!sharedWorkshopNewWeapon) { ++ return; ++ } + + // start weapon dragging from shopfront + DstRect(GameConfig().InternalWidth/2-416, 100+32, GameConfig().InternalWidth/2-96, 450-32); +@@ -1058,9 +1065,9 @@ void Workshop_Weaponry() + // setup drag-and-drop variables for new weapon + DragWeapon = true; + DragWeaponNum = CurrentWorkshopNewWeapon; +- DragWeaponLevel = WorkshopNewWeapon->WeaponLevel; +- DragWeaponAmmo = WorkshopNewWeapon->Ammo; +- DragWeaponAmmoStart = WorkshopNewWeapon->AmmoStart; ++ DragWeaponLevel = sharedWorkshopNewWeapon->WeaponLevel; ++ DragWeaponAmmo = sharedWorkshopNewWeapon->Ammo; ++ DragWeaponAmmoStart = sharedWorkshopNewWeapon->AmmoStart; + // by default, second for launchers only + if (CurrentWorkshopNewWeapon <= 15) { + DragWeaponControl = 1; +@@ -1082,7 +1089,7 @@ void Workshop_Weaponry() + + vw_End2DMode(); + WorkshopDrawShip(WorkshopFighterGame, 4); +- WorkshopDrawWeapon(WorkshopNewWeapon); ++ WorkshopDrawWeapon(sharedWorkshopNewWeapon.get()); + vw_Start2DMode(-1,1); + + +@@ -1090,7 +1097,7 @@ void Workshop_Weaponry() + vw_DrawTextUTF32(GameConfig().InternalWidth/2-438, 50+6, 0, 0, 1.0f, sRGBCOLOR{eRGBCOLOR::yellow}, MenuContentTransp, vw_GetTextUTF32(GetWeaponName(CurrentWorkshopNewWeapon))); + if (DrawButton128_2(GameConfig().InternalWidth/2-197, 50, vw_GetTextUTF32("Info"), MenuContentTransp, false)) { + SetCurrentDialogBox(eDialogBox::ShowWeaponsInfo); +- DialogWeapon = WorkshopNewWeapon; ++ DialogWeapon = sharedWorkshopNewWeapon.get(); + } + + std::ostringstream tmpStream; +@@ -1101,14 +1108,14 @@ void Workshop_Weaponry() + + + int k2 = 0; +- if (GetProjectileDamageKinetic(WorkshopNewWeapon->InternalType) > 0.0f) { ++ if (GetProjectileDamageKinetic(sharedWorkshopNewWeapon->InternalType) > 0.0f) { + vw_DrawTextUTF32(GameConfig().InternalWidth/2-438, 130, -170, 0, 1.0f, sRGBCOLOR{eRGBCOLOR::white}, MenuContentTransp, vw_GetTextUTF32("Damage, Kinetic:")); + tmpStream.clear(); + tmpStream.str(std::string{}); +- tmpStream << GetProjectileDamageKinetic(WorkshopNewWeapon->InternalType) << " "; +- if (WorkshopNewWeapon->InternalType == 11 +- || WorkshopNewWeapon->InternalType == 12 +- || WorkshopNewWeapon->InternalType == 14) { ++ tmpStream << GetProjectileDamageKinetic(sharedWorkshopNewWeapon->InternalType) << " "; ++ if (sharedWorkshopNewWeapon->InternalType == 11 ++ || sharedWorkshopNewWeapon->InternalType == 12 ++ || sharedWorkshopNewWeapon->InternalType == 14) { + tmpStream << vw_GetText("units/sec"); + } else { + tmpStream << vw_GetText("units/shot"); +@@ -1117,14 +1124,14 @@ void Workshop_Weaponry() + + k2=20; + } +- if (GetProjectileDamageEM(WorkshopNewWeapon->InternalType) > 0.0f) { ++ if (GetProjectileDamageEM(sharedWorkshopNewWeapon->InternalType) > 0.0f) { + vw_DrawTextUTF32(GameConfig().InternalWidth/2-438, 130+k2, -170, 0, 1.0f, sRGBCOLOR{eRGBCOLOR::white}, MenuContentTransp, vw_GetTextUTF32("Damage, EM:")); + tmpStream.clear(); + tmpStream.str(std::string{}); +- tmpStream << GetProjectileDamageEM(WorkshopNewWeapon->InternalType) << " "; +- if (WorkshopNewWeapon->InternalType == 11 +- || WorkshopNewWeapon->InternalType == 12 +- || WorkshopNewWeapon->InternalType == 14) { ++ tmpStream << GetProjectileDamageEM(sharedWorkshopNewWeapon->InternalType) << " "; ++ if (sharedWorkshopNewWeapon->InternalType == 11 ++ || sharedWorkshopNewWeapon->InternalType == 12 ++ || sharedWorkshopNewWeapon->InternalType == 14) { + tmpStream << vw_GetText("units/sec"); + } else { + tmpStream << vw_GetText("units/shot"); +@@ -1140,8 +1147,8 @@ void Workshop_Weaponry() + sRGBCOLOR tmpColor{eRGBCOLOR::green}; + tmpStream.clear(); + tmpStream.str(std::string{}); +- tmpStream << vw_GetText("Weapon Level") << ": " << WorkshopNewWeapon->WeaponLevel; +- if (WorkshopNewWeapon->WeaponLevel > GetShipWeaponsMaxSlotLevel()) { ++ tmpStream << vw_GetText("Weapon Level") << ": " << sharedWorkshopNewWeapon->WeaponLevel; ++ if (sharedWorkshopNewWeapon->WeaponLevel > GetShipWeaponsMaxSlotLevel()) { + tmpTransp = MenuContentTransp * CurrentAlert3; + tmpColor = sRGBCOLOR{eRGBCOLOR::orange}; + } -- cgit v1.2.3