summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@gentoo.org>2024-09-03 13:17:55 +0200
committerPetr Vaněk <arkamar@gentoo.org>2024-09-03 18:43:31 +0200
commit74c54cb29778f389f8857f54685381a4ef245814 (patch)
tree967bee7046f144721fb455c19c287d488002e1ea /app-misc
parentapp-office/libreoffice: Drop kioclient patch to support kde-open5 (diff)
downloadgentoo-74c54cb29778f389f8857f54685381a4ef245814.tar.gz
gentoo-74c54cb29778f389f8857f54685381a4ef245814.tar.bz2
gentoo-74c54cb29778f389f8857f54685381a4ef245814.zip
app-misc/astrolog: add 7.70
- use MY_PV in SRC_URI - update LICENSE - respect user optimization CFLAGS and do not pre-strip binaries; src_prepare and src_compile phases were reworked due to that - print postinst message only on the first install Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/astrolog/Manifest1
-rw-r--r--app-misc/astrolog/astrolog-7.70.ebuild75
2 files changed, 76 insertions, 0 deletions
diff --git a/app-misc/astrolog/Manifest b/app-misc/astrolog/Manifest
index 905de738fda6..b4883f98e9a9 100644
--- a/app-misc/astrolog/Manifest
+++ b/app-misc/astrolog/Manifest
@@ -1 +1,2 @@
DIST ast74src.zip 4483648 BLAKE2B d15d3e5d98337c5c5884973d079cffda9144a5c9f43ab48dd38f782eeef089d9fd5fb3f5a01f1d607bd2134e6a774494d4cf7d99e117d3092c8787626436e778 SHA512 540bda7ee10cde0723f6bd4afe410e4e9c59168e31dbdbd0b3b62a9e77ae83a971543fc812876258e2b7b9636f880c74b9be5497c54e7dd0e9b444bad2edbf6b
+DIST ast77src.zip 4706533 BLAKE2B ea5ae3805ea43d61f5ff27f199bd36e7263800e441b1aa31044c814b08f6ae2be8969d752a16262ec944dbaae0e0bc2ab3413ee14edbe2366f332a56452bc4d1 SHA512 f5ad29cc023e4bd6a36ddc8434f422fcfe4dbd0b3ebebb85bf6e2d12de58cf60e8304c8a5cea6cb385de346dc1441752542774ee1e7319de9af2166289fd1291
diff --git a/app-misc/astrolog/astrolog-7.70.ebuild b/app-misc/astrolog/astrolog-7.70.ebuild
new file mode 100644
index 000000000000..84ef17f76a89
--- /dev/null
+++ b/app-misc/astrolog/astrolog-7.70.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Please also check if app-misc/astrolog-ephemeris archive needs update
+
+inherit toolchain-funcs
+
+MY_PV=$(ver_rs 1 '')
+
+DESCRIPTION="A many featured astrology chart calculation program"
+HOMEPAGE="
+ https://www.astrolog.org/astrolog.htm
+ https://github.com/CruiserOne/Astrolog
+"
+SRC_URI="https://www.astrolog.org/ftp/ast${MY_PV:0:2}src.zip"
+
+S="${WORKDIR}"
+
+LICENSE="AGPL-3 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="X"
+
+DEPEND="X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+BDEPEND="app-arch/unzip"
+
+src_prepare() {
+ default
+
+ # we use /usr/share/astrolog for config and (optional) ephemeris-data-files
+ local cfgargs=( -e "s:~/astrolog:/usr/share/astrolog:g" )
+ # if we do NOT use X, we comment the "#define X11" in astrolog.h
+ use X || cfgargs+=( -e "s:#define X11://&:g" )
+
+ sed -i "${cfgargs[@]}" astrolog.h || die
+
+ local makeargs=(
+ # respect CXX (bug #243606), and LDFLAGS
+ -e 's:\tcc :\t$(CXX) $(LDFLAGS) :'
+ # respect -O flags
+ -e '/^CPPFLAGS/s:-O ::'
+ )
+ sed -i "${makeargs[@]}" Makefile || die
+}
+
+src_compile() {
+ local libs=( -lm -ldl )
+ # we need to link with -lX11 if the X use is set
+ use X && libs+=( -lX11 )
+
+ # Makefile contains stripping flag in LIBS. It is easier to overload it
+ # here because we need to control LIBS content with X use anyway.
+ emake LIBS="${libs[*]}"
+}
+
+src_install() {
+ dobin astrolog
+ dodoc astrolog.doc changes.doc
+ insinto /usr/share/astrolog
+ doins astrolog.as
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "There is a sample config file /usr/share/astrolog/astrolog.as"
+ elog "astrolog looks in current dir for a file astrolog.as before"
+ elog "using the file in /usr/share/astrolog"
+ elog "If you want extended accuracy of astrolog's calculations you"
+ elog "can emerge the optional package \"astrolog-ephemeris\" which"
+ elog "needs ~32.9 MB additional diskspace for the ephemeris-files"
+ fi
+}