diff --git a/sci-libs/libsemigroups/Manifest b/sci-libs/libsemigroups/Manifest
index 1f3974c71a462..14c6bd7d9f0cb 100644
--- a/sci-libs/libsemigroups/Manifest
+++ b/sci-libs/libsemigroups/Manifest
@@ -1 +1,2 @@
DIST libsemigroups-2.7.3.tar.gz 2543883 BLAKE2B 02700cb9f132d7121ce42f978e9a1c01ed9f1957fab0da45c60837240639f7a049d3b7e1f9b989be71de8b85a669b475733aeb0e96760eda846b50db903da895 SHA512 001cfdfc55ee9a0bb3fe0914229905083e8eaaec682952bb23b2dc44680631909478bf32e67e93488a7347bfb674305b0cc3b713afa9bce1997a0b1a5693ad36
+DIST libsemigroups-3.0.2.tar.gz 12153898 BLAKE2B 8423f696dd0a5b338f50d056bf3a1ae76f2d53851c35b2fb3266d4b38c78ca85f1b3d20811cd906808fb4c21932741e8de62db56fce068325e900f3738302c53 SHA512 ad14a61867619d3a230f074bad18074830ece8832499d128b841377075fc185acabb7f0718431341a78bfa849131500fb10e87b78259f90722435e99ad491bb4
diff --git a/sci-libs/libsemigroups/libsemigroups-3.0.2.ebuild b/sci-libs/libsemigroups/libsemigroups-3.0.2.ebuild
new file mode 100644
index 0000000000000..c463836802d5e
--- /dev/null
+++ b/sci-libs/libsemigroups/libsemigroups-3.0.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2019-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="C++ library for semigroups and monoids"
+HOMEPAGE="https://github.com/libsemigroups/libsemigroups"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+# Source headers have "or any later version"
+LICENSE="GPL-3+"
+SLOT="0/3"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="cpu_flags_x86_popcnt eigen"
+
+# These two deps are packaged, but both are bundled in the third_party
+# directory, and the build system hard-codes the location to them:
+#
+# * dev-cpp/catch
+# * dev-cpp/magic_enum
+#
+# Eigen is a set of headers, not a shared library.
+BDEPEND="eigen? ( dev-cpp/eigen )"
+DEPEND="dev-libs/libfmt"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Remove bundled deps that we should not be using.
+ rm -rf third_party/fmt-* \
+ third_party/eigen-* \
+ third_party/HPCombi || die
+
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_enable cpu_flags_x86_popcnt popcnt) \
+ $(use_enable eigen) \
+ $(use_with eigen external-eigen) \
+ --disable-hpcombi \
+ --with-external-fmt
+}
+
+src_install() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/sci-libs/libsemigroups/metadata.xml b/sci-libs/libsemigroups/metadata.xml
index 77788e0747226..1fc262d840f7d 100644
--- a/sci-libs/libsemigroups/metadata.xml
+++ b/sci-libs/libsemigroups/metadata.xml
@@ -42,6 +42,12 @@
is for determining words equivalent to w or that are left
divisors of w).
+
libsemigroups/libsemigroups