EDITED: I previously had not found the clarification that Portal 64 was taken down by mutual agreement related to Nintendo. I am leaving the Portal 64 section in here with a big strikethrough in it, and no other edits to its body.
This isn't going to be very long, I've put notable sections into spoiler boxes anyways.
Summary is that I believe Portal 64 to be a wrongful copyright claim made on grey-area grounds which I'd suggest the developer(s) to fight, and TF: Source 2 to be a rightful claim that I'm really surprised did not happen earlier and it's not quite the game you may have assumed it was. Let's describe both, in spoiler boxes so I don't fill someone's feed entirely for a page with this unless they want to read it.
Portal 64
Portal 64 seems, on the surface, to be a port of Portal 1 to the N64. This is nearly what it is, in reality it's a partial recreation of the basic gameplay, various advanced visuals related to the portal game mechanic, and aesthetics of Portal 1 as an open-source game for the N64
Theoretically, if this game's developers provided drop-in assets from Portal 1 or wholly recreated large portions of Valve-designed levels without major modification, this game would fall into "rightful claims that I don't think should be rightful", as Portal 64 was completely free-to-download and would, even in this case, be significantly transformative.
However, no levels of Portal 1 were recreated. One needed to purchase a copy of Portal 1 and provide files from the game for levels to be patched from. As well, I know the assets to have been original creations of the developers, and gameplay mechanics cannot be copyrighted, only patented. Portal 1 has not been patented, the portal gameplay was ineligible for patent already at its time of release and continues to be ineligible for patent.
The majority of the work on Portal 64 was creating an entirely-original codebase which recreated gameplay mechanics from Portal 1, as well as recreated certain technical functionality which Portal 1 uses for reading packaged forms of in-game levels. This functionality in Portal 1 itself is derivative of functionality for this within the Source engine, which is in-turn derivative of that functionality within Quake. Portal 64's implementation of this does not use code created by Valve Software, to my knowledge, in any form.
The grey-area of this claim comes from the intentional aesthetic resemblance to Portal 1, paired with the "Portal" name and recreations of various Portal marketing materials in a style indicative of the limitations of the game. I do believe this claim to be trigger-happy in this specific case.
I cannot say with complete certainty whether countering this claim in court would prove successful, but I can say that I believe it to be highly likely that it would, provided the legal aid of the developer(s) can locate and provide a suitable expert witness.
I wish the developer(s) luck and health in whatever they decide in response.
TF: Source 2
TF: Source 2 was a recreation of Team Fortress 2 in s&box which repackaged Valve-created assets in exact original form, as well as Valve-created assets with small modifications, with the intent of creating a "better" TF2 through subjectively-specific improvements of performance and visual fidelity. All credit within TF: Source 2 appears to have been implicit-only.
The team behind TF: Source 2 have stated that the claim was rightful and legal. They are correct.
I will say on this, multiple individuals within the TF2 community, including myself, considered TF:S2 to be akin to a target with the words "valve please hit this" on it. I am not surprised about this DMCA takedown, regardless of which era of Valve's legal team you make your assumptions on. This was an absolutely-infringing work, as fun as I expect it to have been to make, and regardless of the copyright system you are working under (whether that's DMCA or something that is basically-functional).
I would recommend to Amper Software to take experience gained from working on TF:S2 and make something else, and avoid fangames.
On a personal note, no this project isn't quite as endearing as you might think. Entirely non-transformative while the original game is still active, and with people spreading it with claims of being a much superior version (performance-wise? yeah sorta. otherwise no). Portal 64 is quite endearing, though. Wouldn't be surprised if Valve's legal team make these claims without developers finding out about the games first, honestly, it's pretty common.