From 783ac39b1124347dc84c558dffb8e8b3575a4f49 Mon Sep 17 00:00:00 2001
From: Jakov Smolic <jakov.smolic@sartura.hr>
Date: Sun, 14 Feb 2021 11:33:06 +0100
Subject: sci-chemistry/prekin: Port to EAPI 7

Closes: https://bugs.gentoo.org/707310
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
---
 .../prekin/files/6.51.081122-Makefile.patch        |  2 --
 .../prekin/files/6.51.081122-overflow.patch        |  2 --
 .../files/prekin-6.51.081122-fno-common.patch      | 34 ++++++++++++++++++++++
 sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild  |  9 +++---
 4 files changed, 39 insertions(+), 8 deletions(-)
 create mode 100644 sci-chemistry/prekin/files/prekin-6.51.081122-fno-common.patch

(limited to 'sci-chemistry/prekin')

diff --git a/sci-chemistry/prekin/files/6.51.081122-Makefile.patch b/sci-chemistry/prekin/files/6.51.081122-Makefile.patch
index 5fd9d00d9b06..b562f27e51d3 100644
--- a/sci-chemistry/prekin/files/6.51.081122-Makefile.patch
+++ b/sci-chemistry/prekin/files/6.51.081122-Makefile.patch
@@ -1,5 +1,3 @@
-diff --git a/Makefile.linux b/Makefile.linux
-index 65a021a..3daacd8 100755
 --- a/Makefile.linux
 +++ b/Makefile.linux
 @@ -1,15 +1,15 @@
diff --git a/sci-chemistry/prekin/files/6.51.081122-overflow.patch b/sci-chemistry/prekin/files/6.51.081122-overflow.patch
index 27bc01d61a52..1c6ded314315 100644
--- a/sci-chemistry/prekin/files/6.51.081122-overflow.patch
+++ b/sci-chemistry/prekin/files/6.51.081122-overflow.patch
@@ -1,5 +1,3 @@
-diff --git a/PKIN.h b/PKIN.h
-index 6cb6670..c9c6b89 100755
 --- a/PKIN.h
 +++ b/PKIN.h
 @@ -533,8 +533,8 @@ EXTERN float xnext,ynext,znext,onext,Bnext,Uvalnext;
diff --git a/sci-chemistry/prekin/files/prekin-6.51.081122-fno-common.patch b/sci-chemistry/prekin/files/prekin-6.51.081122-fno-common.patch
new file mode 100644
index 000000000000..207d30152027
--- /dev/null
+++ b/sci-chemistry/prekin/files/prekin-6.51.081122-fno-common.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/707310
+--- a/PKININIT.c
++++ b/PKININIT.c
+@@ -65,6 +65,8 @@ void writeversiontooutput(void); /*041011*/
+ void writechangestooutput(void); /*040215*/
+ void writecmdhelptooutput(void); /*040425*/
+ 
++extern int Lribbonnew;
++
+ static char* prekinchanges[] =
+ {"\r"
+ ,"020514 Cbeta:Superpos,NB:Prekin,IOmage\r"
+--- a/PKINRIBB.c
++++ b/PKINRIBB.c
+@@ -6,6 +6,8 @@
+ #define   PKINRIBB
+ #include "PKINRIBB.h"
+ #undef    PKINRIBB
++
++extern int Lribbonnew;
+  
+ /*{{{--NOTE--  version, etc. */
+ /*051025  for now, just work with one model, and let prekin's levels==sections*/
+--- a/PKINRIBB.h
++++ b/PKINRIBB.h
+@@ -5,7 +5,7 @@
+ #define PKINRIBB extern
+ #endif
+ 
+-PKINRIBB    int   Lribbonnew;  /*051025 new ribbon structures: PKINRIBB*/
++extern int   Lribbonnew;  /*051025 new ribbon structures: PKINRIBB*/
+ 
+ #define CORDER 4  /*order of the B-spline defined here*/
+ 
diff --git a/sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild b/sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild
index db0c34eca49b..d6f5e98ced6b 100644
--- a/sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild
+++ b/sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -6,7 +6,6 @@ EAPI=6
 inherit toolchain-funcs
 
 MY_P=${PN}.${PV}
-
 DESCRIPTION="Prepares molecular kinemages from PDB-format coordinate files"
 HOMEPAGE="http://kinemage.biochem.duke.edu/software/prekin.php"
 SRC_URI="http://kinemage.biochem.duke.edu/downloads/software/${PN}/${MY_P}.src.tgz"
@@ -19,15 +18,17 @@ IUSE="X"
 RDEPEND="
 	x11-libs/libXext
 	x11-libs/libXmu
-	x11-libs/libX11
 	x11-libs/libXt
+	x11-libs/libX11
 	X? ( >=x11-libs/motif-2.3:0= )"
 DEPEND="${RDEPEND}"
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
+
 PATCHES=(
 	"${FILESDIR}"/${PV}-Makefile.patch
 	"${FILESDIR}"/${PV}-overflow.patch
+	"${FILESDIR}"/${P}-fno-common.patch
 )
 
 src_configure() {
-- 
cgit v1.2.3-65-gdbad