summaryrefslogtreecommitdiff
path: root/sci-astronomy
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /sci-astronomy
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/calcmysky/Manifest1
-rw-r--r--sci-astronomy/calcmysky/calcmysky-0.4.0.ebuild33
-rw-r--r--sci-astronomy/calcmysky/metadata.xml19
-rw-r--r--sci-astronomy/cdsclient/Manifest1
-rw-r--r--sci-astronomy/cdsclient/cdsclient-3.8.4-r1.ebuild31
-rw-r--r--sci-astronomy/cdsclient/files/cdsclient-makefile.patch120
-rw-r--r--sci-astronomy/cdsclient/metadata.xml14
-rw-r--r--sci-astronomy/celestia/Manifest2
-rw-r--r--sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild119
-rw-r--r--sci-astronomy/celestia/files/celestia-1.7.0-cmake_lua_version-r1.patch11
-rw-r--r--sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch42
-rw-r--r--sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch40
-rw-r--r--sci-astronomy/celestia/metadata.xml22
-rw-r--r--sci-astronomy/cpl/Manifest1
-rw-r--r--sci-astronomy/cpl/cpl-7.3.2.ebuild70
-rw-r--r--sci-astronomy/cpl/metadata.xml25
-rw-r--r--sci-astronomy/ds9-bin/Manifest3
-rw-r--r--sci-astronomy/ds9-bin/ds9-bin-7.4-r1.ebuild38
-rw-r--r--sci-astronomy/ds9-bin/metadata.xml22
-rw-r--r--sci-astronomy/erfa/Manifest1
-rw-r--r--sci-astronomy/erfa/erfa-2.0.0.ebuild28
-rw-r--r--sci-astronomy/erfa/metadata.xml17
-rw-r--r--sci-astronomy/esorex/Manifest1
-rw-r--r--sci-astronomy/esorex/esorex-3.12.3-r1.ebuild38
-rw-r--r--sci-astronomy/esorex/files/esorex-3.10-generate-manpage.patch123
-rw-r--r--sci-astronomy/esorex/files/esorex-3.10-remove-empty-configdir.patch13
-rw-r--r--sci-astronomy/esorex/files/esorex-3.10-remove-private-ltdl.patch39
-rw-r--r--sci-astronomy/esorex/files/esorex-3.10-set-default-plugin-path.patch28
-rw-r--r--sci-astronomy/esorex/files/esorex-3.9.6-use-shared-libs.patch20
-rw-r--r--sci-astronomy/esorex/metadata.xml21
-rw-r--r--sci-astronomy/fitsh/Manifest1
-rw-r--r--sci-astronomy/fitsh/files/fitsh-0.9.4-makefile.patch302
-rw-r--r--sci-astronomy/fitsh/fitsh-0.9.4.ebuild29
-rw-r--r--sci-astronomy/fitsh/metadata.xml16
-rw-r--r--sci-astronomy/fitspng/Manifest1
-rw-r--r--sci-astronomy/fitspng/fitspng-2.0.ebuild18
-rw-r--r--sci-astronomy/fitspng/metadata.xml18
-rw-r--r--sci-astronomy/funtools/Manifest1
-rw-r--r--sci-astronomy/funtools/funtools-1.4.8-r1.ebuild82
-rw-r--r--sci-astronomy/funtools/metadata.xml18
-rw-r--r--sci-astronomy/galaxy/Manifest1
-rw-r--r--sci-astronomy/galaxy/files/galaxy-2.2-makefile.patch61
-rw-r--r--sci-astronomy/galaxy/galaxy-2.2-r1.ebuild30
-rw-r--r--sci-astronomy/galaxy/metadata.xml13
-rw-r--r--sci-astronomy/gasgano/Manifest2
-rw-r--r--sci-astronomy/gasgano/gasgano-2.4.8-r2.ebuild43
-rw-r--r--sci-astronomy/gasgano/metadata.xml17
-rw-r--r--sci-astronomy/gnuastro/Manifest1
-rw-r--r--sci-astronomy/gnuastro/gnuastro-0.16-r1.ebuild54
-rw-r--r--sci-astronomy/gnuastro/metadata.xml23
-rw-r--r--sci-astronomy/idlastro/Manifest1
-rw-r--r--sci-astronomy/idlastro/idlastro-20161220-r1.ebuild20
-rw-r--r--sci-astronomy/idlastro/metadata.xml17
-rw-r--r--sci-astronomy/kstars/Manifest2
-rw-r--r--sci-astronomy/kstars/files/kstars-3.8.1-cmake.patch53
-rw-r--r--sci-astronomy/kstars/kstars-3.8.2.ebuild105
-rw-r--r--sci-astronomy/kstars/kstars-3.8.3.ebuild105
-rw-r--r--sci-astronomy/kstars/metadata.xml15
-rw-r--r--sci-astronomy/metadata.xml38
-rw-r--r--sci-astronomy/missfits/Manifest1
-rw-r--r--sci-astronomy/missfits/files/missfits-2.8.0-fno-common.patch65
-rw-r--r--sci-astronomy/missfits/files/missfits-2.8.0-run-AM_PROG_AR.patch10
-rw-r--r--sci-astronomy/missfits/metadata.xml16
-rw-r--r--sci-astronomy/missfits/missfits-2.8.0.ebuild29
-rw-r--r--sci-astronomy/montage/Manifest1
-rw-r--r--sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch30
-rw-r--r--sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch21
-rw-r--r--sci-astronomy/montage/files/montage-6.1-prototypes.patch283
-rw-r--r--sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch22
-rw-r--r--sci-astronomy/montage/metadata.xml22
-rw-r--r--sci-astronomy/montage/montage-6.1.ebuild71
-rw-r--r--sci-astronomy/pal/Manifest1
-rw-r--r--sci-astronomy/pal/files/pal-0.9.8-fix-strlcpy-musl.patch14
-rw-r--r--sci-astronomy/pal/metadata.xml17
-rw-r--r--sci-astronomy/pal/pal-0.9.8-r1.ebuild38
-rw-r--r--sci-astronomy/pal/pal-0.9.8.ebuild34
-rw-r--r--sci-astronomy/psfex/Manifest1
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch55
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch221
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch26
-rw-r--r--sci-astronomy/psfex/metadata.xml17
-rw-r--r--sci-astronomy/psfex/psfex-3.17.1.ebuild69
-rw-r--r--sci-astronomy/pyephem/Manifest2
-rw-r--r--sci-astronomy/pyephem/metadata.xml23
-rw-r--r--sci-astronomy/pyephem/pyephem-4.1.5.ebuild58
-rw-r--r--sci-astronomy/pyephem/pyephem-4.2.1.ebuild58
-rw-r--r--sci-astronomy/pysiril/Manifest1
-rw-r--r--sci-astronomy/pysiril/metadata.xml15
-rw-r--r--sci-astronomy/pysiril/pysiril-0.0.15.ebuild19
-rw-r--r--sci-astronomy/scamp/Manifest2
-rw-r--r--sci-astronomy/scamp/files/scamp-2.10.0-spread_bits64.patch18
-rw-r--r--sci-astronomy/scamp/metadata.xml27
-rw-r--r--sci-astronomy/scamp/scamp-2.14.0.ebuild50
-rw-r--r--sci-astronomy/scamp/scamp-2.15.0.ebuild50
-rw-r--r--sci-astronomy/ser-player/Manifest1
-rw-r--r--sci-astronomy/ser-player/metadata.xml15
-rw-r--r--sci-astronomy/ser-player/ser-player-1.8.0.ebuild39
-rw-r--r--sci-astronomy/ser-player/ser-player-9999.ebuild39
-rw-r--r--sci-astronomy/sextractor/Manifest1
-rw-r--r--sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch65
-rw-r--r--sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch277
-rw-r--r--sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch32
-rw-r--r--sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch55
-rw-r--r--sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch26
-rw-r--r--sci-astronomy/sextractor/metadata.xml22
-rw-r--r--sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild78
-rw-r--r--sci-astronomy/siril/Manifest3
-rw-r--r--sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch52
-rw-r--r--sci-astronomy/siril/files/siril-1.2.1-options.patch101
-rw-r--r--sci-astronomy/siril/files/siril-1.2.6-linkage.patch96
-rw-r--r--sci-astronomy/siril/files/siril-1.4-docfiles.patch44
-rw-r--r--sci-astronomy/siril/files/siril-1.4.0-libcurl.patch503
-rw-r--r--sci-astronomy/siril/files/siril-1.4.0-libgit2.patch33
-rw-r--r--sci-astronomy/siril/files/siril-1.4.0-libjpeg.patch45
-rw-r--r--sci-astronomy/siril/files/siril-docfiles.patch16
-rw-r--r--sci-astronomy/siril/metadata.xml30
-rw-r--r--sci-astronomy/siril/siril-1.2.6-r1.ebuild94
-rw-r--r--sci-astronomy/siril/siril-1.4.0-r1.ebuild109
-rw-r--r--sci-astronomy/siril/siril-1.4.2.ebuild106
-rw-r--r--sci-astronomy/siril/siril-9999.ebuild106
-rw-r--r--sci-astronomy/sirilic/Manifest1
-rw-r--r--sci-astronomy/sirilic/metadata.xml20
-rw-r--r--sci-astronomy/sirilic/sirilic-1.15.12.ebuild23
-rw-r--r--sci-astronomy/skymaker/Manifest1
-rw-r--r--sci-astronomy/skymaker/files/skymaker-3.10.5-fno-common.patch66
-rw-r--r--sci-astronomy/skymaker/metadata.xml18
-rw-r--r--sci-astronomy/skymaker/skymaker-3.10.5.ebuild22
-rw-r--r--sci-astronomy/sofa_c/Manifest1
-rw-r--r--sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch105
-rw-r--r--sci-astronomy/sofa_c/metadata.xml26
-rw-r--r--sci-astronomy/sofa_c/sofa_c-20231011.ebuild37
-rw-r--r--sci-astronomy/stellarium/Manifest22
-rw-r--r--sci-astronomy/stellarium/files/stellarium-0.25.4-segfault.patch29
-rw-r--r--sci-astronomy/stellarium/metadata.xml37
-rw-r--r--sci-astronomy/stellarium/stellarium-25.4.ebuild174
-rw-r--r--sci-astronomy/stellarium/stellarium-26.1.ebuild171
-rw-r--r--sci-astronomy/stiff/Manifest1
-rw-r--r--sci-astronomy/stiff/files/stiff-2.4.0-autotools.patch10
-rw-r--r--sci-astronomy/stiff/metadata.xml13
-rw-r--r--sci-astronomy/stiff/stiff-2.4.0-r1.ebuild43
-rw-r--r--sci-astronomy/stuff/Manifest1
-rw-r--r--sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch60
-rw-r--r--sci-astronomy/stuff/metadata.xml13
-rw-r--r--sci-astronomy/stuff/stuff-1.26.0.ebuild19
-rw-r--r--sci-astronomy/swarp/Manifest1
-rw-r--r--sci-astronomy/swarp/metadata.xml11
-rw-r--r--sci-astronomy/swarp/swarp-2.41.5.ebuild34
-rw-r--r--sci-astronomy/wcslib/Manifest1
-rw-r--r--sci-astronomy/wcslib/metadata.xml26
-rw-r--r--sci-astronomy/wcslib/wcslib-8.3-r1.ebuild79
-rw-r--r--sci-astronomy/wcstools/Manifest2
-rw-r--r--sci-astronomy/wcstools/files/Makefile.3.9.7.am74
-rw-r--r--sci-astronomy/wcstools/files/Makefile.am73
-rw-r--r--sci-astronomy/wcstools/files/Makefile.libwcs.3.9.7.am16
-rw-r--r--sci-astronomy/wcstools/files/Makefile.libwcs.am17
-rw-r--r--sci-astronomy/wcstools/files/configure.ac9
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch34
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch34
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch22
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch242
-rw-r--r--sci-astronomy/wcstools/files/wcstools.pc.in13
-rw-r--r--sci-astronomy/wcstools/metadata.xml20
-rw-r--r--sci-astronomy/wcstools/wcstools-3.9.5-r1.ebuild67
-rw-r--r--sci-astronomy/wcstools/wcstools-3.9.7.ebuild76
-rw-r--r--sci-astronomy/weightwatcher/Manifest1
-rw-r--r--sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch11
-rw-r--r--sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch160
-rw-r--r--sci-astronomy/weightwatcher/metadata.xml14
-rw-r--r--sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild30
-rw-r--r--sci-astronomy/xephem/Manifest2
-rw-r--r--sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch12
-rw-r--r--sci-astronomy/xephem/files/xephem-4.1.0-allow-parallel-builds.patch26
-rw-r--r--sci-astronomy/xephem/files/xephem-4.1.0-respect_env_vars.patch128
-rw-r--r--sci-astronomy/xephem/files/xephem-4.2.0-respect_env_vars.patch120
-rw-r--r--sci-astronomy/xephem/metadata.xml19
-rw-r--r--sci-astronomy/xephem/xephem-4.1.0-r1.ebuild61
-rw-r--r--sci-astronomy/xephem/xephem-4.2.0.ebuild67
-rw-r--r--sci-astronomy/xfitsview/Manifest1
-rw-r--r--sci-astronomy/xfitsview/files/xfitsview-2.2-build_system.patch67
-rw-r--r--sci-astronomy/xfitsview/metadata.xml13
-rw-r--r--sci-astronomy/xfitsview/xfitsview-2.2-r2.ebuild38
181 files changed, 7939 insertions, 0 deletions
diff --git a/sci-astronomy/calcmysky/Manifest b/sci-astronomy/calcmysky/Manifest
new file mode 100644
index 000000000000..a67a033da9d8
--- /dev/null
+++ b/sci-astronomy/calcmysky/Manifest
@@ -0,0 +1 @@
+DIST calcmysky-0.4.0.tar.gz 2165658 BLAKE2B 3a672e1249a8d18549b087852eedba46b120e0ac105be4ee69a10e82a738ebcc07e3db84a627686f75ddecc300ef350354c00980d53c558309d1472cc3270671 SHA512 27b98018d512ca15ad19c989813e3dc6f86fd30b62a7eeac7ab1c8b8589155af39987cc04338de208162245a1dd98008a9d717b72c0a9651a0bdb2d3174ce90a
diff --git a/sci-astronomy/calcmysky/calcmysky-0.4.0.ebuild b/sci-astronomy/calcmysky/calcmysky-0.4.0.ebuild
new file mode 100644
index 000000000000..63b85b4f9649
--- /dev/null
+++ b/sci-astronomy/calcmysky/calcmysky-0.4.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2022-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Simulator of light scattering by planetary atmospheres"
+HOMEPAGE="https://github.com/10110111/CalcMySky"
+SRC_URI="
+ https://github.com/10110111/CalcMySky/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+"
+S="${WORKDIR}/CalcMySky-${PV}"
+
+LICENSE="GPL-2+"
+# subslot is soversion
+SLOT="0/15"
+KEYWORDS="amd64 ~ppc ~riscv ~x86"
+
+DEPEND="
+ dev-cpp/eigen:=
+ dev-qt/qtbase:6[gui,opengl,widgets,-gles2-only]
+ media-libs/glm
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DQT_VERSION=6
+ )
+
+ cmake_src_configure
+}
diff --git a/sci-astronomy/calcmysky/metadata.xml b/sci-astronomy/calcmysky/metadata.xml
new file mode 100644
index 000000000000..7f708fb4e379
--- /dev/null
+++ b/sci-astronomy/calcmysky/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexey+gentoo@asokolov.org</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">10110111/CalcMySky</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/cdsclient/Manifest b/sci-astronomy/cdsclient/Manifest
new file mode 100644
index 000000000000..842309b4edd3
--- /dev/null
+++ b/sci-astronomy/cdsclient/Manifest
@@ -0,0 +1 @@
+DIST cdsclient-3.84.tar.gz 119585 BLAKE2B cf5d7fe3e7a1f4985949b8621122157178b856e82415e6bf12a582c67e6748bf9eb75209983baab9051919817b373b198748cfda5a1e4733784a9b98ab7659ff SHA512 2d7abf0079189b9dd19cb8919061445fd19ea9f7dfd54e8ceee26b743218cf62ab00eba0147abe82d9294223927f04b4cc3328620dfc9184a7049f8d515b29e4
diff --git a/sci-astronomy/cdsclient/cdsclient-3.8.4-r1.ebuild b/sci-astronomy/cdsclient/cdsclient-3.8.4-r1.ebuild
new file mode 100644
index 000000000000..4273f00384a4
--- /dev/null
+++ b/sci-astronomy/cdsclient/cdsclient-3.8.4-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# upstream versioning wrong: 3.71 is really 3.7.1
+MYP="${PN}-$(ver_rs 2 '')"
+
+DESCRIPTION="Collection of scripts to access the CDS databases"
+HOMEPAGE="http://cdsweb.u-strasbg.fr/doc/cdsclient.html"
+SRC_URI="ftp://cdsarc.u-strasbg.fr/pub/sw/${MYP}.tar.gz"
+S="${WORKDIR}/${MYP}"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror bindist"
+
+RDEPEND="app-shells/tcsh"
+
+PATCHES=( "${FILESDIR}"/${PN}-makefile.patch )
+
+src_install() {
+ local bindir="${EPREFIX}/usr/bin/${PN}"
+ emake DESTDIR="${D}" SHSDIR="${D}${bindir}" install
+
+ newenvd - 99${PN} <<-EOF
+ PATH="${bindir}"
+ ROOTPATH="${bindir}"
+ EOF
+}
diff --git a/sci-astronomy/cdsclient/files/cdsclient-makefile.patch b/sci-astronomy/cdsclient/files/cdsclient-makefile.patch
new file mode 100644
index 000000000000..d07928219b40
--- /dev/null
+++ b/sci-astronomy/cdsclient/files/cdsclient-makefile.patch
@@ -0,0 +1,120 @@
+- remove non standard "mantex" page
+- respect user flags
+
+--- a/configure
++++ b/configure
+@@ -3938,7 +3938,7 @@
+
+
+ EXPORT_SOURCE_FILE="aclient.c wwwget.c skio.c skclient.c sk.h"
+-EXPORT_MAN_FILE="sk.3 aclient.1 wwwget.1 aclient.tex"
++EXPORT_MAN_FILE="sk.3 aclient.1 wwwget.1 "
+ EXPORT_MAN_TEX="man.tex"
+ CASE="dev"
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -31,17 +31,17 @@
+ #################################################################
+ #PREFIX = /usr/local
+ #PREFIX = $(HOME)
+-PREFIX = @prefix@
++PREFIX = $(DESTDIR)@prefix@
+ PACKAGE = cdsclient
+ VERSION = @version@
+ DISTRIB = $(PACKAGE)-$(VERSION)
+ #################################################################
+
+ INCDIR = $(PREFIX)/include
+-LIBDIR = $(PREFIX)/lib
++LIBDIR = $(DESTDIR)/@libdir@
+ BINDIR = $(PREFIX)/bin
+ SHSDIR = $(PREFIX)/bin
+-MANDIR = $(PREFIX)/man
++MANDIR = $(PREFIX)/share/man
+ ###########
+ # NOTE: The definition below is required only on SOLARIS
+ # Comment the following line if required
+@@ -57,12 +57,13 @@
+ COPY = cp -p
+ RM = rm
+ AWK = @AWK@
++MKDIR = mkdir -p
+
+ # C options --------------------------------
+ DEBUG =
+ C_OPT = -O
+ SYS =
+-CFLAGS = $(C_OPT) $(DEBUG) $(SYS) -I.
++
+
+ # FILES --------------------------------
+ VERFILE = $(PREFIX)/versions
+@@ -102,7 +103,7 @@
+ # RULES --------------------------------
+ .SUFFIXES: .o .c
+ .c.o:
+- $(CC) $(CFLAGS) -c $<
++ $(CC) $(CFLAGS) -I. -c $<
+
+ # DEPENDENCIES --------------------------------
+
+@@ -121,41 +122,39 @@
+ # rm -f $$f; ln finducac2 $$f; done
+
+ aclient: aclient.o $(OBJ)
+- $(CC) $@.o $(OBJ) $(LIBSYS) -o $@
+- $(STRIP) $@
++ $(CC) $(LDFLAGS) $@.o $(OBJ) $(LIBSYS) -o $@
+
+ wwwget: wwwget.c
+- $(CC) wwwget.c $(LIBSYS) -o $@
+- $(STRIP) $@
++ $(CC) $(CFLAGS) $(LDFLAGS) wwwget.c $(LIBSYS) -o $@
+
+ doc: sk.tex man.tex aclient.tex
+ latex man.tex
+
+-install: $(EXPORT_INSTALL) install_shs install_info
++install: $(EXPORT_INSTALL) install_shs
+ rm -rf *.cache
+
+ export_install: install_bin install_man
+
+ install_man: $(MAN)
+ if [ -d $(MANDIR) ]; then echo $(MANDIR) exists; \
+- else mkdir $(MANDIR); fi
++ else $(MKDIR) $(MANDIR); fi
+ for f in $(MAN); do \
+ e=`echo $$f | cut -d. -f2`; \
+ if [ -d $(MANDIR)/man$$e ] ; then echo $(MANDIR)/man$$e exists ; \
+- else mkdir $(MANDIR)/man$$e ; fi ; \
++ else $(MKDIR) $(MANDIR)/man$$e ; fi ; \
+ $(COPY) $$f $(MANDIR)/man$$e ; \
+ done
+
+ install_h: $(INC)
+- test -d $(INCDIR) || mkdir $(INCDIR)
++ test -d $(INCDIR) || $(MKDIR) $(INCDIR)
+ $(COPY) $(INC) $(INCDIR)
+
+ install_bin: $(BIN)
+- test -d $(BINDIR) || mkdir $(BINDIR)
++ test -d $(BINDIR) || $(MKDIR) $(BINDIR)
+ $(COPY) $(BIN) $(BINDIR)
+
+ install_shs: Makefile
+- test -d $(SHSDIR) || mkdir $(SHSDIR)
++ test -d $(SHSDIR) || $(MKDIR) $(SHSDIR)
+ ractools=""; test -r $(RACatCDS) && ractools=$(RACatCDS)/*; \
+ test -z "$$ractools" || ls -l $$ractools; \
+ cdsutil="$(SHSatCDS)"; test -z "$(atCDS)" && cdsutil=""; \
+@@ -195,7 +194,7 @@
+ $(MAKE) clean
+ -test -d /tmp/$(DISTRIB) && rm -rf /tmp/$(DISTRIB)
+ autoconf
+- mkdir /tmp/$(DISTRIB)
++ $(MKDIR) /tmp/$(DISTRIB)
+ cp -p COPYRIGHT /ftp/pub/sw/COPYING /tmp/$(DISTRIB)
+ for f in $(SHS) Makefile.in configure; do cp -p $$f /tmp/$(DISTRIB); \
+ add_license $$f > /tmp/$(DISTRIB)/$$f; done
diff --git a/sci-astronomy/cdsclient/metadata.xml b/sci-astronomy/cdsclient/metadata.xml
new file mode 100644
index 000000000000..d154a0b106d2
--- /dev/null
+++ b/sci-astronomy/cdsclient/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The cdsclient package is a set of C and csh routines which can be
+ built on Unix stations or PCs running Linux, which once compiled allow
+ to query some databases located at Centre de Donnees astronomiques
+ de Strasbourg (CDS) or on mirrors over the network.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/celestia/Manifest b/sci-astronomy/celestia/Manifest
new file mode 100644
index 000000000000..010c609089fb
--- /dev/null
+++ b/sci-astronomy/celestia/Manifest
@@ -0,0 +1,2 @@
+DIST celestia-1.7.0_pre20241231-data.tar.gz 295402479 BLAKE2B c6566f60435bb44c38cce0f01bbbda642a4f171e4c6425c48bfbf769fcce8cd4083ed5fa05783571b2adbba857c37c19ec44f0095bc1259f9abdcc2f7c015eef SHA512 58473a9c10a81740564f97666d991fc507e79c561b3a2388d7358e11ca664015ca81e52e65a4c96916dcd01313b5df8ee0a24337ac716ecf08bdd4208982b8d7
+DIST celestia-1.7.0_pre20241231.tar.gz 4587843 BLAKE2B e6332306a7772a592ac4da6ea3c5713e47c454eb84a79ff2655be30602956e82d68a604c59290ed0b3adf9d4dd01d2dc4c1faf1d6baf7d45d0043242d6e1c440 SHA512 0782f0288388a7069d4a04afee9768be3a4c94779cec63b5b3886899b72c266539b553ae0050d22592f0d677d329873063ab20ef19a95cdf8a07671c79d33a4b
diff --git a/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild b/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild
new file mode 100644
index 000000000000..506a78cc16fe
--- /dev/null
+++ b/sci-astronomy/celestia/celestia-1.7.0_pre20241231-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+CMAKE_IN_SOURCE_BUILD="yes"
+LUA_COMPAT=( lua5-{1,3,4} luajit )
+
+inherit desktop lua-single xdg cmake
+
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="https://github.com/CelestiaProject/Celestia.git"
+ inherit git-r3
+else
+ if [[ ${PV} == *_p* ]] ; then
+ COMMIT_ID="9292455b420aa865482078c3149ae974367270e5"
+ COMMIT_ID_DATA="d20a4500410af19bd508eba567c9220890e9e316"
+ SRC_URI="
+ https://github.com/${PN^}Project/${PN^}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz
+ https://github.com/${PN^}Project/${PN^}Content/archive/${COMMIT_ID_DATA}.tar.gz -> ${P}-data.tar.gz
+ "
+ S="${WORKDIR}/${PN^}-${COMMIT_ID}"
+ KEYWORDS="~amd64 ~x86"
+ else
+ SRC_URI="https://github.com/${PN^}Project/${PN^}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz"
+ fi
+fi
+
+DESCRIPTION="OpenGL 3D space simulator"
+HOMEPAGE="https://celestiaproject.space/ https://github.com/CelestiaProject/Celestia"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="ffmpeg gtk lto lua nls +qt6 sdl test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( gtk qt6 sdl )
+ lua? ( ${LUA_REQUIRED_USE} )"
+
+BDEPEND="
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+DEPEND="
+ dev-cpp/eigen:=
+ dev-libs/boost:=
+ dev-libs/libfmt:=
+ media-libs/freetype
+ media-libs/libepoxy
+ media-libs/libjpeg-turbo:0=
+ media-libs/libpng:0=
+ virtual/zlib:=
+ virtual/glu
+ virtual/opengl
+ ffmpeg? ( media-video/ffmpeg:0= )
+ gtk? ( x11-libs/gtk+:3[wayland,X] )
+ lua? ( ${LUA_DEPS} )
+ qt6? ( dev-qt/qtbase:6[gui,opengl,widgets] )
+ sdl? ( media-libs/libsdl2[X] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ # allow forcing CMake to look for a specific Lua version instead of the newest branch installed
+ "${FILESDIR}"/${PN}-1.7.0-cmake_lua_version-r1.patch
+ # Pending upstream:
+ "${FILESDIR}"/${P}-cmake-minreq-warning.patch # bug 964763
+ "${FILESDIR}"/${P}-content-cmake-minreqver-3.10.patch # bug 964763
+)
+
+src_prepare() {
+ mv "${WORKDIR}"/CelestiaContent-${COMMIT_ID_DATA} content || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" \
+ cmake_src_configure
+
+ local mycmakeargs=(
+ -DCELCFG_EXTRAS_DIRS='"~/.celestia"'
+ -DENABLE_CELX="$(usex lua)"
+ -DENABLE_NLS="$(usex nls)"
+ -DENABLE_FFMPEG="$(usex ffmpeg)"
+ -DENABLE_GTK="$(usex gtk)"
+ -DUSE_GTK3="$(usex gtk)"
+ -DENABLE_LTO="$(usex lto)"
+ -DENABLE_QT5=OFF
+ -DENABLE_QT6="$(usex qt6)"
+ -DENABLE_WIN=OFF
+ -DENABLE_SDL="$(usex sdl)"
+ -DENABLE_TESTS="$(usex test)"
+ )
+ # Upstream always looks for LuaJIT first unless stopped, and we only need
+ # the version specification when linking against PUC Lua
+ if use lua && ! use lua_single_target_luajit; then
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON
+ -DLUA_VERSION=$(lua_get_version)
+ )
+ fi
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_compile
+}
+
+src_install() {
+ cmake_src_install
+
+ # Icons with more resolutions
+ doicon -s 48 "${S}"/src/celestia/gtk/data/${PN}.png
+ newicon -s 128 "${S}"/src/celestia/gtk/data/${PN}-logo.png ${PN}.png
+ doicon -s scalable "${S}"/src/celestia/gtk/data/${PN}.svg
+
+ dodoc AUTHORS README TRANSLATORS *.txt
+
+ CMAKE_USE_DIR="${CMAKE_USE_DIR}/content" BUILD_DIR="${BUILD_DIR}/content" cmake_src_install
+}
diff --git a/sci-astronomy/celestia/files/celestia-1.7.0-cmake_lua_version-r1.patch b/sci-astronomy/celestia/files/celestia-1.7.0-cmake_lua_version-r1.patch
new file mode 100644
index 000000000000..145f89a4a784
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.7.0-cmake_lua_version-r1.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -300,7 +300,7 @@
+ if(LUAJIT_FOUND)
+ link_libraries(LuaJIT::LuaJIT)
+ else()
+- find_package(Lua REQUIRED)
++ find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
+ include(FixLua)
+ MakeLuaTarget()
+ link_libraries(Lua::Lua)
diff --git a/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch
new file mode 100644
index 000000000000..4f93fceccb8c
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-cmake-minreq-warning.patch
@@ -0,0 +1,42 @@
+Source: https://github.com/CelestiaProject/Celestia/pull/2437
+
+From 129e9254d7a50f453d98951a5b8db12b9ca7e0f7 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 7 Jan 2026 18:47:09 +0100
+Subject: [PATCH] CMake: Set CMake to 3.10...3.19 range for !WIN32
+
+Raise !WIN32 minimum mildly from 3.9 to 3.10, which was released in 2017.
+If Windows build can deal with 3.19, so should others. This enables policy
+level up to 3.19 when using modern versions of CMake.
+
+Fixes CMake 3.31 warning:
+
+> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
+> Compatibility with CMake < 3.10 will be removed from a future version of
+> CMake.
+>
+> Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
+> to tell CMake that the project requires at least <min> but has been updated
+> to work with policies introduced by <max> or earlier.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 033747df..adf2ce7e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,7 @@ if(WIN32)
+ # Require more recent CMake on Windows because DLLs are a pain
+ cmake_minimum_required(VERSION 3.19)
+ else()
+- cmake_minimum_required(VERSION 3.9)
++ cmake_minimum_required(VERSION 3.10...3.19)
+ endif()
+
+ # Plain and keyword target_link_libraries() signatures cannot be mixed
+--
+2.52.0
+
diff --git a/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch
new file mode 100644
index 000000000000..c18cafffe7ac
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.7.0_pre20241231-content-cmake-minreqver-3.10.patch
@@ -0,0 +1,40 @@
+Source: https://github.com/CelestiaProject/CelestiaContent/pull/294
+
+From ca0fe5ab2be77c7ad641548b7e5769ad6b4cee0e Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 7 Jan 2026 19:09:47 +0100
+Subject: [PATCH] CMake: Set CMake minimum to 3.10
+
+Raise minimum version from 3.8 to 3.10, which was released in 2017.
+
+Fixes CMake 3.31 warning:
+
+> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
+> Compatibility with CMake < 3.10 will be removed from a future version of
+> CMake.
+>
+> Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
+> to tell CMake that the project requires at least <min> but has been updated
+> to work with policies introduced by <max> or earlier.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f15eec4..e44a08d 100644
+--- a/content/CMakeLists.txt
++++ b/content/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-FileCopyrightText: Celestia Development Team
+ # SPDX-License-Identifier: GPL-2.0-or-later
+
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.10)
+
+ # Normalize install(DESTINATION) paths
+ if(POLICY CMP0177)
+--
+2.52.0
+
diff --git a/sci-astronomy/celestia/metadata.xml b/sci-astronomy/celestia/metadata.xml
new file mode 100644
index 000000000000..8eee0ca14a3e
--- /dev/null
+++ b/sci-astronomy/celestia/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Celestia is a real-time space simulation that lets you experience
+ our universe in three dimensions. You can travel throughout the solar
+ system, to any of over 100,000 stars, or beyond the galaxy. All
+ travel in Celestia is seamless; the exponential zoom feature lets you
+ explore space across a range of scales, from galaxy clusters down
+ to spacecraft a few meters across. A 'point-and-goto' interface
+ is used to navigate through the universe to the object you
+ want to visit.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">CelestiaProject/Celestia</remote-id>
+ <remote-id type="sourceforge">celestia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/cpl/Manifest b/sci-astronomy/cpl/Manifest
new file mode 100644
index 000000000000..65243d202488
--- /dev/null
+++ b/sci-astronomy/cpl/Manifest
@@ -0,0 +1 @@
+DIST cpl-7.3.2.tar.gz 3442591 BLAKE2B 286b2a0f6b9af92395a3247b176bf9ab28a126008f3c68b790515dd6d13cf5bf02982382fe3c3ea3067020ff84c3e525326d3f6cb9110d8b1eded485f7d95da9 SHA512 fa0877346967581992ddd8e0e64c6b280b3bac7d086c071d6428d1ee3afa8030e1e6beb5e1b23d23447c7669b86e5264cd4fe6f9fd330ab15ed883aec4ea2ab6
diff --git a/sci-astronomy/cpl/cpl-7.3.2.ebuild b/sci-astronomy/cpl/cpl-7.3.2.ebuild
new file mode 100644
index 000000000000..9b22c689a57a
--- /dev/null
+++ b/sci-astronomy/cpl/cpl-7.3.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_OPT_USE=gasgano
+
+inherit autotools java-pkg-opt-2
+
+DESCRIPTION="ESO common pipeline library for astronomical data reduction"
+HOMEPAGE="https://www.eso.org/sci/software/cpl/"
+SRC_URI="https://ftp.eso.org/pub/dfs/pipelines/libraries/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/26"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc gasgano static-libs threads"
+
+RDEPEND="
+ dev-libs/libltdl
+ sci-astronomy/wcslib:0=
+ sci-libs/cfitsio:0=
+ sci-libs/fftw:3.0=
+ gasgano? ( sci-astronomy/gasgano )"
+DEPEND="${RDEPEND}
+ doc? ( app-text/doxygen )"
+
+src_prepare() {
+ default
+ # remove cpu chcking
+ sed -e '/CPL_CHECK_CPU/d' \
+ -i configure.ac libcext/configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-ltdl-install
+ --without-included-ltdl
+ --with-cfitsio="${EPREFIX}/usr"
+ --with-wcs="${EPREFIX}/usr"
+ --with-fftw="${EPREFIX}/usr"
+ $(use_enable doc maintainer-mode)
+ $(use_enable static-libs static)
+ $(use_enable threads)
+ )
+ if use gasgano; then
+ myeconfargs+=(
+ --enable-gasgano
+ --with-gasgano="${EPREFIX}/usr"
+ --with-gasgano-classpath="${EPREFIX}/usr/share/gasgano/lib"
+ --with-java="$(java-config -O)"
+ )
+ else
+ myeconfargs+=( --disable-gasgano )
+ fi
+ econf ${myeconfargs[@]}
+}
+
+src_compile() {
+ default
+ use doc && emake html
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+ use doc && emake install-html
+}
diff --git a/sci-astronomy/cpl/metadata.xml b/sci-astronomy/cpl/metadata.xml
new file mode 100644
index 000000000000..58bb468393b9
--- /dev/null
+++ b/sci-astronomy/cpl/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ The Common Pipeline Library (CPL) comprises a set of ISO-C libraries
+ that provide a comprehensive, efficient and robust software
+ toolkit. It forms a basis for the creation of automated astronomical
+ data-reduction tasks (known as "pipelines"). CPL Title Graphic The CPL
+ was developed to standardise the way VLT instrument pipelines are
+ built, to shorten their development cycle and to ease their
+ maintenance. However, it may be more generally applied to any similar
+ application, and the details of the CPL code have been engineered in a
+ way to make the library portable and flexible, as well as minimising
+ external dependencies.
+</longdescription>
+<use>
+ <flag name="gasgano">
+ Enable support for <pkg>sci-astronomy/gasgano</pkg> file organizer
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/sci-astronomy/ds9-bin/Manifest b/sci-astronomy/ds9-bin/Manifest
new file mode 100644
index 000000000000..1612a593dc8b
--- /dev/null
+++ b/sci-astronomy/ds9-bin/Manifest
@@ -0,0 +1,3 @@
+DIST ds9.linux.7.4.tar.gz 12066575 BLAKE2B 60f8369679ffe32e573f17ef77ab3b7f9857b530e2d9aa8fecc4f5a3b39cbd74e1fdcb21eb3e96b01febca35722329a02fcfcc2967b30bbe57584e4ea4a2cc40 SHA512 f56b6ca4ff67cd7163bba300500e1fa55a58185a09c0e41a33fd8f33f8aa393e07e58cb1bd48c39f558f0038180ee38129f3ad421743cdadddc3115f00c0cf64
+DIST ds9.linux64.7.4.tar.gz 12555299 BLAKE2B a61eaba1185ff0826fc7bd7af3049768ec93f28e6fa9f331b3964849d0bcbd5500db38141101f5100d8bbdba6dec34f5f6403b0f8655fb6ae5d2058b96ab9d52 SHA512 dee66842b088881cee7dfcacb3cb220a71ef70ca3258afbe7ce7911a930c274fe5fc09487c4e54d2855179c80d940bf2e57a9b8a59ea0909ccc3213c92d81a65
+DIST ds9.png.tar 10240 BLAKE2B 4146672d9f0048668e5e910a4b0b021d8c7dbbe8d142ac15e5724d796bc7a522e38a3497686fdc259ca40f713409d77ad0f7989db5517a5a5e57abf45606b3f0 SHA512 c7d52733c63adcac00de652ac4be7a19e7a6497cf24cc6f7f78f0a9583cc94ce9c81e567af3c34f9124e15ee089abbd735c49b6cf8f2dcf6ea3cce6ed2c7302f
diff --git a/sci-astronomy/ds9-bin/ds9-bin-7.4-r1.ebuild b/sci-astronomy/ds9-bin/ds9-bin-7.4-r1.ebuild
new file mode 100644
index 000000000000..a4ee5eba8e50
--- /dev/null
+++ b/sci-astronomy/ds9-bin/ds9-bin-7.4-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop
+
+DESCRIPTION="Data visualization application for astronomical FITS images"
+HOMEPAGE="http://ds9.si.edu/site/Home.html"
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/ds9.png.tar
+ amd64? ( http://ds9.si.edu/download/linux64/ds9.linux64.${PV}.tar.gz )
+ x86? ( http://hea-www.harvard.edu/RD/ds9/download/linux/ds9.linux.${PV}.tar.gz )"
+S="${WORKDIR}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-libs/libxml2:=
+ media-libs/fontconfig
+ media-libs/freetype
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/xpa"
+
+QA_PRESTRIPPED="usr/bin/ds9"
+QA_PREBUILT="usr/bin/ds9"
+
+src_install() {
+ dobin ds9
+ doicon ds9.png
+ make_desktop_entry ds9 "SAOImage DS9" ds9
+}
diff --git a/sci-astronomy/ds9-bin/metadata.xml b/sci-astronomy/ds9-bin/metadata.xml
new file mode 100644
index 000000000000..022fe10c4936
--- /dev/null
+++ b/sci-astronomy/ds9-bin/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Smithsonian Astrophysical Observatory Image Deep Space 9 is an
+ astronomical imaging and data visualization application. It is the
+ new generation of the SAOImage software. DS9 supports FITS images
+ and binary tables, multiple frame buffers, region manipulation, many
+ scale algorithms and colormaps. It provides communication with
+ external analysis tasks and is configurable and extensible. DS9
+ supports multiple frame buffers, mosaic images, tiling, blinking,
+ geometric markers, colormap manipulation, scaling, arbitrary zoom,
+ rotation, pan, and a variety of coordinate systems. DS9 also
+ supports FTP and HTTP data access.
+ This is the binary version (source version has a lot of source
+ bundling issues).
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/erfa/Manifest b/sci-astronomy/erfa/Manifest
new file mode 100644
index 000000000000..f91814eb67db
--- /dev/null
+++ b/sci-astronomy/erfa/Manifest
@@ -0,0 +1 @@
+DIST erfa-2.0.0.tar.gz 729292 BLAKE2B af081b44bdcde4457aba661b08b6bc941e8a4e4fad4a61c40a529dd719eb125263662126246cee83dfa73eb81032888331522e04fe824d0e54fd66bd6ce8b222 SHA512 6761a8c1e1fc20f8603b451a47a47c872fe99e39ec805f131f3db24aeb5b6ac3ac480c89630ff9defbedd0e621fb7e2b7922869b8c29ada1fd41cb9793c9ca0a
diff --git a/sci-astronomy/erfa/erfa-2.0.0.ebuild b/sci-astronomy/erfa/erfa-2.0.0.ebuild
new file mode 100644
index 000000000000..0a6a2cc78bf1
--- /dev/null
+++ b/sci-astronomy/erfa/erfa-2.0.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Essential Routines for Fundamental Astronomy"
+HOMEPAGE="https://github.com/liberfa/erfa"
+SRC_URI="https://github.com/liberfa/erfa/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/1"
+KEYWORDS="amd64 ~x86"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/sci-astronomy/erfa/metadata.xml b/sci-astronomy/erfa/metadata.xml
new file mode 100644
index 000000000000..425984d15b0e
--- /dev/null
+++ b/sci-astronomy/erfa/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Essential Routines for Fundamental Astronomy is a C
+ library containing key algorithms for astronomy, and is based on
+ the SOFA library published by the International Astronomical Union
+ (IAU).
+ </longdescription>
+ <upstream>
+ <remote-id type="github">liberfa/erfa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/esorex/Manifest b/sci-astronomy/esorex/Manifest
new file mode 100644
index 000000000000..a5e9c66b9e18
--- /dev/null
+++ b/sci-astronomy/esorex/Manifest
@@ -0,0 +1 @@
+DIST esorex-3.12.3.tar.gz 693894 BLAKE2B 6cefb944f402a706892af92f8ef578d6705aba6c44e3e4edc328369cac004af1e5aa64e1f189438e6d7b6465fb37d002701ce8d7c505a367c76c30b50c1ac096 SHA512 28d62b2cbb66e21fe96435fedf94a727c598b33f2d0aa9ff8d811cfc87edf8d215a76837f525d2964c24bb6e0a3b50aa4dcf2a8dcfae8ac1b933303f8fb08122
diff --git a/sci-astronomy/esorex/esorex-3.12.3-r1.ebuild b/sci-astronomy/esorex/esorex-3.12.3-r1.ebuild
new file mode 100644
index 000000000000..cc504c535889
--- /dev/null
+++ b/sci-astronomy/esorex/esorex-3.12.3-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="ESO Recipe Execution Tool to exec cpl scripts"
+HOMEPAGE="https://www.eso.org/sci/software/cpl/esorex.html"
+SRC_URI="ftp://ftp.eso.org/pub/dfs/pipelines/libraries/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=sci-astronomy/cpl-6.3:="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.9.6-use-shared-libs.patch
+ "${FILESDIR}"/${PN}-3.10-remove-private-ltdl.patch
+ "${FILESDIR}"/${PN}-3.10-generate-manpage.patch
+ "${FILESDIR}"/${PN}-3.10-remove-empty-configdir.patch
+ "${FILESDIR}"/${PN}-3.10-set-default-plugin-path.patch
+)
+
+export CPLDIR="${EPREFIX}/usr"
+
+src_prepare() {
+ default
+ AT_NO_RECURSIVE=1 eautoreconf
+}
+
+src_install() {
+ default
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+}
diff --git a/sci-astronomy/esorex/files/esorex-3.10-generate-manpage.patch b/sci-astronomy/esorex/files/esorex-3.10-generate-manpage.patch
new file mode 100644
index 000000000000..017eb2c8f776
--- /dev/null
+++ b/sci-astronomy/esorex/files/esorex-3.10-generate-manpage.patch
@@ -0,0 +1,123 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Subject: Generate a manpage for esorex.
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -62,3 +62,7 @@
+ include $(top_builddir)/Makefile.purify
+ endif
+
++esorex.man: esorex
++ sh esorex_create_man.sh
++
++man1_MANS = esorex.man
+--- /dev/null
++++ b/src/esorex_create_man.sh
+@@ -0,0 +1,108 @@
++#!/bin/sh
++
++help2man -N -i $0 ./esorex | sed s/^:\ // | fgrep -v "***" > esorex.man
++<< instrument.
++
++[NAME]
++esorex \- ESO Recipe Execution Tool
++
++[DESCRIPTION]
++EsoRex is the ESO Recipe Execution Tool. It can list, configure and execute
++CPL-based recipes from the command line.
++
++One of the features provided by the CPL is the ability to create
++data-reduction algorithms that run as plugins (dynamic libraries). These are
++called recipes and are one of the main aspects of the CPL data-reduction
++development environment.
++
++As these recipes are dynamic libraries, it is not possible to run them
++directly from the command line. However, ESO provides several tools to do
++this, thus saving recipe developers the need to write such an application
++themselves. One of these is GASGANO (a GUI-based tool) and the other is
++ EsoRex (which runs from the command line) and is described here.
++
++[ENVIRONMENT]
++All options can be set as environment parameters as well. See the previous
++paragraph for details.
++
++[HINTS]
++.TP
++.SH File permissions
++When a recipe is used with the \fB\-\-suppress\-prefix\fR option, and the
++\fB\-\-output\-dir\fR is set to the current working directory, then the first
++execution of a recipe will work correctly, but subsequent executions may
++fail. This is due to output products being given \`read-only\' permission
++(to avoid the potential inadvertant loss of products). The recipe itself
++is unable to modify the permissions, and thus it fails when attempting to
++create the file. The solution (other than using a different output directory
++or prefixes) is to change the permission of these output files or delete
++them prior to any subsequent execution of that recipe.
++
++This problem is less likely to occur in EsoRex v2+, due to the replacement of
++the \fB\-\-output\-overwrite\fR option with the \fB\-\-output\-readonly\fR
++(which is disabled by default). However, a determined user can still reach
++this situation, in which case the non-readable products must have their
++permissions changed, as described above.
++
++.TP
++.SH Configuration files
++When creating configuration files, if the the recipe is provided on the
++command line, then EsoRex will generate the configuration file for this
++recipe. If no recipe name is given, then EsoRex will generate a configuration
++file for EsoRex itself. All configuration files are written in the
++$HOME/.esorex/ directory.
++
++.TP
++.SH Memory checking
++It is possible to get EsoRex to check for memory leaks in the recipe
++that it is running, by enabling the \fB\-\-mem\-check\fR option. Then, at the
++conclusion of the recipe execution, and after memory deallocation, a list of
++all remaining allocated memory will be printed to screen. If there are no
++memory leaks, then no addition output is displayed.
++
++[FILES]
++.TP
++.SH /etc/esorex.rc $HOME/.esorex/esorex.rc
++Default configuration files
++
++The configuration file contains the EsoRex options, less the \`\-\-\'
++switch, but prefixed with \`esorex.caller.\'. Blank lines are ignored and
++lines beginning with \`#\' are treated as comments.
++
++Here is an example configuration file.
++
++ # Example EsoRex configuration file
++ #
++ esorex.caller.recipe-dir=/home/username/EsoRex/Plugins
++ esorex.caller.log-dir=.
++ esorex.caller.log-file=esorex.log
++ esorex.caller.log-file=esorex.log
++ esorex.caller.output-dir=.
++ esorex.caller.output-prefix=out_
++
++.TP
++.SH filename.sof
++A sof file contains a list of the input data. This data is specified in an sof
++file (which is just a text file), where each input file is specified with its
++associated classification and category. The format of each line in the sof
++file is as follows:
++
++ full-path-to-file classification
++
++Optionally, a third column may be provided. Permitted values are either RAW or
++CALIB. This is for when a recipe does not identify the type of input file, but
++as all ESO recipes are required to do so, this column is typically not needed.
++
++An example sof file, for the mythological "ZIMOS" instrument, might look like this:
++
++ /data/mos/ZIMOS.03-12-26T01:05:06.fits MOS_SCIENCE
++ /data/mos/ZIMOS.03-12-26T01:26:00.fits MOS_SCIENCE
++ /data/mos/ZIMOS.03-12-26T01:47:04.fits MOS_SCIENCE
++ /data/cal/master_bias4.fits MASTER_BIAS
++ /data/cal/grs_LR_red.3.tfits GRISM_TABLE
++ /data/gasgano/extract_table2.fits EXTRACT_TABLE
++ /data/cal/badpixel.3.tfits CCD_TABLE
++
++For an concrete example for a specific instrument, check the documentation for that
++instrument.
++
diff --git a/sci-astronomy/esorex/files/esorex-3.10-remove-empty-configdir.patch b/sci-astronomy/esorex/files/esorex-3.10-remove-empty-configdir.patch
new file mode 100644
index 000000000000..d492173da8eb
--- /dev/null
+++ b/sci-astronomy/esorex/files/esorex-3.10-remove-empty-configdir.patch
@@ -0,0 +1,13 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Avoid creation of an empty directory "/usr/share/esorex/config"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -51,8 +51,6 @@
+
+ bin_PROGRAMS = esorex
+
+-config_DATA =
+-
+ esorex_LDFLAGS = $(CPL_LDFLAGS) $(LIBLTDL)
+ esorex_LDADD = @GETOPT@ $(LIBCPLDFS) $(LIBCPLUI) $(LIBCPLCORE) $(LIBCEXT) $(LIBLTDL)
+ esorex_DEPENDENCIES = @GETOPT@ $(LIBLTDL)
diff --git a/sci-astronomy/esorex/files/esorex-3.10-remove-private-ltdl.patch b/sci-astronomy/esorex/files/esorex-3.10-remove-private-ltdl.patch
new file mode 100644
index 000000000000..e675cdbb8f73
--- /dev/null
+++ b/sci-astronomy/esorex/files/esorex-3.10-remove-private-ltdl.patch
@@ -0,0 +1,39 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Subject: Remove private library libltdl and use the installed one.
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -37,10 +37,7 @@
+ if MAINTAINER_MODE
+
+ MAINTAINERCLEANFILES = $(top_srcdir)/Makefile.in $(top_srcdir)/aclocal.m4 \
+- $(top_srcdir)/config.h.in $(top_srcdir)/configure config.status config.log \
+- $(top_srcdir)/libltdl/Makefile.in $(top_srcdir)/libltdl/aclocal.m4 \
+- $(top_srcdir)/libltdl/config-h.in $(top_srcdir)/libltdl/configure \
+- libltdl/config.status libltdl/config.log
++ $(top_srcdir)/config.h.in $(top_srcdir)/configure config.status config.log
+
+ clean-local: clean-doxygen
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,9 @@
+
+ ESO_CHECK_DOCTOOLS
+
+-AC_LIBLTDL_CONVENIENCE
++LT_INIT
++LT_CONFIG_LTDL_DIR([libltdl])
++AC_LIB_LTDL
+ AC_SUBST(INCLTDL)
+ AC_SUBST(LIBLTDL)
+
+@@ -76,9 +78,6 @@
+ # Determine the shared library suffix on this platform
+ AC_LTDL_SHLIBEXT
+
+-
+-AC_CONFIG_SUBDIRS(libltdl)
+-
+ AC_CONFIG_FILES(Makefile
+ Makefile.purify
+ doxygen/Doxyfile
diff --git a/sci-astronomy/esorex/files/esorex-3.10-set-default-plugin-path.patch b/sci-astronomy/esorex/files/esorex-3.10-set-default-plugin-path.patch
new file mode 100644
index 000000000000..1289bed5ab0d
--- /dev/null
+++ b/sci-astronomy/esorex/files/esorex-3.10-set-default-plugin-path.patch
@@ -0,0 +1,28 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Set the default plugin path to the one where recipes are
+ installed in Debian.
+--- a/etc/esorex.rc.in
++++ b/etc/esorex.rc.in
+@@ -130,7 +130,7 @@
+ # as well. Multiple directory heads may be specified, by separating the
+ # starting paths with colons (:). This option may also be set using the
+ # environment variable ESOREX_PLUGIN_DIR.
+-esorex.caller.recipe-dir=@recipedir@/esopipes-plugins
++esorex.caller.recipe-dir=@recipedir@
+
+ # --suppress-link
+ # When TRUE, no symbolic link is created to the output product. However, if
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -35,7 +35,10 @@
+ AC_SUBST(configdir)
+
+ if test -z "$recipedir"; then
+- recipedir="`eval echo $libdir`"
++ recipedir="`eval echo $libdir`/cpl/plugins"
++ if test $libdir != "/usr/lib"; then
++ recipedir="$recipedir:/usr/lib/cpl/plugins"
++ fi
+ fi
+ AC_SUBST(recipedir)
+
diff --git a/sci-astronomy/esorex/files/esorex-3.9.6-use-shared-libs.patch b/sci-astronomy/esorex/files/esorex-3.9.6-use-shared-libs.patch
new file mode 100644
index 000000000000..0cd348eaa446
--- /dev/null
+++ b/sci-astronomy/esorex/files/esorex-3.9.6-use-shared-libs.patch
@@ -0,0 +1,20 @@
+--- esorex-3.9.6/m4/cpl.m4.orig 2012-06-04 23:47:50.000000000 +0100
++++ esorex-3.9.6/m4/cpl.m4 2012-06-04 23:48:45.000000000 +0100
+@@ -455,7 +455,7 @@
+ AC_MSG_CHECKING([for libcext])
+
+ cpl_cext_check_header="cxtypes.h"
+- cpl_cext_check_lib="libcext.a"
++ cpl_cext_check_lib="libcext.so"
+
+ cpl_cext_incdirs=""
+ cpl_cext_libdirs=""
+@@ -1314,7 +1314,7 @@
+ AC_MSG_CHECKING([for CPL])
+
+ cpl_check_cpl_header="cpl.h"
+- cpl_check_cpl_lib="libcplcore.a"
++ cpl_check_cpl_lib="libcplcore.so"
+
+ cpl_incdirs=""
+ cpl_libdirs=""
diff --git a/sci-astronomy/esorex/metadata.xml b/sci-astronomy/esorex/metadata.xml
new file mode 100644
index 000000000000..02a6c09dadb7
--- /dev/null
+++ b/sci-astronomy/esorex/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ EsoRex is the ESO Recipe Execution Tool. It can list, configure and
+ execute CPL-based recipes from the command line. One of the features
+ provided by the CPL is the ability to create data-reduction algorithms
+ that run as plugins (dynamic libraries). These are called recipes and
+ are one of the main aspects of the CPL data-reduction development
+ environment. As these recipes are dynamic libraries, it is not
+ possible to run them directly from the command line. However, ESO
+ provides several tools to do this, thus saving recipe developers the
+ need to write such an application themselves. One of these is GASGANO
+ (a GUI-based tool) and the other is EsoRex (which runs from the
+ command line.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/fitsh/Manifest b/sci-astronomy/fitsh/Manifest
new file mode 100644
index 000000000000..034ea48c6f19
--- /dev/null
+++ b/sci-astronomy/fitsh/Manifest
@@ -0,0 +1 @@
+DIST fitsh-0.9.4.tar.gz 620247 BLAKE2B 84ff0efdb71c5cea94aa2c48df3bb9b6f28e9d48847f281fd2a8c55fd6555af62813f7dc5aa561de72641b2a75746711f3c81efe68e55237a551c26570f408b3 SHA512 27610b3a04ca29752fa764b34ccb6260d8fa7ca95ecfe1c2d099ebcf690138525d7e7d5bc5dbbc82458bc8b3389a056c6833de790874de8d0af5a1e964ad15a4
diff --git a/sci-astronomy/fitsh/files/fitsh-0.9.4-makefile.patch b/sci-astronomy/fitsh/files/fitsh-0.9.4-makefile.patch
new file mode 100644
index 000000000000..6f2e47be31f4
--- /dev/null
+++ b/sci-astronomy/fitsh/files/fitsh-0.9.4-makefile.patch
@@ -0,0 +1,302 @@
+* Respect LDFLAGS
+* Fix bashisms in configure
+* Don't pre-compress manpages
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -129,22 +129,22 @@ install: src
+ $(INSTALL) -d $(DESTDIR)${libdir}/fitsh/lfit
+ $(INSTALL) -m 0644 ./src/linear.$(DLEXT) $(DESTDIR)${libdir}/fitsh/lfit
+ $(INSTALL) -d $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fiarith.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/ficalib.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/ficombine.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/ficonv.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fiheader.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fiign.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fiinfo.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fiphot.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/firandom.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fistar.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/fitrans.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/grcollect.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/grmatch.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/grtrans.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/gropt.1.gz $(DESTDIR)${mandir}/man1
+- $(INSTALL) -m 0644 ./man/lfit.1.gz $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fiarith.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/ficalib.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/ficombine.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/ficonv.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fiheader.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fiign.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fiinfo.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fiphot.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/firandom.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fistar.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/fitrans.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/grcollect.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/grmatch.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/grtrans.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/gropt.1 $(DESTDIR)${mandir}/man1
++ $(INSTALL) -m 0644 ./man/lfit.1 $(DESTDIR)${mandir}/man1
+
+ uninstall:
+ rm -f ${bindir}/fiarith
+@@ -164,32 +164,32 @@ uninstall:
+ rm -f ${bindir}/gropt
+ rm -f ${bindir}/lfit
+ rm -f ${libdir}/fitsh/lfit/linear.$(DLEXT)
+- rm -f ${mandir}/man1/fiarith.1.gz
+- rm -f ${mandir}/man1/ficalib.1.gz
+- rm -f ${mandir}/man1/ficombine.1.gz
+- rm -f ${mandir}/man1/ficonv.1.gz
+- rm -f ${mandir}/man1/fiheader.1.gz
+- rm -f ${mandir}/man1/fiign.1.gz
+- rm -f ${mandir}/man1/fiinfo.1.gz
+- rm -f ${mandir}/man1/fiphot.1.gz
+- rm -f ${mandir}/man1/firandom.1.gz
+- rm -f ${mandir}/man1/fistar.1.gz
+- rm -f ${mandir}/man1/fitrans.1.gz
+- rm -f ${mandir}/man1/grcollect.1.gz
+- rm -f ${mandir}/man1/grmatch.1.gz
+- rm -f ${mandir}/man1/grtrans.1.gz
+- rm -f ${mandir}/man1/gropt.1.gz
+- rm -f ${mandir}/man1/lfit.1.gz
++ rm -f ${mandir}/man1/fiarith
++ rm -f ${mandir}/man1/ficalib
++ rm -f ${mandir}/man1/ficombine
++ rm -f ${mandir}/man1/ficonv
++ rm -f ${mandir}/man1/fiheader
++ rm -f ${mandir}/man1/fiign
++ rm -f ${mandir}/man1/fiinfo
++ rm -f ${mandir}/man1/fiphot
++ rm -f ${mandir}/man1/firandom
++ rm -f ${mandir}/man1/fistar
++ rm -f ${mandir}/man1/fitrans
++ rm -f ${mandir}/man1/grcollect
++ rm -f ${mandir}/man1/grmatch
++ rm -f ${mandir}/man1/grtrans
++ rm -f ${mandir}/man1/gropt
++ rm -f ${mandir}/man1/lfit
+
+ HELP2MAN_LIST=fiarith ficalib ficombine ficonv fiheader fiign fiinfo fiphot firandom fistar fitrans grcollect grmatch grtrans gropt lfit
+
+ help2man: src
+ mkdir -p ./doc/help2man
+- cat ./doc/man.brief | while read b name; do $(HELP2MAN) -n "$$name" -N -h --long-help ./src/$$b > ./doc/help2man/$$b.1; $(GZIP) -f ./doc/help2man/$$b.1; done
++ cat ./doc/man.brief | while read b name; do $(HELP2MAN) -n "$$name" -N -h --long-help ./src/$$b > ./doc/help2man/$$b.1; done
+
+ man: help2man
+ mkdir -p $(MAN)
+- for b in $(HELP2MAN_LIST); do cp -p ./doc/help2man/$$b.1.gz $(MAN); done
++ for b in $(HELP2MAN_LIST); do cp -p ./doc/help2man/$$b $(MAN); done
+
+ dist:
+ rm -f -r $(DIST)
+@@ -244,7 +244,7 @@ dist:
+ mkdir $(DIST)/src/psn
+ cp -p src/psn/*.[ch] src/psn/Makefile.in $(DIST)/src/psn
+ mkdir $(DIST)/man
+- cp -p man/*.1.gz $(DIST)/man
++ cp -p man/* $(DIST)/man
+ mkdir $(DIST)/misc
+ mkdir $(DIST)/misc/deb
+ cp -p misc/deb/fitsh.control misc/deb/fitsh.list $(DIST)/misc/deb
+@@ -264,9 +264,7 @@ deb-fitsh: src help2man
+ cp $$file $(DEB)/fitsh/$$target ; \
+ done
+ cp README $(DEB)/fitsh/usr/share/doc/fitsh/
+- gzip $(DEB)/fitsh/usr/share/doc/fitsh/README
+ cp AUTHORS $(DEB)/fitsh/usr/share/doc/fitsh/
+- gzip $(DEB)/fitsh/usr/share/doc/fitsh/AUTHORS
+ cat $(DEB)/fitsh.control | \
+ sed -e "s/__ARCH__/$(DEB_ARCH)/" \
+ -e "s/__VERSION__/$(DEB_VERSION)/" \
+--- a/configure.ac
++++ b/configure.ac
+@@ -232,17 +232,17 @@ dynamic_extensions=yes
+ # our default $(CFLAGS) are:
+ if test -n "$CFLAGS" ; then
+ cflags_default=no
+-elif test "${ac_cv_env_host_alias_value}" == "win32" ; then
++elif test "${ac_cv_env_host_alias_value}" = "win32" ; then
+ HOST=win32
+ CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHOST_WIN32"
+ cflags_default=yes
+ dynamic_extensions=no
+-elif test "${ac_cv_env_host_alias_value}" == "win64" ; then
++elif test "${ac_cv_env_host_alias_value}" = "win64" ; then
+ HOST=win64
+ CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHOST_WIN32 -DHOST_WIN64"
+ cflags_default=yes
+ dynamic_extensions=no
+-elif test "${CC}" == "tcc"; then
++elif test "${CC}" = "tcc"; then
+ CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
+ cflags_default=yes
+ else
+@@ -358,19 +358,19 @@ AC_CHECK_LIB(dl,dlclose)
+
+ ax_cflags_gcc_no_overlength_strings=no
+ AX_CFLAGS_GCC_OPTION(-Wno-overlength-strings,[],[ax_cflags_gcc_no_overlength_strings=yes])
+-if test $cflags_default == yes && test $ax_cflags_gcc_no_overlength_strings == yes ; then
++if test $cflags_default = yes && test $ax_cflags_gcc_no_overlength_strings = yes ; then
+ CFLAGS="$CFLAGS -Wno-overlength-strings"
+ fi
+
+ ax_cflags_gcc_no_long_long=no
+ AX_CFLAGS_GCC_OPTION(-Wno-long-long,[],[ax_cflags_gcc_no_long_long=yes])
+-if test $cflags_default == yes && test $ax_cflags_gcc_no_long_long == yes ; then
++if test $cflags_default = yes && test $ax_cflags_gcc_no_long_long = yes ; then
+ CFLAGS="$CFLAGS -Wno-long-long"
+ fi
+
+ ax_cflags_gcc_no_unused_result=no
+ AX_CFLAGS_GCC_OPTION(-Wno-unused-result,[],[ax_cflags_gcc_no_unused_result=yes])
+-if test $cflags_default == yes && test $ax_cflags_gcc_no_unused_result == yes ; then
++if test $cflags_default = yes && test $ax_cflags_gcc_no_unused_result = yes ; then
+ CFLAGS="$CFLAGS -Wno-unused-result"
+ fi
+
+@@ -450,7 +450,7 @@ AC_MSG_RESULT([$PAPERSIZE: ${PAPER_WIDTH}x${PAPER_HEIGHT}])
+ ARCH=`uname -m`
+
+ AC_MSG_CHECKING([dynamic library extensions (HOST=$HOST)])
+-if test `uname` == Darwin; then
++if test `uname` = Darwin; then
+ OSX_VERSION=`sw_vers -productVersion`
+ DLEXT=dylib
+ DLSWC="-dylib -arch $ARCH -macosx_version_min $OSX_VERSION"
+@@ -459,19 +459,19 @@ if test `uname` == Darwin; then
+ DL_TARGETS=linear.dylib
+ AC_MSG_RESULT([dylib])
+ AC_MSG_NOTICE([OSX linker flags: $DLSWC])
+-elif test "$HOST" == win32; then
++elif test "$HOST" = win32; then
+ DLEXT=
+ DLSWC=
+ DLDYN=
+ DLLIB=
+ AC_MSG_RESULT([not supported])
+-elif test "$HOST" == win64; then
++elif test "$HOST" = win64; then
+ DLEXT=
+ DLSWC=
+ DLDYN=
+ DLLIB=
+ AC_MSG_RESULT([not supported])
+-elif test `uname` == NetBSD; then
++elif test `uname` = NetBSD; then
+ DLEXT=so
+ DLSWC=-shared
+ DLDYN=-rdynamic
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -556,22 +556,22 @@ optcalc.o: optcalc.c optcalc.h
+ ###############################################################################
+
+ fiarith: fiarith.c fitsh.h $(DEP_FIARITH) $(MOD_FIARITH)
+- $(CC) $(CFLAGS) -o fiarith fiarith.c $(DEP_FIARITH) $(MOD_FIARITH) $(LIB_FIARITH)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fiarith fiarith.c $(DEP_FIARITH) $(MOD_FIARITH) $(LIB_FIARITH)
+
+ ficalib: ficalib.c fitsh.h $(DEP_FICALIB) $(MOD_FICALIB)
+- $(CC) $(CFLAGS) -o ficalib ficalib.c $(DEP_FICALIB) $(MOD_FICALIB) $(LIB_FICALIB)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ficalib ficalib.c $(DEP_FICALIB) $(MOD_FICALIB) $(LIB_FICALIB)
+
+ ficombine: ficombine.c fitsh.h $(DEP_FICOMBINE) $(MOD_FICOMBINE)
+- $(CC) $(CFLAGS) -o ficombine ficombine.c $(DEP_FICOMBINE) $(MOD_FICOMBINE) $(LIB_FICOMBINE)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ficombine ficombine.c $(DEP_FICOMBINE) $(MOD_FICOMBINE) $(LIB_FICOMBINE)
+
+ ficonv: ficonv.c fitsh.h $(DEP_FICONV) $(MOD_FICONV)
+- $(CC) $(CFLAGS) -o ficonv ficonv.c $(DEP_FICONV) $(MOD_FICONV) $(LIB_FICONV)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ficonv ficonv.c $(DEP_FICONV) $(MOD_FICONV) $(LIB_FICONV)
+
+ fiheader: fiheader.c fitsh.h $(DEP_FIHEADER) $(MOD_FIHEADER)
+- $(CC) $(CFLAGS) -o fiheader fiheader.c $(DEP_FIHEADER) $(MOD_FIHEADER) $(LIB_FIHEADER)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fiheader fiheader.c $(DEP_FIHEADER) $(MOD_FIHEADER) $(LIB_FIHEADER)
+
+ fiign: fiign.c fitsh.h $(DEP_FIIGN) $(MOD_FIIGN)
+- $(CC) $(CFLAGS) -o fiign fiign.c $(DEP_FIIGN) $(MOD_FIIGN) $(LIB_FIIGN)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fiign fiign.c $(DEP_FIIGN) $(MOD_FIIGN) $(LIB_FIIGN)
+
+ fiinfo-image.o: fiinfo-image.c fiinfo.h
+ $(CC) $(CFLAGS) -c fiinfo-image.c
+@@ -580,40 +580,40 @@ fiinfo-pnm.o: fiinfo-pnm.c fiinfo.h
+ $(CC) $(CFLAGS) -c fiinfo-pnm.c
+
+ fiinfo: fiinfo.c fiinfo.h fitsh.h $(DEP_FIINFO) $(MOD_FIINFO)
+- $(CC) $(CFLAGS) -o fiinfo fiinfo.c $(DEP_FIINFO) $(MOD_FIINFO) $(LIB_FIINFO)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fiinfo fiinfo.c $(DEP_FIINFO) $(MOD_FIINFO) $(LIB_FIINFO)
+
+ firandom-eval.o: firandom-eval.c firandom.h
+ $(CC) $(CFLAGS) -c firandom-eval.c
+
+ firandom: firandom.c fitsh.h $(DEP_FIRANDOM) $(MOD_FIRANDOM)
+- $(CC) $(CFLAGS) -o firandom firandom.c $(DEP_FIRANDOM) $(MOD_FIRANDOM) $(LIB_FIRANDOM)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o firandom firandom.c $(DEP_FIRANDOM) $(MOD_FIRANDOM) $(LIB_FIRANDOM)
+
+ fiphot-io.o: fiphot-io.c fiphot.h
+ $(CC) $(CFLAGS) -c fiphot-io.c
+
+ fiphot: fiphot.c fitsh.h $(DEP_FIPHOT) $(MOD_FIPHOT)
+- $(CC) $(CFLAGS) -o fiphot fiphot.c $(DEP_FIPHOT) $(MOD_FIPHOT) $(LIB_FIPHOT)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fiphot fiphot.c $(DEP_FIPHOT) $(MOD_FIPHOT) $(LIB_FIPHOT)
+
+ fistar-io.o: fistar-io.c fistar.h
+ $(CC) $(CFLAGS) -c fistar-io.c
+
+ fistar: fistar.c fitsh.h $(DEP_FISTAR) $(MOD_FISTAR) fistar.h
+- $(CC) $(CFLAGS) -o fistar fistar.c $(DEP_FISTAR) $(MOD_FISTAR) $(LIB_FISTAR)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fistar fistar.c $(DEP_FISTAR) $(MOD_FISTAR) $(LIB_FISTAR)
+
+ fitrans: fitrans.c fitsh.h $(DEP_FITRANS) $(MOD_FITRANS)
+- $(CC) $(CFLAGS) -o fitrans fitrans.c $(DEP_FITRANS) $(MOD_FITRANS) $(LIB_FITRANS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fitrans fitrans.c $(DEP_FITRANS) $(MOD_FITRANS) $(LIB_FITRANS)
+
+ grcollect: grcollect.c fitsh.h $(DEP_GRCOLLECT) $(MOD_GRCOLLECT)
+- $(CC) $(CFLAGS) -o grcollect grcollect.c $(DEP_GRCOLLECT) $(MOD_GRCOLLECT) $(LIB_GRCOLLECT)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o grcollect grcollect.c $(DEP_GRCOLLECT) $(MOD_GRCOLLECT) $(LIB_GRCOLLECT)
+
+ grmatch: grmatch.c fitsh.h $(DEP_GRMATCH) $(MOD_GRMATCH)
+- $(CC) $(CFLAGS) -o grmatch grmatch.c $(DEP_GRMATCH) $(MOD_GRMATCH) $(LIB_GRMATCH)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o grmatch grmatch.c $(DEP_GRMATCH) $(MOD_GRMATCH) $(LIB_GRMATCH)
+
+ grtrans: grtrans.c fitsh.h $(DEP_GRTRANS) $(MOD_GRTRANS)
+- $(CC) $(CFLAGS) -o grtrans grtrans.c $(DEP_GRTRANS) $(MOD_GRTRANS) $(LIB_GRTRANS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o grtrans grtrans.c $(DEP_GRTRANS) $(MOD_GRTRANS) $(LIB_GRTRANS)
+
+ gropt: gropt.c fitsh.h $(DEP_GROPT) $(MOD_GROPT)
+- $(CC) $(CFLAGS) -o gropt gropt.c $(DEP_GROPT) $(MOD_GROPT) $(LIB_GROPT)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o gropt gropt.c $(DEP_GROPT) $(MOD_GROPT) $(LIB_GROPT)
+
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+@@ -627,7 +627,7 @@ lfit-info.o: lfit-info.c lfit-info.h
+ $(CC) $(CFLAGS) -c lfit-info.c
+
+ lfit: lfit.c $(DEP_LFIT) $(MOD_LFIT)
+- $(CC) $(CFLAGS) -o lfit lfit.c $(DEP_LFIT) $(MOD_LFIT) $(DLDYN) $(LIB_LFIT)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o lfit lfit.c $(DEP_LFIT) $(MOD_LFIT) $(DLDYN) $(LIB_LFIT)
+
+ linear.o: linear.c
+ $(CC) $(CFLAGS) -c linear.c
+@@ -639,7 +639,7 @@ linear.$(DLEXT): linear.o
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+ fic_mpstack: fic_mpstack.c fitsh.h $(DEP_FIC_MPSTACK)
+- $(CC) $(CFLAGS) -o fic_mpstack fic_mpstack.c $(DEP_FIC_MPSTACK) $(MOD_FIC_MPSTACK) $(LIB_FIC_MPSTACK)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fic_mpstack fic_mpstack.c $(DEP_FIC_MPSTACK) $(MOD_FIC_MPSTACK) $(LIB_FIC_MPSTACK)
+
+ ###############################################################################
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -633,7 +633,7 @@ linear.o: linear.c
+ $(CC) $(CFLAGS) -c linear.c
+
+ linear.$(DLEXT): linear.o
+- $(LD) -o linear.$(DLEXT) linear.o $(DLSWC) -lc
++ $(CC) $(LDFLAGS) -o linear.$(DLEXT) linear.o $(DLSWC) -lc
+ chmod 644 linear.$(DLEXT)
+
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/sci-astronomy/fitsh/fitsh-0.9.4.ebuild b/sci-astronomy/fitsh/fitsh-0.9.4.ebuild
new file mode 100644
index 000000000000..74f1a7327f50
--- /dev/null
+++ b/sci-astronomy/fitsh/fitsh-0.9.4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Software package for astronomical image processing"
+HOMEPAGE="https://fitsh.net/"
+SRC_URI="https://fitsh.net/download/fitsh/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.4-makefile.patch
+)
+
+src_prepare() {
+ default
+
+ local file
+ for file in man/*.gz ; do
+ gzip -d "${file}" || die
+ done
+
+ eautoreconf
+}
diff --git a/sci-astronomy/fitsh/metadata.xml b/sci-astronomy/fitsh/metadata.xml
new file mode 100644
index 000000000000..3368eac8ed3e
--- /dev/null
+++ b/sci-astronomy/fitsh/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The FITSH software package provides a set of independent binary
+ programs (called Tasks) that are designed for execution from a
+ UNIX command line shell or shell script. Each of these tasks
+ performs a specific operation, following the UNIX philosophy of
+ modular tools that performs a single step related to astronomical
+ data reduction and image processing.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/fitspng/Manifest b/sci-astronomy/fitspng/Manifest
new file mode 100644
index 000000000000..58d1116e0c83
--- /dev/null
+++ b/sci-astronomy/fitspng/Manifest
@@ -0,0 +1 @@
+DIST fitspng-2.0.tar.gz 1138938 BLAKE2B c8741ce0b368f61126cdff41d646379ceaf1a98972968a1f21db4cf1a1301d8d2b446a89b8efc8144fedbc1dd10d56f36d01400cb6780ad13181e8a889de0b58 SHA512 192a5328e1b53f4bd2f84a0054ff8ae3a732d0c1f2322813d1a714a23d346d5b5e0d47db5a0ad05ec86d6f28db37c835d2f3f4b2422c1d2b210e20601defd9b8
diff --git a/sci-astronomy/fitspng/fitspng-2.0.ebuild b/sci-astronomy/fitspng/fitspng-2.0.ebuild
new file mode 100644
index 000000000000..3db39ea1e620
--- /dev/null
+++ b/sci-astronomy/fitspng/fitspng-2.0.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="FITS to PNG converter"
+HOMEPAGE="http://integral.physics.muni.cz/fitspng/"
+SRC_URI="ftp://integral.physics.muni.cz/pub/${PN}/${P}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sci-libs/cfitsio:0=
+ media-libs/libpng:0="
+DEPEND="${RDEPEND}"
diff --git a/sci-astronomy/fitspng/metadata.xml b/sci-astronomy/fitspng/metadata.xml
new file mode 100644
index 000000000000..1b247f686e4a
--- /dev/null
+++ b/sci-astronomy/fitspng/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ Fitspng is an utility intended to convert of the natural high
+ dynamic range of FITS images, directly representing measured data,
+ to the limited numerical range of PNG format widely used
+ in computer graphics. Fitspng implements a global tone mapping
+ technique by a set of tone functions using parameters provided
+ by user or by machine estimate on base of a robust count statistics.
+ Moreover, the conversion keeps an important FITS meta-information
+ as a text part of PNG header.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/funtools/Manifest b/sci-astronomy/funtools/Manifest
new file mode 100644
index 000000000000..958fbff15876
--- /dev/null
+++ b/sci-astronomy/funtools/Manifest
@@ -0,0 +1 @@
+DIST funtools-1.4.8.tar.gz 3281636 BLAKE2B dd1fd341786e09662a6de88a102a01f02be78775bdada938c4df79f6bae388d07d711df46f52eaea6557589450e104aaff65b0823758161f1aea3301f5a82338 SHA512 f916ce582d66f0350448912be6ec427b0c697e7da49595ec04e86b105af76d229d7721b5fee8844f843b1734129b53402228d7736e55fbae83df405362fb8a6c
diff --git a/sci-astronomy/funtools/funtools-1.4.8-r1.ebuild b/sci-astronomy/funtools/funtools-1.4.8-r1.ebuild
new file mode 100644
index 000000000000..b14ce260ca6f
--- /dev/null
+++ b/sci-astronomy/funtools/funtools-1.4.8-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs autotools
+
+DESCRIPTION="FITS library and utlities for astronomical images"
+HOMEPAGE="https://github.com/ericmandel/funtools"
+SRC_URI="https://github.com/ericmandel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/1"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-lang/tcl:0=
+ sci-astronomy/wcstools
+ sci-visualization/gnuplot
+ virtual/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_prepare() {
+ default
+ # respect libdir, dont build wcs, respect toolchain
+ sed -e "/INSTALL/s|/lib|/$(get_libdir)|g" \
+ -e 's|${OBJS}|$(OBJS)|g' \
+ -e '/^SUBLIBS/s|wcs||g' \
+ -e 's/mkdir/mkdir -p/g' \
+ -e '/mklib/s|-o $(PACKAGE)|-o $(PACKAGE) $(LIBS)|g' \
+ -e 's|./mklib|& -linker "$(CC)" -ldflags "$(LDFLAGS)"|' \
+ -e "s| ar| $(tc-getAR)|g" \
+ -e "s|ar cruv|$(tc-getAR) cruv|g" \
+ -e "s|WCS_INC.*=.*|WCS_INC = $($(tc-getPKG_CONFIG) --cflags wcstools)|g" \
+ -i Makefile.in */Makefile.in || die
+ # fix race condition (when ccache is on)
+ sed -e 's|$(LIB):|$(LIB): FORCE|g' \
+ -e '$aFORCE:' \
+ -i */Makefile.in || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --exec-prefix="${EPREFIX}/usr"
+ --enable-shared
+ --enable-dl
+ --with-wcslib="$($(tc-getPKG_CONFIG) --libs wcstools)"
+ --with-zlib="$($(tc-getPKG_CONFIG) --libs zlib)"
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake
+ emake shtclfun
+}
+
+src_install() {
+ default
+ # install missing includes
+ insinto /usr/include/funtools/fitsy
+ doins fitsy/*.h
+
+ # fix bug #536630
+ mv "${ED}"/usr/share/man/man3/funopen.3 \
+ "${ED}"/usr/share/man/man7/funopen.7 \
+ || die
+
+ if use doc; then
+ dodoc doc/*.pdf doc/*html doc/*c
+ docompress -x /usr/share/doc/${PF}/*.c
+ fi
+
+ if ! use static-libs; then
+ find "${ED}" -name "*.a" -type f -delete || die
+ fi
+}
diff --git a/sci-astronomy/funtools/metadata.xml b/sci-astronomy/funtools/metadata.xml
new file mode 100644
index 000000000000..23ff32ae3e77
--- /dev/null
+++ b/sci-astronomy/funtools/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Funtools, is a minimal buy-in FITS library and utility package from
+ the SAO/HEAD. The Funtools library provides simplified
+ access to FITS images and binary tables, as well as to raw array and binary
+ event lists. The Funtools utilities provide high-level support for
+ processing astronomical data.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">ericmandel/funtools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/galaxy/Manifest b/sci-astronomy/galaxy/Manifest
new file mode 100644
index 000000000000..d4d260ded76f
--- /dev/null
+++ b/sci-astronomy/galaxy/Manifest
@@ -0,0 +1 @@
+DIST galaxy-2.2.tar.gz 146675 BLAKE2B 5e0dce355c7df5c73d3017b80f88715056cd8ceb765f7ad2810037fe8c800599979dbf3d42dbacdc70aafa080ad84a08db0d6d4cffc8ee4b86b8199e6b4e31f8 SHA512 b3843f4ef7bdd60d761db019ded8af99b4c520ecc1c852a210bc6282751474254d9b9172e738015c7b01df57502655749051baac11448797fb9b71ecd4edd8d6
diff --git a/sci-astronomy/galaxy/files/galaxy-2.2-makefile.patch b/sci-astronomy/galaxy/files/galaxy-2.2-makefile.patch
new file mode 100644
index 000000000000..86d1e3a7bc2a
--- /dev/null
+++ b/sci-astronomy/galaxy/files/galaxy-2.2-makefile.patch
@@ -0,0 +1,61 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,30 +5,28 @@
+ SOURCE = $(PROGRAM)-$(VERSION).cc
+
+ # defaults for parameters that may be pre-defined
+-CXXFLAGS ?= -O3 -g -Wall
+-LDFLAGS ?= -O3 -g -Wall -rdynamic
+-PREFIX ?= /usr
++PREFIX = $(EPREFIX)/usr
+
+ # target install directories
+ BINDIR = $(PREFIX)/bin
+ SHAREDIR = $(PREFIX)/share/$(PROGRAM)
+ DATADIR = $(SHAREDIR)/data
+ ICONDIR = $(SHAREDIR)/icons
+-DOCDIR = $(PREFIX)/share/doc/$(PROGRAM)
++DOCDIR = $(PREFIX)/share/doc/$(PF)
+ MANDIR = $(PREFIX)/share/man/man1
+ MENUFILE = $(PREFIX)/share/applications/kornelix-$(PROGRAM).desktop
+
+-CFLAGS = $(CXXFLAGS) -c `pkg-config --cflags gtk+-3.0`
+-LIBS = `pkg-config --libs gtk+-3.0`
++CXXFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-3.0)
++LIBS += $(shell $(PKG_CONFIG) --libs gtk+-3.0)
+
+ $(PROGRAM): $(PROGRAM).o zfuncs.o
+- $(CXX) $(LDFLAGS) $(PROGRAM).o zfuncs.o $(LIBS) -o $(PROGRAM)
++ $(CXX) $(LDFLAGS) $(PROGRAM).o zfuncs.o -o $(PROGRAM) $(LIBS)
+
+ $(PROGRAM).o: $(SOURCE)
+- $(CXX) $(CFLAGS) -o $(PROGRAM).o $(SOURCE)
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(PROGRAM).o $(SOURCE)
+
+ zfuncs.o: zfuncs.cc zfuncs.h
+- $(CXX) $(CFLAGS) zfuncs.cc \
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c zfuncs.cc \
+ -D PREFIX=\"$(PREFIX)\" -D DOCDIR=\"$(DOCDIR)\" \
+ -Wno-deprecated-declarations
+
+@@ -45,19 +43,16 @@
+ cp -f -R doc/* $(DESTDIR)$(DOCDIR)
+ # man page
+ cp -f doc/$(PROGRAM).man $(PROGRAM).1
+- gzip -f -9 $(PROGRAM).1
+- cp $(PROGRAM).1.gz $(DESTDIR)$(MANDIR)
++ cp $(PROGRAM).1 $(DESTDIR)$(MANDIR)
+ rm -f $(PROGRAM).1.gz
+ # menu (desktop) file
+ cp -f desktop $(DESTDIR)$(MENUFILE)
+- xdg-desktop-menu install $(DESTDIR)$(MENUFILE)
+
+ uninstall:
+ rm -f $(DESTDIR)$(BINDIR)/$(PROGRAM)
+ rm -R -f $(DESTDIR)$(SHAREDIR)
+ rm -R -f $(DESTDIR)$(DOCDIR)
+ rm -f $(DESTDIR)$(MANDIR)/$(PROGRAM).1.gz
+- xdg-desktop-menu uninstall $(DESTDIR)$(MENUFILE)
+ rm -f $(DESTDIR)$(MENUFILE)
+
+ clean:
diff --git a/sci-astronomy/galaxy/galaxy-2.2-r1.ebuild b/sci-astronomy/galaxy/galaxy-2.2-r1.ebuild
new file mode 100644
index 000000000000..3f4fb74903ab
--- /dev/null
+++ b/sci-astronomy/galaxy/galaxy-2.2-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs xdg
+
+# probably change every release
+PID="1/3/0/3/13035936"
+
+DESCRIPTION="Stellar simulation program"
+HOMEPAGE="http://www.kornelix.com/galaxy.html"
+SRC_URI="http://www.kornelix.com/uploads/${PID}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="x11-libs/gtk+:3"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+
+src_configure() {
+ tc-export CXX PKG_CONFIG
+ append-cxxflags -pthread
+ append-ldflags -pthread
+}
diff --git a/sci-astronomy/galaxy/metadata.xml b/sci-astronomy/galaxy/metadata.xml
new file mode 100644
index 000000000000..9816839f4234
--- /dev/null
+++ b/sci-astronomy/galaxy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Stellar simulation program. Watch a few stars move around each-other,
+ accelerated by their mutual attractions, or watch thousands of random
+ stars evolve into a spiral galaxy.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/gasgano/Manifest b/sci-astronomy/gasgano/Manifest
new file mode 100644
index 000000000000..ccb6d2c5afb8
--- /dev/null
+++ b/sci-astronomy/gasgano/Manifest
@@ -0,0 +1,2 @@
+DIST VLT-PRO-ESO-19000-1932-V4.pdf 818369 BLAKE2B f58191ca9f1bd72f78e73eceecbfc32331fb88abcaed0eb27f7beb444e47788a95d43f3e8421b235e7637d452d22a773f7363934690644e2cc02acfdfd5cbb11 SHA512 272da18caee1bb1b5228df76a7f09411120be39a4b421b79d48e0bfc09972f250322a718bf380d7a83c3a528151260139efdcd8d2482c6a36ad45d727d93cce1
+DIST gasgano-2.4.8.tar.gz 9211627 BLAKE2B df0a7856ec8b06cb590ff180798841a18f919c55eef4553fb9712e2b8a17d8a39fdeb642c941f8169b866baa2a1fd9ca0795f7c331adfb6ed56c69098abdb9bd SHA512 94fbc9721077b15d2ec06e296d1503a0e33cb845c831a4102740b84d600bc900324ec5293b9a977df0956bd02cd5adf9cc62989be860417e8014e97ead41967c
diff --git a/sci-astronomy/gasgano/gasgano-2.4.8-r2.ebuild b/sci-astronomy/gasgano/gasgano-2.4.8-r2.ebuild
new file mode 100644
index 000000000000..807881b273e4
--- /dev/null
+++ b/sci-astronomy/gasgano/gasgano-2.4.8-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop java-pkg-2
+
+PDOC=VLT-PRO-ESO-19000-1932-V4
+
+DESCRIPTION="ESO astronomical data file organizer"
+HOMEPAGE="https://www.eso.org/sci/software/gasgano.html"
+SRC_URI="ftp://ftp.eso.org/pub/dfs/${PN}/${P}.tar.gz
+ doc? ( https://www.eso.org/sci/software/gasgano/${PDOC}.pdf )"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+DEPEND=">=virtual/jdk-1.8:*"
+RDEPEND="
+ >=virtual/jre-1.8:*
+ dev-java/gnu-regexp:1
+ dev-java/jal:0
+ dev-java/junit:0
+"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ sed -i \
+ -e "s:^BASE=\`pwd\`:BASE=${EPREFIX}/usr/share/${PN}:" \
+ -e 's:$BASE/share/:$BASE/lib/:g' \
+ bin/gasgano || die
+}
+
+src_install() {
+ dobin bin/*
+ java-pkg_dojar share/*.jar
+ insinto /usr/share/${PN}
+ doins -r config
+ make_desktop_entry gasgano "Gasgano FITS Organizer"
+ use doc && newdoc "${DISTDIR}"/${PDOC}.pdf user-manual.pdf
+}
diff --git a/sci-astronomy/gasgano/metadata.xml b/sci-astronomy/gasgano/metadata.xml
new file mode 100644
index 000000000000..c5be8c0f3235
--- /dev/null
+++ b/sci-astronomy/gasgano/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Gasgano is a Data File Organiser developed and maintained by ESO to
+ help its user community to manage and organise in a systematic way the
+ astronomical data observed and produced by all VLT compliant
+ telescopes, i.e. by telescopes which are being operated through
+ Observation Blocks. The tool also supports FITS files which are not
+ generated by those telescopes but with a limited number of
+ functionalities.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/gnuastro/Manifest b/sci-astronomy/gnuastro/Manifest
new file mode 100644
index 000000000000..77e427454a58
--- /dev/null
+++ b/sci-astronomy/gnuastro/Manifest
@@ -0,0 +1 @@
+DIST gnuastro-0.16.tar.gz 6089988 BLAKE2B be85152e6638a3462cf00555748a6be8d8c9d30b7c43332f1a16140bd22af2d7e948e1e089045b51b22db1541645dc82668cf2cb8c73abf3b07418343f1c02d9 SHA512 8848528b1a117aaebed854db2e8e4586d3b3f860f25f07a1362b7cd1ffd4f0f7ef214fc0b91b3bfc4aaf1ba9c8bbeaf9dec82979665db1c6fe3703f39354a867
diff --git a/sci-astronomy/gnuastro/gnuastro-0.16-r1.ebuild b/sci-astronomy/gnuastro/gnuastro-0.16-r1.ebuild
new file mode 100644
index 000000000000..baee7f80a96b
--- /dev/null
+++ b/sci-astronomy/gnuastro/gnuastro-0.16-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="GNU Astronomy Utilities"
+HOMEPAGE="https://www.gnu.org/software/gnuastro"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/1"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="static-libs threads"
+
+# jpeg, pdf, and libgit2 are forced deps
+# because they are automagically detected.
+
+RDEPEND="
+ app-text/ghostscript-gpl
+ dev-libs/libgit2:=
+ media-libs/tiff:=
+ media-libs/libjpeg-turbo:=
+ net-misc/curl
+ sci-astronomy/wcslib:0=
+ sci-libs/cfitsio:0=
+ sci-libs/gsl:0=
+ virtual/zlib:=
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ sed -i -e 's/-O3//' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable threads)
+ )
+ econf ${myeconfargs[@]}
+}
+
+src_install() {
+ default
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}
diff --git a/sci-astronomy/gnuastro/metadata.xml b/sci-astronomy/gnuastro/metadata.xml
new file mode 100644
index 000000000000..b1db18c26a68
--- /dev/null
+++ b/sci-astronomy/gnuastro/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The GNU Astronomy Utilities (Gnuastro) is an official GNU package
+ consisting of various programs and library functions for the
+ manipulation and analysis of astronomical data. All the programs
+ share the same basic command-line user interface for the comfort
+ of both the users and developers. Gnuastro is written to comply
+ fully with the GNU coding standards so it integrates finely with
+ the GNU/Linux operating system. This also enables astronomers to
+ expect a fully familiar experience in the source code, building,
+ installing and command-line user interaction that they have seen
+ in all the other GNU software that they use.
+ </longdescription>
+ <upstream>
+ <remote-id type="savannah">gnuastro</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/idlastro/Manifest b/sci-astronomy/idlastro/Manifest
new file mode 100644
index 000000000000..478e0c9bf49d
--- /dev/null
+++ b/sci-astronomy/idlastro/Manifest
@@ -0,0 +1 @@
+DIST idlastro-20161220.tar.gz 1154282 BLAKE2B f0ce4aa5f7dc96366caf66b1f12ace98ed3681c2c498c53febd30dda3005a5907a0b8a12db894b9a8f37df0ec7a29cf288ef7b308fbbb49a716a43ca7735204c SHA512 d61a2c3c27e9cb676639c76741063e97802ea149043f563d00b682e92a710ffd3005bce838c29ff4f1f734a5d64298999e5890cf858ffee083c3085dec3a5636
diff --git a/sci-astronomy/idlastro/idlastro-20161220-r1.ebuild b/sci-astronomy/idlastro/idlastro-20161220-r1.ebuild
new file mode 100644
index 000000000000..ebdaa656932b
--- /dev/null
+++ b/sci-astronomy/idlastro/idlastro-20161220-r1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Astronomical user routines for IDL"
+HOMEPAGE="https://idlastro.gsfc.nasa.gov/"
+SRC_URI="https://idlastro.gsfc.nasa.gov/ftp/astron.tar.gz -> ${P}.tar.gz"
+S=${WORKDIR}
+
+LICENSE="BSD-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RDEPEND="dev-lang/gdl"
+
+src_install() {
+ insinto /usr/share/gnudatalanguage/${PN}
+ doins -r pro/*
+ dodoc *txt text/*
+}
diff --git a/sci-astronomy/idlastro/metadata.xml b/sci-astronomy/idlastro/metadata.xml
new file mode 100644
index 000000000000..8d1dbc5b6ea5
--- /dev/null
+++ b/sci-astronomy/idlastro/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The IDL Astronomy Users Library is a central repository for
+ low-level astronomy software written in the commercial language
+ IDL or GNU version of it (GDL). The Library is not meant to be an
+ integrated package, but rather is a collection of procedures from
+ which users can pick and choose (and possibly modify) for their own
+ use. Submitted procedures are given a cursory testing, but are
+ basically stored in the Library as submitted.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/kstars/Manifest b/sci-astronomy/kstars/Manifest
new file mode 100644
index 000000000000..d9083a2256a2
--- /dev/null
+++ b/sci-astronomy/kstars/Manifest
@@ -0,0 +1,2 @@
+DIST kstars-3.8.2.tar.xz 52049284 BLAKE2B a0d5bf5f48ba4664bc933162322dfcc55149c33da621ac31cd87e5160fd7bbd3b2b68c48526d82d018240fe6b881f891f1299399a3d54df335f43a79e71dac90 SHA512 81f468d779055f7a38b4d6e204f0e51663a845197d7ab31a2e7343c8885494398628da2627794082e107d4472a4370a9447956beaddbbbb7055fc67cb9bd56a3
+DIST kstars-3.8.3.tar.xz 52218240 BLAKE2B 21c0c810db8298868539119b368eae38855820254d5888380190f5e0d036eb08ed34fce64207cf5977850852585413d1c84994a8c75edf7c66c19c188fd3e160 SHA512 c42e544adcc8ebd5e64844c34a233cad0de7e982018a1e7c3529fa63c50602eeae345b69bbb21f0e7a4fb3b6c75cf74bcb3d3672618d83193c6c47e2f2dee300
diff --git a/sci-astronomy/kstars/files/kstars-3.8.1-cmake.patch b/sci-astronomy/kstars/files/kstars-3.8.1-cmake.patch
new file mode 100644
index 000000000000..ddafaa67cddc
--- /dev/null
+++ b/sci-astronomy/kstars/files/kstars-3.8.1-cmake.patch
@@ -0,0 +1,53 @@
+From 98c9e687ba0480cbec1df2b2a64817c0c08add7e Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 3 Dec 2024 19:46:01 +0100
+Subject: [PATCH] Thanks, but no thanks
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e2153462..dd2d64788 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -363,7 +363,7 @@ if (UNIX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+ endif()
+-endif(UNIX)
++endif()
+
+ # Optimize binary size by dropping unneeded symbols at linking stage
+ if (ANDROID)
+@@ -372,7 +372,7 @@ if (ANDROID)
+ endif ()
+
+ # Add security (hardening flags)
+-IF (UNIX OR APPLE OR ANDROID)
++IF (0)
+ SET(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -fstack-protector-all -Wcast-align -fPIE")
+ # This is ill-defined, but I searched for a solution for quite a long time to no avail
+ # - FORTIFY_SOURCE generates a warning when there is no code optimization, and warnings will become errors at some point
+@@ -405,7 +405,7 @@ ENDIF ()
+
+ SET(FIX_WARNINGS OFF CACHE BOOL "Enable strict compilation mode to turn compiler warnings to errors")
+ # Warning, debug and linker flags
+-IF (UNIX OR APPLE)
++IF (0)
+ SET(COMP_FLAGS "")
+ SET(LINKER_FLAGS "")
+ # Verbose warnings and turns all to errors
+@@ -469,7 +469,7 @@ ENDIF ()
+
+ # Sanitizer support
+ SET(SANITIZERS OFF CACHE BOOL "Sanitizer support for gcc and Clang")
+-IF (SANITIZERS AND
++IF (0 AND
+ ((UNIX AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR CMAKE_COMPILER_IS_GNUCXX) OR
+ (APPLE AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_COMPILER_IS_GNUCXX))))
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer")
+--
+2.53.0
+
diff --git a/sci-astronomy/kstars/kstars-3.8.2.ebuild b/sci-astronomy/kstars/kstars-3.8.2.ebuild
new file mode 100644
index 000000000000..f4e3d9c77838
--- /dev/null
+++ b/sci-astronomy/kstars/kstars-3.8.2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=6.9.0
+QTMIN=6.8.1
+inherit ecm kde.org optfeature xdg
+
+DESCRIPTION="Desktop Planetarium"
+HOMEPAGE="https://apps.kde.org/kstars/ https://kstars.kde.org/"
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+ KEYWORDS="amd64 ~x86"
+fi
+
+LICENSE="GPL-2+ GPL-3+"
+SLOT="0"
+IUSE="+password raw"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+# currently broken w/ KF6, https://invent.kde.org/education/kstars/-/issues/294
+RESTRICT="test"
+
+# https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes#Still_unpackaged
+# >=dev-qt/qtdatavis3d-${QTMIN}:6
+COMMON_DEPEND="
+ dev-cpp/eigen:=
+ >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,sql,widgets]
+ >=dev-qt/qtdeclarative-${QTMIN}:6
+ >=dev-qt/qtsvg-${QTMIN}:6
+ >=dev-qt/qtwebsockets-${QTMIN}:6
+ >=kde-frameworks/kconfig-${KFMIN}:6
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:6
+ >=kde-frameworks/kcoreaddons-${KFMIN}:6
+ >=kde-frameworks/kcrash-${KFMIN}:6
+ >=kde-frameworks/ki18n-${KFMIN}:6
+ >=kde-frameworks/kio-${KFMIN}:6
+ >=kde-frameworks/knewstuff-${KFMIN}:6
+ >=kde-frameworks/knotifications-${KFMIN}:6
+ >=kde-frameworks/knotifyconfig-${KFMIN}:6
+ >=kde-frameworks/kplotting-${KFMIN}:6
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+ >=kde-frameworks/kxmlgui-${KFMIN}:6
+ media-libs/opencv:=[ffmpeg]
+ sci-astronomy/wcslib:=
+ sci-libs/cfitsio:=
+ sci-libs/gsl:=
+ >=sci-libs/indilib-2.0.2
+ sci-libs/libnova:=
+ >=sci-libs/stellarsolver-2.7
+ virtual/zlib:=
+ password? ( >=dev-libs/qtkeychain-0.14.2:=[qt6(+)] )
+ raw? ( media-libs/libraw:= )
+"
+# TODO: what about virtual/opengl?
+DEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtbase-${QTMIN}:6[concurrent]
+ test? ( sci-astronomy/erfa )
+"
+RDEPEND="${COMMON_DEPEND}
+ !${CATEGORY}/${PN}:5
+ >=dev-qt/qt5compat-${QTMIN}:6[qml]
+ >=dev-qt/qtpositioning-${QTMIN}:6
+"
+
+CMAKE_SKIP_TESTS=(
+ # bug 842768, test declared unstable by upstream
+ TestKSPaths
+ # bugs 923871, 939788
+ TestPlaceholderPath # ki18n (KLocalizedString) failure
+ # all fail with offscreen plugin
+ TestEkos{Capture,FilterWheel,Focus,Mount,Scheduler{,Ops},Simulator}
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8.1-cmake.patch # bug 895892, downstream patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_PYKSTARS=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibXISF=ON # not packaged
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6DataVisualization=ON # not packaged
+ -DBUILD_WITH_QT6=ON # KF6 please
+ -DENABLE_SENTRY=OFF
+ $(cmake_use_find_package password Qt6Keychain)
+ $(cmake_use_find_package raw LibRaw)
+ )
+
+ ecm_src_configure
+}
+
+src_test() {
+ LC_NUMERIC="C" LC_TIME="C" TZ=UTC ecm_src_test
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "Display 'current' pictures of planets" x11-misc/xplanet
+ fi
+ xdg_pkg_postinst
+}
diff --git a/sci-astronomy/kstars/kstars-3.8.3.ebuild b/sci-astronomy/kstars/kstars-3.8.3.ebuild
new file mode 100644
index 000000000000..f6dc9d61e279
--- /dev/null
+++ b/sci-astronomy/kstars/kstars-3.8.3.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=6.9.0
+QTMIN=6.8.1
+inherit ecm kde.org optfeature xdg
+
+DESCRIPTION="Desktop Planetarium"
+HOMEPAGE="https://apps.kde.org/kstars/ https://kstars.kde.org/"
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2+ GPL-3+"
+SLOT="0"
+IUSE="+password raw"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+# currently broken w/ KF6, https://invent.kde.org/education/kstars/-/issues/294
+RESTRICT="test"
+
+# https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes#Still_unpackaged
+# >=dev-qt/qtdatavis3d-${QTMIN}:6
+COMMON_DEPEND="
+ dev-cpp/eigen:=
+ >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,sql,widgets]
+ >=dev-qt/qtdeclarative-${QTMIN}:6
+ >=dev-qt/qtsvg-${QTMIN}:6
+ >=dev-qt/qtwebsockets-${QTMIN}:6
+ >=kde-frameworks/kconfig-${KFMIN}:6
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:6
+ >=kde-frameworks/kcoreaddons-${KFMIN}:6
+ >=kde-frameworks/kcrash-${KFMIN}:6
+ >=kde-frameworks/ki18n-${KFMIN}:6
+ >=kde-frameworks/kio-${KFMIN}:6
+ >=kde-frameworks/knewstuff-${KFMIN}:6
+ >=kde-frameworks/knotifications-${KFMIN}:6
+ >=kde-frameworks/knotifyconfig-${KFMIN}:6
+ >=kde-frameworks/kplotting-${KFMIN}:6
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+ >=kde-frameworks/kxmlgui-${KFMIN}:6
+ media-libs/opencv:=[ffmpeg]
+ sci-astronomy/wcslib:=
+ sci-libs/cfitsio:=
+ sci-libs/gsl:=
+ >=sci-libs/indilib-2.0.2
+ sci-libs/libnova:=
+ >=sci-libs/stellarsolver-2.7
+ virtual/zlib:=
+ password? ( >=dev-libs/qtkeychain-0.14.2:=[qt6(+)] )
+ raw? ( media-libs/libraw:= )
+"
+# TODO: what about virtual/opengl?
+DEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtbase-${QTMIN}:6[concurrent]
+ test? ( sci-astronomy/erfa )
+"
+RDEPEND="${COMMON_DEPEND}
+ !${CATEGORY}/${PN}:5
+ >=dev-qt/qt5compat-${QTMIN}:6[qml]
+ >=dev-qt/qtpositioning-${QTMIN}:6
+"
+
+CMAKE_SKIP_TESTS=(
+ # bug 842768, test declared unstable by upstream
+ TestKSPaths
+ # bugs 923871, 939788
+ TestPlaceholderPath # ki18n (KLocalizedString) failure
+ # all fail with offscreen plugin
+ TestEkos{Capture,FilterWheel,Focus,Mount,Scheduler{,Ops},Simulator}
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8.1-cmake.patch # bug 895892, downstream patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_PYKSTARS=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibXISF=ON # not packaged
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6DataVisualization=ON # not packaged
+ -DBUILD_WITH_QT6=ON # KF6 please
+ -DENABLE_SENTRY=OFF
+ $(cmake_use_find_package password Qt6Keychain)
+ $(cmake_use_find_package raw LibRaw)
+ )
+
+ ecm_src_configure
+}
+
+src_test() {
+ LC_NUMERIC="C" LC_TIME="C" TZ=UTC ecm_src_test
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "Display 'current' pictures of planets" x11-misc/xplanet
+ fi
+ xdg_pkg_postinst
+}
diff --git a/sci-astronomy/kstars/metadata.xml b/sci-astronomy/kstars/metadata.xml
new file mode 100644
index 000000000000..7fa30344464e
--- /dev/null
+++ b/sci-astronomy/kstars/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://bugs.kde.org/enter_bug.cgi?product=kstars</bugs-to>
+ <remote-id type="kde-invent">education/kstars</remote-id>
+ </upstream>
+ <use>
+ <flag name="password">Store passwords securely via <pkg>dev-libs/qtkeychain</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-astronomy/metadata.xml b/sci-astronomy/metadata.xml
new file mode 100644
index 000000000000..609cf25af959
--- /dev/null
+++ b/sci-astronomy/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The sci-astronomy category contains software that can be used
+ in astronomical and related scientific environments.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie sci-astronomy enthält Software, die in astronomischen
+ und verwandten wissenschaftlichen Umfeldern genutzt wird.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría sci-astronomy contiene programas que pueden ser utilizados
+ en entornos relacionados con la astronomía.
+ </longdescription>
+ <longdescription lang="ja">
+ sci-astronomyカテゴリーには天文学の科学的な分野に利用される
+ ソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De sci-astronomy categorie bevat software, die in astronomische
+ en gerelateerde wetenschappelijke omgevingen wordt gebruikt.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm sci-astronomy chứa các phần mềm dùng trong thiên văn
+ và liên quan đến khoa học.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria sci-astronomy contiene programmi per l'astronomia.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria sci-astronomy contém programas que podem ser usados
+ em ambientes relacionados a astronomia.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria sci-astronomy zawiera programy naukowe związane z astronomią.
+ </longdescription>
+</catmetadata>
diff --git a/sci-astronomy/missfits/Manifest b/sci-astronomy/missfits/Manifest
new file mode 100644
index 000000000000..30bf6b078ead
--- /dev/null
+++ b/sci-astronomy/missfits/Manifest
@@ -0,0 +1 @@
+DIST missfits-2.8.0.tar.gz 428404 BLAKE2B 6d4f2ce1a3b36a487c84a13ea64dd5ab07f359ff31efdaa129455aae8a76eb37973f65bca5d4abf0675865016b6ceb86e904d5cc51d4e48b4be9332d86b66036 SHA512 32727f5eb30573a1cedacb8900e2536867e4815059eee32e64e3db65be9291b8a91b9f45b2c9f3cf6fc2a8cc448012ea3d502bdd9dee516008e17d5086aee795
diff --git a/sci-astronomy/missfits/files/missfits-2.8.0-fno-common.patch b/sci-astronomy/missfits/files/missfits-2.8.0-fno-common.patch
new file mode 100644
index 000000000000..0c7e042376b7
--- /dev/null
+++ b/sci-astronomy/missfits/files/missfits-2.8.0-fno-common.patch
@@ -0,0 +1,65 @@
+--- a/src/file.c
++++ b/src/file.c
+@@ -45,6 +45,8 @@
+ #include "prefs.h"
+ #include "xml.h"
+
++char gstr[MAXCHAR];
++
+ /****** load_fitsfiles *******************************************************
+ PROTO catstruct **load_fitsfiles(char *name, int *ncat, int * outcat,
+ filenum *filetype, int *headflag)
+--- a/src/fits/fitscat.h
++++ b/src/fits/fitscat.h
+@@ -333,6 +333,6 @@
+ warning(char *msg1, char *msg2);
+
+
+-int bswapflag;
++extern int bswapflag;
+
+ #endif
+--- a/src/fits/fitscheck.c
++++ b/src/fits/fitscheck.c
+@@ -38,6 +38,8 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++int bswapflag;
++
+ #define ENCODE_OFFSET 0x30
+ unsigned int exclude[13] = {0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
+ 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60};
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -30,7 +30,7 @@
+ #include "types.h"
+
+ /*----------------------- miscellaneous variables ---------------------------*/
+-char gstr[MAXCHAR];
++extern char gstr[MAXCHAR];
+
+ /*------------------------------- functions ---------------------------------*/
+ extern void makeit(void),
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -50,6 +50,8 @@
+ #include "prefs.h"
+ #include "preflist.h"
+
++prefstruct prefs;
++
+ /********************************* dumpprefs ********************************/
+ /*
+ Print the default preference parameters.
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -84,7 +84,7 @@
+ double time_diff; /* Execution time */
+ } prefstruct;
+
+-prefstruct prefs;
++extern prefstruct prefs;
+
+ /*----------------------------- Internal constants --------------------------*/
+
diff --git a/sci-astronomy/missfits/files/missfits-2.8.0-run-AM_PROG_AR.patch b/sci-astronomy/missfits/files/missfits-2.8.0-run-AM_PROG_AR.patch
new file mode 100644
index 000000000000..33166519fc6d
--- /dev/null
+++ b/sci-astronomy/missfits/files/missfits-2.8.0-run-AM_PROG_AR.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,6 +78,7 @@
+ ACX_PROG_CC_OPTIM
+ fi
+
++AM_PROG_AR
+ AC_PROG_RANLIB
+ AC_PROG_INSTALL
+
diff --git a/sci-astronomy/missfits/metadata.xml b/sci-astronomy/missfits/metadata.xml
new file mode 100644
index 000000000000..0230107296d2
--- /dev/null
+++ b/sci-astronomy/missfits/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ MissFITS is a program that performs basic maintenance and packaging
+ tasks on FITS files using an optimised FITS library. MissFITS can:
+ * add/edit/remove FITS header keywords
+ * split/join Multi-Extension-FITS (MEF) files
+ * unpile/pile FITS data-cubes
+ * create/check/update FITS checksums, using R. Seaman’s protocol.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/missfits/missfits-2.8.0.ebuild b/sci-astronomy/missfits/missfits-2.8.0.ebuild
new file mode 100644
index 000000000000..9dd38b78ce32
--- /dev/null
+++ b/sci-astronomy/missfits/missfits-2.8.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Performs basic maintenance and packaging tasks on FITS files"
+HOMEPAGE="http://www.astromatic.net/software/missfits/"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-run-AM_PROG_AR.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc -r doc/.
+}
diff --git a/sci-astronomy/montage/Manifest b/sci-astronomy/montage/Manifest
new file mode 100644
index 000000000000..eff678bf36bf
--- /dev/null
+++ b/sci-astronomy/montage/Manifest
@@ -0,0 +1 @@
+DIST montage-6.1.tar.gz 45025917 BLAKE2B cae563e0a90bf4be4682964f817c885927ad75771266ad1acc4fd891c4cc56572e7552cfac0fa34b5f8071003ead8b94cf57824b5f872ae9edf3c2b5a5e39836 SHA512 063e7701f2e93031d21896addbb5e2de86e71d41a13241987432fd25ae98bfb1cf18b5d955dcaacf5672d58996a8f4aae1b19ca5d5587c7f0ae0daf0d7bed862
diff --git a/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch b/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch
new file mode 100644
index 000000000000..3bb2598465e2
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch
@@ -0,0 +1,30 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 20 Dec 2024 08:17:51 +0100
+Subject: Add dependency for Montagelib::lib target
+
+---
+ MontageLib/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/MontageLib/Makefile b/MontageLib/Makefile
+index f37df2d..9d41a23 100644
+--- a/MontageLib/Makefile
++++ b/MontageLib/Makefile
+@@ -49,7 +49,7 @@ pgm:
+ (cd FitExec && $(MAKE) && $(MAKE) install)
+ (cd ProjExec && $(MAKE) && $(MAKE) install)
+
+-lib:
++lib: pgm
+ rm -f libmontage.a libmontage.so libmontagepy.so
+ ar q libmontage.a \
+ util/checkFile.o util/checkHdr.o util/checkWCS.o \
+@@ -136,7 +136,7 @@ lib:
+ DiffFitExec/montageDiffFitExec.o \
+ ProjExec/montageProjExec.o
+
+-pythonlibs:
++pythonlibs: pgm
+ rm -f ../python/MontagePy/lib/*.o
+ mkdir -p ../python/MontagePy/lib
+ cp util/checkFile.o util/checkHdr.o util/checkWCS.o \
diff --git a/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch b/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch
new file mode 100644
index 000000000000..8058a70588e9
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch
@@ -0,0 +1,21 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Tue, 19 Mar 2024 11:28:54 +0100
+Subject: Include string.h in mPresentation.c to declare strcpy()
+
+Closes: #1066317
+---
+ grid/Pegasus/mPresentation.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/grid/Pegasus/mPresentation.c b/grid/Pegasus/mPresentation.c
+index 72da6be..e059e65 100644
+--- a/grid/Pegasus/mPresentation.c
++++ b/grid/Pegasus/mPresentation.c
+@@ -14,6 +14,7 @@ Version Developer Date Change
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <strings.h>
++#include <string.h>
+
+ #define MAXLEN 20000
+
diff --git a/sci-astronomy/montage/files/montage-6.1-prototypes.patch b/sci-astronomy/montage/files/montage-6.1-prototypes.patch
new file mode 100644
index 000000000000..5f77f9077b2c
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-prototypes.patch
@@ -0,0 +1,283 @@
+https://github.com/Caltech-IPAC/Montage/pull/85
+--- /dev/null
++++ b/Montage/filePath.h
+@@ -0,0 +1,3 @@
++#pragma once
++
++char *filePath(char *path, char *fname);
+--- a/MontageLib/ArchiveExec/montageArchiveExec.c
++++ b/MontageLib/ArchiveExec/montageArchiveExec.c
+@@ -17,7 +17,6 @@ extern int optind, opterr;
+
+ extern int getopt(int argc, char *const *argv, const char *options);
+
+-char *svc_value();
+
+
+ /*-*****************************************************************/
+--- a/grid/Globus/ExecTG/mExecTG.c
++++ b/grid/Globus/ExecTG/mExecTG.c
+@@ -42,7 +42,6 @@ int debugCheck (char *debugStr);
+ char *mktemp (char *template);
+ int strncasecmp(const char *s1, const char *s2, size_t n);
+ char *url_encode ();
+-char *svc_value ();
+
+ static time_t currtime, start;
+
+--- a/grid/Pegasus/mConcatFit.c
++++ b/grid/Pegasus/mConcatFit.c
+@@ -29,8 +29,6 @@ extern int optind, opterr;
+
+ extern int getopt(int argc, char *const *argv, const char *options);
+
+-char *svc_val();
+-
+ int checkFile(char *filename);
+
+ int debug;
+--- a/grid/Pegasus/mDAG.c
++++ b/grid/Pegasus/mDAG.c
+@@ -31,8 +31,6 @@ Version Developer Date Change
+
+ #define MAXSTR 1024
+
+-char *svc_value();
+-
+ int readTemplate(char *template);
+ int printError (char *msg);
+ int stradd (char *header, char *card);
+--- a/grid/Pegasus/mDAGGalacticPlane.c
++++ b/grid/Pegasus/mDAGGalacticPlane.c
+@@ -30,8 +30,6 @@ Version Developer Date Change
+
+ #define MAXSTR 1024
+
+-char *svc_value();
+-
+ int readTemplate(char *template);
+ int printError (char *msg);
+ int stradd (char *header, char *card);
+--- a/grid/Pegasus/mDiffFit.c
++++ b/grid/Pegasus/mDiffFit.c
+@@ -20,6 +20,7 @@ Version Developer Date Change
+ #include <sys/stat.h>
+
+ #include <svc.h>
++#include "filePath.h"
+
+ #include "montage.h"
+
+@@ -34,9 +35,6 @@ char cmd [MAXSTR];
+ char msg [MAXSTR];
+ char status [MAXSTR];
+
+-char *svc_value();
+-char *filePath ();
+-
+ extern char *optarg;
+ extern int optind, opterr;
+
+--- a/lib/src/coord/ccalc.c
++++ b/lib/src/coord/ccalc.c
+@@ -15,7 +15,10 @@
+ #define DD2AS(d) (d * 3600.)
+ #define AS2DD(a) (a / 3600.)
+
+-extern void convertCoordinates();
++void
++convertCoordinates(int insys, double inepoch, double inlon, double inlat,
++ int outsys, double outepoch, double *outlon, double *outlat,
++ double obstime);
+
+ static int ExtractEpochInfo(char *from_sys, char *from_epoch, char *to_sys,
+ char *to_epoch, int *jsysin, double *eqx1,
+--- a/lib/src/coord/computeFKCorrections.c
++++ b/lib/src/coord/computeFKCorrections.c
+@@ -14,6 +14,13 @@ static double dad[181], dpmad[181], dd[181], dpmdd[181],
+
+ void initializeFK5CorrectionData();
+ void loadFK5Constants();
++static double interpolateLinear(double y1, double y2,
++ double x1, double x2, double x0);
++static double interpolateBilinear(double za1d1, double za2d1,
++ double za1d2, double za2d2,
++ double a1, double a2,
++ double d1, double d2,
++ double a, double d);
+
+
+ /****************************************************************************/
+@@ -50,8 +57,6 @@ besselianToJulianFKCorrection(double ain, double d, double dmag, double epoch,
+ int loc, loc1, loc2, locx1, locx2;
+ int n1, n3;
+
+- double interpolateLinear(), interpolateBilinear();
+-
+ double dec1, dec2, dtest, fkpdec= 89.999;
+ double xmag1, xmag2, a;
+ double delepk, delras, deldas, delpma, delpmd, dcosd;
+--- a/lib/src/coord/convertBesselianJulian.c
++++ b/lib/src/coord/convertBesselianJulian.c
+@@ -4,13 +4,15 @@
+
+ extern int japply;
+
+-void correctCoordinateRange();
+-void getEquETermCorrection();
+-void getEclETermCorrection();
+-void refinedEquETermCorrection();
+-void refinedEclETermCorrection();
+-void correctForEquatorialETerms();
+-void correctForEclipticETerms();
++void correctCoordinateRange(double *ra, double *dec);
++void getEquETermCorrection(double ra, double dec, double *dra, double *ddec);
++void getEclETermCorrection(double epoch, double elon, double elat,
++ double *dra, double *ddec);
++void refinedEquETermCorrection(double ra, double dec, double *dra, double *ddec);
++void refinedEclETermCorrection(double obsdatej, double elon, double elat,
++ double *delon, double *delat);
++void correctForEquatorialETerms(double date, double *ra, double *dec);
++void correctForEclipticETerms(double date, double *ra, double *dec);
+
+
+
+--- a/lib/src/coord/convertEclEqu.c
++++ b/lib/src/coord/convertEclEqu.c
+@@ -2,7 +2,7 @@
+ #include <math.h>
+ #include <coord.h>
+
+-double computeEquPole();
++double computeEquPole(double date, int besselian);
+
+
+
+--- a/lib/src/coord/coord.h
++++ b/lib/src/coord/coord.h
+@@ -94,31 +94,57 @@ typedef enum {A = 0 , /* 0 */
+
+ /* Prototypes of callable functions */
+
+-void convertCoordinates();
+-void convertEclToEqu();
+-void convertEquToEcl();
+-void convertEquToGal();
+-void convertGalToEqu();
+-void convertGalToSgal();
+-void convertSgalToGal();
+-
+-void convertBesselianToJulian();
+-void convertJulianToBesselian();
+-void precessBesselian();
+-void precessBesselianWithProperMotion();
+-void precessJulian();
+-void precessJulianWithProperMotion();
+-void julianToBesselianFKCorrection();
+-void besselianToJulianFKCorrection();
+-
+-int ccalc();
+-int degreeToDMS();
+-int degreeToHMS();
+-int degreeToSex();
+-int sexToDegree();
+-int parseCoordinateString();
+-
+-double roundValue();
++void
++convertCoordinates(int insys, double inepoch, double inlon, double inlat,
++ int outsys, double outepoch, double *outlon, double *outlat,
++ double obstime);
++void convertEclToEqu(double elon, double elat, double *ra, double *dec,
++ double date, int besselian);
++void convertEquToEcl(double ra, double dec, double *elon, double *elat,
++ double date, int besselian);
++void convertEquToGal(double ra, double dec, double *glon, double *glat);
++void convertGalToEqu(double glon, double glat, double *ra, double *dec);
++void convertGalToSgal(double glon, double glat, double *sglon, double *sglat);
++void convertSgalToGal(double sglon, double sglat, double *glon, double *glat);
++
++void convertBesselianToJulian(double equinoxin, double ra, double dec,
++ double obsdatein, int ieflg,
++ double *raout, double *decout);
++void convertJulianToBesselian(double ra, double dec,
++ double obsdatein, int ieflg, double equinoxout,
++ double *raout, double *decout);
++void precessBesselian(double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout);
++void precessBesselianWithProperMotion
++ (double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout,
++ double pmain, double pmdin, double pin, double vin,
++ double *rapm, double *decpm);
++void precessJulian(double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout);
++void precessJulianWithProperMotion
++ (double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout,
++ double pmain, double pmdin, double pin, double vin,
++ double *rapm, double *decpm);
++void
++julianToBesselianFKCorrection(double ra, double dec, double xmag, double tobs,
++ double *corra, double *corrd, double *corrpa,
++ double *corrpd);
++void
++besselianToJulianFKCorrection(double ain, double d, double dmag, double epoch,
++ double *corra, double *corrd, double *corrpa,
++ double *corrpd);
++
++int ccalc(struct COORD *from, struct COORD *to, char *longprec, char *latprec);
++int degreeToDMS(double deg, int prec, int *neg, int *d, int *m, double *s);
++int degreeToHMS(double deg, int prec, int *neg, int *h, int *m, double *s);
++int degreeToSex(double lon, double lat, char *lonstr, char *latstr);
++int sexToDegree(char *cra, char *cdec, double *ra, double *dec);
++int parseCoordinateString(char *cmd, char *lonstr, char *latstr,
++ char *csys, char *cfmt, char *epoch);
++
++double roundValue(double value, int precision);
+
+
+ #define ISIS_COORD_LIB
+--- a/lib/src/coord/sexToDecimalDegree.c
++++ b/lib/src/coord/sexToDecimalDegree.c
+@@ -7,7 +7,7 @@
+ #define FALSE 0
+ #define TRUE !FALSE
+
+-void getSubstrings();
++void getSubstrings(char *string, char **subst, int *nsub);
+ int checkFormat(char *);
+
+
+--- a/lib/src/svc/svc.h
++++ b/lib/src/svc/svc.h
+@@ -47,7 +47,7 @@ int svc_command(int svc, char *cmdstr);
+ char *svc_value(char *ref);
+ int svc_getargs (char *cmd, char **cmdv);
+ void svc_sigset();
+-void svc_sighandler();
++void svc_sighandler(int sig);
+ SVC *svc_struct(char *instr);
+ char *svc_stripblanks(char *ptr, int len, int quotes);
+ int svc_free(SVC *svc);
+--- a/util/Exec/mExec.c
++++ b/util/Exec/mExec.c
+@@ -33,6 +33,8 @@ Version Developer Date Change
+ #include <math.h>
+ #include <time.h>
+
++#include "filePath.h"
++
+ #define MAXLEN 4096
+ #define BUFSIZE 32769
+ #define MAXHDR 80000
+@@ -51,9 +53,7 @@ char *mktemp (char *template);
+ int debugCheck (char *debugStr);
+
+ char *url_encode ();
+-char *svc_value ();
+ char *keyword_value();
+-char *filePath ();
+ int printerr (char *str);
+ int stradd (char *header, char *card);
+ int FITSerror (char *fname, int status);
diff --git a/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch b/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch
new file mode 100644
index 000000000000..c6120ce65343
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch
@@ -0,0 +1,22 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 20 Dec 2024 08:10:53 +0100
+Subject: Fix argument of tcol in mExec.c
+
+Closes: #1089268
+---
+ util/Exec/mExec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util/Exec/mExec.c b/util/Exec/mExec.c
+index 67cb9b1..1f4ca0d 100644
+--- a/util/Exec/mExec.c
++++ b/util/Exec/mExec.c
+@@ -2409,7 +2409,7 @@ int main(int argc, char **argv, char **envp)
+
+ ncols = topen("pimages.tbl");
+
+- icntr = tcol('cntr');
++ icntr = tcol("cntr");
+
+ if(icntr < 0)
+ {
diff --git a/sci-astronomy/montage/metadata.xml b/sci-astronomy/montage/metadata.xml
new file mode 100644
index 000000000000..833e9465ca4b
--- /dev/null
+++ b/sci-astronomy/montage/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ Montage is a toolkit for assembling astronomical images into custom mosaics.
+ It uses algorithms that preserve the calibration and positional (astrometric)
+ fidelity of the input images to deliver mosaics that meet user-specified
+ parameters of projection, coordinates, and spatial scale. It supports all
+ projections and coordinate systems in use in astronomy.
+ It contains independent modules for analyzing the geometry of images on the
+ sky, and for creating and managing mosaics; these modules are powerful tools
+ in their own right and have applicability outside mosaic production, in areas
+ such as data validation.
+</longdescription>
+ <upstream>
+ <remote-id type="github">Caltech-IPAC/Montage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/montage/montage-6.1.ebuild b/sci-astronomy/montage/montage-6.1.ebuild
new file mode 100644
index 000000000000..0fd15af04341
--- /dev/null
+++ b/sci-astronomy/montage/montage-6.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Toolkit for assembling FITS images into mosaics"
+HOMEPAGE="http://montage.ipac.caltech.edu/"
+SRC_URI="https://github.com/Caltech-IPAC/Montage/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/Montage-${PV}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ app-arch/bzip2:=
+ media-libs/freetype:2
+ sci-astronomy/wcstools
+ sci-libs/cfitsio:0=
+ media-libs/libjpeg-turbo:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.1-prototypes.patch
+ "${FILESDIR}"/${PN}-6.1-tcol-cntr.patch
+ "${FILESDIR}"/${PN}-6.1-presentation-strcpy.patch
+ "${FILESDIR}"/${PN}-6.1-montagelib-dep.patch
+)
+
+src_prepare() {
+ default
+
+ sed -e '/cfitsio/d' \
+ -e '/wcssubs/d' \
+ -e '/jpeg/d' \
+ -e '/freetype/d' \
+ -e '/bzip2/d' \
+ -i lib/src/Makefile MontageLib/Makefile || die
+
+ tc-export CC AR
+
+ # bug #708396
+ append-cflags -fcommon
+
+ find . -type f -name Makefile\* -execdir sed -i \
+ -e "/^CC.*=/s#\(gcc\|cc\)#$(tc-getCC)#g" \
+ -e "/^CFLAGS.*=/s#-g#${CFLAGS} $($(tc-getPKG_CONFIG) --cflags wcstools)#g" \
+ -e "s#-I../../lib/freetype/include #$($(tc-getPKG_CONFIG) --cflags freetype2)#g" \
+ -e 's#$(CC) -o#$(CC) $(LDFLAGS) -o#g' \
+ -e 's#$(CC) -g -o#$(CC) $(LDFLAGS) -o#g' \
+ -e "s#-lwcs#$($(tc-getPKG_CONFIG) --libs wcstools)#g" \
+ -e "s#-lcfitsio#$($(tc-getPKG_CONFIG) --libs cfitsio)#g" \
+ -e 's#-lnsl##g' \
+ -e "s#\tar #\t$(tc-getAR) #g" \
+ -e "s#ranlib #$(tc-getRANLIB) #g" \
+ -e "s#\tgcc -shared#\t$(tc-getCC) \$(LDFLAGS) -shared#g" \
+ -e "s#\tgcc -std=gnu99 -o#\t$(tc-getCC) \$(LDFLAGS) -o#g" \
+ -e "s#\tgcc -std=gnu99 -g -O2#\t$(tc-getCC) \$(CFLAGS)#g" \
+ '{}' + || die
+}
+
+src_install() {
+ dobin bin/*
+ dodoc README* ChangeHistory
+ use doc && dodoc -r man/*
+}
diff --git a/sci-astronomy/pal/Manifest b/sci-astronomy/pal/Manifest
new file mode 100644
index 000000000000..ffe142aee0a2
--- /dev/null
+++ b/sci-astronomy/pal/Manifest
@@ -0,0 +1 @@
+DIST pal-0.9.8.tar.gz 1267834 BLAKE2B 0f1735b564881785ddcfab5c73480905b47c7e7a1d2b9183069f5a620584cf552df9ecccac111b33f46d59a696a40762a0c95698a153a293636071a219ca39fb SHA512 659ca2f97ac58558a638b400f83773af39002785ae3734a195ff8bfbc968af76a6c2ec5ab2dfcb7b81908391c55f31c7d4a4172705bd5fab306ef2233587e2d3
diff --git a/sci-astronomy/pal/files/pal-0.9.8-fix-strlcpy-musl.patch b/sci-astronomy/pal/files/pal-0.9.8-fix-strlcpy-musl.patch
new file mode 100644
index 000000000000..7ceef8e4b52e
--- /dev/null
+++ b/sci-astronomy/pal/files/pal-0.9.8-fix-strlcpy-musl.patch
@@ -0,0 +1,14 @@
+Bug: https://bugs.gentoo.org/898106
+bsd/string.h is available on most libc's
+--- a/palDfltin.c
++++ b/palDfltin.c
+@@ -121,6 +121,9 @@ static int ISBLANK( int c ) {
+
+ #ifdef HAVE_BSD_STRING_H
+ #include <bsd/string.h>
++#else
++#define _GNU_SOURCE
++#define __USE_MISC
+ #endif
+
+ /* System include files */
diff --git a/sci-astronomy/pal/metadata.xml b/sci-astronomy/pal/metadata.xml
new file mode 100644
index 000000000000..f19392bee077
--- /dev/null
+++ b/sci-astronomy/pal/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Positional Astronomy Library is a collection of code designed
+ to aid in replacing the SLA library with code from NOVAS and
+ ERFA. Where possible the API is similar to the C SLA API except
+ for the use of a "pal" prefix.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">Starlink/pal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/pal/pal-0.9.8-r1.ebuild b/sci-astronomy/pal/pal-0.9.8-r1.ebuild
new file mode 100644
index 000000000000..530faefbe18a
--- /dev/null
+++ b/sci-astronomy/pal/pal-0.9.8-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Positional Astronomy Library"
+HOMEPAGE="https://github.com/Starlink/pal"
+SRC_URI="https://github.com/Starlink/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+RDEPEND="sci-astronomy/erfa:="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.8-fix-strlcpy-musl.patch
+)
+
+src_configure() {
+ econf --without-starlink \
+ --without-stardocs \
+ --with-erfa \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # remove cruft from non-fhs compliant
+ dodoc -r "${ED}"/usr/{docs,manifests,news}
+ rm -r "${ED}"/usr/{docs,manifests,news} || die
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}
diff --git a/sci-astronomy/pal/pal-0.9.8.ebuild b/sci-astronomy/pal/pal-0.9.8.ebuild
new file mode 100644
index 000000000000..2fe78f3e9637
--- /dev/null
+++ b/sci-astronomy/pal/pal-0.9.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Positional Astronomy Library"
+HOMEPAGE="https://github.com/Starlink/pal"
+SRC_URI="https://github.com/Starlink/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+RDEPEND="sci-astronomy/erfa:="
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf --without-starlink \
+ --without-stardocs \
+ --with-erfa \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # remove cruft from non-fhs compliant
+ dodoc -r "${ED}"/usr/{docs,manifests,news}
+ rm -r "${ED}"/usr/{docs,manifests,news} || die
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}
diff --git a/sci-astronomy/psfex/Manifest b/sci-astronomy/psfex/Manifest
new file mode 100644
index 000000000000..5124443b4043
--- /dev/null
+++ b/sci-astronomy/psfex/Manifest
@@ -0,0 +1 @@
+DIST psfex-3.17.1.tar.gz 2366370 BLAKE2B e73ddb526b93b60baceb9edf0e1a88dc335e55490f43d3e148cf6f0eb25ae192b54abd207fab96534cf4d596c340f824d8d8afdbc7530c7037132383f1f3093e SHA512 eb562372dd75593a111c23698b0c00ce050547051803a741ac771ca346d13a0de1e478b055581619a9fa2bf6fa374915ca685cfcf1c4162271b6aa44303e6e58
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch b/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch
new file mode 100644
index 000000000000..1b6565089849
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch
@@ -0,0 +1,55 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Use mmap only if it exists.
+--- a/src/fits/fitsbody.c
++++ b/src/fits/fitsbody.c
+@@ -64,9 +64,12 @@
+ ***/
+ PIXTYPE *alloc_body(tabstruct *tab, void (*func)(PIXTYPE *ptr, int npix))
+ {
++#ifdef HAVE_MMAP
+ FILE *file;
+ PIXTYPE *buffer;
+- size_t npix, size, sizeleft, spoonful;
++ size_t sizeleft, spoonful;
++#endif
++ size_t npix, size;
+
+ if (!body_ramflag)
+ {
+@@ -87,7 +90,9 @@
+ /* Decide if the data will go in physical memory or on swap-space */
+ npix = tab->tabsize/tab->bytepix;
+ size = npix*sizeof(PIXTYPE);
++#if !HAVE_MMAP
+ if (size < body_ramleft)
++#endif
+ {
+ /*-- There should be enough RAM left: try to do a malloc() */
+ if ((tab->bodybuf = malloc(size)))
+@@ -105,6 +110,7 @@
+ tab->bodybuf = NULL;
+ }
+
++#if HAVE_MMAP
+ if (size < body_vramleft)
+ {
+ /*-- Convert and copy the data to a swap file, and mmap() it */
+@@ -144,6 +150,7 @@
+ return NULL;
+ return (PIXTYPE *)tab->bodybuf;
+ }
++#endif
+
+ /* If no memory left at all: forget it! */
+ return NULL;
+@@ -270,8 +277,10 @@
+ size = (tab->tabsize/tab->bytepix)*sizeof(PIXTYPE);
+ if (tab->swapflag)
+ {
++#if HAVE_MMAP
+ if (munmap(tab->bodybuf, size))
+ warning("Can't unmap ", tab->cat->filename);
++#endif
+ tab->swapflag = 0;
+ tab->bodybuf = NULL;
+ body_vramleft += size;
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch b/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch
new file mode 100644
index 000000000000..4dd5805a9367
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch
@@ -0,0 +1,221 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Replace deprecated plwid() calls by plwidth().
+--- a/src/cplot.c
++++ b/src/cplot.c
+@@ -527,7 +527,7 @@
+
+ /* Draw meridians */
+ plschr(0.0, 0.33);
+- plwid(0);
++ plwidth(0.0);
+ pllsty(2);
+ xmd = xmu = xdo = -0.5;
+ ymd = ymu = ydo = -0.5;
+@@ -709,14 +709,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: FWHM map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -830,7 +830,7 @@
+ plFree2dGrid(fwhm, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -941,14 +941,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: ellipticity map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1062,7 +1062,7 @@
+ plFree2dGrid(ellip, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1159,14 +1159,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: map of Moffat fit residuals", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1278,7 +1278,7 @@
+ plFree2dGrid(resi, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1378,14 +1378,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: PSF asymmetry map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1497,7 +1497,7 @@
+ plFree2dGrid(resi, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1592,14 +1592,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: source count map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1666,7 +1666,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1751,14 +1751,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: source count fraction map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1826,7 +1826,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1911,14 +1911,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: #gx#u2#d/d.o.f. map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1985,7 +1985,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -2070,14 +2070,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: map of residuals", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -2144,7 +2144,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch b/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch
new file mode 100644
index 000000000000..2796f63884e3
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch
@@ -0,0 +1,26 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Handle the "sigbus" case only if it exists
+--- a/src/fits/fitscleanup.c
++++ b/src/fits/fitscleanup.c
+@@ -164,7 +164,9 @@
+ /* Catch CTRL-Cs */
+ signal(SIGINT, signal_function);
+ /* Catch bus errors */
++#ifdef SIGBUS // TODO: what if it is an enum?
+ signal(SIGBUS, signal_function);
++#endif
+ /* Catch segmentation faults */
+ signal(SIGSEGV, signal_function);
+ /* Catch floating exceptions */
+@@ -195,9 +197,11 @@
+ case SIGINT:
+ fprintf(stderr, "^C\n");
+ exit(-1);
++#ifdef SIGBUS
+ case SIGBUS:
+ fprintf(stderr, "bus error\n");
+ exit(-1);
++#endif
+ case SIGSEGV:
+ fprintf(stderr, "segmentation fault\n");
+ exit(-1);
diff --git a/sci-astronomy/psfex/metadata.xml b/sci-astronomy/psfex/metadata.xml
new file mode 100644
index 000000000000..2d44946b2650
--- /dev/null
+++ b/sci-astronomy/psfex/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ PSFEx (“PSF Extractor”) extracts models of the Point Spread
+ Function (PSF) from FITS images processed with <pkg>sci-astronomy/sextractor</pkg>, and
+ measures the quality of images. The generated PSF models can be used
+ for model-fitting photometry or morphological analyses.
+</longdescription>
+<use>
+ <flag name="plplot">Build with <pkg>sci-libs/plplot</pkg> to allow diagnostic plots during processing</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-astronomy/psfex/psfex-3.17.1.ebuild b/sci-astronomy/psfex/psfex-3.17.1.ebuild
new file mode 100644
index 000000000000..a94250461846
--- /dev/null
+++ b/sci-astronomy/psfex/psfex-3.17.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Extracts models of the Point Spread Function from FITS images"
+HOMEPAGE="http://www.astromatic.net/software/psfex"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="doc threads plplot"
+
+BDEPEND="virtual/pkgconfig"
+RDEPEND="
+ sci-libs/atlas:0[lapack,threads=]
+ sci-libs/fftw:3.0
+ plplot? ( sci-libs/plplot:= )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-have-mmap.patch"
+ "${FILESDIR}/${P}-plplot510.patch"
+ "${FILESDIR}/${P}-sigbus.patch"
+)
+
+src_prepare() {
+ default
+
+ local mycblas=atlcblas myclapack=atlclapack
+
+ if use threads; then
+ [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
+ mycblas=ptcblas
+ [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] &&
+ myclapack=ptclapack
+ fi
+
+ # fix the configure and not the acx_atlas.m4. the eautoreconf will
+ # produce a configure giving a wrong install Makefile target (to fix)
+ sed -e "s/-lcblas/-l${mycblas}/g" \
+ -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
+ -e "s/-llapack/-l${myclapack}/g" \
+ -e "s/\(lapack_lib=\).*/\1${myclapack}/g" \
+ -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
+ -i acx_atlas.m4 || die
+
+ # fix for newer plplot
+ sed -e 's/plplotd/plplot/g' -i acx_plplot.m4 || die
+ eautoreconf
+}
+
+src_configure() {
+ # bug #724588
+ append-cflags "-fcommon"
+
+ econf \
+ --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
+ $(use_enable plplot) \
+ $(use_enable threads)
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/*
+}
diff --git a/sci-astronomy/pyephem/Manifest b/sci-astronomy/pyephem/Manifest
new file mode 100644
index 000000000000..f65728809cf9
--- /dev/null
+++ b/sci-astronomy/pyephem/Manifest
@@ -0,0 +1,2 @@
+DIST pyephem-4.1.5.gh.tar.gz 2662791 BLAKE2B a30d3103b0d626e0316e85d1188dc2e93782fd87db6792dd6933fd9efb1b3fd7be7073486ec45c96e068b7bf9e471bf369a5867af87df5b5d50e16fc1f1a0e4c SHA512 f462df23060abacc69698e67526503302306953891c92920f77bc67d977a9691ed0d176d2743fa2c7c95cb3ff558f5e4a77fa6acff82cff243b771ed7ad095c9
+DIST pyephem-4.2.1.gh.tar.gz 2668251 BLAKE2B f81294d50ec81ea4006513982655012a2e891c269be0713555006a6be79b58b7c6c027fd6e9d8ea4737568670c8b40f2a17a9315f21d064736b1ee1cf365e97c SHA512 3de83947475279d03256000eb8d604c04dcad28de4e5bba5268bc0073a96b1ccde16701792fbd923477070258d9bec305d1a68e5233ab6de5b90aa8641e95f47
diff --git a/sci-astronomy/pyephem/metadata.xml b/sci-astronomy/pyephem/metadata.xml
new file mode 100644
index 000000000000..bde9628b61e6
--- /dev/null
+++ b/sci-astronomy/pyephem/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ PyEphem provides astronomical computations for the Python programming
+ language. Given a date and location on the Earth's surface, it can
+ compute the positions of the Sun and Moon, of the planets and their
+ moons, and of any asteroids, comets, or earth satellites whose orbital
+ elements the user can provide. Additional functions are provided to
+ compute the angular separation between two objects in the sky, to
+ determine the constellation in which an object lies, and to find the
+ times at which an object rises, transits, and sets on a particular
+ day.
+</longdescription>
+<upstream>
+ <remote-id type="github">brandon-rhodes/pyephem</remote-id>
+ <remote-id type="pypi">pyephem</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/pyephem/pyephem-4.1.5.ebuild b/sci-astronomy/pyephem/pyephem-4.1.5.ebuild
new file mode 100644
index 000000000000..92211b196c74
--- /dev/null
+++ b/sci-astronomy/pyephem/pyephem-4.1.5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="Astronomical routines for the Python programming language"
+HOMEPAGE="https://rhodesmill.org/pyephem/"
+SRC_URI="https://github.com/brandon-rhodes/pyephem/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE="doc"
+
+BDEPEND="doc? ( dev-python/sphinx )"
+
+EPYTEST_DESELECT=(
+ # Can't find its test files (class not loaded properly in test env?)
+ # bug #855461
+ tests/test_jpl.py::JPLTest::runTest
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ # Don't install rst files by default
+ sed -i -e "s:'doc/\*\.rst',::" setup.py || die
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+ if use doc; then
+ PYTHONPATH=. emake -C ephem/doc html
+ fi
+}
+
+python_test() {
+ cd "${T}" || die
+ epytest --pyargs ephem
+}
+
+src_install() {
+ use doc && HTML_DOCS=( ephem/doc/_build/html/. )
+ distutils-r1_src_install
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ rm -r "${D}$(python_get_sitedir)/ephem/tests" || die
+}
diff --git a/sci-astronomy/pyephem/pyephem-4.2.1.ebuild b/sci-astronomy/pyephem/pyephem-4.2.1.ebuild
new file mode 100644
index 000000000000..a590eb9a18a4
--- /dev/null
+++ b/sci-astronomy/pyephem/pyephem-4.2.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="Astronomical routines for the Python programming language"
+HOMEPAGE="https://rhodesmill.org/pyephem/"
+SRC_URI="https://github.com/brandon-rhodes/pyephem/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+BDEPEND="doc? ( dev-python/sphinx )"
+
+EPYTEST_DESELECT=(
+ # Can't find its test files (class not loaded properly in test env?)
+ # bug #855461
+ tests/test_jpl.py::JPLTest::runTest
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ # Don't install rst files by default
+ sed -i -e "s:'doc/\*\.rst',::" setup.py || die
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+ if use doc; then
+ PYTHONPATH=. emake -C ephem/doc html
+ fi
+}
+
+python_test() {
+ cd "${T}" || die
+ epytest --pyargs ephem
+}
+
+src_install() {
+ use doc && HTML_DOCS=( ephem/doc/_build/html/. )
+ distutils-r1_src_install
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ rm -r "${D}$(python_get_sitedir)/ephem/tests" || die
+}
diff --git a/sci-astronomy/pysiril/Manifest b/sci-astronomy/pysiril/Manifest
new file mode 100644
index 000000000000..79b9ec9fc4b0
--- /dev/null
+++ b/sci-astronomy/pysiril/Manifest
@@ -0,0 +1 @@
+DIST pysiril-V0_0_15.tar.bz2 107650 BLAKE2B 94efb349e1e92e75bc7813d08a1fc1cd38b9c6199da8ba71e28f3b5b2420295cd770e4327c073558d600adf80efe39a295663b030f9048e9124a5fb71a7aba30 SHA512 e1820e14b14041eb99d2f5165fa81ba64d8e1459d50af6a0c748ac5cbef90447ce2f92c12bcfd8da784a7ae7f04c270b3bd75fe5369f1671840e3f9105271429
diff --git a/sci-astronomy/pysiril/metadata.xml b/sci-astronomy/pysiril/metadata.xml
new file mode 100644
index 000000000000..a38139b47d33
--- /dev/null
+++ b/sci-astronomy/pysiril/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>mario.haustein@hrz.tu-chemnitz.de</email>
+ <name>Mario Haustein</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="gitlab">free-astro/pysiril</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/pysiril/pysiril-0.0.15.ebuild b/sci-astronomy/pysiril/pysiril-0.0.15.ebuild
new file mode 100644
index 000000000000..a6dde88486a7
--- /dev/null
+++ b/sci-astronomy/pysiril/pysiril-0.0.15.ebuild
@@ -0,0 +1,19 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+inherit distutils-r1
+
+DESCRIPTION="Python library to interface Python to a SiriL script"
+HOMEPAGE="https://gitlab.com/free-astro/pysiril"
+SRC_URI="https://gitlab.com/free-astro/pysiril/-/archive/V${PV//./_}/${PN}-V${PV//./_}.tar.bz2"
+S="${WORKDIR}/${PN}-V${PV//./_}"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+
+RDEPEND="sci-astronomy/siril"
diff --git a/sci-astronomy/scamp/Manifest b/sci-astronomy/scamp/Manifest
new file mode 100644
index 000000000000..4dacf45fd96e
--- /dev/null
+++ b/sci-astronomy/scamp/Manifest
@@ -0,0 +1,2 @@
+DIST scamp-2.14.0.tar.gz 56356548 BLAKE2B d6003b1da11616c5749e7ffbe74761731b6c0bba61657ce2b96a0055f073055c70647732794e507f7a4b73cc659c6adcc5d499984f710001a7e5e1973756b46b SHA512 c1a25359bbdb3edae2e4039e72f0872b4dcae7fe32692977f54779398b478380a30f920f9095ce0f4a56100e151259a1cd2358ae838c8059605731f7589f511e
+DIST scamp-2.15.0.tar.gz 56355289 BLAKE2B 3ec50e4f6ca596b0566e0379a11d643aaeb707648767c190f1a14892bb8e38b83090acd97f0c9e1ff9a4c9bbcb5eb9aa16153304e6f6e5228fc06d61e9ba1a9d SHA512 36b683feeacdb45e78b56a7da81288fbeb37897161028c9a1f159390fe23677dd11cf2ea9346bfa62d1e0dff0da7484cc3061789255eb412975f074c78ac47c1
diff --git a/sci-astronomy/scamp/files/scamp-2.10.0-spread_bits64.patch b/sci-astronomy/scamp/files/scamp-2.10.0-spread_bits64.patch
new file mode 100644
index 000000000000..e126dc6e8c79
--- /dev/null
+++ b/sci-astronomy/scamp/files/scamp-2.10.0-spread_bits64.patch
@@ -0,0 +1,18 @@
+--- a/src/chealpix.c
++++ b/src/chealpix.c
+@@ -532,7 +532,6 @@
+ return (long) res;
+ }
+
+-#ifndef __BMI2__
+ static int64_t spread_bits64(int v) {
+ return (int64_t) (utab[v & 0xff])
+ | ((int64_t) (utab[(v >> 8) & 0xff]) << 16)
+@@ -548,6 +547,7 @@
+ | (ctab[(raw >> 40) & 0xff] << 20);
+ }
+
++#ifndef __BMI2__
+ static int64_t xyf2nest64(int64_t nside, int ix, int iy, int face_num) {
+ return (face_num * nside * nside) + spread_bits64(ix)
+ + (spread_bits64(iy) << 1);
diff --git a/sci-astronomy/scamp/metadata.xml b/sci-astronomy/scamp/metadata.xml
new file mode 100644
index 000000000000..74915547c749
--- /dev/null
+++ b/sci-astronomy/scamp/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>mario.haustein@hrz.tu-chemnitz.de</email>
+ <name>Mario Haustein</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ SCAMP computes astrometric and photometric solutions from SExtractor catalogs
+ and stores them in header files. These headers files can be read by SWarp to
+ coadd images.
+ </longdescription>
+ <use>
+ <flag name="plplot">Build with <pkg>sci-libs/plplot</pkg> to allow diagnostic plots during processing</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">astromatic/scamp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/scamp/scamp-2.14.0.ebuild b/sci-astronomy/scamp/scamp-2.14.0.ebuild
new file mode 100644
index 000000000000..32bed9ac878a
--- /dev/null
+++ b/sci-astronomy/scamp/scamp-2.14.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Astrometric and photometric solutions for astronomical images"
+HOMEPAGE="http://www.astromatic.net/software/scamp https://github.com/astromatic/scamp"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/astromatic/${PN}.git"
+else
+ SRC_URI="https://github.com/astromatic/scamp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="plplot threads"
+
+RDEPEND="
+ sci-astronomy/cdsclient
+ sci-libs/atlas[lapack,threads=]
+ sci-libs/fftw:3.0
+ plplot? ( sci-libs/plplot:= )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.10.0-spread_bits64.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -e "s/lapack_atlas/atlclapack/g" -i m4/acx_atlas.m4 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-atlas-incdir="${EPREFIX}/usr/include/atlas"
+ $(use_enable plplot)
+ $(use_enable threads)
+ )
+
+ econf "${myeconfargs[@]}"
+}
diff --git a/sci-astronomy/scamp/scamp-2.15.0.ebuild b/sci-astronomy/scamp/scamp-2.15.0.ebuild
new file mode 100644
index 000000000000..ca7635c58963
--- /dev/null
+++ b/sci-astronomy/scamp/scamp-2.15.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Astrometric and photometric solutions for astronomical images"
+HOMEPAGE="http://www.astromatic.net/software/scamp https://github.com/astromatic/scamp"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/astromatic/${PN}.git"
+else
+ SRC_URI="https://github.com/astromatic/scamp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="plplot threads"
+
+RDEPEND="
+ sci-astronomy/cdsclient
+ sci-libs/atlas[lapack,threads=]
+ sci-libs/fftw:3.0
+ plplot? ( sci-libs/plplot:= )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.10.0-spread_bits64.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -e "s/lapack_atlas/atlclapack/g" -i m4/acx_atlas.m4 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-atlas-incdir="${EPREFIX}/usr/include/atlas"
+ $(use_enable plplot)
+ $(use_enable threads)
+ )
+
+ econf "${myeconfargs[@]}"
+}
diff --git a/sci-astronomy/ser-player/Manifest b/sci-astronomy/ser-player/Manifest
new file mode 100644
index 000000000000..2af5e29ee5cd
--- /dev/null
+++ b/sci-astronomy/ser-player/Manifest
@@ -0,0 +1 @@
+DIST ser-player-1.8.0.tar.gz 3234942 BLAKE2B f91680ee6261e1faeaf3664230d2776f95cd75a67a2ad67e30ee6f163cc8ebe812aea49d16e90a58072b2cb967f4e4097467480fd3788359816ea6d977a0a43d SHA512 0c92030ad160c23adef36e0ecd21c81269dd2b6c06726147b3229520f84841893ac8775db9b5aa774f3ca827eb17749601e6b9f270d79c4357eeda431d7dca85
diff --git a/sci-astronomy/ser-player/metadata.xml b/sci-astronomy/ser-player/metadata.xml
new file mode 100644
index 000000000000..8390339ce695
--- /dev/null
+++ b/sci-astronomy/ser-player/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>mario.haustein@hrz.tu-chemnitz.de</email>
+ <name>Mario Haustein</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">lock042/ser-player</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/ser-player/ser-player-1.8.0.ebuild b/sci-astronomy/ser-player/ser-player-1.8.0.ebuild
new file mode 100644
index 000000000000..1e825cfcae6f
--- /dev/null
+++ b/sci-astronomy/ser-player/ser-player-1.8.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils xdg
+
+DESCRIPTION="Video player for SER files used for solar, lunar and planetary astronomy-imaging"
+HOMEPAGE="
+ https://free-astro.org/index.php?title=SER_Player#Linux
+ https://github.com/lock042/ser-player
+"
+
+if [[ ${PV} = "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/lock042/ser-player.git"
+else
+ SRC_URI="https://github.com/lock042/ser-player/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+DEPEND="
+ dev-qt/qtbase:6[gui,widgets]
+ media-libs/libpng:=
+"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ eqmake6 \
+ DEFINES+=DISABLE_NEW_VERSION_CHECK \
+ CONFIG+=release
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}" install
+}
diff --git a/sci-astronomy/ser-player/ser-player-9999.ebuild b/sci-astronomy/ser-player/ser-player-9999.ebuild
new file mode 100644
index 000000000000..1e825cfcae6f
--- /dev/null
+++ b/sci-astronomy/ser-player/ser-player-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils xdg
+
+DESCRIPTION="Video player for SER files used for solar, lunar and planetary astronomy-imaging"
+HOMEPAGE="
+ https://free-astro.org/index.php?title=SER_Player#Linux
+ https://github.com/lock042/ser-player
+"
+
+if [[ ${PV} = "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/lock042/ser-player.git"
+else
+ SRC_URI="https://github.com/lock042/ser-player/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+DEPEND="
+ dev-qt/qtbase:6[gui,widgets]
+ media-libs/libpng:=
+"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ eqmake6 \
+ DEFINES+=DISABLE_NEW_VERSION_CHECK \
+ CONFIG+=release
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}" install
+}
diff --git a/sci-astronomy/sextractor/Manifest b/sci-astronomy/sextractor/Manifest
new file mode 100644
index 000000000000..e106b3224094
--- /dev/null
+++ b/sci-astronomy/sextractor/Manifest
@@ -0,0 +1 @@
+DIST sextractor-2.19.5.tar.gz 4317039 BLAKE2B 3f0618ec7d782422289287bf1d327ff7e9136866d3a15a9cea74d23a8625f902281aa2d5eba0827d703942ca9b0c1d875d8441e07cdb4450b89b03f2d1229bc0 SHA512 aadd007facad983ea35bd7496a53520f987aa8e492259e428170354d262212e3c1a17c60bf6ea97b6056136b0bd02793e92e14b21cb40a0f8886245eeeac6f4d
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch
new file mode 100644
index 000000000000..c20ce31ee30e
--- /dev/null
+++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch
@@ -0,0 +1,65 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Fix format security errors
+--- a/src/catout.c
++++ b/src/catout.c
+@@ -999,7 +999,7 @@
+ break;
+
+ case ASCII_SKYCAT:
+- fprintf(ascfile, skycattail);
++ fprintf(ascfile, "%s", skycattail);
+ if (!prefs.pipe_flag)
+ fclose(ascfile);
+ break;
+--- a/src/xml.c
++++ b/src/xml.c
+@@ -696,7 +696,7 @@
+ name, ucd);
+ break;
+ case P_STRING:
+- sprintf(value, (char *)key[i].ptr);
++ sprintf(value, "%s", (char *)key[i].ptr);
+ fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\""
+ " ucd=\"%s\" value=\"%s\"/>\n",
+ name, ucd, *value? value: " ");
+@@ -705,13 +705,13 @@
+ n = *(key[i].nlistptr);
+ if (n)
+ {
+- sprintf(value, ((char **)key[i].ptr)[0]);
++ sprintf(value, "%s", ((char **)key[i].ptr)[0]);
+ fprintf(file, " <PARAM name=\"%s\" datatype=\"char\""
+ " arraysize=\"*\" ucd=\"%s\" value=\"%s",
+ name, ucd, *value? value: " ");
+ for (j=1; j<n; j++)
+ {
+- sprintf(value, ((char **)key[i].ptr)[j]);
++ sprintf(value, "%s", ((char **)key[i].ptr)[j]);
+ fprintf(file, ",%s", *value? value: " ");
+ }
+ fprintf(file, "\"/>\n");
+@@ -722,7 +722,7 @@
+ name, ucd);
+ break;
+ case P_KEY:
+- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]);
++ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]);
+ fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\""
+ " ucd=\"%s\" value=\"%s\"/>\n",
+ name, ucd, value);
+@@ -731,13 +731,13 @@
+ n = *(key[i].nlistptr);
+ if (n)
+ {
+- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]);
++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]);
+ fprintf(file, " <PARAM name=\"%s\" datatype=\"char\""
+ " arraysize=\"*\" ucd=\"%s\" value=\"%s",
+ name, ucd, value);
+ for (j=1; j<n; j++)
+ {
+- sprintf(value, key[i].keylist[((int *)key[i].ptr)[j]]);
++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[j]]);
+ fprintf(file, ",%s", value);
+ }
+ fprintf(file, "\"/>\n");
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch
new file mode 100644
index 000000000000..1150fe366f5e
--- /dev/null
+++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-fno-common.patch
@@ -0,0 +1,277 @@
+--- a/src/clean.c
++++ b/src/clean.c
+@@ -44,6 +44,7 @@
+
+ /*------------------------------- variables ---------------------------------*/
+
++objliststruct *cleanobjlist;
+ static LONG *cleanvictim;
+
+
+--- a/src/clean.h
++++ b/src/clean.h
+@@ -33,7 +33,7 @@
+
+ /*------------------------------- variables ---------------------------------*/
+
+-objliststruct *cleanobjlist; /* laconic, isn't it? */
++extern objliststruct *cleanobjlist; /* laconic, isn't it? */
+
+ /*------------------------------- functions ---------------------------------*/
+
+--- a/src/extract.c
++++ b/src/extract.c
+@@ -40,6 +40,8 @@
+ #include "extract.h"
+ #include "plist.h"
+
++PIXTYPE *dumscan;
++
+ /*------------------------- Static buffers for lutz() -----------------------*/
+
+ static infostruct *info, *store;
+--- a/src/extract.h
++++ b/src/extract.h
+@@ -37,7 +37,7 @@
+ status; /* Extraction status */
+
+ /*--------------------------------- variables -------------------------------*/
+-PIXTYPE *dumscan;
++extern PIXTYPE *dumscan;
+
+ /*------------------------------- structures --------------------------------*/
+ /* Temporary object parameters during extraction */
+--- a/src/filter.c
++++ b/src/filter.c
+@@ -44,6 +44,8 @@
+ #include "filter.h"
+ #include "image.h"
+
++filterstruct *thefilter;
++
+ /******************************** convolve ***********************************/
+ /*
+ Convolve a scan line with an array.
+--- a/src/filter.h
++++ b/src/filter.h
+@@ -43,7 +43,7 @@
+ struct structbpann *bpann;
+ } filterstruct;
+
+-filterstruct *thefilter;
++extern filterstruct *thefilter;
+
+ /*------------------------------- functions ---------------------------------*/
+ void convolve(picstruct *, PIXTYPE *, int y),
+--- a/src/fits/fitscat.c
++++ b/src/fits/fitscat.c
+@@ -42,6 +42,10 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++float ctg[37], stg[37];
++char gstr[MAXCHAR];
++int bswapflag;
++
+ /****** about_cat **************************************************************
+ PROTO int about_cat(catstruct *cat, FILE *stream)
+ PURPOSE Print some info about a catalog.
+--- a/src/fits/fitscat_defs.h
++++ b/src/fits/fitscat_defs.h
+@@ -86,7 +86,7 @@
+ typedef int LONG; /* for DEC-Alpha... */
+
+ /*----------------------------- Internal constants --------------------------*/
+-char gstr[MAXCHAR];
++extern char gstr[MAXCHAR];
+
+ /*----------------------------- External constants --------------------------*/
+
+--- a/src/fits/fitscat.h
++++ b/src/fits/fitscat.h
+@@ -333,6 +333,6 @@
+ warning(char *msg1, char *msg2);
+
+
+-int bswapflag;
++extern int bswapflag;
+
+ #endif
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -30,13 +30,13 @@
+
+ /*----------------------- miscellaneous variables ---------------------------*/
+
+-sexcatstruct thecat;
+-picstruct thefield1,thefield2, thewfield1,thewfield2;
+-objstruct flagobj;
+-obj2struct flagobj2;
++extern sexcatstruct thecat;
++extern picstruct thefield1,thefield2, thewfield1,thewfield2;
++extern objstruct flagobj;
++extern obj2struct flagobj2;
+ extern obj2struct outobj2;
+-float ctg[37], stg[37];
+-char gstr[MAXCHAR];
++extern float ctg[37], stg[37];
++extern char gstr[MAXCHAR];
+
+ /*------------------------------- functions ---------------------------------*/
+ extern void alloccatparams(void),
+--- a/src/plist.c
++++ b/src/plist.c
+@@ -38,6 +38,11 @@
+ #include "prefs.h"
+ #include "plist.h"
+
++int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
++ plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var,
++ plistoff_value, plistoff_dvalue, plistoff_cdvalue,
++ plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var,
++ plistsize;
+
+ /******************************** createblank *******************************
+ PROTO int createblank(int no, objliststruct *objlist)
+--- a/src/plist.h
++++ b/src/plist.h
+@@ -47,7 +47,7 @@
+
+ /*-------------------------------- globals ----------------------------------*/
+
+-int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
++extern int plistexist_value, plistexist_dvalue, plistexist_cdvalue,
+ plistexist_flag, plistexist_wflag, plistexist_dthresh, plistexist_var,
+ plistoff_value, plistoff_dvalue, plistoff_cdvalue,
+ plistoff_flag[MAXFLAG], plistoff_wflag, plistoff_dthresh, plistoff_var,
+--- a/src/preflist.h
++++ b/src/preflist.h
+@@ -39,7 +39,7 @@
+ #endif
+
+ /*-------------------------------- initialization ---------------------------*/
+- int idummy;
++extern int idummy;
+
+ pkeystruct key[] =
+ {
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -56,6 +56,9 @@
+ #include "preflist.h"
+ #include "fits/fitscat.h"
+
++prefstruct prefs;
++double ddummy;
++int idummy;
+
+ /********************************* dumpprefs ********************************/
+ /*
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -249,7 +249,7 @@
+ int nthreads; /* Number of active threads */
+ } prefstruct;
+
+- prefstruct prefs;
++extern prefstruct prefs;
+
+ /*-------------------------------- protos -----------------------------------*/
+ extern int cistrcmp(char *cs, char *ct, int mode);
+--- a/src/psf.c
++++ b/src/psf.c
+@@ -47,6 +47,9 @@
+
+ /*------------------------------- variables ---------------------------------*/
+
++psfstruct *psf,*thedpsf,*thepsf;
++psfitstruct *thepsfit,*thedpsfit;
++PIXTYPE *checkmask;
+
+ extern keystruct objkey[];
+ extern objstruct outobj;
+--- a/src/psf.h
++++ b/src/psf.h
+@@ -102,9 +102,9 @@
+ } psfitstruct;
+
+ /*----------------------------- Global variables ----------------------------*/
+-psfstruct *psf,*thedpsf,*thepsf;
+-psfitstruct *thepsfit,*thedpsfit;
+-PIXTYPE *checkmask;
++extern psfstruct *psf,*thedpsf,*thepsf;
++extern psfitstruct *thepsfit,*thedpsfit;
++extern PIXTYPE *checkmask;
+
+ /*-------------------------------- functions --------------------------------*/
+ extern void compute_pos(int *pnpsf,int *pconvflag,int *pnpsfflag,
+--- a/src/retina.c
++++ b/src/retina.c
+@@ -42,6 +42,7 @@
+ #include "image.h"
+ #include "retina.h"
+
++retistruct *theretina;
+
+ /******************************** readretina *********************************/
+ /*
+--- a/src/retina.h
++++ b/src/retina.h
+@@ -38,7 +38,7 @@
+ struct structbpann *bpann; /* The neural network */
+ } retistruct;
+
+-retistruct *theretina;
++extern retistruct *theretina;
+
+ /*------------------------------- functions ---------------------------------*/
+
+--- a/src/sexhead1.h
++++ b/src/sexhead1.h
+@@ -26,8 +26,8 @@
+ *
+ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+-int idummy;
+-double ddummy;
++extern int idummy;
++extern double ddummy;
+
+ keystruct headkey1[] = {
+ {"EPOCH ", "",
+--- a/src/som.c
++++ b/src/som.c
+@@ -41,6 +41,8 @@
+ #include "prefs.h"
+ #include "som.h"
+
++somstruct *thesom;
++
+ /********************************* som_phot **********************************/
+ /*
+ Perform SOM-fitting on a detected source: returns node number of the
+--- a/src/som.h
++++ b/src/som.h
+@@ -70,7 +70,7 @@
+ float stderror; /* Global reduced error */
+ } somstruct;
+
+-somstruct *thesom;
++extern somstruct *thesom;
+
+ /*---------------------------------- protos --------------------------------*/
+
+--- a/src/xml.c
++++ b/src/xml.c
+@@ -50,6 +50,11 @@
+ xmlstruct *xmlstack = NULL;
+ int nxml=0, nxmlmax=0;
+
++sexcatstruct thecat;
++picstruct thefield1,thefield2, thewfield1,thewfield2;
++objstruct flagobj;
++obj2struct flagobj2;
++
+ /****** init_xml ************************************************************
+ PROTO int init_xml(void)
+ PURPOSE Initialize a set of meta-data kept in memory before being written to the
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch
new file mode 100644
index 000000000000..dd10d4a2c3cd
--- /dev/null
+++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch
@@ -0,0 +1,32 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Define rpl_malloc if not there.
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -34,6 +34,8 @@
+ #include <time.h>
+ #include <sys/time.h>
+
++#include <sys/types.h>
++
+ #include "define.h"
+ #include "globals.h"
+
+@@ -153,3 +155,18 @@
+ }
+
+
++#if !HAVE_MALLOC
++#undef malloc
++
++// Allocate an N-byte block of memory from the heap. If N is zero,
++// allocate a 1-byte block.
++void *rpl_malloc(size_t n)
++{
++ void *malloc();
++ if (0==n) {
++ n = 1;
++ }
++
++ return malloc(n);
++}
++#endif
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch
new file mode 100644
index 000000000000..1b6565089849
--- /dev/null
+++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch
@@ -0,0 +1,55 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Use mmap only if it exists.
+--- a/src/fits/fitsbody.c
++++ b/src/fits/fitsbody.c
+@@ -64,9 +64,12 @@
+ ***/
+ PIXTYPE *alloc_body(tabstruct *tab, void (*func)(PIXTYPE *ptr, int npix))
+ {
++#ifdef HAVE_MMAP
+ FILE *file;
+ PIXTYPE *buffer;
+- size_t npix, size, sizeleft, spoonful;
++ size_t sizeleft, spoonful;
++#endif
++ size_t npix, size;
+
+ if (!body_ramflag)
+ {
+@@ -87,7 +90,9 @@
+ /* Decide if the data will go in physical memory or on swap-space */
+ npix = tab->tabsize/tab->bytepix;
+ size = npix*sizeof(PIXTYPE);
++#if !HAVE_MMAP
+ if (size < body_ramleft)
++#endif
+ {
+ /*-- There should be enough RAM left: try to do a malloc() */
+ if ((tab->bodybuf = malloc(size)))
+@@ -105,6 +110,7 @@
+ tab->bodybuf = NULL;
+ }
+
++#if HAVE_MMAP
+ if (size < body_vramleft)
+ {
+ /*-- Convert and copy the data to a swap file, and mmap() it */
+@@ -144,6 +150,7 @@
+ return NULL;
+ return (PIXTYPE *)tab->bodybuf;
+ }
++#endif
+
+ /* If no memory left at all: forget it! */
+ return NULL;
+@@ -270,8 +277,10 @@
+ size = (tab->tabsize/tab->bytepix)*sizeof(PIXTYPE);
+ if (tab->swapflag)
+ {
++#if HAVE_MMAP
+ if (munmap(tab->bodybuf, size))
+ warning("Can't unmap ", tab->cat->filename);
++#endif
+ tab->swapflag = 0;
+ tab->bodybuf = NULL;
+ body_vramleft += size;
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch
new file mode 100644
index 000000000000..2796f63884e3
--- /dev/null
+++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch
@@ -0,0 +1,26 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Handle the "sigbus" case only if it exists
+--- a/src/fits/fitscleanup.c
++++ b/src/fits/fitscleanup.c
+@@ -164,7 +164,9 @@
+ /* Catch CTRL-Cs */
+ signal(SIGINT, signal_function);
+ /* Catch bus errors */
++#ifdef SIGBUS // TODO: what if it is an enum?
+ signal(SIGBUS, signal_function);
++#endif
+ /* Catch segmentation faults */
+ signal(SIGSEGV, signal_function);
+ /* Catch floating exceptions */
+@@ -195,9 +197,11 @@
+ case SIGINT:
+ fprintf(stderr, "^C\n");
+ exit(-1);
++#ifdef SIGBUS
+ case SIGBUS:
+ fprintf(stderr, "bus error\n");
+ exit(-1);
++#endif
+ case SIGSEGV:
+ fprintf(stderr, "segmentation fault\n");
+ exit(-1);
diff --git a/sci-astronomy/sextractor/metadata.xml b/sci-astronomy/sextractor/metadata.xml
new file mode 100644
index 000000000000..844c834990f3
--- /dev/null
+++ b/sci-astronomy/sextractor/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>sci-astronomy@gentoo.org</email>
+<name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ SExtractor (Source Extractor) is a program that builds a catalogue of
+ objects from an astronomical image. Although it is particularly
+ oriented towards reduction of large scale galaxy-survey data, it
+ performs rather well on moderately crowded star fields. It has the
+ ability to automatically separate stars and galaxy using neural
+ networks.
+</longdescription>
+<use>
+<flag name="modelfit">
+ Enable profile model fitting, needs <pkg>sci-libs/atlas</pkg>
+ and <pkg>sci-libs/fftw</pkg>
+</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild
new file mode 100644
index 000000000000..6e61c1580a01
--- /dev/null
+++ b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+AUTOTOOLS_AUTO_DEPEND=no
+
+inherit autotools
+
+DESCRIPTION="Extract catalogs of sources from astronomical FITS images"
+HOMEPAGE="http://www.astromatic.net/software/sextractor"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc modelfit test threads"
+REQUIRED_USE="test? ( modelfit )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !games-misc/sex
+ modelfit? (
+ sci-libs/atlas[lapack,threads=]
+ sci-libs/fftw:3.0=
+ )"
+DEPEND="${RDEPEND}
+ modelfit? ( ${AUTOTOOLS_DEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-format-errors.patch
+ "${FILESDIR}"/${P}-have-malloc.patch
+ "${FILESDIR}"/${P}-have-mmap.patch
+ "${FILESDIR}"/${P}-sigbus.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_prepare() {
+ default
+
+ if use modelfit; then
+ local mycblas=atlcblas
+ local myclapack=atlclapack
+ if use threads; then
+ [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
+ mycblas=ptcblas
+ [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \
+ myclapack=ptclapack
+ fi
+ sed -i \
+ -e "s/-lcblas/-l${mycblas}/g" \
+ -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
+ -e "s/-llapack/-l${myclapack}/g" \
+ -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
+ acx_atlas.m4 || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --with-atlas-incdir="${EPREFIX}"/usr/include/atlas \
+ $(use_enable modelfit model-fitting) \
+ $(use_enable threads)
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/sextractor
+ doins -r config/.
+ use doc && dodoc -r doc/.
+}
+
+pkg_postinst() {
+ elog "SExtractor examples configuration files are located in"
+ elog "${EROOT}/usr/share/sextractor and are not loaded anymore by default."
+}
diff --git a/sci-astronomy/siril/Manifest b/sci-astronomy/siril/Manifest
new file mode 100644
index 000000000000..97918bb34f84
--- /dev/null
+++ b/sci-astronomy/siril/Manifest
@@ -0,0 +1,3 @@
+DIST siril-1.2.6.tar.bz2 4621526 BLAKE2B b0d2b69ac601a28f033c2b02eda8a418aba1bdbacb9f1abe52b69a4a133808e3c176274da5fb7e025aff558243e9a187d77dbecad302d4b437e4fc3b33483934 SHA512 bf1503a9759e08c2767dc267860d129be7ce345695db0c89a4bf199775c084f77e10f2675e9491074f21022dcbdd3fdb161be5d541405c18c25a758226703009
+DIST siril-1.4.0.tar.bz2 14754666 BLAKE2B 8893fcaceb4263ade09e3e0e9063750845fbebb53ad9c8aa64b0254e2233ff9936132ea2cdd1f050dd42857418a0278d03013e55a9defb2227a555738011b1c6 SHA512 79655cf6110793452efac30d3be2b620e5ae4ba4fa53c88855d162f930df3980284dff1c17895f26922f4213be5cfc860bef67bc799f3eece1be87a2a1c1960a
+DIST siril-1.4.2.tar.bz2 14805286 BLAKE2B 493f98a3200aa9fb62b5661cbfbcf15faf5920f087b21f24eeef11a726a966ba56bfc554a8499c0bcdad9e042129a6d882b424564c181fb42adf74b6315fd3c7 SHA512 8b0ef74cd517972cc665c93c44d525ff467c07f28ee316b1ff9376a5a63248c6aa2cdfe48e3add37917489e8cee7995c5737dbe09f69869c3af73c80a9c2578c
diff --git a/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch b/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch
new file mode 100644
index 000000000000..310ae0cdb6d3
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch
@@ -0,0 +1,52 @@
+From 7f09478f4522b65b476c788a696159e5a4974286 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 13 Dec 2023 21:00:08 +0100
+Subject: [PATCH] Clean up and fix fseek64/ftell64
+Upstream: https://gitlab.com/free-astro/siril/-/merge_requests/606
+
+Test for the exception systems, GNU and Windows, and then fall back to
+standard POSIX.
+
+This fixes build with musl libc, which does not have fseeko64/ftello64.
+
+Fixes https://gitlab.com/free-astro/siril/-/issues/1241
+--- a/src/io/avi_pipp/pipp_utf8.h
++++ b/src/io/avi_pipp/pipp_utf8.h
+@@ -31,27 +31,15 @@
+ #endif
+
+ // 64-bit fseek for various platforms
+-#ifdef __linux__
+-#define fseek64 fseeko64 // Linux
+-#define ftell64 ftello64 // Linux
+-#elif defined (OS_OSX)
+-#define fseek64 fseeko // OS X
+-#define ftell64 ftello // OS X
+-#elif defined(BSD)
+-#define fseek64 fseeko // DragonFly BSD, FreeBSD, OpenBSD, NetBSD
+-#define ftell64 ftello // DragonFly BSD, FreeBSD, OpenBSD, NetBSD
+-#elif defined (__FreeBSD_kernel__) && defined (__GLIBC__)
+-#define fseek64 fseeko64 // KFreeBSD
+-#define ftell64 ftello64 // KFreeBSD
+-#elif defined (__gnu_hurd__)
+-#define fseek64 fseeko64 // GNU/Hurd
+-#define ftell64 ftello64 // GNU/Hurd
+-#elif defined(__CYGWIN__)
+-#define fseek64 fseeko // CYGWIN
+-#define ftell64 ftello // CYGWIN
+-#else
++#if defined(__GLIBC__) || defined(__gnu_hurd__)
++#define fseek64 fseeko64 // GNU
++#define ftell64 ftello64 // GNU
++#elif defined(_WIN32)
+ #define fseek64 _fseeki64 // Windows
+ #define ftell64 _ftelli64 // Windows
++#else // POSIX
++#define fseek64 fseeko // OS X, DragonFly BSD, FreeBSD, OpenBSD, NetBSD, musl
++#define ftell64 ftello // OS X, DragonFly BSD, FreeBSD, OpenBSD, NetBSD, musl
+ #endif
+
+ #endif // PIPP_UTF8_H
+--
+GitLab
+
diff --git a/sci-astronomy/siril/files/siril-1.2.1-options.patch b/sci-astronomy/siril/files/siril-1.2.1-options.patch
new file mode 100644
index 000000000000..11a8bdeeef0c
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.2.1-options.patch
@@ -0,0 +1,101 @@
+From 241b4b17d83285eb4bf4151dd77198427ac9fde4 Mon Sep 17 00:00:00 2001
+From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
+Date: Sun, 28 Apr 2024 14:09:19 +0200
+Subject: [PATCH] Fix multiple definition of struct options
+Upstream: https://gitlab.com/free-astro/siril/-/merge_requests/668
+Bug: https://bugs.gentoo.org/927345
+
+--- a/src/filters/deconvolution/estimate_kernel.cpp
++++ b/src/filters/deconvolution/estimate_kernel.cpp
+@@ -33,7 +33,7 @@ extern "C" float *estimate_kernel(estk_data *args, int max_threads) {
+ if (!cppfftwmultithreaded)
+ max_threads = 1;
+ img_t<float>::use_threading(max_threads);
+- options opts;
++ estimate_kernel_options opts;
+ opts.ks = args->ks;
+ opts.lambda = args->lambda;
+ opts.lambda_ratio = args->lambda_ratio;
+--- a/src/filters/deconvolution/estimate_kernel.hpp
++++ b/src/filters/deconvolution/estimate_kernel.hpp
+@@ -56,7 +56,7 @@ void gaussian_downsample(img_t<float>& out, const img_t<float>& _in, float facto
+ }
+ }
+
+-struct options {
++struct estimate_kernel_options {
+ bool verbose;
+ int ks;
+ float lambda;
+@@ -81,7 +81,7 @@ template <typename T>
+ class ImagePredictor {
+ public:
+ virtual void solve(img_t<T>& u, const img_t<T>& K, T lambda, T beta_init, T beta_rate, T beta_max,
+- const options& opts) = 0;
++ const estimate_kernel_options& opts) = 0;
+ virtual ~ImagePredictor() {}
+ };
+
+@@ -114,7 +114,7 @@ public:
+ }
+
+ void solve(img_t<T>& u, const img_t<T>& K,
+- T lambda, T beta_init, T beta_rate, T beta_max, const options& opts) {
++ T lambda, T beta_init, T beta_rate, T beta_max, const estimate_kernel_options& opts) {
+ assert(K.w % 2);
+ assert(K.h % 2);
+
+@@ -177,7 +177,7 @@ public:
+ template <typename T>
+ class KernelEstimator {
+ public:
+- virtual void solve(img_t<T>& k, const img_t<T>& u, const struct options& opts) = 0;
++ virtual void solve(img_t<T>& k, const img_t<T>& u, const struct estimate_kernel_options& opts) = 0;
+ virtual ~KernelEstimator() {}
+ };
+
+@@ -198,7 +198,7 @@ public:
+ }
+
+ // implements Algorithm 3
+- void solve(img_t<T>& k, const img_t<T>& u, const struct options& opts) {
++ void solve(img_t<T>& k, const img_t<T>& u, const struct estimate_kernel_options& opts) {
+ k.resize(ks, ks);
+
+ // solves the Equation (28)
+@@ -313,7 +313,7 @@ public:
+ fv = fft::r2c(v);
+ }
+
+- void solve(img_t<T>& k, const img_t<T>& u, const struct options& opts) {
++ void solve(img_t<T>& k, const img_t<T>& u, const struct estimate_kernel_options& opts) {
+ if (k.w != ks || k.h != ks)
+ k.resize(ks, ks);
+
+@@ -407,7 +407,7 @@ public:
+ // estimates the sharp image and the kernel from a blurry image and an initialization of u
+ template <typename T>
+ void l0_kernel_estimation(img_t<T>& k, img_t<T>& u, const img_t<T>& v,
+- const img_t<T>& initu, struct options& opts) {
++ const img_t<T>& initu, struct estimate_kernel_options& opts) {
+ // static int it = 0;
+ ImagePredictor<T>* sharp_predictor = nullptr;
+ sharp_predictor = new L0ImagePredictor<T>(v);
+@@ -463,7 +463,7 @@ void l0_kernel_estimation(img_t<T>& k, img_t<T>& u, const img_t<T>& v,
+ // it assumes that the image was previously processed by preprocess_image
+ // the inner loop is implemented in l0_kernel_estimation
+ template <typename T>
+-void multiscale_l0_kernel_estimation(img_t<T>& k, img_t<T>& u, const img_t<T>& v, struct options& opts) {
++void multiscale_l0_kernel_estimation(img_t<T>& k, img_t<T>& u, const img_t<T>& v, struct estimate_kernel_options& opts) {
+ std::vector<img_t<T>> vs;
+ std::vector<int> kernelSizes;
+ printf("Multiscale kernel estimation...\n");
+@@ -511,7 +511,7 @@ void multiscale_l0_kernel_estimation(img_t<T>& k, img_t<T>& u, const img_t<T>& v
+
+ // preprocess the input blurry image as describe in Section 2.1
+ template <typename T>
+-void preprocess_image(img_t<T>& out, const img_t<T>& _v, struct options& opts) {
++void preprocess_image(img_t<T>& out, const img_t<T>& _v, struct estimate_kernel_options& opts) {
+ img_t<T> v(_v.w, _v.h);
+
+ // convert to grayscale
diff --git a/sci-astronomy/siril/files/siril-1.2.6-linkage.patch b/sci-astronomy/siril/files/siril-1.2.6-linkage.patch
new file mode 100644
index 000000000000..0dc528970bea
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.2.6-linkage.patch
@@ -0,0 +1,96 @@
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1516
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1202
+Bug: https://bugs.gentoo.org/957668
+--- a/src/core/processing.h
++++ b/src/core/processing.h
+@@ -136,6 +136,10 @@ struct generic_seq_args {
+ #endif
+ };
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ gpointer generic_sequence_worker(gpointer p);
+ gboolean end_generic_sequence(gpointer p);
+
+@@ -184,4 +188,8 @@ gpointer generic_sequence_metadata_worker(gpointer args);
+
+ void kill_child_process(gboolean on_exit);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/src/filters/da3d/DA3D.cpp
++++ b/src/filters/da3d/DA3D.cpp
+@@ -15,10 +15,8 @@
+ #include "WeightMap.hpp"
+ #include "Utils.hpp"
+ #include "DftPatch.hpp"
+-extern "C" {
+ #include "core/processing.h"
+ #include "gui/progress_and_log.h"
+-}
+
+ #ifdef _OPENMP
+ #include <omp.h>
+--- a/src/filters/nlbayes/NlBayes.cpp
++++ b/src/filters/nlbayes/NlBayes.cpp
+@@ -27,11 +27,9 @@
+ #include "LibMatrix.h"
+ #include "LibImages.h"
+ #include "Utilities.h"
+-extern "C" {
+ #include "algos/anscombe.h"
+ #include "core/processing.h"
+ #include "gui/progress_and_log.h"
+-}
+
+ #ifdef _OPENMP
+ #include <omp.h>
+--- a/src/gui/progress_and_log.h
++++ b/src/gui/progress_and_log.h
+@@ -10,6 +10,10 @@
+ #define PROGRESS_DONE 1.0 // fill the progress bar
+ #define PROGRESS_TEXT_RESET "" // reset the progress bar's text
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ void initialize_log_tags();
+ void gui_log_message(const char* msg, const char* color);
+
+@@ -17,4 +21,8 @@ void set_progress_bar_data(const char *text, double percent);
+ void set_cursor_waiting(gboolean waiting);
+ void set_cursor(const gchar* cursor_name);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+--- a/src/opencv/opencv.h
++++ b/src/opencv/opencv.h
+@@ -5,14 +5,15 @@
+ # include <config.h>
+ #endif
+
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+ #include <stdint.h>
+ #include "registration/registration.h"
+ #include "registration/matching/misc.h"
+ #include "registration/matching/atpmatch.h"
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ #include "gui/progress_and_log.h"
+
+ WORD *fits_to_bgrbgr_ushort(fits *image);
diff --git a/sci-astronomy/siril/files/siril-1.4-docfiles.patch b/sci-astronomy/siril/files/siril-1.4-docfiles.patch
new file mode 100644
index 000000000000..7767f0924eb9
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.4-docfiles.patch
@@ -0,0 +1,44 @@
+--- a/meson.build
++++ b/meson.build
+@@ -709,7 +709,6 @@ subdir('data')
+ subdir('po')
+ subdir('python_module')
+ subdir('scripts')
+-subdir('3rdparty_licenses')
+
+ ################################################################################
+ # Install misc
+@@ -728,12 +727,6 @@ man_files = [
+ ]
+
+ install_man(man_files)
+-install_data(['AUTHORS', 'LICENSE.md'],
+- rename : [
+- 'doc/siril/AUTHORS',
+- 'doc/siril/LICENSE.md',
+- ],
+- install_dir : siril_share)
+
+
+ ################################################################################
+--- a/python_module/meson.build
++++ b/python_module/meson.build
+@@ -9,16 +9,7 @@ install_data(python_files,
+ install_dir: siril_datadir + '/python_module'
+ )
+
+-install_data(['README.md'],
+- install_dir: siril_share + 'doc/siril/python_module'
+-)
+-
+-# Create the locale directory in doc and install its README.md
+-install_data(['locale/README.md'],
+- install_dir: siril_share + 'doc/siril/python_module/locale'
+-)
+-
+ # Install the entire 'sirilpy' subdirectory (this will handle all .py files in sirilpy/)
+ install_subdir('sirilpy',
+ install_dir: siril_datadir + '/python_module'
+-)
+\ No newline at end of file
++)
diff --git a/sci-astronomy/siril/files/siril-1.4.0-libcurl.patch b/sci-astronomy/siril/files/siril-1.4.0-libcurl.patch
new file mode 100644
index 000000000000..924270267678
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.4.0-libcurl.patch
@@ -0,0 +1,503 @@
+From 7ea2a86229acd35cb2e67d882ca4670afa9bd8eb Mon Sep 17 00:00:00 2001
+From: Cyril Richard <cyril.richard42@gmail.com>
+Date: Sun, 7 Dec 2025 21:58:36 +0100
+Subject: [PATCH] Closes #1887 and #1888
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1887
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1888
+
+(cherry picked from commit c5bcc5ae764813dc1a6d89af08d9d417f1288dda)
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,7 +1,7 @@
+ siril-1.4.1
+ --/--/--
+ **Fixes**
+-* Fixes build error when compiled without libgit2, libjpeg (#1886, #1889)
++* Fixes build error when compiled without libgit2, libjpeg and libcurl (#1886, #1887, #1888, #1889)
+
+ siril-1.4.0
+ 12/05/25
+--- a/src/core/siril_networking.c
++++ b/src/core/siril_networking.c
+@@ -18,12 +18,6 @@
+ * along with Siril. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-#if defined(HAVE_LIBCURL)
+-#include <curl/curl.h>
+-
+ #include <string.h>
+
+ #include "core/siril.h"
+@@ -35,6 +29,13 @@
+
+ static gboolean online_status = TRUE;
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++#if defined(HAVE_LIBCURL)
++
++#include <curl/curl.h>
++
+ static size_t cbk_curl(void *buffer, size_t size, size_t nmemb, void *userp) {
+ size_t realsize = size * nmemb;
+ struct ucontent *mem = (struct ucontent *) userp;
+@@ -193,6 +194,41 @@ gboolean siril_compiled_with_networking() {
+
+ #else
+
++// Stub functions when libcurl is not available
++// These return errors but allow the code to compile and link
++
++gpointer fetch_url_async(gpointer p) {
++ fetch_url_async_data *args = (fetch_url_async_data *) p;
++ g_assert(args->idle_function != NULL);
++
++ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Network features are unavailable.\n"), "red");
++
++ // Clean up and call the idle function with NULL content to signal failure
++ g_free(args->url);
++ args->url = NULL;
++ args->length = 0;
++ args->content = NULL;
++ args->code = 0;
++
++ siril_add_idle(args->idle_function, args);
++ return NULL;
++}
++
++char* fetch_url(const gchar *url, gsize *length, int *error, gboolean quiet) {
++ if (!quiet) {
++ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Cannot fetch URL: %s\n"), "red", url);
++ }
++ *error = 1;
++ *length = 0;
++ return NULL;
++}
++
++int submit_post_request(const char *url, const char *post_data, char **post_response) {
++ siril_log_color_message(_("Error: Siril was compiled without libcurl support. Cannot submit POST request to: %s\n"), "red", url);
++ *post_response = NULL;
++ return 1;
++}
++
+ gboolean siril_compiled_with_networking() {
+ return FALSE;
+ }
+@@ -209,4 +245,4 @@ gboolean set_online_status(gboolean status) {
+ if (!siril_compiled_with_networking())
+ return FALSE;
+ return online_status;
+-}
++}
+\ No newline at end of file
+--- a/src/core/siril_networking.h
++++ b/src/core/siril_networking.h
+@@ -21,12 +21,8 @@ gpointer fetch_url_async(gpointer p);
+ char *fetch_url(const gchar *url, gsize *length, int *error, gboolean quiet);
+ int submit_post_request(const char *url, const char *post_data, char **post_response);
+
+-// HAVE_LIBCURL
+-//#endif
+-
+ gboolean siril_compiled_with_networking();
+ gboolean is_online();
+ gboolean set_online_status(gboolean status);
+
+-// SIRIL_NETWORKING_H
+-#endif
++#endif
+\ No newline at end of file
+--- a/src/core/siril_update.c
++++ b/src/core/siril_update.c
+@@ -21,21 +21,21 @@
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-#if defined(HAVE_LIBCURL)
+-#include "yyjson.h"
+
+ #include <string.h>
+
+ #include "core/siril.h"
+-#include "core/siril_networking.h"
+ #include "core/proto.h"
+-#include "core/processing.h"
+ #include "core/siril_log.h"
+ #include "gui/utils.h"
+-#include "gui/message_dialog.h"
+-#include "gui/progress_and_log.h"
+ #include "core/siril_update.h"
+
++#if defined(HAVE_LIBCURL)
++#include "yyjson.h"
++#include "core/siril_networking.h"
++#include "core/processing.h"
++#include "gui/message_dialog.h"
++#include "gui/progress_and_log.h"
+
+ #define SIRIL_DOMAIN "https://siril.org/"
+ #define SIRIL_VERSIONS SIRIL_DOMAIN"siril_versions.json"
+@@ -43,6 +43,171 @@
+ #define GITLAB_URL "https://gitlab.com/free-astro/siril/raw"
+ #define BRANCH "master"
+ #define SIRIL_NOTIFICATIONS "notifications/siril_notifications.json"
++#endif
++
++// ============================================================================
++// UTILITY FUNCTIONS - Independent of libcurl
++// These functions work with version numbers and strings, no network required
++// ============================================================================
++
++static void remove_alpha(gchar *str, gboolean *is_rc, gboolean *is_beta) {
++ unsigned long i = 0;
++ unsigned long j = 0;
++ char c;
++
++ if (g_str_has_prefix(str, "beta")) {
++ *is_rc = FALSE;
++ *is_beta = TRUE;
++ } else if (g_str_has_prefix(str, "rc")) {
++ *is_rc = TRUE;
++ *is_beta = FALSE;
++ } else {
++ *is_rc = FALSE;
++ *is_beta = FALSE;
++ }
++
++ while ((c = str[i++]) != '\0') {
++ if (g_ascii_isdigit(c)) {
++ str[j++] = c;
++ }
++ }
++ str[j] = '\0';
++}
++
++/**
++ * Check if the version is a patched version.
++ * patched version are named like that x.y.z.patch where patch only contains digits.
++ * if patch contains alpha char it is because that's a RC or beta version. Not a patched one.
++ * @param version version to be tested
++ * @return 0 if the version is not patched. The version of the patch is returned otherwise.
++ */
++static guint check_for_patch(gchar *version, gboolean *is_rc, gboolean *is_beta) {
++ remove_alpha(version, is_rc, is_beta);
++ return (g_ascii_strtoull(version, NULL, 10));
++}
++
++version_number get_version_number_from_string(const gchar *input) {
++ version_number version = { 0 };
++ gchar **version_string = NULL;
++ const gchar *string = find_first_numeric(input);
++ if (!string)
++ goto the_end;
++ version_string = g_strsplit_set(string, ".-", -1);
++ version.major_version = g_ascii_strtoull(version_string[0], NULL, 10);
++ if (version_string[1])
++ version.minor_version = g_ascii_strtoull(version_string[1], NULL, 10);
++ else
++ goto the_end;
++ if (version_string[2])
++ version.micro_version = g_ascii_strtoull(version_string[2], NULL, 10);
++ else
++ goto the_end;
++ if (version_string[3] == NULL) {
++ version.patched_version = 0;
++ version.rc_version = FALSE;
++ version.beta_version = FALSE;
++ } else {
++ version.patched_version = check_for_patch(version_string[3], &version.rc_version, &version.beta_version);
++ }
++the_end:
++ g_strfreev(version_string);
++ return version;
++}
++
++version_number get_current_version_number() {
++ return get_version_number_from_string(PACKAGE_VERSION);
++}
++
++/**
++ * This function compares two version numbers following the pattern x.y.z[-type#]
++ * where type can be beta, rc, or a stable patch number.
++ * Version ordering: beta < rc < stable < stable-patch
++ * Examples: 1.4.0-beta1 < 1.4.0-rc2 < 1.4.0 < 1.4.0-1
++ * @param v1 First version number to be tested
++ * @param v2 Second version number to be tested
++ * @return -1 if v1 < v2, 1 if v1 > v2 and 0 if v1 is equal to v2
++ */
++int compare_version(version_number v1, version_number v2) {
++ if (v1.major_version < v2.major_version)
++ return -1;
++ else if (v1.major_version > v2.major_version)
++ return 1;
++ else {
++ if (v1.minor_version < v2.minor_version)
++ return -1;
++ else if (v1.minor_version > v2.minor_version)
++ return 1;
++ else {
++ if (v1.micro_version < v2.micro_version)
++ return -1;
++ else if (v1.micro_version > v2.micro_version)
++ return 1;
++ else {
++ // Determine version type
++ int v1_is_stable = !v1.rc_version && !v1.beta_version;
++ int v2_is_stable = !v2.rc_version && !v2.beta_version;
++
++ // Order: beta < rc < stable
++ if (v1.beta_version && !v2.beta_version) return -1; // beta < (rc or stable)
++ if (v2.beta_version && !v1.beta_version) return 1; // (rc or stable) > beta
++ if (v1.rc_version && v2_is_stable) return -1; // rc < stable
++ if (v2.rc_version && v1_is_stable) return 1; // stable > rc
++
++ // Same type: compare patched_version
++ if (v1.beta_version && v2.beta_version) {
++ // Both beta versions
++ if (v1.patched_version < v2.patched_version)
++ return -1;
++ else if (v1.patched_version > v2.patched_version)
++ return 1;
++ }
++ else if (v1.rc_version && v2.rc_version) {
++ // Both rc versions
++ if (v1.patched_version < v2.patched_version)
++ return -1;
++ else if (v1.patched_version > v2.patched_version)
++ return 1;
++ }
++ else if (v1_is_stable && v2_is_stable) {
++ // Both stable versions: compare patches
++ // 1.4.0 (patch=0) < 1.4.0-1 (patch=1)
++ if (v1.patched_version < v2.patched_version)
++ return -1;
++ else if (v1.patched_version > v2.patched_version)
++ return 1;
++ }
++ }
++ }
++ }
++ return 0;
++}
++
++// ============================================================================
++// NETWORK-DEPENDENT FUNCTIONS - Require libcurl
++// ============================================================================
++
++#if defined(HAVE_LIBCURL)
++
++static version_number get_last_version_number(gchar *version_str) {
++ gchar **v;
++ version_number version = { 0 };
++
++ v = g_strsplit_set(version_str, ".-", -1);
++
++ if (v[0])
++ version.major_version = g_ascii_strtoull(v[0], NULL, 10);
++ if (v[0] && v[1])
++ version.minor_version = g_ascii_strtoull(v[1], NULL, 10);
++ if (v[0] && v[1] && v[2])
++ version.micro_version = g_ascii_strtoull(v[2], NULL, 10);
++ if (v[0] && v[1] && v[2] && v[3]) {
++ remove_alpha(v[3], &version.rc_version, &version.beta_version);
++ version.patched_version = g_ascii_strtoull(v[3], NULL, 10);
++ }
++
++ g_strfreev(v);
++ return version;
++}
+
+ static gboolean siril_update_get_highest(yyjson_doc *doc,
+ gchar **highest_version, gint64 *release_timestamp,
+@@ -195,159 +360,6 @@ static gboolean siril_update_get_highest(yyjson_doc *doc,
+ return FALSE;
+ }
+
+-static void remove_alpha(gchar *str, gboolean *is_rc, gboolean *is_beta) {
+- unsigned long i = 0;
+- unsigned long j = 0;
+- char c;
+-
+- if (g_str_has_prefix(str, "beta")) {
+- *is_rc = FALSE;
+- *is_beta = TRUE;
+- } else if (g_str_has_prefix(str, "rc")) {
+- *is_rc = TRUE;
+- *is_beta = FALSE;
+- } else {
+- *is_rc = FALSE;
+- *is_beta = FALSE;
+- }
+-
+- while ((c = str[i++]) != '\0') {
+- if (g_ascii_isdigit(c)) {
+- str[j++] = c;
+- }
+- }
+- str[j] = '\0';
+-}
+-
+-/**
+- * Check if the version is a patched version.
+- * patched version are named like that x.y.z.patch where patch only contains digits.
+- * if patch contains alpha char it is because that's a RC or beta version. Not a patched one.
+- * @param version version to be tested
+- * @return 0 if the version is not patched. The version of the patch is returned otherwise.
+- */
+-static guint check_for_patch(gchar *version, gboolean *is_rc, gboolean *is_beta) {
+- remove_alpha(version, is_rc, is_beta);
+- return (g_ascii_strtoull(version, NULL, 10));
+-}
+-
+-version_number get_version_number_from_string(const gchar *input) {
+- version_number version = { 0 };
+- gchar **version_string = NULL;
+- const gchar *string = find_first_numeric(input);
+- if (!string)
+- goto the_end;
+- version_string = g_strsplit_set(string, ".-", -1);
+- version.major_version = g_ascii_strtoull(version_string[0], NULL, 10);
+- if (version_string[1])
+- version.minor_version = g_ascii_strtoull(version_string[1], NULL, 10);
+- else
+- goto the_end;
+- if (version_string[2])
+- version.micro_version = g_ascii_strtoull(version_string[2], NULL, 10);
+- else
+- goto the_end;
+- if (version_string[3] == NULL) {
+- version.patched_version = 0;
+- version.rc_version = FALSE;
+- version.beta_version = FALSE;
+- } else {
+- version.patched_version = check_for_patch(version_string[3], &version.rc_version, &version.beta_version);
+- }
+-the_end:
+- g_strfreev(version_string);
+- return version;
+-}
+-
+-version_number get_current_version_number() {
+- return get_version_number_from_string(PACKAGE_VERSION);
+-}
+-
+-static version_number get_last_version_number(gchar *version_str) {
+- gchar **v;
+- version_number version = { 0 };
+-
+- v = g_strsplit_set(version_str, ".-", -1);
+-
+- if (v[0])
+- version.major_version = g_ascii_strtoull(v[0], NULL, 10);
+- if (v[0] && v[1])
+- version.minor_version = g_ascii_strtoull(v[1], NULL, 10);
+- if (v[0] && v[1] && v[2])
+- version.micro_version = g_ascii_strtoull(v[2], NULL, 10);
+- if (v[0] && v[1] && v[2] && v[3]) {
+- remove_alpha(v[3], &version.rc_version, &version.beta_version);
+- version.patched_version = g_ascii_strtoull(v[3], NULL, 10);
+- }
+-
+- g_strfreev(v);
+- return version;
+-}
+-
+-/**
+- * This function compares two version numbers following the pattern x.y.z[-type#]
+- * where type can be beta, rc, or a stable patch number.
+- * Version ordering: beta < rc < stable < stable-patch
+- * Examples: 1.4.0-beta1 < 1.4.0-rc2 < 1.4.0 < 1.4.0-1
+- * @param v1 First version number to be tested
+- * @param v2 Second version number to be tested
+- * @return -1 if v1 < v2, 1 if v1 > v2 and 0 if v1 is equal to v2
+- */
+-int compare_version(version_number v1, version_number v2) {
+- if (v1.major_version < v2.major_version)
+- return -1;
+- else if (v1.major_version > v2.major_version)
+- return 1;
+- else {
+- if (v1.minor_version < v2.minor_version)
+- return -1;
+- else if (v1.minor_version > v2.minor_version)
+- return 1;
+- else {
+- if (v1.micro_version < v2.micro_version)
+- return -1;
+- else if (v1.micro_version > v2.micro_version)
+- return 1;
+- else {
+- // Determine version type
+- int v1_is_stable = !v1.rc_version && !v1.beta_version;
+- int v2_is_stable = !v2.rc_version && !v2.beta_version;
+-
+- // Order: beta < rc < stable
+- if (v1.beta_version && !v2.beta_version) return -1; // beta < (rc or stable)
+- if (v2.beta_version && !v1.beta_version) return 1; // (rc or stable) > beta
+- if (v1.rc_version && v2_is_stable) return -1; // rc < stable
+- if (v2.rc_version && v1_is_stable) return 1; // stable > rc
+-
+- // Same type: compare patched_version
+- if (v1.beta_version && v2.beta_version) {
+- // Both beta versions
+- if (v1.patched_version < v2.patched_version)
+- return -1;
+- else if (v1.patched_version > v2.patched_version)
+- return 1;
+- }
+- else if (v1.rc_version && v2.rc_version) {
+- // Both rc versions
+- if (v1.patched_version < v2.patched_version)
+- return -1;
+- else if (v1.patched_version > v2.patched_version)
+- return 1;
+- }
+- else if (v1_is_stable && v2_is_stable) {
+- // Both stable versions: compare patches
+- // 1.4.0 (patch=0) < 1.4.0-1 (patch=1)
+- if (v1.patched_version < v2.patched_version)
+- return -1;
+- else if (v1.patched_version > v2.patched_version)
+- return 1;
+- }
+- }
+- }
+- }
+- return 0;
+-}
+-
+ static gchar *parse_changelog(gchar *changelog) {
+ gchar **token;
+ GString *strResult;
+@@ -683,4 +695,4 @@ void siril_check_notifications(gboolean verbose) {
+ g_thread_new("siril-notifications", fetch_url_async, args);
+ }
+
+-#endif
++#endif // HAVE_LIBCURL
+\ No newline at end of file
+--- a/src/core/siril_update.h
++++ b/src/core/siril_update.h
+@@ -20,11 +20,12 @@
+ #ifndef SRC_CORE_SIRIL_UPDATE_H_
+ #define SRC_CORE_SIRIL_UPDATE_H_
+
+-#if ( defined(HAVE_LIBCURL) || defined(HAVE_LIBGIT2) )
+-
+ int compare_version(version_number v1, version_number v2);
+ version_number get_version_number_from_string(const gchar *string);
+ version_number get_current_version_number();
++
++#if ( defined(HAVE_LIBCURL) || defined(HAVE_LIBGIT2) )
++
+ void siril_check_updates(gboolean verbose);
+ void siril_check_notifications(gboolean verbose);
+
+--
+GitLab
+
diff --git a/sci-astronomy/siril/files/siril-1.4.0-libgit2.patch b/sci-astronomy/siril/files/siril-1.4.0-libgit2.patch
new file mode 100644
index 000000000000..79cc9ed3aa3e
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.4.0-libgit2.patch
@@ -0,0 +1,33 @@
+From 0ea30faf4236432a43aa552f53447c9bcdb3a57c Mon Sep 17 00:00:00 2001
+From: Cyril Richard <cyril.richard42@gmail.com>
+Date: Sun, 7 Dec 2025 21:09:34 +0100
+Subject: [PATCH] Closes #1886
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1886
+
+(cherry picked from commit 4b74c4de02e5341d82999837bc9d46e889780356)
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++siril-1.4.1
++--/--/--
++**Fixes**
++* Fixes build error when compiled without libgit2 (#1886)
++
+ siril-1.4.0
+ 12/05/25
+ **Improvements**
+--- a/src/io/siril_pythonmodule.c
++++ b/src/io/siril_pythonmodule.c
+@@ -2153,7 +2153,9 @@ static PythonVenvInfo* prepare_venv_environment(const gchar *venv_path) {
+ // this repopulates gui.repo_scripts and updates the script menu
+ // the reason for doing it on completion of python installation is that pyscript_version_check
+ // cannot check python script versions until it knows what module version is installed
++#ifdef HAVE_LIBGIT2
+ g_thread_unref(g_thread_new("update_scripts_list", update_repo_scripts_list_and_menu_in_thread, NULL));
++#endif
+ }
+ g_free(module_path);
+
+--
+GitLab
+
diff --git a/sci-astronomy/siril/files/siril-1.4.0-libjpeg.patch b/sci-astronomy/siril/files/siril-1.4.0-libjpeg.patch
new file mode 100644
index 000000000000..07578bf2a0eb
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.4.0-libjpeg.patch
@@ -0,0 +1,45 @@
+From 8a38018889873055e26490e77975f151e5f4137f Mon Sep 17 00:00:00 2001
+From: Cyril Richard <cyril.richard42@gmail.com>
+Date: Sun, 7 Dec 2025 21:20:27 +0100
+Subject: [PATCH] Closes #1889
+Upstream: https://gitlab.com/free-astro/siril/-/issues/1889
+
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,7 +1,7 @@
+ siril-1.4.1
+ --/--/--
+ **Fixes**
+-* Fixes build error when compiled without libgit2 (#1886)
++* Fixes build error when compiled without libgit2, libjpeg (#1886, #1889)
+
+ siril-1.4.0
+ 12/05/25
+--- a/src/gui/save_dialog.c
++++ b/src/gui/save_dialog.c
+@@ -532,6 +532,7 @@ static void initialize_data(gpointer p) {
+ args->checksum = gtk_toggle_button_get_active(checksum);
+ }
+
++#ifdef HAVE_JPEG
+ static long calculate_jpeg_size(struct savedial_data *args) {
+ char const *tmp_dir = g_get_tmp_dir();
+ gchar *tmp_filename;
+@@ -596,6 +597,14 @@ static gpointer calculate_jpeg_size_thread(gpointer p) {
+ return NULL;
+ }
+
++#else
++static gpointer calculate_jpeg_size_thread(gpointer p) {
++ printf("Should not happen\n");
++ return NULL;
++}
++
++#endif
++
+ static gpointer mini_save_dialog(gpointer p) {
+ struct savedial_data *args = (struct savedial_data *) p;
+ #ifdef HAVE_LIBPNG
+--
+GitLab
+
diff --git a/sci-astronomy/siril/files/siril-docfiles.patch b/sci-astronomy/siril/files/siril-docfiles.patch
new file mode 100644
index 000000000000..f98e0210d7e6
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-docfiles.patch
@@ -0,0 +1,16 @@
+--- siril-1.0.0/meson.build
++++ siril-1.0.0/meson.build
+@@ -497,13 +497,6 @@
+ ]
+
+ install_man(man_files)
+-install_data(['AUTHORS', 'LICENSE.md', 'LICENSE_sleef.txt'],
+- rename : [
+- 'doc/siril/AUTHORS',
+- 'doc/siril/LICENSE.md',
+- 'doc/siril/LICENSE_sleef.txt',
+- ],
+- install_dir : siril_share)
+
+
+ ################################################################################
diff --git a/sci-astronomy/siril/metadata.xml b/sci-astronomy/siril/metadata.xml
new file mode 100644
index 000000000000..0f4d6e0b7080
--- /dev/null
+++ b/sci-astronomy/siril/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>mario.haustein@hrz.tu-chemnitz.de</email>
+ <name>Mario Haustein</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ SIRIL is an astronomical image processing tool.
+
+ It is specially tailored for noise reduction and improving the
+ signal/noise ratio of an image from multiple captures, as required in
+ astronomy. SIRIL can align automatically or manually, stack and enhance
+ pictures from various file formats, even image sequence files (films
+ and SER files). It works well with limited system resources, like in
+ embedded platforms, but is also very fast when run on more powerful
+ computers.
+ </longdescription>
+ <use>
+ <flag name="libconfig">Require <pkg>dev-libs/libconfig</pkg> to read old configuration files</flag>
+ <flag name="wcs">Add supprt astrometry features using <pkg>sci-astronomy/wcslib</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="gitlab">free-astro/siril</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/siril/siril-1.2.6-r1.ebuild b/sci-astronomy/siril/siril-1.2.6-r1.ebuild
new file mode 100644
index 000000000000..2219abe8ee82
--- /dev/null
+++ b/sci-astronomy/siril/siril-1.2.6-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson optfeature toolchain-funcs xdg
+
+DESCRIPTION="A free astronomical image processing software"
+HOMEPAGE="https://siril.org/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/free-astro/${PN}.git"
+else
+ SRC_URI="https://gitlab.com/free-astro/siril/-/archive/${PV/_/-}/${PN}-${PV/_/-}.tar.bz2"
+ KEYWORDS="amd64 ~x86"
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+LICENSE="GPL-3+ Boost-1.0"
+SLOT="0"
+IUSE="curl exif ffmpeg heif jpeg libconfig openmp png raw tiff wcs"
+
+DEPEND="
+ >=dev-libs/glib-2.56.0:2
+ >=dev-libs/json-glib-1.2.6
+ media-libs/librtprocess
+ >=media-libs/opencv-4.4.0:=[features2d]
+ sci-libs/cfitsio:=
+ sci-libs/fftw:3.0=
+ sci-libs/gsl:=
+ x11-libs/gdk-pixbuf:2
+ x11-libs/cairo
+ x11-libs/pango
+ >=x11-libs/gtk+-3.20.0:3
+ curl? ( net-misc/curl )
+ exif? ( >=media-gfx/exiv2-0.25:= )
+ ffmpeg? ( media-video/ffmpeg:= )
+ heif? ( media-libs/libheif:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ libconfig? ( >=dev-libs/libconfig-1.4:=[cxx] )
+ png? ( >=media-libs/libpng-1.6.0:= )
+ raw? ( media-libs/libraw:= )
+ tiff? ( media-libs/tiff:= )
+ wcs? ( >=sci-astronomy/wcslib-7.7:= )
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="dev-build/cmake
+ x11-base/xorg-proto"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docfiles.patch"
+ "${FILESDIR}/${PN}-1.2-fseek64-musl.patch"
+ "${FILESDIR}/${PN}-1.2.1-options.patch"
+ "${FILESDIR}/${PN}-1.2.6-linkage.patch"
+)
+
+DOCS=( README.md NEWS ChangeLog AUTHORS )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local emesonargs=(
+ -Dffms2=false
+ -Dcriterion=false
+ $(meson_use exif exiv2)
+ $(meson_use ffmpeg)
+ $(meson_use heif libheif)
+ $(meson_use jpeg libjpeg)
+ $(meson_use libconfig)
+ $(meson_use openmp)
+ $(meson_use png libpng)
+ $(meson_use raw libraw)
+ $(meson_use tiff libtiff)
+ $(meson_use wcs wcslib)
+ $(usex curl -Denable-libcurl=yes -Denable-libcurl=no)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+ optfeature "gnuplot support" sci-visualization/gnuplot
+}
diff --git a/sci-astronomy/siril/siril-1.4.0-r1.ebuild b/sci-astronomy/siril/siril-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..2c495d26c9cd
--- /dev/null
+++ b/sci-astronomy/siril/siril-1.4.0-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="tk"
+
+inherit meson python-r1 toolchain-funcs xdg
+
+DESCRIPTION="A free astronomical image processing software"
+HOMEPAGE="https://siril.org/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/free-astro/${PN}.git"
+else
+ SRC_URI="https://gitlab.com/free-astro/siril/-/archive/${PV/_/-}/${PN}-${PV/_/-}.tar.bz2"
+ KEYWORDS="amd64 ~x86"
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+LICENSE="GPL-3+ Boost-1.0"
+SLOT="0"
+IUSE="curl exif ffmpeg git heif jpeg jpegxl openmp png raw tiff"
+
+DEPEND="
+ >=dev-libs/glib-2.56.0:2
+ >=dev-libs/yyjson-0.10.0:=
+ media-libs/lcms:=
+ media-libs/librtprocess
+ >=media-libs/opencv-4.2.0:=[features2d]
+ >=sci-astronomy/wcslib-7.12:=
+ sci-libs/cfitsio:=
+ sci-libs/fftw:3.0=
+ sci-libs/gsl:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.22.0:3
+ x11-libs/gtksourceview:4
+ x11-libs/pango
+ virtual/zlib:=
+ curl? ( net-misc/curl )
+ exif? ( >=media-gfx/exiv2-0.25:= )
+ ffmpeg? ( media-video/ffmpeg:= )
+ git? ( dev-libs/libgit2:= )
+ heif? ( media-libs/libheif:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ jpegxl? ( media-libs/libjxl:= )
+ png? ( >=media-libs/libpng-1.6.0:= )
+ raw? ( media-libs/libraw:= )
+ tiff? ( media-libs/tiff:= )
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/pip[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-build/cmake
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4-docfiles.patch"
+ "${FILESDIR}/${PN}-1.4.0-libgit2.patch"
+ "${FILESDIR}/${PN}-1.4.0-libjpeg.patch"
+ "${FILESDIR}/${PN}-1.4.0-libcurl.patch"
+)
+
+DOCS=( README.md ChangeLog AUTHORS )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local emesonargs=(
+ -DlibXISF=false
+ -Dffms2=false
+ -Dcriterion=false
+ $(meson_use curl libcurl)
+ $(meson_use exif exiv2)
+ $(meson_use ffmpeg)
+ $(meson_use git libgit2)
+ $(meson_use heif libheif)
+ $(meson_use jpeg libjpeg)
+ $(meson_use jpegxl libjxl)
+ $(meson_use openmp)
+ $(meson_use png libpng)
+ $(meson_use raw libraw)
+ $(meson_use tiff libtiff)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
diff --git a/sci-astronomy/siril/siril-1.4.2.ebuild b/sci-astronomy/siril/siril-1.4.2.ebuild
new file mode 100644
index 000000000000..08f62688ad53
--- /dev/null
+++ b/sci-astronomy/siril/siril-1.4.2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="tk"
+
+inherit meson python-r1 toolchain-funcs xdg
+
+DESCRIPTION="A free astronomical image processing software"
+HOMEPAGE="https://siril.org/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/free-astro/${PN}.git"
+else
+ SRC_URI="https://gitlab.com/free-astro/siril/-/archive/${PV/_/-}/${PN}-${PV/_/-}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+LICENSE="GPL-3+ Boost-1.0"
+SLOT="0"
+IUSE="curl exif ffmpeg git heif jpeg jpegxl openmp png raw tiff"
+
+DEPEND="
+ >=dev-libs/glib-2.56.0:2
+ >=dev-libs/yyjson-0.10.0:=
+ media-libs/lcms:=
+ media-libs/librtprocess
+ >=media-libs/opencv-4.2.0:=[features2d]
+ >=sci-astronomy/wcslib-7.12:=
+ sci-libs/cfitsio:=
+ sci-libs/fftw:3.0=
+ sci-libs/gsl:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.22.0:3
+ x11-libs/gtksourceview:4
+ x11-libs/pango
+ virtual/zlib:=
+ curl? ( net-misc/curl )
+ exif? ( >=media-gfx/exiv2-0.25:= )
+ ffmpeg? ( media-video/ffmpeg:= )
+ git? ( dev-libs/libgit2:= )
+ heif? ( media-libs/libheif:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ jpegxl? ( media-libs/libjxl:= )
+ png? ( >=media-libs/libpng-1.6.0:= )
+ raw? ( media-libs/libraw:= )
+ tiff? ( media-libs/tiff:= )
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/pip[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-build/cmake
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4-docfiles.patch"
+)
+
+DOCS=( README.md ChangeLog AUTHORS )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local emesonargs=(
+ -DlibXISF=false
+ -Dffms2=false
+ -Dcriterion=false
+ $(meson_use curl libcurl)
+ $(meson_use exif exiv2)
+ $(meson_use ffmpeg)
+ $(meson_use git libgit2)
+ $(meson_use heif libheif)
+ $(meson_use jpeg libjpeg)
+ $(meson_use jpegxl libjxl)
+ $(meson_use openmp)
+ $(meson_use png libpng)
+ $(meson_use raw libraw)
+ $(meson_use tiff libtiff)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
diff --git a/sci-astronomy/siril/siril-9999.ebuild b/sci-astronomy/siril/siril-9999.ebuild
new file mode 100644
index 000000000000..08f62688ad53
--- /dev/null
+++ b/sci-astronomy/siril/siril-9999.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="tk"
+
+inherit meson python-r1 toolchain-funcs xdg
+
+DESCRIPTION="A free astronomical image processing software"
+HOMEPAGE="https://siril.org/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/free-astro/${PN}.git"
+else
+ SRC_URI="https://gitlab.com/free-astro/siril/-/archive/${PV/_/-}/${PN}-${PV/_/-}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+LICENSE="GPL-3+ Boost-1.0"
+SLOT="0"
+IUSE="curl exif ffmpeg git heif jpeg jpegxl openmp png raw tiff"
+
+DEPEND="
+ >=dev-libs/glib-2.56.0:2
+ >=dev-libs/yyjson-0.10.0:=
+ media-libs/lcms:=
+ media-libs/librtprocess
+ >=media-libs/opencv-4.2.0:=[features2d]
+ >=sci-astronomy/wcslib-7.12:=
+ sci-libs/cfitsio:=
+ sci-libs/fftw:3.0=
+ sci-libs/gsl:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.22.0:3
+ x11-libs/gtksourceview:4
+ x11-libs/pango
+ virtual/zlib:=
+ curl? ( net-misc/curl )
+ exif? ( >=media-gfx/exiv2-0.25:= )
+ ffmpeg? ( media-video/ffmpeg:= )
+ git? ( dev-libs/libgit2:= )
+ heif? ( media-libs/libheif:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ jpegxl? ( media-libs/libjxl:= )
+ png? ( >=media-libs/libpng-1.6.0:= )
+ raw? ( media-libs/libraw:= )
+ tiff? ( media-libs/tiff:= )
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/pip[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-build/cmake
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4-docfiles.patch"
+)
+
+DOCS=( README.md ChangeLog AUTHORS )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local emesonargs=(
+ -DlibXISF=false
+ -Dffms2=false
+ -Dcriterion=false
+ $(meson_use curl libcurl)
+ $(meson_use exif exiv2)
+ $(meson_use ffmpeg)
+ $(meson_use git libgit2)
+ $(meson_use heif libheif)
+ $(meson_use jpeg libjpeg)
+ $(meson_use jpegxl libjxl)
+ $(meson_use openmp)
+ $(meson_use png libpng)
+ $(meson_use raw libraw)
+ $(meson_use tiff libtiff)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+}
diff --git a/sci-astronomy/sirilic/Manifest b/sci-astronomy/sirilic/Manifest
new file mode 100644
index 000000000000..95efda7313a8
--- /dev/null
+++ b/sci-astronomy/sirilic/Manifest
@@ -0,0 +1 @@
+DIST sirilic-V1.15.12.tar.bz2 147469 BLAKE2B 9f746220bf16b916dba2cb406098c1a1a2a6599efda255301163da8ecfa3ef980388fa11907a7eee16d586b08639d8a5f82b76ed3c60065b49bf9b03fb861d64 SHA512 d2509c42c1093c81c07307d8b6880491e0a2363aeb68753c69e5c40545b98f6bfc0b888659704c81d5fbf6fb34ee978c0fdc7dc8e0c6ed5fe2125b2f2f347d54
diff --git a/sci-astronomy/sirilic/metadata.xml b/sci-astronomy/sirilic/metadata.xml
new file mode 100644
index 000000000000..3613015496fd
--- /dev/null
+++ b/sci-astronomy/sirilic/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>mario.haustein@hrz.tu-chemnitz.de</email>
+ <name>Mario Haustein</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ SiriLic (SiriL's Interactif Companion) is a software for preparing
+ acquisition files (RAW, Offset, Flat and Dark) for processing with
+ SiriL software.
+ </longdescription>
+ <upstream>
+ <remote-id type="gitlab">free-astro/sirilic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/sirilic/sirilic-1.15.12.ebuild b/sci-astronomy/sirilic/sirilic-1.15.12.ebuild
new file mode 100644
index 000000000000..d0fee61fdd0d
--- /dev/null
+++ b/sci-astronomy/sirilic/sirilic-1.15.12.ebuild
@@ -0,0 +1,23 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+inherit distutils-r1
+
+DESCRIPTION="Preparing acquisition files for processing with the SiriL software"
+HOMEPAGE="https://gitlab.com/free-astro/sirilic"
+SRC_URI="https://gitlab.com/free-astro/sirilic/-/archive/V${PV}/${PN}-V${PV}.tar.bz2"
+S="${WORKDIR}/${PN}-V${PV}"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=dev-python/wxpython-4.2:4.0[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}"
diff --git a/sci-astronomy/skymaker/Manifest b/sci-astronomy/skymaker/Manifest
new file mode 100644
index 000000000000..00fa381f56c1
--- /dev/null
+++ b/sci-astronomy/skymaker/Manifest
@@ -0,0 +1 @@
+DIST skymaker-3.10.5.tar.gz 508938 BLAKE2B 82baaf083deb941c31052c3394a601489cb9c4efea979055236eb33af1df2b5473bc43339e76de0785956f5a9a7968f48c62227c66bf1e76ef57907e16cbdac4 SHA512 98bb5a75c21475c6ecf16cb7de333db7faae95fd32c4ac311b44ddf637ffec2c80061b056b070b8d21b1a5a46c0a5a82855e417d25a9d8de02aad2167cb45b43
diff --git a/sci-astronomy/skymaker/files/skymaker-3.10.5-fno-common.patch b/sci-astronomy/skymaker/files/skymaker-3.10.5-fno-common.patch
new file mode 100644
index 000000000000..f80ed5422c67
--- /dev/null
+++ b/sci-astronomy/skymaker/files/skymaker-3.10.5-fno-common.patch
@@ -0,0 +1,66 @@
+--- a/src/fits/fitscat.c
++++ b/src/fits/fitscat.c
+@@ -42,6 +42,9 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++int bswapflag;
++char gstr[MAXCHAR];
++
+ /****** about_cat **************************************************************
+ PROTO int about_cat(catstruct *cat, FILE *stream)
+ PURPOSE Print some info about a catalog.
+--- a/src/fits/fitscat_defs.h
++++ b/src/fits/fitscat_defs.h
+@@ -86,7 +86,7 @@
+ typedef int LONG; /* for DEC-Alpha... */
+
+ /*----------------------------- Internal constants --------------------------*/
+-char gstr[MAXCHAR];
++extern char gstr[MAXCHAR];
+
+ /*----------------------------- External constants --------------------------*/
+
+--- a/src/fits/fitscat.h
++++ b/src/fits/fitscat.h
+@@ -333,6 +333,6 @@
+ warning(char *msg1, char *msg2);
+
+
+-int bswapflag;
++extern int bswapflag;
+
+ #endif
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -29,7 +29,7 @@
+ #include "types.h"
+
+ /*----------------------- miscellaneous variables ---------------------------*/
+-char gstr[MAXCHAR];
++extern char gstr[MAXCHAR];
+
+ /*------------------------------- functions ---------------------------------*/
+ extern void makeit(void);
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -59,6 +59,8 @@
+ #include "prefs.h"
+ #include "preflist.h"
+
++prefstruct prefs;
++
+ /********************************* dumpprefs ********************************/
+ /*
+ Print the default preference parameters.
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -149,7 +149,7 @@
+ int nobj; /* Number of sources added */
+ } prefstruct;
+
+-prefstruct prefs;
++extern prefstruct prefs;
+
+ /*-------------------------------- protos -----------------------------------*/
+ extern int cistrcmp(char *cs, char *ct, int mode);
diff --git a/sci-astronomy/skymaker/metadata.xml b/sci-astronomy/skymaker/metadata.xml
new file mode 100644
index 000000000000..ca8254972502
--- /dev/null
+++ b/sci-astronomy/skymaker/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ SkyMaker is a program that simulates astronomical images. It accepts
+ object lists in ASCII generated by the Stuff program to produce
+ realistic astronomical fields. There are various options for the user:
+ build a realistic Point Spread Function, generate a list of stars and
+ galaxies. Galaxies are modeled analytically.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">astromatic/skymaker</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/skymaker/skymaker-3.10.5.ebuild b/sci-astronomy/skymaker/skymaker-3.10.5.ebuild
new file mode 100644
index 000000000000..bec83d5d62ff
--- /dev/null
+++ b/sci-astronomy/skymaker/skymaker-3.10.5.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Program that simulates astronomical images"
+HOMEPAGE="http://www.astromatic.net/software/skymaker"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="threads"
+
+RDEPEND="sci-libs/fftw:3.0="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
+src_configure() {
+ econf $(use_enable threads)
+}
diff --git a/sci-astronomy/sofa_c/Manifest b/sci-astronomy/sofa_c/Manifest
new file mode 100644
index 000000000000..c7ddb940f695
--- /dev/null
+++ b/sci-astronomy/sofa_c/Manifest
@@ -0,0 +1 @@
+DIST sofa_c-20231011.tar.gz 3055571 BLAKE2B 4a2771599af61f06cab76c83af8d8bac321258bd2145f7558be9a7afed3b5cefc13bea2a24d05f9a7481409e617f807f4e29173d87ab58a403808d43aae477a5 SHA512 8e7d67f7ac7a285a96160c96d16b1921ccb7a9324b83280b1594efcbbd7eb78c4d41898c1e5acfa5081842e4aeee15a96572d21b466bfda7ef7582c58624d376
diff --git a/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch b/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch
new file mode 100644
index 000000000000..9e923db1604a
--- /dev/null
+++ b/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch
@@ -0,0 +1,105 @@
+--- a/makefile
++++ b/makefile
+@@ -49,7 +49,7 @@
+
+ # Specify the installation home directory.
+
+-INSTALL_DIR = $(HOME)
++INSTALL_DIR = $(DESTDIR)/usr
+
+ # Specify the installation directory for the library.
+
+@@ -63,9 +63,9 @@
+ # of your preferred C compiler (CCOMPC) and compilation flags (CFLAGF
+ # for functions, CFLAGX for executables) here.
+
+-CCOMPC = gcc
+-CFLAGF = -c -pedantic -Wall -O
+-CFLAGX = -pedantic -Wall -O
++CCOMPC = $(CC)
++CFLAGF = $(CPPFLAGS) -I. -c -fPIC $(CFLAGS)
++CFLAGX = $(CPPFLAGS) -I. $(CFLAGS)
+
+ #----YOU SHOULDN'T HAVE TO MODIFY ANYTHING BELOW THIS LINE---------
+
+@@ -80,6 +80,11 @@
+ SOFA_LIB_NAME = libsofa_c.a
+ SOFA_LIB = $(SOFA_LIB_DIR)$(SOFA_LIB_NAME)
+
++# Name the SOFA/C library in its source and target locations.
++
++SOFA_SHLIB_NAME = libsofa_c.so
++SOFA_SHLIB = $(SOFA_LIB_DIR)$(SOFA_SHLIB_NAME)
++
+ # Name the SOFA/C testbed in its source and target locations.
+
+ SOFA_TEST_NAME = t_sofa_c.c
+@@ -88,7 +93,7 @@
+ # Name the SOFA/C includes in their source and target locations.
+
+ SOFA_INC_NAMES = sofa.h sofam.h
+-SOFA_INC = $(SOFA_INC_DIR)sofa.h $(SOFA_INC_DIR)sofam.h
++SOFA_INC = $(SOFA_INC_NAMES:%=$(SOFA_INC_DIR)%)
+
+ # The list of SOFA/C library object files.
+
+@@ -347,28 +352,30 @@
+ #-----------------------------------------------------------------------
+
+ # Build (but do not install) the library.
+-all : $(SOFA_LIB_NAME)
++all : $(SOFA_SHLIB_NAME)
+ -@ echo ""
+ -@ echo "*** Now type 'make test'" \
+ " to install the library and run tests ***"
+ -@ echo ""
+
+ # Install the library and header files.
+-install $(SOFA_LIB) : $(INSTALL_DIRS) $(SOFA_LIB_NAME) $(SOFA_INC)
+- cp $(SOFA_LIB_NAME) $(SOFA_LIB_DIR)
++install: $(INSTALL_DIRS) $(SOFA_SHLIB_NAME) $(SOFA_INC)
++ cp $(SOFA_SHLIB_NAME).0.0 $(SOFA_LIB_DIR)
++ ln -s $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB).0
++ ln -s $(SOFA_SHLIB_NAME).0 $(SOFA_SHLIB)
+
+ # Deinstall the library and header files.
+ uninstall:
+- - $(RM) $(SOFA_LIB) $(SOFA_INC)
++ - $(RM) $(SOFA_LIB) $(SOFA_SHLIB)* $(SOFA_INC)
+
+ # Test the build.
+-check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_LIB_NAME)
+- $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_LIB_NAME) \
+- -I. -lm -o $(SOFA_TEST)
+- ./$(SOFA_TEST)
++check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_SHLIB_NAME)
++ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_SHLIB_NAME).0.0 \
++ -lm -o $(SOFA_TEST)
++ LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}:." ./$(SOFA_TEST)
+
+ # Test the installed library.
+-installcheck test: $(SOFA_TEST_NAME) $(SOFA_INC) $(SOFA_LIB)
++installcheck: $(SOFA_TEST_NAME) $(SOFA_INC) $(SOFA_LIB)
+ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) -I$(SOFA_INC_DIR) \
+ -L$(SOFA_LIB_DIR) -lsofa_c -lm -o $(SOFA_TEST)
+ ./$(SOFA_TEST)
+@@ -379,7 +386,7 @@
+
+ # Delete all generated binaries in the current directory.
+ realclean distclean : clean
+- - $(RM) $(SOFA_LIB_NAME) $(SOFA_TEST)
++ - $(RM) $(SOFA_LIB_NAME) $(SOFA_SHLIB_NAME)* $(SOFA_TEST)
+
+ # Create the installation directories if not already present.
+ $(INSTALL_DIRS):
+@@ -389,6 +396,10 @@
+ $(SOFA_LIB_NAME): $(SOFA_OBS)
+ ar ru $(SOFA_LIB_NAME) $?
+
++$(SOFA_SHLIB_NAME): $(SOFA_OBS)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(SOFA_SHLIB_NAME).0 $? -lm -o $(SOFA_SHLIB_NAME).0.0
++ ln -sfn $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB_NAME).0
++
+ # Install the header files.
+ $(SOFA_INC) : $(INSTALL_DIRS) $(SOFA_INC_NAMES)
+ cp $(SOFA_INC_NAMES) $(SOFA_INC_DIR)
diff --git a/sci-astronomy/sofa_c/metadata.xml b/sci-astronomy/sofa_c/metadata.xml
new file mode 100644
index 000000000000..dc115367ce6f
--- /dev/null
+++ b/sci-astronomy/sofa_c/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ This is a suite of vector/matrix routines and various utilities that
+ underpin the astronomy algorithms, which include routines for the
+ following:
+ * Calendars
+ * Time Scales
+ * Earth rotation and sidereal time
+ * Ephemerides (medium precision)
+ * Geocentric/geodetic transformations
+ * Precession, nutation, polar motion
+ * Star space motion
+ * Star catalogue conversion
+ This is the ANSI C version of the library.
+ The International Astronomical Union's SOFA service has the task of
+ establishing and maintaining an accessible and authoritative set of
+ algorithms and procedures that implement standard models used in
+ fundamental astronomy.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/sofa_c/sofa_c-20231011.ebuild b/sci-astronomy/sofa_c/sofa_c-20231011.ebuild
new file mode 100644
index 000000000000..71ec404941bb
--- /dev/null
+++ b/sci-astronomy/sofa_c/sofa_c-20231011.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+YYYY=${PV:0:4}
+MMDD=${PV:4:4}
+MYPV=${YYYY}${MMDD}
+
+DESCRIPTION="Library for algorithms for models in fundamental astronomy"
+HOMEPAGE=" http://www.iausofa.org/current_C.html"
+SRC_URI="http://www.iausofa.org/${YYYY}_${MMDD}_C/${PN}-${MYPV}.tar.gz"
+S="${WORKDIR}/sofa/${MYPV}/c/src"
+
+LICENSE="SOFA"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_prepare() {
+ default
+ sed -e "s:/lib:/$(get_libdir):" -i makefile || die
+ tc-export CC
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ cd ..
+ dodoc 00READ.ME
+ use doc && dodoc doc/*.lis doc/*.pdf
+}
diff --git a/sci-astronomy/stellarium/Manifest b/sci-astronomy/stellarium/Manifest
new file mode 100644
index 000000000000..4098af2da018
--- /dev/null
+++ b/sci-astronomy/stellarium/Manifest
@@ -0,0 +1,22 @@
+DIST stars_4_1v0_6.cat 55759776 BLAKE2B a62d35c697690feb0eb9a83dcda9b9f28d9ef0b57d4fc1c8e4049d7a5209e5a7d0d960dc927649ef8ebd2c6ffce1eca56cf8dcd15e75c870213fe95ec29a2af0 SHA512 315e61e181e056e9429e216b90aeaec61308c91f7f097f94325ed016e815ba2a0adf2b7ea2bf641b4f42afef07cda3cf78cf7ab0f1a9aa4d4e79c39d7b2edbbf
+DIST stars_4_1v0_6.cat.asc 313 BLAKE2B 3aa4cb97987ff4acfddf6ee804bcffe8157c605b04eb9ceefccaeced15d3d8d0706aab955ad59482a1b635edbef8078680a6b70d5942b4bdf03edc19a003028b SHA512 b9e72d1840a110fe6087c263c9c36696f1fc17758bf68719f901ac16dfeda0f578a7837a88da0c6f2bdf3f6be5e2e1658f54be2a8eede82e9031ebd26287235d
+DIST stars_5_1v0_6.cat 257743872 BLAKE2B 9c84b28b596ac003fb262f6c7273327fdf24f19dd13356271068ffcff5357cc1f4c754227045895988699b257418bf533f2712087aa7b43fd19fe86ed34db0ed SHA512 73b4a8a6344ff329ba65ff6e3d8577b6524f8bb8c1a620dba9e4080641a578f066a312a5e72b79b99f97c9571c4a7dc213dc014832eeb96e00ad45e964303ce5
+DIST stars_5_1v0_6.cat.asc 313 BLAKE2B 3d40462ea53ec05c1ec2cdee6b007ec8375a5071878c87a3394b6bf29364c5720e0bdc571251de42cff0456c4057941bd0ffb22945d32dd31e13259e09371f3e SHA512 7e920b7b00e9080128f9fb50b0af1258f1aace855ae2d3535aad9674cbe202e52bc48ea8c3d8bac9a228698869d980dc90b209452b8c733cce373ad762710a7b
+DIST stars_6_1v0_4.cat 956479200 BLAKE2B 7d53987ae6fabcb9879f010944008e6798342611db72ce85a322e712417418c5137e35ffd97e3aa6a56574d79689fbd78c6094f6831893202ea022cbede0b226 SHA512 051154ab596a1be53d9dda98d7978864787c9d1996f7714aef12f53d32a502d079cb2812718c2c101409e5619fcfc03172dbfbdc5ef1aa2c41480de7aa38d68b
+DIST stars_6_1v0_4.cat.asc 313 BLAKE2B a8cdcee892b3d4ea5f945fa0878d7c20605d3f5c67e773be8851c28bb2ae328e7720792b2e29cb86d959e13a760869588cb53c0acf92e4ab0f4ab302052fc179 SHA512 d16c5ef59e9f6785f37329c678710304712d141c331f30f87272be71ba43adbf4203cb3eb9f6835484f96e6ee19b73e7d18355e71df6d6eb80ba98e163f51b8b
+DIST stars_7_1v0_4.cat 1842421888 BLAKE2B 5f5e323565c0b3fba1006e08b9e27d2db6e6c501dbfbb18c9e206767a80a3511bd73a0701cb5ec58e73db9ea35feabf70519ca8e1a7ec68a7275dc892e1555f9 SHA512 47344376a265a165b10743630216b8c7f54a7d87a8d78c31d0acaefeec5b1722aba89b8c049b75da63851bacb3a861f0d10f29188bb01ed52141ea9b829d4377
+DIST stars_7_1v0_4.cat.asc 313 BLAKE2B 4d2ad78812ed45e655266cdfffd4eaaae6ced690a6c511eaef2932fad9e7cb68389d069162e2e99eb4df9ed0630d7cdb2adae6cbcfa85ee049ae13e471d9f5ac SHA512 ff0b216116e86abf6bd3b46a44df986dfc91fe61df988f1d939f4db0d4456283dda0e5a6fe562433ab7dfcc096a35adeafdbeab497bc16d8587a89729fab9d6a
+DIST stars_8_2v0_3.cat 1971773856 BLAKE2B 49aab2f1490cd25c83a50eea4cab5c54d3db0e7f473140f466f8d2f205af3bfe981e94cdcd7eb164993df851396895304d325f1064634115ca8355b35fddc3d5 SHA512 026c3f4972a09fcd98a083f440654b614c89041e38dc5810d799bf986786d8e500cdb0cf6f9124fec1e91ba2891375d5778daf8a2c2906873cb4d41669f6fbe0
+DIST stars_8_2v0_3.cat.asc 313 BLAKE2B 39c0f8a3189dc2434cb6c38f786bcf504bcfcb6473fd26ffbef7d84b3de7e351f8f3fe57171958965e1e0740eb3b2e88aa9d6e7eb66befcf6e0c1f882cada355 SHA512 90c1ae0e9391c3f940ef6c114385408f8d181b87c611f6240379d98f51d0a4cc4feb6b0433b345770ebac23485b1d219d38d5caf4addd24868da54143ef75537
+DIST stellarium-25.4.tar.xz 442058888 BLAKE2B ff62e189fd06a33deb7d2ebc1c802d5ee8ee845a6937489eea33af7afb8429b1b51efb62f23751ff56b0fd216e46d3c59f64c9ed8ab1bfad0bb83798c1fb944b SHA512 a6b87ccb8670d66fe097817822631bda78b50a0e5371ed759b91f16f60c74e68711334e1c8263c80aaea7b3d4f512ece0bd7008aafd35393ddbe641cbda055e3
+DIST stellarium-25.4.tar.xz.asc 313 BLAKE2B 75e43e10d7ce2199e710a13ee2ea6d111d37f6caf51c9e414b812064db1281648e39f13947d2dbe6734c64f2cc8fd85c29190001a91486a7bec1b51363451d09 SHA512 f6280ab360d40b0c76ffae655627110d4d8f6beb718e055904c0cfe81631d074910cd9c9d2f9f5d96b20a886a7cf37ed184b6cec25bc3014f4d06e40a9c96d3b
+DIST stellarium-26.1.tar.xz 453293332 BLAKE2B 4a43605bb94e79156fb57e1b0d8920009714af7e5a0cebe90dba9b906f240c8abf0ed2bc4bd9977292ca03c4f2920c166e83a8e90c2073a9785795b1393b5f92 SHA512 cd3f51f920bf33ea63f9fc38bec379b7650461af213520a9a2fbeb5d9dc3c763ca8c28030a107136553d71dd0f7137d9c465a5f6ea2ec0977ec48a8e78ac9dc6
+DIST stellarium-26.1.tar.xz.asc 313 BLAKE2B f48281bcb06b4e9d64ff7c41ca331927f8828b9b1ac24bb1369e0b8af90ee3a67017ce380130e8701552ae22d133f7148dda8389ef96240d0fce94e4680be639 SHA512 f51fa14e63b4f37a68e43b18d8e223afe129fd4b59b7ad38310013ddd1e1c01b32f04a63824d373fff3a942ab2372377a32385f1d511d84c516cb247db6c6aee
+DIST stellarium-dso-catalog-3.22.dat 28674096 BLAKE2B 58a91361b5c17a46d306e9233b391d8192314db19db6404fdd42b1edc08ca8d6f7f4e5113c5ab0a84fa4926c293e7dad9ae6caf49ddff1a4830ee6c79c8e1f48 SHA512 ce5d5bc403a77948c0b29d055d1cf2cce9e6a38054135438fb4f3802444f6c6770b6567957c32f1a80f86bc3ddf23fa2fa9489e345c1570f005691ff3e09e045
+DIST stellarium-dso-catalog-3.22.dat.asc 313 BLAKE2B d7ff8d62bc390d08f52a36a1f12edc654a7fb96e43d3364bb51b1ad32ff1c43ce3f38dd9fd36ff6ba94a190eeebb5232edcb204a50ddb37d60b6b8a408783d69 SHA512 6e2f0110cb12a4ed712951a322c9581f8082f39242f2c385bb330facd39f846a8379d098610ddba197ec74a2331929f3f1a89667a1617e7508727026d66bdf29
+DIST stellarium-dso-catalog-3.23.dat 28685798 BLAKE2B 9b35fc8f6fc96f98e511799925ee73f45cd1efbf1630aee0d7fe6fd6c8679a29c17408f88e20e76007a0b25d78b37ca0205009b6e86acf553d76b33638203f22 SHA512 e6da2f5d5b9d39538feff86e1460de692b966d2af6a8c0a4adde64f42cf53a49a54d471c6f6cdbca0158575ee5434ac003b2d3a2121f54fb3bac4443153b2e08
+DIST stellarium-dso-catalog-3.23.dat.asc 313 BLAKE2B 733b6bba61725f59bf119c59a2e01a097cbb6ded4fdfc28b36750ddff21b9e21c5f512eb2b88fe0f0ce3553b269fdbd736776f56faa6e26a6fe753afa44bd49f SHA512 2ab51bbc0b8595da0726fa9145c76285a0ef3f376edce8bf94c091a2ba0d0b819efa360e8508efb090930542922085a7e1eb07bfff439a411f12f3355fa5048a
+DIST stellarium_user_guide-25.4-1.pdf 14678792 BLAKE2B e02ba4addd8d8db21c6088099f788d157223dfc36a624a73fcbf50adf0c406f7c770c924531a7e9f25a887224d38cd7815f068deca0218298a56b5b0fea2a34b SHA512 311c956f7955ef41004e835eb8e4cc79522ccfa23d5fda5b50e63a543d948faec117416eddf192736eccf16b52b982b79141c323c7c02cf4c10393b7854b07b7
+DIST stellarium_user_guide-25.4-1.pdf.asc 313 BLAKE2B 1a779d6948ac0fd3a191408f21be40898e57a6aea57a4611b9dbf262fc09e626086298a0f917aa5d28cd51beeb0890602aca4f37b078d105eadc0f2e28321b8e SHA512 cfdf1466ed21903e65d09fbddc3954cda18bf2761185c78c04feb6c26f0744247e3049631c3b373d466af32ae93523ec2890e34fd19d7de41821af2b95402606
+DIST stellarium_user_guide-26.1-1.pdf 14985811 BLAKE2B 64d29eb92c90448a0157b1491aef46cdb0f0a8df0d320e4dcea9eac362c0346739ece704065e82e66adba26e4b5d05f253ee304a5f733192f4d65ef419a0a40c SHA512 b20a0c769a3040d8a706c5265f65f701e6dc863429b339a619287ea2e0e88c5f1c0c3dea718281183e874875efc0ccadb24c86a9225c2722a55fa3f2f8990260
+DIST stellarium_user_guide-26.1-1.pdf.asc 313 BLAKE2B 08367466c8c722a1aa602c5dd4648540d2f2d3d260b42bf90e3b54d1ecedf8a35206da3a8951653be3247582285e6618c48ceb741630c1dcc5f6cc8c94476324 SHA512 40a77825878a8e84a147b839570493d9cbff89047c63a5ad5ac3438d3f06f7edc9829f93107576dd973003d8cea5ca7badb6aa88c237854823f6b5a08a1818d1
diff --git a/sci-astronomy/stellarium/files/stellarium-0.25.4-segfault.patch b/sci-astronomy/stellarium/files/stellarium-0.25.4-segfault.patch
new file mode 100644
index 000000000000..5d941fbd826f
--- /dev/null
+++ b/sci-astronomy/stellarium/files/stellarium-0.25.4-segfault.patch
@@ -0,0 +1,29 @@
+https://github.com/Stellarium/stellarium/commit/5023376c32668771db8757c3fae61289efd26cc3
+
+From 5023376c32668771db8757c3fae61289efd26cc3 Mon Sep 17 00:00:00 2001
+From: "Alexander V. Wolf" <alex.v.wolf@gmail.com>
+Date: Mon, 29 Dec 2025 21:59:39 +0700
+Subject: [PATCH] Fixed crash at exit from Stellarium in macOS
+
+---
+ plugins/Calendars/src/Calendars.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/Calendars/src/Calendars.cpp b/plugins/Calendars/src/Calendars.cpp
+index d33eb31902349..882358dcc7ea4 100644
+--- a/plugins/Calendars/src/Calendars.cpp
++++ b/plugins/Calendars/src/Calendars.cpp
+@@ -170,9 +170,11 @@ Calendars::Calendars():
+ Calendars::~Calendars()
+ {
+ delete configDialog; configDialog=nullptr;
+- for (auto c = calendars.cbegin(), end = calendars.cend(); c != end; ++c)
++ QMapIterator<QString, Calendar*> i(calendars);
++ while (i.hasNext())
+ {
+- Calendar *cal = calendars.take(c.key());
++ i.next();
++ Calendar *cal = calendars.take(i.key());
+ delete cal;
+ }
+ if (infoPanel) delete infoPanel;
diff --git a/sci-astronomy/stellarium/metadata.xml b/sci-astronomy/stellarium/metadata.xml
new file mode 100644
index 000000000000..7bb1756f0c97
--- /dev/null
+++ b/sci-astronomy/stellarium/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>alexey+gentoo@asokolov.org</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Stellarium is a free open source planetarium for your computer. It
+ shows a realistic sky in 3D, just like what you see with the naked
+ eye, binoculars or a telescope. It is being used in planetarium
+ projectors.
+ </longdescription>
+ <use>
+ <flag name="deep-sky">Install extra deep sky objects catalog (may affect performance)</flag>
+ <flag name="lens-distortion">Enable lens distortion estimator plugin</flag>
+ <flag name="libcxx">Use external libraries for STL features not available in libc++</flag>
+ <flag name="media">Enable sound and video support</flag>
+ <flag name="scripting">Enable JS scripting using Qml via <pkg>dev-qt/qtdeclarative</pkg></flag>
+ <flag name="show-my-sky">Enable a better atmosphere model via <pkg>sci-astronomy/calcmysky</pkg></flag>
+ <flag name="stars">Install extra star catalogs</flag>
+ <flag name="telescope">Enable telescope control via <pkg>sci-libs/indilib</pkg></flag>
+ <flag name="webengine">Show online results about the selected star in an embedded window using <pkg>dev-qt/qtwebengine</pkg></flag>
+ <flag name="xlsx">Support XLSX (Excel) files via <pkg>dev-libs/qxlsx</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Stellarium/stellarium</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/stellarium/stellarium-25.4.ebuild b/sci-astronomy/stellarium/stellarium-25.4.ebuild
new file mode 100644
index 000000000000..b9688c042982
--- /dev/null
+++ b/sci-astronomy/stellarium/stellarium-25.4.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+inherit cmake desktop flag-o-matic python-any-r1 toolchain-funcs xdg verify-sig virtualx
+
+DESCRIPTION="3D photo-realistic skies in real time"
+HOMEPAGE="https://stellarium.org/ https://github.com/Stellarium/stellarium"
+MY_DSO_VERSION="3.22"
+SRC_URI="
+ https://github.com/Stellarium/stellarium/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? ( https://github.com/Stellarium/stellarium/releases/download/v${PV}/${P}.tar.xz.asc )
+ deep-sky? (
+ https://github.com/Stellarium/stellarium-data/releases/download/dso-${MY_DSO_VERSION}/catalog-${MY_DSO_VERSION}.dat -> ${PN}-dso-catalog-${MY_DSO_VERSION}.dat
+ verify-sig? ( https://github.com/Stellarium/stellarium-data/releases/download/dso-${MY_DSO_VERSION}/catalog-${MY_DSO_VERSION}.dat.asc -> ${PN}-dso-catalog-${MY_DSO_VERSION}.dat.asc )
+ )
+ doc? (
+ https://github.com/Stellarium/stellarium/releases/download/v${PV}/stellarium_user_guide-${PV}-1.pdf
+ verify-sig? ( https://github.com/Stellarium/stellarium/releases/download/v${PV}/stellarium_user_guide-${PV}-1.pdf.asc )
+ )
+ stars? (
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_4_1v0_6.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_5_1v0_6.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_6_1v0_4.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_7_1v0_4.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_8_2v0_3.cat
+ verify-sig? (
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_4_1v0_6.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_5_1v0_6.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_6_1v0_4.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_7_1v0_4.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_8_2v0_3.cat.asc
+ )
+ )"
+
+LICENSE="GPL-2+ SGI-B-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~riscv ~x86"
+IUSE="debug deep-sky doc gps +lens-distortion libcxx media nls +scripting +show-my-sky stars telescope test webengine +xlsx"
+
+# Python interpreter is used while building RemoteControl plugin
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ doc? ( app-text/doxygen[dot] )
+ nls? ( dev-qt/qttools:6[linguist] )
+ verify-sig? ( sec-keys/openpgp-keys-stellarium )
+"
+# TODO: review need for dev-cpp/tbb after several releases of gcc and clang
+RDEPEND="
+ dev-cpp/tbb:=
+ dev-libs/md4c
+ dev-qt/qtbase:6=[concurrent,gui,network,widgets]
+ dev-qt/qtcharts:6
+ dev-qt/qtpositioning:6
+ media-fonts/dejavu
+ >=sci-astronomy/calcmysky-0.3.5:=
+ virtual/zlib:=
+ gps? (
+ dev-qt/qtserialport:6
+ sci-geosciences/gpsd:=[cxx]
+ )
+ lens-distortion? (
+ media-gfx/exiv2:=
+ sci-libs/nlopt
+ )
+ media? (
+ dev-qt/qtmultimedia:6[gstreamer]
+ dev-qt/qtspeech:6
+ virtual/opengl
+ )
+ scripting? ( dev-qt/qtdeclarative:6 )
+ telescope? (
+ dev-qt/qtserialport:6
+ sci-libs/indilib:=
+ )
+ webengine? ( dev-qt/qtwebengine:6[widgets] )
+ xlsx? ( >=dev-libs/qxlsx-1.5.0:= )
+"
+DEPEND="${RDEPEND}
+ libcxx? ( dev-cpp/fast_float )
+"
+
+RESTRICT="!test? ( test )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/stellarium.asc
+
+PATCHES=(
+ "${FILESDIR}"/stellarium-0.25.4-segfault.patch
+)
+
+pkg_setup() {
+ if tc-is-clang && ! use libcxx && [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ die "When using libc++, please enable USE=libcxx"
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+ use debug || append-cppflags -DQT_NO_DEBUG #415769
+
+ rm -r src/external/qtcompress/ || die
+ rm -r src/external/zlib/ || die
+ rm -r src/external/fake-indi/ || die
+
+ # for glues_stel aka libtess I couldn't find an upstream with the same API
+
+ local remaining="$(cd src/external/ && echo */)"
+ if [[ "${remaining}" != "glues_stel/" ]]; then
+ eqawarn "Need to unbundle more deps: ${remaining}"
+ fi
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862249
+
+ local mycmakeargs=(
+ -DCPM_LOCAL_PACKAGES_ONLY=yes
+ -DUSE_BUNDLED_QTCOMPRESS=no
+ -DENABLE_CCACHE=no
+ -DENABLE_GPS="$(usex gps)"
+ -DENABLE_MEDIA="$(usex media)"
+ -DENABLE_NLS="$(usex nls)"
+ -DENABLE_QT6=yes
+ -DENABLE_QTWEBENGINE="$(usex webengine)"
+ -DENABLE_SHOWMYSKY=$(usex show-my-sky)
+ -DENABLE_SCRIPTING=$(usex scripting)
+ -DENABLE_TESTING="$(usex test)"
+ -DENABLE_XLSX="$(usex xlsx)"
+ -DUSE_PLUGIN_LENSDISTORTIONESTIMATOR="$(usex lens-distortion)"
+ -DUSE_PLUGIN_TELESCOPECONTROL="$(usex telescope)"
+ "$(cmake_use_find_package doc Doxygen)"
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ virtx cmake_src_test
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use doc ; then
+ cmake_build apidoc
+ fi
+}
+
+src_install() {
+ if use doc ; then
+ local HTML_DOCS=( "${BUILD_DIR}/doc/html/." )
+ dodoc "${DISTDIR}/stellarium_user_guide-${PV}-1.pdf"
+ fi
+ cmake_src_install
+
+ # use the more up-to-date system fonts
+ rm "${ED}"/usr/share/stellarium/data/DejaVuSans{Mono,}.ttf || die
+ dosym ../../fonts/dejavu/DejaVuSans.ttf /usr/share/stellarium/data/DejaVuSans.ttf
+ dosym ../../fonts/dejavu/DejaVuSansMono.ttf /usr/share/stellarium/data/DejaVuSansMono.ttf
+
+ if use stars ; then
+ insinto /usr/share/${PN}/stars/hip_gaia3
+ doins "${DISTDIR}"/stars_{4,5}_1v0_6.cat
+ doins "${DISTDIR}"/stars_{6,7}_1v0_4.cat
+ doins "${DISTDIR}"/stars_8_2v0_3.cat
+ fi
+ if use deep-sky ; then
+ insinto /usr/share/${PN}/nebulae/default
+ newins "${DISTDIR}/${PN}-dso-catalog-${MY_DSO_VERSION}.dat" catalog.dat
+ fi
+ newicon doc/images/stellarium-logo.png ${PN}.png
+}
diff --git a/sci-astronomy/stellarium/stellarium-26.1.ebuild b/sci-astronomy/stellarium/stellarium-26.1.ebuild
new file mode 100644
index 000000000000..e62ad55d13b7
--- /dev/null
+++ b/sci-astronomy/stellarium/stellarium-26.1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+inherit cmake desktop flag-o-matic python-any-r1 toolchain-funcs xdg verify-sig virtualx
+
+DESCRIPTION="3D photo-realistic skies in real time"
+HOMEPAGE="https://stellarium.org/ https://github.com/Stellarium/stellarium"
+MY_DSO_VERSION="3.23"
+SRC_URI="
+ https://github.com/Stellarium/stellarium/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? ( https://github.com/Stellarium/stellarium/releases/download/v${PV}/${P}.tar.xz.asc )
+ deep-sky? (
+ https://github.com/Stellarium/stellarium-data/releases/download/dso-${MY_DSO_VERSION}/catalog-${MY_DSO_VERSION}.dat -> ${PN}-dso-catalog-${MY_DSO_VERSION}.dat
+ verify-sig? ( https://github.com/Stellarium/stellarium-data/releases/download/dso-${MY_DSO_VERSION}/catalog-${MY_DSO_VERSION}.dat.asc -> ${PN}-dso-catalog-${MY_DSO_VERSION}.dat.asc )
+ )
+ doc? (
+ https://github.com/Stellarium/stellarium/releases/download/v${PV}/stellarium_user_guide-${PV}-1.pdf
+ verify-sig? ( https://github.com/Stellarium/stellarium/releases/download/v${PV}/stellarium_user_guide-${PV}-1.pdf.asc )
+ )
+ stars? (
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_4_1v0_6.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_5_1v0_6.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_6_1v0_4.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_7_1v0_4.cat
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_8_2v0_3.cat
+ verify-sig? (
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_4_1v0_6.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_5_1v0_6.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_6_1v0_4.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_7_1v0_4.cat.asc
+ https://github.com/Stellarium/stellarium-data/releases/download/stars-3.0/stars_8_2v0_3.cat.asc
+ )
+ )"
+
+LICENSE="GPL-2+ SGI-B-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="debug deep-sky doc gps +lens-distortion libcxx media nls +scripting +show-my-sky stars telescope test webengine +xlsx"
+
+# Python interpreter is used while building RemoteControl plugin
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ doc? ( app-text/doxygen[dot] )
+ nls? ( dev-qt/qttools:6[linguist] )
+ verify-sig? ( sec-keys/openpgp-keys-stellarium )
+"
+# TODO: review need for dev-cpp/tbb after several releases of gcc and clang
+RDEPEND="
+ dev-cpp/tbb:=
+ dev-libs/md4c
+ dev-qt/qtbase:6=[concurrent,gui,network,widgets]
+ dev-qt/qtcharts:6
+ dev-qt/qtpositioning:6
+ dev-qt/qtsvg:6
+ media-fonts/dejavu
+ >=sci-astronomy/calcmysky-0.3.5:=
+ virtual/zlib:=
+ gps? (
+ dev-qt/qtserialport:6
+ sci-geosciences/gpsd:=[cxx]
+ )
+ lens-distortion? (
+ media-gfx/exiv2:=
+ sci-libs/nlopt
+ )
+ media? (
+ dev-qt/qtmultimedia:6[gstreamer]
+ dev-qt/qtspeech:6
+ virtual/opengl
+ )
+ scripting? ( dev-qt/qtdeclarative:6 )
+ telescope? (
+ dev-qt/qtserialport:6
+ sci-libs/indilib:=
+ )
+ webengine? ( dev-qt/qtwebengine:6[widgets] )
+ xlsx? ( >=dev-libs/qxlsx-1.5.0:= )
+"
+DEPEND="${RDEPEND}
+ libcxx? ( dev-cpp/fast_float )
+"
+
+RESTRICT="!test? ( test )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/stellarium.asc
+
+pkg_setup() {
+ if tc-is-clang && ! use libcxx && [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ die "When using libc++, please enable USE=libcxx"
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+ use debug || append-cppflags -DQT_NO_DEBUG #415769
+
+ rm -r src/external/qtcompress/ || die
+ rm -r src/external/zlib/ || die
+ rm -r src/external/fake-indi/ || die
+
+ # for glues_stel aka libtess I couldn't find an upstream with the same API
+
+ local remaining="$(cd src/external/ && echo */)"
+ if [[ "${remaining}" != "glues_stel/" ]]; then
+ eqawarn "Need to unbundle more deps: ${remaining}"
+ fi
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862249
+
+ local mycmakeargs=(
+ -DCPM_LOCAL_PACKAGES_ONLY=yes
+ -DUSE_BUNDLED_QTCOMPRESS=no
+ -DENABLE_CCACHE=no
+ -DENABLE_GPS="$(usex gps)"
+ -DENABLE_MEDIA="$(usex media)"
+ -DENABLE_NLS="$(usex nls)"
+ -DENABLE_QT6=yes
+ -DENABLE_QTWEBENGINE="$(usex webengine)"
+ -DENABLE_SHOWMYSKY=$(usex show-my-sky)
+ -DENABLE_SCRIPTING=$(usex scripting)
+ -DENABLE_TESTING="$(usex test)"
+ -DENABLE_XLSX="$(usex xlsx)"
+ -DUSE_PLUGIN_LENSDISTORTIONESTIMATOR="$(usex lens-distortion)"
+ -DUSE_PLUGIN_TELESCOPECONTROL="$(usex telescope)"
+ "$(cmake_use_find_package doc Doxygen)"
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ virtx cmake_src_test
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use doc ; then
+ cmake_build apidoc
+ fi
+}
+
+src_install() {
+ if use doc ; then
+ local HTML_DOCS=( "${BUILD_DIR}/doc/html/." )
+ dodoc "${DISTDIR}/stellarium_user_guide-${PV}-1.pdf"
+ fi
+ cmake_src_install
+
+ # use the more up-to-date system fonts
+ rm "${ED}"/usr/share/stellarium/data/DejaVuSans{Mono,}.ttf || die
+ dosym ../../fonts/dejavu/DejaVuSans.ttf /usr/share/stellarium/data/DejaVuSans.ttf
+ dosym ../../fonts/dejavu/DejaVuSansMono.ttf /usr/share/stellarium/data/DejaVuSansMono.ttf
+
+ if use stars ; then
+ insinto /usr/share/${PN}/stars/hip_gaia3
+ doins "${DISTDIR}"/stars_{4,5}_1v0_6.cat
+ doins "${DISTDIR}"/stars_{6,7}_1v0_4.cat
+ doins "${DISTDIR}"/stars_8_2v0_3.cat
+ fi
+ if use deep-sky ; then
+ insinto /usr/share/${PN}/nebulae/default
+ newins "${DISTDIR}/${PN}-dso-catalog-${MY_DSO_VERSION}.dat" catalog.dat
+ fi
+ newicon doc/images/stellarium-logo.png ${PN}.png
+}
diff --git a/sci-astronomy/stiff/Manifest b/sci-astronomy/stiff/Manifest
new file mode 100644
index 000000000000..bfbfbb45d1cd
--- /dev/null
+++ b/sci-astronomy/stiff/Manifest
@@ -0,0 +1 @@
+DIST stiff-2.4.0.tar.gz 1074161 BLAKE2B 50a865985184b1b5cbd78024ed3ee72fa6d19431dbe99336d1ad671eaf076a5aa94471a11d447e3981881c789c00167b89c3fa92262f48f03f8a4251fa8cce3f SHA512 c8a293a2d1771b21d8af1194f9a2f582eca1a363964e76b78319c9cc2407332ef5e31dc74c0d10b9d5c7b6ae18ebd35ee59c53ad31c5f3966fabcd03948cadf6
diff --git a/sci-astronomy/stiff/files/stiff-2.4.0-autotools.patch b/sci-astronomy/stiff/files/stiff-2.4.0-autotools.patch
new file mode 100644
index 000000000000..0a3bb4de9ee6
--- /dev/null
+++ b/sci-astronomy/stiff/files/stiff-2.4.0-autotools.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,6 +82,7 @@
+ fi
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AM_PROG_AR
+
+ # Checks for libraries.
+ AC_CHECK_LIB(m, sin)
diff --git a/sci-astronomy/stiff/metadata.xml b/sci-astronomy/stiff/metadata.xml
new file mode 100644
index 000000000000..61c9420df1d7
--- /dev/null
+++ b/sci-astronomy/stiff/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ STIFF is a program that convert scientific FITS images to the
+ more popular TIFF, in 8 (grayscale) or 24 (true colour: 3 times 8) bits per
+ pixel.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/stiff/stiff-2.4.0-r1.ebuild b/sci-astronomy/stiff/stiff-2.4.0-r1.ebuild
new file mode 100644
index 000000000000..9d3bd8592411
--- /dev/null
+++ b/sci-astronomy/stiff/stiff-2.4.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Converts astronomical FITS images to the TIFF format"
+HOMEPAGE="http://www.astronomatic.net/software/stiff"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc threads"
+
+RDEPEND="
+ media-libs/tiff:=
+ media-libs/libjpeg-turbo:=
+ virtual/zlib:="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # https://bugs.gentoo.org/725272
+ "${FILESDIR}"/${P}-autotools.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # https://bugs.gentoo.org/708382
+ append-cflags -fcommon
+
+ CONFIG_SHELL="${BROOT}"/bin/bash econf $(use_enable threads)
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/stiff.pdf
+}
diff --git a/sci-astronomy/stuff/Manifest b/sci-astronomy/stuff/Manifest
new file mode 100644
index 000000000000..6ed8c24b1d0c
--- /dev/null
+++ b/sci-astronomy/stuff/Manifest
@@ -0,0 +1 @@
+DIST stuff-1.26.0.tar.gz 4110495 BLAKE2B ca2af60a1aad3d53035bd7fc9384170a5db58ddd872e29bfaaec70e96840cec1793223f2702d2b4d800ec11c0bc53ddde6d0780d6ba76ffe0d10e6c61b5d2a74 SHA512 6b71112e29d06807c8fc880bd33032a08810554afa563f27d5af19a45293b780ab0b7827ad84ad7942bed28fe3b03bb6c1fa3983667d1fbcbb467b32653203f2
diff --git a/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch b/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch
new file mode 100644
index 000000000000..bb02fa9e26fd
--- /dev/null
+++ b/sci-astronomy/stuff/files/stuff-1.26.0-fno-common.patch
@@ -0,0 +1,60 @@
+--- a/src/cosmo.c
++++ b/src/cosmo.c
+@@ -39,6 +39,11 @@
+ #include "cosmo.h"
+ #include "lf.h"
+
++char gstr[MAXCHAR];
++int bswapflag;
++
++double H, H0, OmegaM, OmegaL, deltaMH;
++
+ /******************************** cosmo_dconf ********************************/
+ /*
+ Conformal distance. Numerical integration along geodesic, allowing for a
+--- a/src/cosmo.h
++++ b/src/cosmo.h
+@@ -38,7 +38,7 @@
+
+ /*------------------------------ global variables ---------------------------*/
+
+-double H, H0, OmegaM, OmegaL, deltaMH;
++extern double H, H0, OmegaM, OmegaL, deltaMH;
+
+ /*-------------------------------- protos -----------------------------------*/
+
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -29,8 +29,8 @@
+ #include "types.h"
+
+ /*----------------------- miscellaneous variables ---------------------------*/
+-char gstr[MAXCHAR];
+-int bswapflag;
++extern char gstr[MAXCHAR];
++extern int bswapflag;
+
+ /*------------------------------- functions ---------------------------------*/
+ extern void error(int, char *, char *),
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -53,6 +53,8 @@
+ #include "prefs.h"
+ #include "preflist.h"
+
++prefstruct prefs;
++
+ /********************************* dumpprefs ********************************/
+ /*
+ Print the default preference parameters.
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -136,7 +136,7 @@
+ double time_diff; /* Execution time */
+ } prefstruct;
+
+-prefstruct prefs;
++extern prefstruct prefs;
+
+ /*----------------------------- Internal constants --------------------------*/
+
diff --git a/sci-astronomy/stuff/metadata.xml b/sci-astronomy/stuff/metadata.xml
new file mode 100644
index 000000000000..41d70423e1b2
--- /dev/null
+++ b/sci-astronomy/stuff/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Stuff is a program that simulates “perfect” astronomical
+ catalogues. It generate object lists in ASCII which can read by the
+ SkyMaker program to produce realistic astronomical fields.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/stuff/stuff-1.26.0.ebuild b/sci-astronomy/stuff/stuff-1.26.0.ebuild
new file mode 100644
index 000000000000..f464b794239a
--- /dev/null
+++ b/sci-astronomy/stuff/stuff-1.26.0.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Tool for automatic generation of astronomical catalogs"
+HOMEPAGE="http://www.astromatic.net/software/stuff/"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="threads"
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
+src_configure() {
+ econf $(use_enable threads)
+}
diff --git a/sci-astronomy/swarp/Manifest b/sci-astronomy/swarp/Manifest
new file mode 100644
index 000000000000..cfd7879045b2
--- /dev/null
+++ b/sci-astronomy/swarp/Manifest
@@ -0,0 +1 @@
+DIST swarp-2.41.5.tar.gz 444035 BLAKE2B a76f9a68c9668c33f578262ec360234f2aebd5fe1ac1708c57819d63b3d4c70fbaa8442b1d025811d024321cb580a212854049ecba53a714cc84e4c7f20334ba SHA512 f397abb9c1a8a22c3bde2d1f5337492f8264df3bb43d4e263dbf175c8845d8cfea44bdfc977f2481ae8a1644722a56c82b818d40e4539d9f895fd91718d8aafe
diff --git a/sci-astronomy/swarp/metadata.xml b/sci-astronomy/swarp/metadata.xml
new file mode 100644
index 000000000000..99ac9a33b9a5
--- /dev/null
+++ b/sci-astronomy/swarp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <use>
+ <flag name="cfitsio">Link with <pkg>sci-libs/cfitsio</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-astronomy/swarp/swarp-2.41.5.ebuild b/sci-astronomy/swarp/swarp-2.41.5.ebuild
new file mode 100644
index 000000000000..5a105a2a502e
--- /dev/null
+++ b/sci-astronomy/swarp/swarp-2.41.5.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Resample and coadd astronomical FITS images"
+HOMEPAGE="http://www.astromatic.net/software/swarp"
+SRC_URI="https://github.com/astromatic/swarp/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cfitsio doc threads"
+
+RDEPEND="cfitsio? ( sci-libs/cfitsio )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with cfitsio) \
+ $(use_enable threads)
+}
+
+src_install() {
+ default
+ use doc && dodoc -r doc/.
+}
diff --git a/sci-astronomy/wcslib/Manifest b/sci-astronomy/wcslib/Manifest
new file mode 100644
index 000000000000..0d262df65da7
--- /dev/null
+++ b/sci-astronomy/wcslib/Manifest
@@ -0,0 +1 @@
+DIST wcslib-8.3.tar.bz2 3245293 BLAKE2B 0f420d1c6e3b4a7e97b3227971f745d70f5c51e907f0315b7f57e79a34ef32446bbd7fa29ffd25c800e888b8aab6227b774375ed8d89d21f7315916fdd06d788 SHA512 248518489431cbcba7a5df9e34a747e2a007128639d8ab655ceee35250e609d952fe466b67cdca5defe16d3e926730d00bfc5c362c369f74851cd88973b506ba
diff --git a/sci-astronomy/wcslib/metadata.xml b/sci-astronomy/wcslib/metadata.xml
new file mode 100644
index 000000000000..8298d1f04337
--- /dev/null
+++ b/sci-astronomy/wcslib/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ WCSLIB is a C library, supplied with a full set of Fortran wrappers,
+ that implements the "World Coordinate System" (WCS) convention in FITS
+ (Flexible Image Transport System). It also includes a PGPLOT-based routine,
+ PGSBOX, for drawing general curvilinear coordinate graticules and a number of
+ utility programs.
+ </longdescription>
+ <use>
+ <flag name="fits">
+ Enable support for the FITS format through <pkg>sci-libs/cfitsio</pkg>
+ </flag>
+ <flag name="pgplot">
+ Builds PGBSOX routines, needs <pkg>sci-libs/pgplot</pkg> library
+ </flag>
+ <flag name="tools">
+ Builds and installs extra command line utilities for WCS checking
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-astronomy/wcslib/wcslib-8.3-r1.ebuild b/sci-astronomy/wcslib/wcslib-8.3-r1.ebuild
new file mode 100644
index 000000000000..89f26dce9678
--- /dev/null
+++ b/sci-astronomy/wcslib/wcslib-8.3-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED=fortran
+
+inherit flag-o-matic fortran-2
+
+DESCRIPTION="Astronomical World Coordinate System transformations library"
+HOMEPAGE="https://www.atnf.csiro.au/people/mcalabre/WCS/"
+SRC_URI="ftp://ftp.atnf.csiro.au/pub/software/${PN}/${P}.tar.bz2"
+
+SLOT="0/$(ver_cut 1)"
+LICENSE="LGPL-3"
+KEYWORDS="amd64 ~x86"
+IUSE="doc fortran fits pgplot static-libs +tools"
+
+RDEPEND="
+ fits? (
+ !sci-astronomy/montage
+ sci-libs/cfitsio:0=
+ )
+ pgplot? ( sci-libs/pgplot:0= )
+"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-alternatives/lex
+ virtual/pkgconfig"
+
+src_configure() {
+ # workaround until upstream fix it properly
+ append-fflags $(test-flags-FC -fallow-argument-mismatch)
+
+ local myconf=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}
+ $(use_enable fortran)
+ $(use_enable tools utils)
+ --with-bindc
+ )
+ # hacks because cfitsio and pgplot directories are hard-coded
+ if use fits; then
+ myconf+=(
+ --with-cfitsioinc="${EPREFIX}/usr/include"
+ --with-cfitsiolib="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=( --without-cfitsio )
+ fi
+ if use pgplot; then
+ myconf+=(
+ --with-pgplotinc="${EPREFIX}/usr/include"
+ --with-pgplotlib="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=( --without-pgplot )
+ fi
+ econf "${myconf[@]}"
+ sed -i -e 's/COPYING\*//' GNUmakefile || die
+}
+
+src_install () {
+ default
+ # static libs share the same symbols as shared (i.e. compiled with PIC)
+ # so they are not compiled twice
+ if ! use static-libs; then
+ rm "${ED}"/usr/$(get_libdir)/lib*.a || die
+ fi
+
+ if ! use doc; then
+ rm -r \
+ "${ED}"/usr/share/doc/${PF}/html \
+ "${ED}"/usr/share/doc/${PF}/*.pdf || die
+ fi
+ # always creates this symlink
+ rm "${ED}"/usr/share/doc/${PN} || die
+}
diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
new file mode 100644
index 000000000000..e377077e11f6
--- /dev/null
+++ b/sci-astronomy/wcstools/Manifest
@@ -0,0 +1,2 @@
+DIST wcstools-3.9.5.tar.gz 8538612 BLAKE2B 79e1c544408595a3147c7a6c4e86ca18f8a1851b8e036fa87e34d1979cbb04e9fe13db1a3ec8b18689a00d726d85131cd2c90add5e2685f80a8dcb5b20981065 SHA512 aa48081b6f5dc12ed8d64eae5275c27aaa279856f588a3eb429ec0a4943dc482788cb7f84820233f0e2ee4fefeda7ab9bb85c4513a9942c48f5d97a0bde1581d
+DIST wcstools-3.9.7.tar.gz 8652114 BLAKE2B 8e61d141bd4df5b72e1bf362e9b1a3ca1533888559ccd955929204655c3f0e8f383e98ec329d4d3b457e326ba0fed8dc2f602bd0e5576eab2a8e4e9b5b46612b SHA512 b731d21b34d7f914465083ba0545516f8e8bbca3b3a8b1c987264b66225a813af2a6acd78ebc67c6869f774e40d6845f0eaddfe93f1b20d25335df22da180450
diff --git a/sci-astronomy/wcstools/files/Makefile.3.9.7.am b/sci-astronomy/wcstools/files/Makefile.3.9.7.am
new file mode 100644
index 000000000000..8610812e5fd9
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.3.9.7.am
@@ -0,0 +1,74 @@
+SUBDIRS = libwcs
+INCLUDES = -I$(top_srcdir)/libwcs
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = wcstools.pc
+
+bin_SCRIPTS = wcstools
+
+EXTRA_DIST = wcstools COPYING Readme NEWS Programs
+
+bin_PROGRAMS = \
+ cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \
+ imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \
+ keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \
+ imstack imextract sumpix wcsremap getcol wcsgetdate imfill imsmooth imresize \
+ fileroot filename filext char2sp sp2char wcscrlf isnum isrange isfits \
+ isfile simpos bincat fixhead
+
+# these ones don't need libwcs
+wcscrlf_SOURCES = crlf.c
+filename_SOURCES = filename.c
+filedir_SOURCES = filedir.c
+fileroot_SOURCES = fileroot.c
+filext_SOURCES = filext.c
+isrange_SOURCES = isrange.c
+
+LDADD = $(top_builddir)/libwcs/libwcstools.la
+
+bincat_SOURCES = bincat.c
+getcol_SOURCES = getcol.c
+wcsgetdate_SOURCES = getdate.c
+gethead_SOURCES = gethead.c
+getfits_SOURCES = getfits.c
+getpix_SOURCES = getpix.c
+gettab_SOURCES = gettab.c
+imcat_SOURCES = imcat.c
+imsize_SOURCES = imsize.c
+imstar_SOURCES = imstar.c
+imwcs_SOURCES = imwcs.c
+immatch_SOURCES = immatch.c
+scat_SOURCES = scat.c
+setpix_SOURCES = setpix.c
+skycoor_SOURCES = skycoor.c
+sumpix_SOURCES = sumpix.c
+xy2sky_SOURCES = xy2sky.c
+simpos_SOURCES = simpos.c
+
+addpix_SOURCES = addpix.c
+char2sp_SOURCES = char2sp.c
+conpix_SOURCES = conpix.c
+cphead_SOURCES = cphead.c
+delwcs_SOURCES = delwcs.c
+delhead_SOURCES = delhead.c
+edhead_SOURCES = edhead.c
+fixpix_SOURCES = fixpix.c
+i2f_SOURCES = i2f.c
+imfill_SOURCES = imfill.c
+imresize_SOURCES = imresize.c
+imsmooth_SOURCES = imsmooth.c
+imhead_SOURCES = imhead.c
+imrot_SOURCES = imrot.c
+imstack_SOURCES = imstack.c
+imextract_SOURCES = imextract.c
+isfile_SOURCES = isfile.c
+isnum_SOURCES = isnum.c
+keyhead_SOURCES = keyhead.c
+newfits_SOURCES = newfits.c
+wcsremap_SOURCES = remap.c
+sethead_SOURCES = sethead.c
+sky2xy_SOURCES = sky2xy.c
+sp2char_SOURCES = sp2char.c
+subpix_SOURCES = subpix.c
+wcshead_SOURCES = wcshead.c
+fixhead_SOURCES = fixhead.c
diff --git a/sci-astronomy/wcstools/files/Makefile.am b/sci-astronomy/wcstools/files/Makefile.am
new file mode 100644
index 000000000000..46abf6d39ae0
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.am
@@ -0,0 +1,73 @@
+SUBDIRS = libwcs
+INCLUDES = -I$(top_srcdir)/libwcs
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = wcstools.pc
+
+bin_SCRIPTS = wcstools
+
+EXTRA_DIST = wcstools COPYING Readme NEWS Programs
+
+bin_PROGRAMS = \
+ cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \
+ imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \
+ keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \
+ imstack imextract sumpix wcsremap getcol wcsgetdate imfill imsmooth imresize \
+ fileroot filename filext char2sp sp2char wcscrlf isnum isrange isfits \
+ isfile simpos bincat
+
+# these ones don't need libwcs
+wcscrlf_SOURCES = crlf.c
+filename_SOURCES = filename.c
+filedir_SOURCES = filedir.c
+fileroot_SOURCES = fileroot.c
+filext_SOURCES = filext.c
+isrange_SOURCES = isrange.c
+
+LDADD = $(top_builddir)/libwcs/libwcstools.la
+
+bincat_SOURCES = bincat.c
+getcol_SOURCES = getcol.c
+wcsgetdate_SOURCES = getdate.c
+gethead_SOURCES = gethead.c
+getfits_SOURCES = getfits.c
+getpix_SOURCES = getpix.c
+gettab_SOURCES = gettab.c
+imcat_SOURCES = imcat.c
+imsize_SOURCES = imsize.c
+imstar_SOURCES = imstar.c
+imwcs_SOURCES = imwcs.c
+immatch_SOURCES = immatch.c
+scat_SOURCES = scat.c
+setpix_SOURCES = setpix.c
+skycoor_SOURCES = skycoor.c
+sumpix_SOURCES = sumpix.c
+xy2sky_SOURCES = xy2sky.c
+simpos_SOURCES = simpos.c
+
+addpix_SOURCES = addpix.c
+char2sp_SOURCES = char2sp.c
+conpix_SOURCES = conpix.c
+cphead_SOURCES = cphead.c
+delwcs_SOURCES = delwcs.c
+delhead_SOURCES = delhead.c
+edhead_SOURCES = edhead.c
+fixpix_SOURCES = fixpix.c
+i2f_SOURCES = i2f.c
+imfill_SOURCES = imfill.c
+imresize_SOURCES = imresize.c
+imsmooth_SOURCES = imsmooth.c
+imhead_SOURCES = imhead.c
+imrot_SOURCES = imrot.c
+imstack_SOURCES = imstack.c
+imextract_SOURCES = imextract.c
+isfile_SOURCES = isfile.c
+isnum_SOURCES = isnum.c
+keyhead_SOURCES = keyhead.c
+newfits_SOURCES = newfits.c
+wcsremap_SOURCES = remap.c
+sethead_SOURCES = sethead.c
+sky2xy_SOURCES = sky2xy.c
+sp2char_SOURCES = sp2char.c
+subpix_SOURCES = subpix.c
+wcshead_SOURCES = wcshead.c
diff --git a/sci-astronomy/wcstools/files/Makefile.libwcs.3.9.7.am b/sci-astronomy/wcstools/files/Makefile.libwcs.3.9.7.am
new file mode 100644
index 000000000000..0d3b1564ab05
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.libwcs.3.9.7.am
@@ -0,0 +1,16 @@
+lib_LTLIBRARIES = libwcstools.la
+libwcstools_la_SOURCES = \
+ imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \
+ fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \
+ gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \
+ sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \
+ skybotread.c imrotate.c fitsfile.c imhfile.c \
+ hget.c hput.c imio.c dateutil.c imutil.c \
+ worldpos.c tnxpos.c zpxpos.c dsspos.c platepos.c \
+ sortstar.c platefit.c iget.c fileutil.c \
+ wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c poly.c
+
+wcsdir = $(includedir)/wcs
+wcs_HEADERS = \
+ wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h
+
diff --git a/sci-astronomy/wcstools/files/Makefile.libwcs.am b/sci-astronomy/wcstools/files/Makefile.libwcs.am
new file mode 100644
index 000000000000..5905aa3d7955
--- /dev/null
+++ b/sci-astronomy/wcstools/files/Makefile.libwcs.am
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libwcstools.la
+libwcstools_la_SOURCES = \
+ imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \
+ fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \
+ gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \
+ sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \
+ skybotread.c imrotate.c fitsfile.c imhfile.c \
+ hget.c hput.c imio.c dateutil.c imutil.c \
+ worldpos.c tnxpos.c zpxpos.c dsspos.c platepos.c \
+ sortstar.c platefit.c iget.c fileutil.c \
+ wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c poly.c
+
+wcsdir = $(includedir)/wcs
+wcs_HEADERS = \
+ wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h
+
+noinst_HEADERS = fitsfile1.h wcscat1.h
diff --git a/sci-astronomy/wcstools/files/configure.ac b/sci-astronomy/wcstools/files/configure.ac
new file mode 100644
index 000000000000..3a46108cd304
--- /dev/null
+++ b/sci-astronomy/wcstools/files/configure.ac
@@ -0,0 +1,9 @@
+AC_INIT([wcstools], [3.9.x] , [http://tdc-www.harvard.edu/wcstools/])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CC
+LT_INIT([disable-static])
+AC_CHECK_LIB([m], [sin])
+AC_CONFIG_FILES([libwcs/Makefile Makefile wcstools.pc])
+AC_OUTPUT
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch
new file mode 100644
index 000000000000..ff81820d404a
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-compiler-warning.patch
@@ -0,0 +1,34 @@
+From: Ole Streicher <debian@liska.ath.cx>
+Date: Fri, 5 Aug 2016 16:17:42 +0200
+Subject: Fix some compiler warnings.
+
+---
+ libwcs/imhfile.c | 2 +-
+ libwcs/webread.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
+index b618686..4279d3c 100644
+--- a/libwcs/imhfile.c
++++ b/libwcs/imhfile.c
+@@ -1075,7 +1075,7 @@ char *hdrname; /* IRAF image header file pathname */
+
+ /* add name */
+ newpixname[len] = '\0';
+- (void)strncat (newpixname, pixname, SZ_IM2PIXFILE);
++ (void)strncat (newpixname, pixname, SZ_IM2PIXFILE - len);
+ }
+
+ /* Pixel file has same name as header file, but with .pix extension */
+diff --git a/libwcs/webread.c b/libwcs/webread.c
+index 1f5c518..cd9cba9 100644
+--- a/libwcs/webread.c
++++ b/libwcs/webread.c
+@@ -32,6 +32,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <ctype.h>
+ #include <math.h>
+ #include "wcs.h"
+ #include "fitsfile.h"
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch
new file mode 100644
index 000000000000..d8679578f408
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-fix-tests.patch
@@ -0,0 +1,34 @@
+From: Ole Streicher <debian@liska.ath.cx>
+Date: Fri, 5 Aug 2016 16:17:42 +0200
+Subject: Fix several bugs that appear in during the mayhem tests.
+
+---
+ cphead.c | 2 +-
+ getpix.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/cphead.c b/cphead.c
+index 0c025dd..2b34f12 100644
+--- a/cphead.c
++++ b/cphead.c
+@@ -148,7 +148,7 @@ char **av;
+ free (kwd);
+ kwd = kwdnew;
+ }
+- for (ikwd = nkwd; i < nkwd+nkwd1+32; i++) {
++ for (ikwd = nkwd; ikwd < nkwd+nkwd1+32; ikwd++) {
+ kwd[ikwd] = (char *) calloc (32, 1);
+ }
+ strcpy (kwd[nkwd], "RA");
+diff --git a/getpix.c b/getpix.c
+index ccb38f0..64cc571 100644
+--- a/getpix.c
++++ b/getpix.c
+@@ -83,6 +83,7 @@ char **av;
+ char *crange; /* Column range string */
+ char *rstr;
+ char *dstr = NULL;
++ char rastr[32], decstr[32];
+ char *cstr;
+ int systemp;
+ int i;
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch
new file mode 100644
index 000000000000..427c476edb95
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-haspm.patch
@@ -0,0 +1,22 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 5 Aug 2016 16:17:42 +0200
+Subject: Fix uninitialized value for haspm in RASortStars()
+
+This fixes a crash with 'imstar -s'.
+---
+ libwcs/sortstar.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libwcs/sortstar.c b/libwcs/sortstar.c
+index 0123c64..f77555f 100644
+--- a/libwcs/sortstar.c
++++ b/libwcs/sortstar.c
+@@ -856,6 +856,8 @@ int log; /* If >0, log progress every time mod number written */
+ hasnum = 1;
+ if (spra != NULL && spdec != NULL)
+ haspm = 1;
++ else
++ haspm = 0;
+ if (sx != NULL && sy != NULL)
+ hasxy = 1;
+ else
diff --git a/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch
new file mode 100644
index 000000000000..d655c345c257
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.9.4-spelling.patch
@@ -0,0 +1,242 @@
+From: Ole Streicher <debian@liska.ath.cx>
+Date: Fri, 5 Aug 2016 16:17:42 +0200
+Subject: Spellfixes and manpage fixes
+
+---
+ edhead.c | 2 +-
+ immatch.c | 2 +-
+ imwcs.c | 4 ++--
+ libwcs/fitsfile.c | 10 +++++-----
+ libwcs/imhfile.c | 4 ++--
+ man/man1/edhead.1 | 2 +-
+ man/man1/imcat.1 | 2 +-
+ man/man1/imgsc.1 | 4 ++--
+ man/man1/imua2.1 | 2 +-
+ man/man1/keyhead.1 | 2 +-
+ man/man1/skycoor.1 | 2 +-
+ man/man1/sua2.1 | 2 +-
+ man/man1/susa2.1 | 2 +-
+ 13 files changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/edhead.c b/edhead.c
+index 1fe33e2..494cb4d 100644
+--- a/edhead.c
++++ b/edhead.c
+@@ -109,7 +109,7 @@ usage ()
+ exit (-1);
+ fprintf (stderr,"Edit header of FITS or IRAF image file\n");
+ fprintf(stderr,"usage: edhead [-nv] [-e editor] file.fits file.imh...\n");
+- fprintf(stderr," -e: Set editor, overiding environment EDITOR \n");
++ fprintf(stderr," -e: Set editor, overriding environment EDITOR \n");
+ fprintf(stderr," -n: write new file, else overwrite \n");
+ fprintf(stderr," -v: verbose\n");
+ exit (1);
+diff --git a/immatch.c b/immatch.c
+index 02af222..59b4826 100644
+--- a/immatch.c
++++ b/immatch.c
+@@ -383,7 +383,7 @@ char **av;
+
+ /* If reference catalog is not set, exit with an error message */
+ if (refcatname == NULL) {
+- PrintUsage ("* Must specifiy a reference catalog using -c or alias.");
++ PrintUsage ("* Must specify a reference catalog using -c or alias.");
+ }
+
+ /* Process image files from list file */
+diff --git a/imwcs.c b/imwcs.c
+index c32cffd..6639198 100644
+--- a/imwcs.c
++++ b/imwcs.c
+@@ -285,7 +285,7 @@ char **av;
+ ac--;
+ break;
+
+- case 'o': /* Specifiy output image filename */
++ case 'o': /* Specify output image filename */
+ if (ac < 2)
+ PrintUsage (str);
+ if (*(av+1)[0] == '-' || *(str+1) != (char)0)
+@@ -476,7 +476,7 @@ char **av;
+
+ /* If reference catalog is not set, exit with an error message */
+ if (refcatname == NULL && matchfile == NULL) {
+- PrintUsage ("* Must specifiy a reference catalog using -c or alias.");
++ PrintUsage ("* Must specify a reference catalog using -c or alias.");
+ }
+
+ if (!writeheader && !verbose) {
+diff --git a/libwcs/fitsfile.c b/libwcs/fitsfile.c
+index 2c3e709..a2f0d0f 100644
+--- a/libwcs/fitsfile.c
++++ b/libwcs/fitsfile.c
+@@ -1583,7 +1583,7 @@ char *image; /* FITS image pixels */
+ if (!access (filename, 0)) {
+ fd = open (filename, O_WRONLY);
+ if (fd < 3) {
+- snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writeable\n", filename);
++ snprintf (fitserrmsg,79, "FITSWIMAGE: file %s not writable\n", filename);
+ return (0);
+ }
+ }
+@@ -1622,7 +1622,7 @@ char *image; /* FITS image pixels */
+ if (!access (filename, 0)) {
+ fd = open (filename, O_WRONLY);
+ if (fd < 3) {
+- snprintf (fitserrmsg,79, "FITSWEXT: file %s not writeable\n",
++ snprintf (fitserrmsg,79, "FITSWEXT: file %s not writable\n",
+ filename);
+ return (0);
+ }
+@@ -1884,7 +1884,7 @@ char *filename0; /* Name of input FITS image file */
+ if (!access (filename, 0)) {
+ fdout = open (filename, O_WRONLY);
+ if (fdout < 3) {
+- snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writeable\n", filename);
++ snprintf (fitserrmsg,79, "FITSCIMAGE: file %s not writable\n", filename);
+ return (0);
+ }
+ }
+@@ -1970,7 +1970,7 @@ char *header; /* FITS image header */
+ if (!access (filename, 0)) {
+ fd = open (filename, O_WRONLY);
+ if (fd < 3) {
+- snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writeable\n", filename);
++ snprintf (fitserrmsg, 79, "FITSWHEAD: file %s not writable\n", filename);
+ return (0);
+ }
+ }
+@@ -2072,7 +2072,7 @@ char *header; /* FITS image header */
+ if (ext != NULL)
+ *ext = cext;
+ if (fd < 3) {
+- snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writeable\n", filename);
++ snprintf (fitserrmsg, 79, "FITSWEXHEAD: file %s not writable\n", filename);
+ return (-1);
+ }
+
+diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
+index 4279d3c..25f82ac 100644
+--- a/libwcs/imhfile.c
++++ b/libwcs/imhfile.c
+@@ -896,7 +896,7 @@ char *fitsheader; /* FITS image header */
+ if (!access (hdrname, 0)) {
+ fd = open (hdrname, O_WRONLY);
+ if (fd < 3) {
+- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", hdrname);
++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", hdrname);
+ return (0);
+ }
+ }
+@@ -993,7 +993,7 @@ char *image; /* IRAF image */
+ if (!access (pixname, 0)) {
+ fd = open (pixname, O_WRONLY);
+ if (fd < 3) {
+- fprintf (stderr, "IRAFWIMAGE: file %s not writeable\n", pixname);
++ fprintf (stderr, "IRAFWIMAGE: file %s not writable\n", pixname);
+ return (0);
+ }
+ }
+diff --git a/man/man1/edhead.1 b/man/man1/edhead.1
+index 543487c..74dbedf 100644
+--- a/man/man1/edhead.1
++++ b/man/man1/edhead.1
+@@ -11,7 +11,7 @@ takes care of trailing spaces so they can be ignored while using the editor.
+ .SH Options
+ .TP
+ .B \-e <editor path>
+-Set editor, overiding environment EDITOR
++Set editor, overriding environment EDITOR
+ .TP
+ .B \-n
+ Write a new file with .e before the file type extension. The default is
+diff --git a/man/man1/imcat.1 b/man/man1/imcat.1
+index a1cac13..e975af6 100644
+--- a/man/man1/imcat.1
++++ b/man/man1/imcat.1
+@@ -4,7 +4,7 @@ imcat \- List catalog stars in FITS and IRAF image files
+ .SH Synopsis
+ imcat [options] FITS or IRAF file(s)
+ .SH Description
+-Search given catalog withing area described by the world coordinate
++Search given catalog within area described by the world coordinate
+ system in an image header. May be called as imuac to search the USNO A 1.0
+ catalog, imusac to search the USNO SA 1.0 catalog, or imgsc to search
+ the HST Guide Star Catalog.
+diff --git a/man/man1/imgsc.1 b/man/man1/imgsc.1
+index 604b072..aa64b2c 100644
+--- a/man/man1/imgsc.1
++++ b/man/man1/imgsc.1
+@@ -1,10 +1,10 @@
+-.TH imgsc(1) WCS "14 April 1998"
++.TH imgsc 1 WCSTools "14 April 1998"
+ .SH Name
+ imgsc \- Find HST GSC stars in FITS or IRAF image files
+ .SH Synopsis
+ imgsc [options] FITS or IRAF file(s)
+ .SH Description
+-Search the HST Guide Star Catalog withing the area described by the world
++Search the HST Guide Star Catalog within the area described by the world
+ coordinate system in an image header. This is a link to imcat rather than
+ a separate executable.
+ .SH Options
+diff --git a/man/man1/imua2.1 b/man/man1/imua2.1
+index 4acbc8b..22b896f 100644
+--- a/man/man1/imua2.1
++++ b/man/man1/imua2.1
+@@ -78,7 +78,7 @@ Sort by RA instead of flux
+ Tab table to standard output as well as file
+ .TP
+ .B \-u <plate>
+-Accept only stars from thsi plate (default all)
++Accept only stars from this plate (default all)
+ .TP
+ .B \-v
+ Verbose listing of processing intermediate results
+diff --git a/man/man1/keyhead.1 b/man/man1/keyhead.1
+index 4d1dfb1..fea7652 100644
+--- a/man/man1/keyhead.1
++++ b/man/man1/keyhead.1
+@@ -7,7 +7,7 @@ sethead [\-hknv] <FITS or IRAF file> kw1=kw1a kw2=kwd2a ... kwn=kwdna
+ Change the names of keywords in FITS or IRAF image headers. Each current
+ image keyword whose entry is to be modified should be followed by an
+ equal sign and a second keyword, with no intervening spaces.
+-If the \-r option is used, the value of the second keyword is transfered
++If the \-r option is used, the value of the second keyword is transferred
+ to that of the first. Otherwise, the name of the first keyword is changed
+ to the second keyword.
+ To change keywords in a list of files, substitute @<listfile> for the file
+diff --git a/man/man1/skycoor.1 b/man/man1/skycoor.1
+index c3b3d2b..2126c29 100644
+--- a/man/man1/skycoor.1
++++ b/man/man1/skycoor.1
+@@ -1,4 +1,4 @@
+-.TH skycoor(1) WCSTools "9 November 2001"
++.TH skycoor 1 WCSTools "9 November 2001"
+ .SH Name
+ skycoor \- Convert coordinates
+ .SH Synopsis
+diff --git a/man/man1/sua2.1 b/man/man1/sua2.1
+index b28c89a..d29d126 100644
+--- a/man/man1/sua2.1
++++ b/man/man1/sua2.1
+@@ -1,6 +1,6 @@
+ .TH sua2 1 WCS "19 November 1999"
+ .SH Name
+-Find USNO-A2.0 Catalog stars in a square on the sky
++sua2 \- Find USNO-A2.0 Catalog stars in a square on the sky
+ .SH Synopsis
+ sua2 [options] ra dec system
+ .SH Description
+diff --git a/man/man1/susa2.1 b/man/man1/susa2.1
+index 06409e2..8d03886 100644
+--- a/man/man1/susa2.1
++++ b/man/man1/susa2.1
+@@ -1,6 +1,6 @@
+ .TH susa2 1 WCS "9 June 2000"
+ .SH Name
+-Find USNO-SA2.0 Catalog stars in a square on the sky
++susa2 \- Find USNO-SA2.0 Catalog stars in a square on the sky
+ .SH Synopsis
+ susac [options] [\-b or \-j] ra dec
+ .SH Description
diff --git a/sci-astronomy/wcstools/files/wcstools.pc.in b/sci-astronomy/wcstools/files/wcstools.pc.in
new file mode 100644
index 000000000000..c8eb8b094a0a
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: World Coordinate System Library and Tools
+Version: @PACKAGE_VERSION@
+URL: http://tdc-www.harvard.edu/wcstools/
+Libs: -L${libdir} -lwcstools
+Libs.private: -lm
+Cflags: -I${includedir}/wcs
+
diff --git a/sci-astronomy/wcstools/metadata.xml b/sci-astronomy/wcstools/metadata.xml
new file mode 100644
index 000000000000..aefe8e1362f5
--- /dev/null
+++ b/sci-astronomy/wcstools/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Astronomers often need to relate positions on an image of the sky to
+ positions on the real sky to identify catalogued objects in images,
+ tell other people where to look to find an identified object, or to
+ compute motions of planets, satellites, asteroids, or comets. WCSTools
+ is a package of programs and a library of utility subroutines for
+ setting and using the world coordinate systems (WCS) in the headers of
+ the most common astronomical image formats, FITS and IRAF .imh, to
+ relate image pixels to sky coordinates.
+ The Gentoo package is using GNU autotools to produce portable shared
+ and static libraried.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/wcstools/wcstools-3.9.5-r1.ebuild b/sci-astronomy/wcstools/wcstools-3.9.5-r1.ebuild
new file mode 100644
index 000000000000..acf4b50071a4
--- /dev/null
+++ b/sci-astronomy/wcstools/wcstools-3.9.5-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="World Coordinate System library for astronomical FITS images"
+HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools/"
+SRC_URI="http://tdc-www.harvard.edu/software/wcstools/Old/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DOCS=( Readme Programs NEWS )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.9.4-spelling.patch
+ "${FILESDIR}"/${PN}-3.9.4-haspm.patch
+ "${FILESDIR}"/${PN}-3.9.4-fix-tests.patch
+ "${FILESDIR}"/${PN}-3.9.4-compiler-warning.patch
+)
+
+src_prepare() {
+ default
+ einfo "Copying gentoo autotools files"
+ local f
+ for f in "${FILESDIR}"/{configure.ac,wcstools.pc.in,Makefile.am}; do
+ cp ${f} "${S}"/ || die
+ done
+ cp "${FILESDIR}"/Makefile.libwcs.am "${S}"/libwcs/Makefile.am || die
+ # avoid colliding with fixdos, getdate and remap from other packages
+ sed -i \
+ -e 's/getdate/wcsgetdate/' \
+ -e 's/crlf/wcscrlf/' \
+ -e 's/remap/wcsremap/' \
+ -e "s/3.... Programs/${PV} Programs/" \
+ wcstools || die
+ eautoreconf
+}
+
+src_test() {
+ einfo "Testing various wcstools programs"
+ ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed"
+ ./sethead test.fits A=1 B=1 || die "test sethead failed"
+ [[ "$(./gethead test.fits RA)" == "16:32:00.0000" ]] \
+ || die "test gethead failed"
+ rm test.fits
+}
+
+src_install() {
+ default
+ doman man/man1/*
+ newdoc libwcs/NEWS NEWS.libwcs
+ newdoc libwcs/Readme Readme.libwcs
+
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ elog "The following execs have been renamed to avoid colliding"
+ elog "with other packages:"
+ elog " getdate -> wcsgetdate"
+ elog " crlf -> wcscrlf"
+ elog " remap -> wcsremap"
+}
diff --git a/sci-astronomy/wcstools/wcstools-3.9.7.ebuild b/sci-astronomy/wcstools/wcstools-3.9.7.ebuild
new file mode 100644
index 000000000000..0cedf8e08f5f
--- /dev/null
+++ b/sci-astronomy/wcstools/wcstools-3.9.7.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="World Coordinate System library for astronomical FITS images"
+HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools/"
+SRC_URI="http://tdc-www.harvard.edu/software/wcstools/${P}.tar.gz
+ http://tdc-www.harvard.edu/software/wcstools/Old/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DOCS=( Readme Programs NEWS )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.9.4-spelling.patch
+ "${FILESDIR}"/${PN}-3.9.4-haspm.patch
+ "${FILESDIR}"/${PN}-3.9.4-fix-tests.patch
+ "${FILESDIR}"/${PN}-3.9.4-compiler-warning.patch
+)
+
+src_prepare() {
+ default
+ einfo "Copying gentoo autotools files"
+ local f
+ for f in "${FILESDIR}"/{configure.ac,wcstools.pc.in}; do
+ cp -v ${f} "${S}"/ || die
+ done
+ cp -v "${FILESDIR}"/Makefile.${PV}.am "${S}"/Makefile.am || die
+ cp -v "${FILESDIR}"/Makefile.libwcs.${PV}.am "${S}"/libwcs/Makefile.am || die
+ # avoid colliding with fixdos, getdate and remap from other packages
+ sed -i \
+ -e 's/getdate/wcsgetdate/' \
+ -e 's/crlf/wcscrlf/' \
+ -e 's/remap/wcsremap/' \
+ -e "s/3.... Programs/${PV} Programs/" \
+ wcstools || die
+ eautoreconf
+}
+
+src_configure() {
+ # bug #943830
+ append-cflags -std=gnu17
+
+ default
+}
+
+src_test() {
+ einfo "Testing various wcstools programs"
+ ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed"
+ ./sethead test.fits A=1 B=1 || die "test sethead failed"
+ [[ "$(./gethead test.fits RA)" == "16:32:00.0000" ]] \
+ || die "test gethead failed"
+ rm test.fits
+}
+
+src_install() {
+ default
+ doman man/man1/*
+ newdoc libwcs/NEWS NEWS.libwcs
+ newdoc libwcs/Readme Readme.libwcs
+
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ elog "The following execs have been renamed to avoid colliding"
+ elog "with other packages:"
+ elog " getdate -> wcsgetdate"
+ elog " crlf -> wcscrlf"
+ elog " remap -> wcsremap"
+}
diff --git a/sci-astronomy/weightwatcher/Manifest b/sci-astronomy/weightwatcher/Manifest
new file mode 100644
index 000000000000..787f7bc10ea8
--- /dev/null
+++ b/sci-astronomy/weightwatcher/Manifest
@@ -0,0 +1 @@
+DIST weightwatcher-1.12.tar.gz 460583 BLAKE2B 6ea09dcb8ba527cdf40dc94a7ed7b11357ec438611cd0d30d99e209bd4d976454d064be77c98ec97d1c8946bfd987fdd2b34211e9b944c3ed293dd2e5c1a0fbf SHA512 392ca6442de96e6c35447b7b34c67b22e7793831337aaf0f06e45d40e63f8c5e9605649fe39a67a5baf9eadcb79fa9f5d998fcb9504f85606f75071d672b0ada
diff --git a/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch
new file mode 100644
index 000000000000..6c5b72ffc74c
--- /dev/null
+++ b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/725284
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,6 +78,7 @@ fi
+
+ AC_PROG_RANLIB
+ AC_PROG_INSTALL
++AM_PROG_AR
+
+ # Checks for libraries.
+ # Replace `main' with a function in -lm:
diff --git a/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch
new file mode 100644
index 000000000000..a9071da81207
--- /dev/null
+++ b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch
@@ -0,0 +1,160 @@
+--- a/src/field.c
++++ b/src/field.c
+@@ -42,6 +42,9 @@
+ #include "prefs.h"
+ #include "readimage.h"
+
++extern prefstruct prefs;
++char gstr[MAXCHAR];
++
+ /********************************* newfield **********************************/
+ /*
+ Returns a pointer to a new field, ready to go!
+--- a/src/fits/fitsbody.c
++++ b/src/fits/fitsbody.c
+@@ -43,6 +43,7 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++extern int bswapflag;
+ size_t body_maxram = BODY_DEFRAM,
+ body_maxvram = BODY_DEFVRAM,
+ body_ramleft, body_vramleft, body_ramflag;
+--- a/src/fits/fitscat.h
++++ b/src/fits/fitscat.h
+@@ -333,6 +333,6 @@ extern void error(int, char *, char *),
+ warning(char *msg1, char *msg2);
+
+
+-int bswapflag;
++extern int bswapflag;
+
+ #endif
+--- a/src/fits/fitscheck.c
++++ b/src/fits/fitscheck.c
+@@ -42,6 +42,7 @@
+ unsigned int exclude[13] = {0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
+ 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60};
+
++extern int bswapflag;
+ /****** encode_checksum *****************************************************
+ PROTO void encode_checksum(unsigned int sum, char *str)
+ PURPOSE Encode a checksum to ASCII
+--- a/src/fits/fitskey.c
++++ b/src/fits/fitskey.c
+@@ -38,6 +38,7 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++int bswapflag;
+ /****** add_key ****************************************************************
+ PROTO int add_key(keystruct *key, tabstruct *tab, int pos)
+ PURPOSE Copy a key from one table to another.
+--- a/src/fits/fitsread.c
++++ b/src/fits/fitsread.c
+@@ -38,6 +38,7 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++extern int bswapflag;
+ char padbuf[FBSIZE];
+
+ /****** read_cat ***************************************************************
+--- a/src/fits/fitswrite.c
++++ b/src/fits/fitswrite.c
+@@ -39,6 +39,7 @@
+ #include "fitscat_defs.h"
+ #include "fitscat.h"
+
++extern int bswapflag;
+
+ /****** save_cat **************************************************************
+ PROTO void save_cat(catstruct *cat, char *filename)
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -30,7 +30,7 @@
+ #include "types.h"
+
+ /*----------------------- miscellaneous variables ---------------------------*/
+-char gstr[MAXCHAR];
++extern char gstr[MAXCHAR];
+
+ /*------------------------------- functions ---------------------------------*/
+ extern void makeit(void),
+--- a/src/main.c
++++ b/src/main.c
+@@ -51,6 +51,8 @@ EXECUTABLE " [-c <configuration_file>] [-<keyword> <value>]\n"\
+ extern const char notokstr[];
+ time_t thetime, thetime2;
+
++extern prefstruct prefs;
++
+ /********************************** main ************************************/
+ int main(int argc, char *argv[])
+
+--- a/src/makeit.c
++++ b/src/makeit.c
+@@ -45,6 +45,8 @@
+ #include "readimage.h"
+ #include "xml.h"
+
++extern prefstruct prefs;
++
+ /********************************** makeit ***********************************/
+ void makeit(void)
+ {
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -51,6 +51,9 @@
+ #include "prefs.h"
+ #include "preflist.h"
+
++extern int bswapflag;
++prefstruct prefs;
++
+ /********************************* dumpprefs ********************************/
+ /*
+ Print the default preference parameters.
+--- a/src/prefs.h
++++ b/src/prefs.h
+@@ -86,7 +86,7 @@ typedef struct
+ double time_diff; /* Execution time */
+ } prefstruct;
+
+- prefstruct prefs;
++extern prefstruct prefs;
+
+
+ /*-------------------------------- protos -----------------------------------*/
+--- a/src/readimage.c
++++ b/src/readimage.c
+@@ -39,6 +39,7 @@
+ #include "fits/fitscat.h"
+ #include "readimage.h"
+
++extern int bswapflag;
+ /******************************** readdata **********************************/
+ /*
+ read and convert input data stream in PIXTYPE (float) format.
+--- a/src/vector.c
++++ b/src/vector.c
+@@ -46,6 +46,9 @@
+
+ static void chsort(crosstruct *ra, int n);
+
++extern char gstr[MAXCHAR];
++extern prefstruct prefs;
++
+ /********************************** newvec **********************************/
+ /*
+ Returns a pointer to a new polygon, and initialize local context buffer:
+--- a/src/xml.c
++++ b/src/xml.c
+@@ -45,6 +45,7 @@
+ #include "field.h"
+ #include "xml.h"
+
++extern prefstruct prefs;
+ extern time_t thetime,thetime2; /* from makeit.c */
+ extern pkeystruct key[]; /* from preflist.h */
+ extern char keylist[][32]; /* from preflist.h */
diff --git a/sci-astronomy/weightwatcher/metadata.xml b/sci-astronomy/weightwatcher/metadata.xml
new file mode 100644
index 000000000000..f068f6f1ce14
--- /dev/null
+++ b/sci-astronomy/weightwatcher/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ WeightWatcher is a program that combines weight-maps, flag-maps and
+ polygon data in order to produce control maps which can directly be
+ used in astronomical image-processing packages like Drizzle,
+ <pkg>sci-astronomy/sextractor</pkg> or <pkg>sci-astronomy/swarp</pkg>.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild b/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild
new file mode 100644
index 000000000000..040c72a86993
--- /dev/null
+++ b/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Combine weight maps and polygon for astronomical images weighting"
+HOMEPAGE="http://www.astromatic.net/software/weightwatcher/"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="doc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-AR.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/*
+}
diff --git a/sci-astronomy/xephem/Manifest b/sci-astronomy/xephem/Manifest
new file mode 100644
index 000000000000..b1707b70c6c5
--- /dev/null
+++ b/sci-astronomy/xephem/Manifest
@@ -0,0 +1,2 @@
+DIST xephem-4.1.0.tar.gz 17213750 BLAKE2B 921aa4b305cb80df5746db962739d16ee23f1831b59934389ecd218b874ba1fc51aab07896d1283760db1a50be6279da50ed112320fc481f90b4f2d6e25c96dc SHA512 bcad3a6b375cabf1f44e39bc99386552d97a7e7d2ee4063dae4ccd3d5842604f0efc3407447f18a5c9e7f265bab6eebe98bdb64626dcf2135b56f346818ef1b6
+DIST xephem-4.2.0.tar.gz 17317398 BLAKE2B 9a77e976ad867e90e6d7fa1bb68759cc2c3c860187aa6f9a4768bcc53ae93a6fb699cf55d07bc1237603d42d0ac6de712cf87724af9cb3923237892f1aa4d2e2 SHA512 97756bc299821e95cbc06facc3091795feb245db033193fdf587bcfd7a83142a15552a1f8aa53c040c87cb75021424b94bbed5a747fb9783f5a0cac6fb4ddb3e
diff --git a/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch b/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch
new file mode 100644
index 000000000000..4c340711e0e8
--- /dev/null
+++ b/sci-astronomy/xephem/files/xephem-3.7.7-implicits.patch
@@ -0,0 +1,12 @@
+sunmenu.c:920:3: warning: implicit declaration of function ‘strptime’
+
+--- a/GUI/xephem/sunmenu.c
++++ b/GUI/xephem/sunmenu.c
+@@ -1,6 +1,7 @@
+ /* code to manage the sun display
+ */
+
++#define _XOPEN_SOURCE /* See feature_test_macros(7) */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
diff --git a/sci-astronomy/xephem/files/xephem-4.1.0-allow-parallel-builds.patch b/sci-astronomy/xephem/files/xephem-4.1.0-allow-parallel-builds.patch
new file mode 100644
index 000000000000..87d4a32e8857
--- /dev/null
+++ b/sci-astronomy/xephem/files/xephem-4.1.0-allow-parallel-builds.patch
@@ -0,0 +1,26 @@
+From 89cc80f47cdf71d3a5eae0ea6a2bade329a3e1fb Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Fri, 9 Dec 2022 12:30:24 +0100
+Subject: [PATCH] allow parallel builds
+
+Ensure all libraries are ready before the final binary is
+going to get linked.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/GUI/xephem/Makefile
++++ b/GUI/xephem/Makefile
+@@ -182,9 +182,9 @@ OBJS = \
+ xephem.o \
+ xmisc.o
+
+-all: libs xephem xephem.1
++all: xephem xephem.1
+
+-xephem: $(INCS) $(OBJS)
++xephem: libs $(INCS) $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+ xephem.1: xephem.man
+--
+2.38.1
+
diff --git a/sci-astronomy/xephem/files/xephem-4.1.0-respect_env_vars.patch b/sci-astronomy/xephem/files/xephem-4.1.0-respect_env_vars.patch
new file mode 100644
index 000000000000..0f08e4380c30
--- /dev/null
+++ b/sci-astronomy/xephem/files/xephem-4.1.0-respect_env_vars.patch
@@ -0,0 +1,128 @@
+diff --git a/GUI/xephem/Makefile b/GUI/xephem/Makefile
+index dd653c7..32966ee 100644
+--- a/GUI/xephem/Makefile
++++ b/GUI/xephem/Makefile
+@@ -9,9 +9,9 @@
+ # one executable, xephem.
+
+ # These -I and -L flags point to the supporting XEphem libraries
+-LIBINC = -I../../libastro -I../../libip -I../../liblilxml -I../../libjpegd -I../../libpng -I../../libz
+-LIBLNK = -L../../libastro -L../../libip -L../../liblilxml -L../../libjpegd -L../../libpng -L../../libz
+-LIBLIB = -lastro -lip -llilxml -ljpegd -lpng -lz
++LIBINC = -I../../libastro -I../libastro -I../../libip -I../libip -I../../liblilxml -I../liblilxml
++LIBLNK = -L../../libastro -L../libastro -L../../libip -L../libip -L../../liblilxml -L../liblilxml
++LIBLIB = -lastro -lip -llilxml -ljpeg -lpng -lz
+
+ # MOTIFI is the directory containing the Xm directory of include files.
+ # MOTIFL is the directory containing the libXm.a library.
+@@ -29,12 +29,9 @@ MOTIFL = /usr/lib
+ endif
+
+ # for linux and Apple OS X
+-CC = gcc
+-CLDFLAGS = -g
+-CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include
+-LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib
+ XLIBS = -lXm -lXt -lXext -lXmu -lX11
+-LIBS = $(XLIBS) $(LIBLIB) -lm -lssl
++CFLAGS := $(LIBINC) $(CFLAGS)
++LIBS = $(LIBLNK) $(XLIBS) $(LIBLIB) -lm -lssl
+
+ # static linking on Apple using X11 libs from ports
+ # CC = gcc
+@@ -194,12 +191,9 @@ xephem.1: xephem.man
+ nroff -man $? > $@
+
+ libs:
+- cd ../../libastro; make
+- cd ../../libip; make
+- cd ../../libjpegd; make
+- cd ../../liblilxml; make
+- cd ../../libpng; make
+- cd ../../libz; make
++ $(MAKE) -C ../../libastro
++ $(MAKE) -C ../../libip
++ $(MAKE) -C ../../liblilxml
+
+ clean:
+ rm -fr *.o ../../lib*/*.[ao]
+diff --git a/libastro/Makefile b/libastro/Makefile
+index 0a8ecb6..a640c95 100644
+--- a/libastro/Makefile
++++ b/libastro/Makefile
+@@ -4,8 +4,6 @@
+ # compiler and flags
+
+ # gcc
+-CC = gcc
+-CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc
+@@ -83,11 +81,11 @@ OBJS = \
+ vsop87_data.o
+
+ libastro.a: $(HS) $(OBJS)
+- ar rv $@ $(OBJS)
+- ranlib $@
++ $(AR) rv $@ $(OBJS)
++ $(RANLIB) $@
+
+ libastro.so: $(HS) $(OBJS)
+- $(CC) -shared -o $@ $(OBJS)
++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
+
+ clobber:
+ rm -f *.o libastro.a
+diff --git a/libip/Makefile b/libip/Makefile
+index 5c36ac8..f093d6f 100644
+--- a/libip/Makefile
++++ b/libip/Makefile
+@@ -2,8 +2,6 @@
+ # (C) 2001 Elwood Charles Downey
+
+ # gcc
+-CC = gcc
+-CFLAGS= -I../libastro -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -I../libastro -O2 -Wall -arch i386 -arch ppc
+@@ -36,11 +34,11 @@ OBJS = \
+ HS = ip.h fsmatch.h
+
+ libip.a: $(HS) $(OBJS)
+- ar rv $@ $(OBJS)
+- ranlib $@
++ $(AR) rv $@ $(OBJS)
++ $(RANLIB) $@
+
+ libip.so: $(OBJS)
+- gcc -shared -o $@ $(OBJS)
++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
+
+ clobber:
+ rm -f *.o libip.a
+diff --git a/liblilxml/Makefile b/liblilxml/Makefile
+index 2e73761..c75651b 100644
+--- a/liblilxml/Makefile
++++ b/liblilxml/Makefile
+@@ -4,8 +4,6 @@
+ # compiler and flags
+
+ # gcc
+-CC = gcc
+-CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc
+@@ -27,8 +25,8 @@ HS = lilxml.h
+ OBJS = lilxml.o base64.o
+
+ liblilxml.a: $(HS) $(OBJS)
+- ar r $@ $(OBJS)
+- ranlib $@
++ $(AR) r $@ $(OBJS)
++ $(RANLIB) $@
+
+ liltest: liltest.o liblilxml.a
+ $(CC) $(LDFLAGS) -o liltest liltest.o liblilxml.a
diff --git a/sci-astronomy/xephem/files/xephem-4.2.0-respect_env_vars.patch b/sci-astronomy/xephem/files/xephem-4.2.0-respect_env_vars.patch
new file mode 100644
index 000000000000..8fa55502ff4b
--- /dev/null
+++ b/sci-astronomy/xephem/files/xephem-4.2.0-respect_env_vars.patch
@@ -0,0 +1,120 @@
+--- a/GUI/xephem/Makefile
++++ b/GUI/xephem/Makefile
+@@ -9,9 +9,9 @@
+ # one executable, xephem.
+
+ # These -I and -L flags point to the supporting XEphem libraries
+-LIBINC = -I../../libastro -I../../libip -I../../liblilxml -I../../libjpegd -I../../libpng -I../../libz
+-LIBLNK = -L../../libastro -L../../libip -L../../liblilxml -L../../libjpegd -L../../libpng -L../../libz
+-LIBLIB = -lastro -lip -llilxml -ljpegd -lpng -lz
++LIBINC = -I../../libastro -I../libastro -I../../libip -I../libip -I../../liblilxml -I../liblilxml
++LIBLNK = -L../../libastro -L../libastro -L../../libip -L../libip -L../../liblilxml -L../liblilxml
++LIBLIB = -lastro -lip -llilxml -ljpeg -lpng -lz
+
+ # MOTIFI is the directory containing the Xm directory of include files.
+ # MOTIFL is the directory containing the libXm.a library.
+@@ -36,12 +36,9 @@ ifeq ($(UNAME_S),Darwin)
+ PLATL = -L/usr/local/opt/openssl@3/lib -L/opt/X11/lib
+ endif
+
+-CC = gcc
+-CLDFLAGS = -g
+-CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) $(PLATI)
+-LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) $(PLATL)
+ XLIBS = -lXm -lXt -lXext -lXmu -lX11
+-LIBS = $(XLIBS) $(LIBLIB) -lm -lssl
++CFLAGS := $(LIBINC) $(CFLAGS)
++LIBS = $(LIBLNK) $(XLIBS) $(LIBLIB) -lm -lssl
+
+ # static linking on Apple using X11 libs from ports
+ # CC = gcc
+@@ -201,12 +198,9 @@ xephem.1: xephem.man
+ nroff -man $? > $@
+
+ libs:
+- cd ../../libastro; make
+- cd ../../libip; make
+- cd ../../libjpegd; make
+- cd ../../liblilxml; make
+- cd ../../libpng; make
+- cd ../../libz; make
++ $(MAKE) -C ../../libastro
++ $(MAKE) -C ../../libip
++ $(MAKE) -C ../../liblilxml
+
+ clean:
+ rm -fr *.o ../../lib*/*.[ao]
+--- a/libastro/Makefile
++++ b/libastro/Makefile
+@@ -4,8 +4,6 @@
+ # compiler and flags
+
+ # gcc
+-CC = gcc
+-CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc
+@@ -83,11 +81,11 @@ OBJS = \
+ vsop87_data.o
+
+ libastro.a: $(HS) $(OBJS)
+- ar rv $@ $(OBJS)
+- ranlib $@
++ $(AR) rv $@ $(OBJS)
++ $(RANLIB) $@
+
+ libastro.so: $(HS) $(OBJS)
+- $(CC) -shared -o $@ $(OBJS)
++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
+
+ clobber:
+ rm -f *.o libastro.a
+--- a/libip/Makefile
++++ b/libip/Makefile
+@@ -2,8 +2,6 @@
+ # (C) 2001 Elwood Charles Downey
+
+ # gcc
+-CC = gcc
+-CFLAGS= -I../libastro -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -I../libastro -O2 -Wall -arch i386 -arch ppc
+@@ -36,11 +34,11 @@ OBJS = \
+ HS = ip.h fsmatch.h
+
+ libip.a: $(HS) $(OBJS)
+- ar rv $@ $(OBJS)
+- ranlib $@
++ $(AR) rv $@ $(OBJS)
++ $(RANLIB) $@
+
+ libip.so: $(OBJS)
+- gcc -shared -o $@ $(OBJS)
++ $(CC) $(LDFLAGS) -shared -o $@ $(OBJS)
+
+ clobber:
+ rm -f *.o libip.a
+--- a/liblilxml/Makefile
++++ b/liblilxml/Makefile
+@@ -4,8 +4,6 @@
+ # compiler and flags
+
+ # gcc
+-CC = gcc
+-CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc
+@@ -27,8 +25,8 @@ HS = lilxml.h
+ OBJS = lilxml.o base64.o
+
+ liblilxml.a: $(HS) $(OBJS)
+- ar r $@ $(OBJS)
+- ranlib $@
++ $(AR) r $@ $(OBJS)
++ $(RANLIB) $@
+
+ liltest: liltest.o liblilxml.a
+ $(CC) $(LDFLAGS) -o liltest liltest.o liblilxml.a
diff --git a/sci-astronomy/xephem/metadata.xml b/sci-astronomy/xephem/metadata.xml
new file mode 100644
index 000000000000..a6c852e0ab3d
--- /dev/null
+++ b/sci-astronomy/xephem/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Xephem is an interactive astronomical ephemeris program for X Windows
+ systems. It computes heliocentric, geocentric and topocentric
+ information for fixed celestial objects and objects in heliocentric
+ and geocentric orbits; has built-in support for all planet positions;
+ the moons of Jupiter, Saturn and Earth; Mars' and Jupiter's central
+ meridian longitude; Saturn's rings; and Jupiter's Great Red Spot.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">XEphem/XEphem</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-astronomy/xephem/xephem-4.1.0-r1.ebuild b/sci-astronomy/xephem/xephem-4.1.0-r1.ebuild
new file mode 100644
index 000000000000..695269892c31
--- /dev/null
+++ b/sci-astronomy/xephem/xephem-4.1.0-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 desktop toolchain-funcs
+
+DESCRIPTION="Interactive tool for astronomical ephemeris and sky simulation"
+HOMEPAGE="https://xephem.github.io/XEphem/Site/xephem.html"
+SRC_URI="https://github.com/XEphem/XEphem/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/XEphem-${PV}"
+
+LICENSE="MIT"
+SLOT=0
+KEYWORDS="amd64 ~ppc ppc64 ~x86"
+
+RDEPEND="
+ dev-libs/openssl:=
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:0=
+ >=x11-libs/motif-2.3:0
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-apps/groff"
+
+HTML_DOCS=( GUI/xephem/help/. )
+
+# NOTE: order is relevant - parallel build patch requires respect env vars
+# patch to be already applied
+PATCHES=(
+ "${FILESDIR}/${PN}-3.7.7-implicits.patch"
+ "${FILESDIR}/${P}-respect_env_vars.patch"
+ "${FILESDIR}/${P}-allow-parallel-builds.patch"
+)
+
+src_compile() {
+ tc-export CC AR RANLIB
+ emake -C GUI/xephem
+}
+
+src_install() {
+ insinto /usr/share/X11/app-defaults
+ newins - XEphem <<-EOF
+ XEphem.ShareDir: /usr/share/${PN}
+ EOF
+ newenvd - 99xephem <<-EOF
+ XEHELPURL=/usr/share/doc/${PF}/html/xephem.html
+ EOF
+ einstalldocs
+
+ cd GUI/xephem || die
+ dobin xephem
+ doman xephem.1
+ newicon XEphem.png ${PN}.png
+ insinto /usr/share/${PN}
+ doins -r auxil catalogs fifos fits gallery lo
+ make_desktop_entry xephem XEphem ${PN}
+}
diff --git a/sci-astronomy/xephem/xephem-4.2.0.ebuild b/sci-astronomy/xephem/xephem-4.2.0.ebuild
new file mode 100644
index 000000000000..80dd283c0a5c
--- /dev/null
+++ b/sci-astronomy/xephem/xephem-4.2.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic toolchain-funcs
+
+DESCRIPTION="Interactive tool for astronomical ephemeris and sky simulation"
+HOMEPAGE="https://xephem.github.io/XEphem/Site/xephem.html"
+SRC_URI="https://github.com/XEphem/XEphem/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/XEphem-${PV}"
+
+LICENSE="MIT"
+SLOT=0
+KEYWORDS="amd64 ~ppc ppc64 ~x86"
+
+RDEPEND="
+ dev-libs/openssl:=
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:0=
+ virtual/zlib:=
+ >=x11-libs/motif-2.3:0
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-apps/groff"
+
+HTML_DOCS=( GUI/xephem/help/. )
+
+# NOTE: order is relevant - parallel build patch requires respect env vars
+# patch to be already applied
+PATCHES=(
+ "${FILESDIR}/${PN}-3.7.7-implicits.patch"
+ "${FILESDIR}/${P}-respect_env_vars.patch"
+ "${FILESDIR}/${PN}-4.1.0-allow-parallel-builds.patch"
+)
+
+src_compile() {
+ # https://bugs.gentoo.org/944933
+ # https://bugs.gentoo.org/944468
+ append-cflags -std=gnu17
+
+ tc-export CC AR RANLIB
+ emake -C GUI/xephem
+}
+
+src_install() {
+ insinto /usr/share/X11/app-defaults
+ newins - XEphem <<-EOF
+ XEphem.ShareDir: /usr/share/${PN}
+ EOF
+ newenvd - 99xephem <<-EOF
+ XEHELPURL=/usr/share/doc/${PF}/html/xephem.html
+ EOF
+ einstalldocs
+
+ cd GUI/xephem || die
+ dobin xephem
+ doman xephem.1
+ newicon XEphem.png ${PN}.png
+ insinto /usr/share/${PN}
+ doins -r auxil catalogs fifos fits gallery lo
+ make_desktop_entry xephem XEphem ${PN}
+}
diff --git a/sci-astronomy/xfitsview/Manifest b/sci-astronomy/xfitsview/Manifest
new file mode 100644
index 000000000000..85072db2f5ad
--- /dev/null
+++ b/sci-astronomy/xfitsview/Manifest
@@ -0,0 +1 @@
+DIST xfitsview2.2.tgz 290959 BLAKE2B 5825d078319ea17d6202dc1cf3a49b7bef4cb6ff9d0e5621bc33b27fbcb4d1f8753cfa191eacf3b89b29fc1401269282c4798ad9d49f0a47916f7bc3a1b24e55 SHA512 01e57f0dd9c7320b86683a2235e7a779828f19c34b9380d5127bad85941e8861fd86f17a276f7ec60038d9e3bc4c8df54cc6291b70f8c7ecce4ef17cfb92b1b9
diff --git a/sci-astronomy/xfitsview/files/xfitsview-2.2-build_system.patch b/sci-astronomy/xfitsview/files/xfitsview-2.2-build_system.patch
new file mode 100644
index 000000000000..ca45aa7ba39a
--- /dev/null
+++ b/sci-astronomy/xfitsview/files/xfitsview-2.2-build_system.patch
@@ -0,0 +1,67 @@
+* Fix parallel build
+* Respect LDFLAGS
+* Fix build with gmake 3.82
+* Respect AR
+
+https://bugs.gentoo.org/337479
+https://bugs.gentoo.org/725292
+
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -44,7 +44,7 @@
+
+ # build fitssub library
+ $(ARCH)/libfitsLib.a: ${OBJECTS}
+- ar rv $(ARCH)/libfitsLib.a ${OBJECTS}
++ ${AR} rv $(ARCH)/libfitsLib.a ${OBJECTS}
+ ${RANLIB} $(ARCH)/libfitsLib.a
+
+ clean:
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -61,26 +61,26 @@
+ LIBDIR = lib/$(ARCH)/
+ CFLAGS = -Iinclude -Ifitssubs @MOTIF_CPPFLAGS@ @X_CFLAGS@ \
+ $(DEBUG) $(OSFLAGS) @CFLAGS@
+-LIBS = @MOTIF_LIBS@ -lfitsLib
+-LDFLAGS = @MOTIF_LDFLAGS@ @X_LIBS@ -L$(LIBDIR)
++LIBS = @MOTIF_LIBS@ @X_LIBS@ -L$(LIBDIR) -lfitsLib
++LDFLAGS = @LDFLAGS@ @MOTIF_LDFLAGS@
+
+ all: $(TARGETS)
+
+ # update source/object directory
+ srcupdate:
+- cd src; $(MAKE)
++ $(MAKE) -C src
+
+ # update fitssubs source/object directory
+ fitsupdate:
+- cd fitssubs; $(MAKE)
++ $(MAKE) -C fitssubs
+
+ # update fitssubs library directory
+-libupdate:
+- cd lib; $(MAKE) RANLIB="$(RANLIB)"
++libupdate: fitsupdate srcupdate
++ $(MAKE) RANLIB="$(RANLIB)" -C lib
+
+ # Link Obitview
+-XFITSview: lib/$(ARCH)/libfitsLib.a src/*.c XFITSview.c
+- $(CC) XFITSview.c -o XFITSview $(CFLAGS) src/*.o $(LDFLAGS) $(LIBS)
++XFITSview: XFITSview.c libupdate
++ $(CC) $(LDFLAGS) XFITSview.c -o XFITSview $(CFLAGS) src/*.o $(LIBS)
+
+ # make gzipped tar backup of directory
+ backup:
+--- a/fitssubs/Makefile.in
++++ b/fitssubs/Makefile.in
+@@ -69,7 +69,7 @@
+
+
+ # create library directory if needed
+-../lib/$(ARCH): ../lib
++$(LIBDIR): ../lib
+ mkdir ../lib/$(ARCH)
+
+ clean:
diff --git a/sci-astronomy/xfitsview/metadata.xml b/sci-astronomy/xfitsview/metadata.xml
new file mode 100644
index 000000000000..f5cde61f137c
--- /dev/null
+++ b/sci-astronomy/xfitsview/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ XFITSview is a Graphical User Interface based on the Motif library to
+ visualize astronomical images in the FITS format. It's a fairly simple
+ program useful for doing simple astrometry.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/xfitsview/xfitsview-2.2-r2.ebuild b/sci-astronomy/xfitsview/xfitsview-2.2-r2.ebuild
new file mode 100644
index 000000000000..b671e309be7c
--- /dev/null
+++ b/sci-astronomy/xfitsview/xfitsview-2.2-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+MY_PN=XFITSview
+MY_P=${MY_PN}${PV}
+
+DESCRIPTION="Viewer for astronomical images in FITS format"
+HOMEPAGE="http://www.nrao.edu/software/fitsview/"
+SRC_URI="ftp://ftp.cv.nrao.edu/fits/os-support/unix/xfitsview/${PN}${PV}.tgz"
+S="${WORKDIR}/${MY_PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=x11-libs/motif-2.3:0"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-build_system.patch )
+
+src_prepare() {
+ default
+ find -name '*old.c' -delete || die
+}
+
+src_configure() {
+ tc-export AR
+ default
+}
+
+src_install() {
+ dobin XFITSview
+ dodoc README changes notes.text
+}