public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/pgplot/
Date: Fri, 26 Apr 2024 18:19:58 +0000 (UTC)	[thread overview]
Message-ID: <1714155397.44fa80963d6e8705d0dac6d12de4a1632f562b2d.sam@gentoo> (raw)

commit:     44fa80963d6e8705d0dac6d12de4a1632f562b2d
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Fri Apr 26 14:32:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 18:16:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44fa8096

sci-libs/pgplot: update EAPI 6 -> 8

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/pgplot/pgplot-5.2.2-r8.ebuild | 177 +++++++++++++++++++++++++++++++++
 1 file changed, 177 insertions(+)

diff --git a/sci-libs/pgplot/pgplot-5.2.2-r8.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r8.ebuild
new file mode 100644
index 000000000000..e42bace2cf5a
--- /dev/null
+++ b/sci-libs/pgplot/pgplot-5.2.2-r8.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2 flag-o-matic toolchain-funcs
+
+MY_P="${PN}${PV//.}"
+
+DESCRIPTION="FORTRAN/C device-independent scientific graphic library"
+HOMEPAGE="https://www.astro.caltech.edu/~tjp/pgplot/"
+SRC_URI="ftp://ftp.astro.caltech.edu/pub/pgplot/${MY_P}.tar.gz"
+
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc motif static-libs tk"
+
+RDEPEND="
+	media-libs/libpng:=
+	x11-libs/libX11:=
+	x11-libs/libXt:=
+	motif? ( x11-libs/motif:= )
+	tk? ( dev-lang/tk:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	doc? ( virtual/latex-base )
+"
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-drivers.patch
+	"${FILESDIR}"/${PN}-makemake.patch
+	"${FILESDIR}"/${PN}-compile-setup.patch
+	"${FILESDIR}"/${PN}-headers.patch
+	"${FILESDIR}"/${PN}-libpng15.patch
+	"${FILESDIR}"/${PN}-tk86.patch
+)
+
+src_prepare() {
+	default
+
+	# fix pointers for 64 bits
+	if use amd64 || use ia64; then
+		sed -e 's/INTEGER PIXMAP/INTEGER*8 PIXMAP/g' \
+			-i drivers/{gi,pp,wd}driv.f || die "sed 64bits failed"
+	fi
+
+	cp sys_linux/g77_gcc.conf local.conf
+
+	sed -e "s:FCOMPL=.*:FCOMPL=\"$(tc-getFC)\":g" \
+		-e "s:CCOMPL=.*:CCOMPL=\"$(tc-getCC)\":g" \
+		-i local.conf || die "sed flags failed"
+
+	if [[ "$(tc-getFC)" = if* ]]; then
+		sed -e 's/-Wall//g' \
+			-e 's/TK_LIBS="/TK_LIBS="-nofor-main /' \
+			-i local.conf || die "sed drivers failed"
+	fi
+
+	sed -e "s:/usr/local/pgplot:${EPREFIX}/usr/$(get_libdir)/pgplot:g" \
+		-e "s:/usr/local/bin:${EPREFIX}/usr/bin:g" \
+		-i src/grgfil.f makehtml maketex || die "sed path failed"
+
+	use motif && sed -i -e '/XMDRIV/s/!//' drivers.list
+	use tk && sed -i -e '/TKDRIV/s/!//' drivers.list
+}
+
+src_configure() {
+	# -Werror=lto-type-mismatch
+	# https://bugs.gentoo.org/862918
+	#
+	# Upstream contact method is email. I have sent one.
+	filter-lto
+
+	# GCC 10 workaround
+	# bug #722190
+	append-fflags $(test-flags-FC -fallow-argument-mismatch)
+
+	./makemake . linux
+	# post makefile creation prefix hack
+	sed -i -e "s|/usr|${EPREFIX}/usr|g" makefile || die
+}
+
+src_compile() {
+	emake \
+		CFLAGS="${CFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		shared cpg-shared pgxwin_server pgdisp pgplot.doc
+
+	use tk && emake CFLAGS="${CFLAGS} -fPIC" libtkpgplot.so
+	use motif && emake CFLAGS="${CFLAGS} -fPIC" libXmPgplot.so
+
+	emake -j1 clean
+	use static-libs && emake all cpg
+
+	if use doc; then
+		export VARTEXFONTS="${T}/fonts"
+		emake pgplot.html pgplot-routines.tex
+		pdflatex pgplot-routines.tex
+		pdflatex pgplot-routines.tex
+	fi
+
+	# this just cleans out not needed files
+	emake -j1 clean
+}
+
+src_test() {
+	# i can go to 16
+	local i j
+	for i in 1 2 3; do
+		emake pgdemo${i}
+		# j can also be LATEX CPS...
+		for j in NULL PNG PS CPS LATEX; do
+			local testexe=./test_${j}_${i}
+			echo "LD_LIBRARY_PATH=. ./pgdemo${i} <<EOF" > ${testexe}
+			echo "/${j}" >> ${testexe}
+			echo "EOF" >> ${testexe}
+			sh ${testexe} || die "test ${i} failed"
+		done
+	done
+}
+
+src_install() {
+	insinto /usr/$(get_libdir)/pgplot
+	doins grfont.dat grexec.f *.inc rgb.txt
+	echo "PGPLOT_FONT=${EPREFIX}/usr/$(get_libdir)/pgplot/grfont.dat" >> 99pgplot
+	doenvd 99pgplot
+
+	dolib.so libpgplot.so*
+	dobin pgxwin_server pgdisp
+
+	# C binding
+	insinto /usr/include
+	doins cpgplot.h
+	dolib.so libcpgplot.so*
+
+	if use motif; then
+		insinto /usr/include
+		doins XmPgplot.h
+		dolib.so libXmPgplot.so*
+	fi
+
+	if use tk; then
+		insinto /usr/include
+		doins tkpgplot.h
+		dolib.so libtkpgplot.so*
+	fi
+
+	use static-libs && dolib.a lib*pgplot.a
+
+	# minimal doc
+	dodoc aaaread.me pgplot.doc
+	newdoc pgdispd/aaaread.me pgdispd.txt
+
+	if use doc; then
+		dodoc cpg/cpgplot.doc applications/curvefit/curvefit.doc pgplot.html
+		dodoc pgplot-routines.pdf pgplot-routines.tex
+		docinto examples
+		dodoc -r examples/. cpg/cpgdemo.c
+		docompress -x /usr/share/doc/${PF}/examples
+		dodoc -r applications
+		docompress -x /usr/share/doc/${PF}/applications
+		if use motif; then
+			docinto pgm
+			dodoc -r pgmf/. drivers/xmotif/pgmdemo.c
+			docompress -x /usr/share/doc/${PF}/pgm
+		fi
+		if use tk; then
+			docinto pgtk
+			dodoc drivers/xtk/pgtkdemo.*
+			docompress -x /usr/share/doc/${PF}/pgtk
+		fi
+	fi
+}


             reply	other threads:[~2024-04-26 18:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 18:19 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-10  9:52 [gentoo-commits] repo/gentoo:master commit in: sci-libs/pgplot/ Sam James
2024-06-07 16:47 Arthur Zamarin
2024-06-07 16:46 Arthur Zamarin
2024-04-26 18:19 Sam James
2024-04-26 18:19 Sam James
2022-05-17  5:34 Sam James
2022-02-13 21:08 Conrad Kostecki
2021-02-19 12:47 Sam James
2020-06-27 20:45 Andreas K. Hüttel
2020-02-08 16:53 David Seifert
2020-01-03 19:08 Andreas Sturmlechner
2020-01-03 14:30 Agostino Sarubbo
2020-01-01 15:30 Agostino Sarubbo
2016-06-23 13:40 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1714155397.44fa80963d6e8705d0dac6d12de4a1632f562b2d.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox