--- /dev/null
+DIST planarity-3.0.0.5.tar.gz 492644 BLAKE2B d183bc07cab7246b62cc7340956206e3f6c5999aa92b223e7665ebd8ae1bc0c354011c078ea4f42d2e45efa2ae5e83e082e4c8d80e3391a4f20be1020ebf8188 SHA512 dfeb7e024e1f5758e5abbd854c4ca963b4f5d45433b2c5eb00ce85c154b5407ebccd1ace0db167488dee757db2c23367101a2aa568941a3664bac9058ea24328
--- /dev/null
+diff -Naur planarity-2.2.0.orig/c/planarity.h planarity-2.2.0/c/planarity.h
+--- planarity-2.2.0.orig/c/planarity.h 2015-06-04 22:24:57.753965370 +1200
++++ planarity-2.2.0/c/planarity.h 2015-06-04 23:02:38.138973933 +1200
+@@ -77,7 +77,7 @@
+ int legacyCommandLine(int argc, char *argv[]);\r
+ int menu();\r
+ \r
+-char Mode,\r
++extern char Mode,\r
+ OrigOut,\r
+ EmbeddableOut,\r
+ ObstructedOut,\r
+@@ -88,7 +88,7 @@
+ \r
+ /* Low-level Utilities */\r
+ #define MAXLINE 1024\r
+-char Line[MAXLINE];\r
++extern char Line[MAXLINE];\r
+ \r
+ void Message(char *message);\r
+ void ErrorMessage(char *message);\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+ <!--
+ mjo: François maintained this package in the sage-on-gentoo overlay
+ long before I moved it into ::gentoo. You don't need an ACK from me
+ to merge his changes.
+ -->
+ <maintainer type="person">
+ <email>frp.bissey@gmail.com</email>
+ <name>François Bissey</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+
+ <upstream>
+ <remote-id type="github">
+ graph-algorithms/edge-addition-planarity-suite
+ </remote-id>
+ </upstream>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="edge-addition-planarity-suite-Version"
+DESCRIPTION="The edge addition planarity suite of graph algorithms"
+HOMEPAGE="https://github.com/graph-algorithms/edge-addition-planarity-suite/"
+
+# Use the tarball from sage because the github release doesn't
+# contain the generated autotools files (like ./configure).
+SRC_URI="http://files.sagemath.org/spkg/upstream/${PN}/${P}.tar.gz"
+IUSE="examples static-libs"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# https://github.com/graph-algorithms/edge-addition-planarity-suite/issues/4
+# https://github.com/graph-algorithms/edge-addition-planarity-suite/pull/3
+PATCHES=( "${FILESDIR}/${P}-extern.patch" )
+
+S="${WORKDIR}/${MY_PN}_${PV}"
+
+src_configure(){
+ econf $(use_enable static-libs static)
+}
+
+src_install(){
+ default
+ find "${ED}" -name '*.la' -delete || die
+ use examples && dodoc -r c/samples
+}