sci-chemistry/molden: Fix build with gcc >= 8, create desktop entry
authorPacho Ramos <pacho@gentoo.org>
Mon, 11 Nov 2019 21:02:14 +0000 (22:02 +0100)
committerPacho Ramos <pacho@gentoo.org>
Mon, 11 Nov 2019 21:02:26 +0000 (22:02 +0100)
Bug: https://bugs.gentoo.org/665800
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
sci-chemistry/molden/files/molden-5.5-gcc8.patch [new file with mode: 0644]
sci-chemistry/molden/molden-5.5.ebuild

diff --git a/sci-chemistry/molden/files/molden-5.5-gcc8.patch b/sci-chemistry/molden/files/molden-5.5-gcc8.patch
new file mode 100644 (file)
index 0000000..b76cb63
--- /dev/null
@@ -0,0 +1,9 @@
+--- a/rdchx.f  2016-01-25 17:56:49.000000000 +0600
++++ b/rdchx.f  2018-08-24 16:51:14.000000000 +0700
+@@ -6004,5 +6004,5 @@
+       implicit double precision (a-h,p-z),integer (i-n),logical (o)
+       parameter (mxcon=10)
+-      dimension iconn(mxcon+1,*),icnn(mxcon+1)
++      dimension iconn(mxcon+1,*),icnn(*)
+       ibnds = 0
index 9bc1635e9353fe759328ac44a59b17b5a2a1697a..ef939cfb15507c67186f2559d0efe8c494626281 100644 (file)
@@ -1,9 +1,8 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-
-inherit eutils fortran-2 flag-o-matic toolchain-funcs
+inherit desktop fortran-2 flag-o-matic toolchain-funcs
 
 MY_P="${PN}${PV}"
 
@@ -21,7 +20,8 @@ RDEPEND="
                virtual/glu
        opengl? (
                media-libs/freeglut
-               virtual/opengl )"
+               virtual/opengl )
+"
 DEPEND="${RDEPEND}
        x11-misc/gccmakedep
        app-editors/vim"
@@ -34,6 +34,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.0-overflow.patch
        "${FILESDIR}"/${PN}-4.8-ldflags.patch
        "${FILESDIR}"/${PN}-4.7-implicit-dec.patch
+       "${FILESDIR}"/${PN}-5.5-gcc8.patch
 )
 
 src_prepare() {
@@ -67,6 +68,8 @@ src_compile() {
 
 src_install() {
        dobin ${PN} g${PN} $(usex opengl ${PN}ogl "")
+       doicon gmolden.png
+       make_desktop_entry gmolden MOLDEN gmolden.png
 
        dodoc HISTORY README REGISTER
        cd doc || die