[Midnightbsd-cvs] [MidnightBSD/mports] 1a058f: net-im/tg_owt: fix build on MidnightBSD, drop powe...
Lucas Holt
noreply at github.com
Mon Sep 7 11:48:32 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/mports
Commit: 1a058f4704514c22a1b6624c2e1db0468e435c7a
https://github.com/MidnightBSD/mports/commit/1a058f4704514c22a1b6624c2e1db0468e435c7a
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M net-im/tg_owt/Makefile
A net-im/tg_owt/files/patch-cmake_libwebrtcbuild.cmake
R net-im/tg_owt/files/patch-src_rtc__base_system_arch.h
Log Message:
-----------
net-im/tg_owt: fix build on MidnightBSD, drop powerpc patch (#859)
Fixes #854.
## Problem
`net-im/tg_owt` failed to build:
```
src/rtc_base/byte_order.h:98:2: error: "Missing byte order functions for this arch."
```
`cmake/libwebrtcbuild.cmake:99` gated the BSD define on an exact match:
```cmake
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
```
MidnightBSD reports `CMAKE_SYSTEM_NAME` as `"MidnightBSD"`, so
`WEBRTC_FREEBSD` was never defined and `byte_order.h` fell through to
its
`#error`.
## Fix
```diff
- elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ elseif (CMAKE_SYSTEM_NAME MATCHES "^(FreeBSD|MidnightBSD)$")
```
The define does more than byte order — it also selects the correct code
in
`platform_thread_types.cc`, `system_wrappers/source/cpu_info.cc` and
`modules/audio_device/audio_device_impl.cc`, all of which want FreeBSD
behaviour here. Those were silently taking the wrong branch; the
byte-order
`#error` was just the fatal one.
MidnightBSD *does* define `__FreeBSD__` at the C preprocessor level, so
only
the CMake string comparison needed changing — no source patches
required.
This is the same bug class fixed in #850 for `devel/cmake-core`.
## Also
Drops `files/patch-src_rtc__base_system_arch.h`. Its single hunk only
added a
`__powerpc64__` branch to `arch.h`; mports targets i386 and amd64, so
per
AGENTS.md powerpc patches are not kept. The remaining three patches
apply
cleanly without it.
`PORTREVISION` 3 → 4.
## Testing
MidnightBSD 4.2 amd64:
- `bmake patch` — all patches apply cleanly
- `bmake build` — 1319 targets, **zero errors**
- `bmake fake` / `bmake package` — `tg_owt-0.0.20251212_4.mport`,
installed
## Follow-up, not fixed here
`net-im/telegram-desktop` now builds **past** tg_owt but stops on a
separate
issue: `cmake/external/gsl/CMakeLists.txt` wants `Microsoft.GSL 4.1.0`
while
`devel/microsoft-gsl` is at 4.0.0 (FreeBSD has 4.2.2), and the port
removes
the bundled `Telegram/ThirdParty/GSL`, so it hits
`FATAL_ERROR "Guidelines Support Library is not found"`. That needs a
`devel/microsoft-gsl` update and is out of scope here.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01XkHF8bn8Ehit2aSoWjCshm
## Summary by Sourcery
Enable tg_owt to build successfully on MidnightBSD while removing an
unsupported PowerPC patch.
Bug Fixes:
- Fix tg_owt builds on MidnightBSD by applying the FreeBSD-specific
WebRTC configuration to that platform.
Enhancements:
- Remove the obsolete PowerPC architecture patch, retaining the port’s
supported platform scope.
Chores:
- Increment PORTREVISION for the build fix.
Signed-off-by: Lucas Holt <luke at foolishgames.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications
More information about the Midnightbsd-cvs
mailing list