diff --git a/x11-libs/motif/Manifest b/x11-libs/motif/Manifest
index 95f7f2d0744b3..99bac5ab7cb64 100644
--- a/x11-libs/motif/Manifest
+++ b/x11-libs/motif/Manifest
@@ -1,2 +1,3 @@
DIST motif-2.3.8-patches-5.tar.xz 6156 BLAKE2B b8d1ac1f2bea3521c97b506ecb480ea92c64708376c1bd9c00b853109568527f82eb8f87bd50d78afe9e15a4c84aab51f32598a12b040f7d67ae0dee422c0366 SHA512 594b39ded4e932789baf906e5e7e3cc402f1940cba147b35ae43aba52f65522ba48a05f3193ed9f8ff5c03fed1b517bfde35b38c189e1e7169745c8b97a5d924
DIST motif-2.3.8.tar.gz 5704328 BLAKE2B 3755b7f46e50240e1e9e7046aa439fa89872e54ae5d03860383f509b6d0f09edf85bd7d92ea4d37925efd2e44401028aa2752d940c42d9cccb652b2bd1d85459 SHA512 1ab8e8eece25ef97e948592b5fa3e19d98e932695290a18b7a8e90f1aa2766bc4f082bdbc3999dff5660e684821178a149040f76bb477163e53ca06474d02b55
+DIST motif-2.5.0.tar.gz 8818941 BLAKE2B 09aa2bc7aa835fcd475312fec8969fc3654092a47e407c101596ec3ab633bd9101e8a652db2271a4a4aa5f776b95830e71fbd2445922c3e3d63383987f5b6e06 SHA512 db1476c7499b2d80f1ea88a286d6b9d1c5666aeb0f20e574b078732f8c3baf1c002d422d6b5a932063789c32a58a536a4b2d66ebb180eac7fd5845f5189748ff
diff --git a/x11-libs/motif/metadata.xml b/x11-libs/motif/metadata.xml
index 70dfd4d5d257b..08d457fe2ca6c 100644
--- a/x11-libs/motif/metadata.xml
+++ b/x11-libs/motif/metadata.xml
@@ -4,8 +4,18 @@
ulm@gentoo.org
+
- http://bugs.motifzone.net/
- motif
+ thentenaar/motif
diff --git a/x11-libs/motif/motif-2.5.0.ebuild b/x11-libs/motif/motif-2.5.0.ebuild
new file mode 100644
index 0000000000000..0c8abc6fd6eab
--- /dev/null
+++ b/x11-libs/motif/motif-2.5.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal toolchain-funcs virtualx
+
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/thentenaar/motif.git"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="https://github.com/thentenaar/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos ~x64-solaris"
+fi
+
+DESCRIPTION="The Motif user interface component toolkit"
+HOMEPAGE="https://github.com/thentenaar/motif"
+
+LICENSE="LGPL-2.1+ MIT"
+SLOT="0/5"
+IUSE="examples jpeg png static-libs unicode +xcursor xft +xrandr +xrender"
+REQUIRED_USE="test? ( jpeg png xft )"
+
+RDEPEND="x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXmu[${MULTILIB_USEDEP}]
+ x11-libs/libXpm[${MULTILIB_USEDEP}]
+ x11-libs/libXt[${MULTILIB_USEDEP}]
+ jpeg? ( media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ test? ( dev-libs/check )
+ unicode? ( virtual/libiconv[${MULTILIB_USEDEP}] )
+ xcursor? ( x11-libs/libXcursor[${MULTILIB_USEDEP}] )
+ xft? (
+ media-libs/fontconfig[${MULTILIB_USEDEP}]
+ x11-libs/libXft[${MULTILIB_USEDEP}]
+ )
+ xrandr? ( x11-libs/libXrandr[${MULTILIB_USEDEP}] )
+ xrender? ( x11-libs/libXrender[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto
+ x11-misc/xbitmaps"
+
+BDEPEND="sys-devel/flex
+ dev-util/byacc"
+
+src_prepare() {
+ default
+
+ AT_M4DIR=. eautoreconf
+
+ if use !elibc_glibc && use !elibc_musl; then
+ # libiconv detection in configure script doesn't always work
+ # http://bugs.motifzone.net/show_bug.cgi?id=1423
+ export LIBS="${LIBS} -liconv"
+ fi
+
+ # avoid mismatch of lex variants #936172
+ export LEX=flex
+ # "bison -y" causes runtime crashes #355795
+ export YACC=byacc
+
+ # remember the name of the C compiler for the native ABI
+ MY_NATIVE_CC=$(tc-getCC)
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ $(use_enable unicode utf8)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with xcursor)
+ $(use_with xft)
+ $(use_with xrandr)
+ $(use_with xrender)
+ )
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if ! multilib_is_native_abi; then
+ # The wmluiltok build tool is linked with libfl.a, so always
+ # compile it for the native ABI
+ emake -C tools/wml CC="${MY_NATIVE_CC}" \
+ wmluiltok_LDADD="-lfl" wmluiltok
+ fi
+ emake
+
+ if multilib_is_native_abi && use examples; then
+ emake -C demos
+ fi
+}
+
+multilib_src_test() {
+ virtx emake check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use examples; then
+ emake -C demos DESTDIR="${D}" install-data
+ dodir /usr/share/doc/${PF}/demos
+ mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos || die
+ fi
+}
+
+multilib_src_install_all() {
+ # mwm default configs
+ insinto /usr/share/X11/app-defaults
+ newins "${FILESDIR}"/Mwm.defaults Mwm
+
+ # cleanup
+ rm -rf "${ED}"/usr/share/Xm || die
+ find "${D}" -type f -name "*.la" -delete || die
+
+ dodoc README.md
+}