sci-electronics/vbs: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Tue, 17 Apr 2018 09:03:26 +0000 (11:03 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 17 Apr 2018 09:08:11 +0000 (11:08 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

sci-electronics/vbs/files/vbs-1.4.0-const_cast.patch [new file with mode: 0644]
sci-electronics/vbs/files/vbs-1.4.0-gcc-4.1.patch
sci-electronics/vbs/files/vbs-1.4.0-gcc-4.3.patch
sci-electronics/vbs/vbs-1.4.0.ebuild

diff --git a/sci-electronics/vbs/files/vbs-1.4.0-const_cast.patch b/sci-electronics/vbs/files/vbs-1.4.0-const_cast.patch
new file mode 100644 (file)
index 0000000..796aba5
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/common/scp_tab.cc
++++ b/common/scp_tab.cc
+@@ -148,7 +148,7 @@
+               nm.replace(0,top.length()+1,"");
+       const char * n = nm.c_str();
+       size_t full, sub,diff;
+-      char * last_dot = strrchr(n,'.');
++      char * last_dot = const_cast<char*>(strrchr(n,'.'));
+       char * ret = 0;
+       if (last_dot != 0)
+               {
index 20f2aadb7e6e9e02257080f8e81245375ca0c219..b017e9e05dcf27436bd1102a869205949bc7252a 100644 (file)
@@ -1,6 +1,5 @@
-diff -ur vbs-1.4.0.orig/src/common/bvector.h vbs-1.4.0/src/common/bvector.h
---- vbs-1.4.0.orig/src/common/bvector.h        2003-01-12 05:40:59.000000000 +0100
-+++ vbs-1.4.0/src/common/bvector.h     2007-03-09 22:40:02.000000000 +0100
+--- a/common/bvector.h
++++ b/common/bvector.h
 @@ -90,9 +90,9 @@
                size_type _size; // Size of this sub-bit vector.
  
@@ -22,9 +21,8 @@ diff -ur vbs-1.4.0.orig/src/common/bvector.h vbs-1.4.0/src/common/bvector.h
                size_type size() const
                        { return _size; }
                ostream_type &info(ostream_type &) const;
-diff -ur vbs-1.4.0.orig/src/common/logic.h vbs-1.4.0/src/common/logic.h
---- vbs-1.4.0.orig/src/common/logic.h  2002-10-21 11:01:02.000000000 +0200
-+++ vbs-1.4.0/src/common/logic.h       2007-03-09 22:40:02.000000000 +0100
+--- a/common/logic.h
++++ b/common/logic.h
 @@ -44,6 +44,10 @@
                { return (_state == HI) ? true : false; }
        operator int() const
@@ -36,9 +34,8 @@ diff -ur vbs-1.4.0.orig/src/common/logic.h vbs-1.4.0/src/common/logic.h
        operator char() const
                {
                switch (_state)
-diff -ur vbs-1.4.0.orig/src/common/st_net.h vbs-1.4.0/src/common/st_net.h
---- vbs-1.4.0.orig/src/common/st_net.h 2002-11-24 03:07:00.000000000 +0100
-+++ vbs-1.4.0/src/common/st_net.h      2007-03-09 22:40:02.000000000 +0100
+--- a/common/st_net.h
++++ b/common/st_net.h
 @@ -133,4 +133,7 @@
        const st_net &_net;
        };
@@ -47,9 +44,8 @@ diff -ur vbs-1.4.0.orig/src/common/st_net.h vbs-1.4.0/src/common/st_net.h
 +void exit_iovars(st_net::io_list &, st_net::arg_list &);
 +
  #endif // _ST_NET_H
-diff -ur vbs-1.4.0.orig/src/expr/erdwr.cc vbs-1.4.0/src/expr/erdwr.cc
---- vbs-1.4.0.orig/src/expr/erdwr.cc   2002-05-28 08:22:46.000000000 +0200
-+++ vbs-1.4.0/src/expr/erdwr.cc        2007-03-09 22:40:02.000000000 +0100
+--- a/expr/erdwr.cc
++++ b/expr/erdwr.cc
 @@ -25,8 +25,9 @@
  expr_base *
  read_expr::operator()() const
@@ -62,9 +58,8 @@ diff -ur vbs-1.4.0.orig/src/expr/erdwr.cc vbs-1.4.0/src/expr/erdwr.cc
        long ln;
        _in >> ln;
        expr_base *expr = 0;
-diff -ur vbs-1.4.0.orig/src/Makefile.in vbs-1.4.0/src/Makefile.in
---- vbs-1.4.0.orig/src/Makefile.in     2003-06-08 00:38:24.000000000 +0200
-+++ vbs-1.4.0/src/Makefile.in  2007-03-09 22:40:02.000000000 +0100
+--- a/Makefile.in
++++ b/Makefile.in
 @@ -329,13 +329,15 @@
        rm -f *.o
        rm -f *.a
@@ -82,9 +77,8 @@ diff -ur vbs-1.4.0.orig/src/Makefile.in vbs-1.4.0/src/Makefile.in
  
  tarball:
        @echo "===== Tar ball ======"
-diff -ur vbs-1.4.0.orig/src/misc/mrdwr.cc vbs-1.4.0/src/misc/mrdwr.cc
---- vbs-1.4.0.orig/src/misc/mrdwr.cc   2002-05-28 11:42:00.000000000 +0200
-+++ vbs-1.4.0/src/misc/mrdwr.cc        2007-03-09 22:40:02.000000000 +0100
+--- a/misc/mrdwr.cc
++++ b/misc/mrdwr.cc
 @@ -21,8 +21,9 @@
  module *
  read_module::operator()() const
index c0a62e1d0e22a3e36c135a461ea4059ebaaf9e9c..1bb55d824e7a28c7821e5348f98eba1f0a9e8b6e 100644 (file)
@@ -1,5 +1,5 @@
---- vbs-1.4.0b/src/common/dumpstrm.cc  2009-01-21 02:42:43.000000000 -0400
-+++ vbs-1.4.0/src/common/dumpstrm.cc   2009-01-21 02:48:57.000000000 -0400
+--- a/common/dumpstrm.cc
++++ b/common/dumpstrm.cc
 @@ -13,6 +13,7 @@
  
  #include <cstdio> // sprintf
@@ -8,8 +8,8 @@
  #include "dumpstrm.h"
  
  using std::cerr;
---- vbs-1.4.0b/src/common/logic.h      2009-01-21 02:42:43.000000000 -0400
-+++ vbs-1.4.0/src/common/logic.h       2009-01-21 02:48:05.000000000 -0400
+--- a/common/logic.h
++++ b/common/logic.h
 @@ -18,6 +18,7 @@
  
  #ifndef _LOGIC_H
@@ -18,8 +18,8 @@
  
  class logic
        {
---- vbs-1.4.0b/src/common/bvector.h    2009-01-21 02:42:43.000000000 -0400
-+++ vbs-1.4.0/src/common/bvector.h     2009-01-21 02:46:31.000000000 -0400
+--- a/common/bvector.h
++++ b/common/bvector.h
 @@ -30,6 +30,7 @@
  #include <string>
  #include <utility>
index 3dab479eec55090750103757b405151e03f33560..0c3b4dcf54c85b09f875aa382b373d3972f1a528 100644 (file)
@@ -1,41 +1,40 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="2"
+EAPI=6
 
-inherit eutils
-
-HOMEPAGE="http://www.geda.seul.org/tools/vbs/index.html"
 DESCRIPTION="vbs - the Verilog Behavioral Simulator"
+HOMEPAGE="http://www.geda.seul.org/tools/vbs/index.html"
 SRC_URI="http://www.geda.seul.org/dist/${P}.tar.gz"
 
-SLOT="0"
 LICENSE="GPL-2"
-IUSE="examples"
+SLOT="0"
 KEYWORDS="~amd64 ppc ~x86"
+IUSE=""
 
-DEPEND=">=sys-devel/flex-2.3
-       >=sys-devel/bison-1.22"
+DEPEND="
+       sys-devel/flex
+       sys-devel/bison"
 RDEPEND=""
 
 S="${WORKDIR}/${P}/src"
-
-src_prepare() {
-       epatch "${FILESDIR}/${P}-gcc-4.1.patch"
-       epatch "${FILESDIR}/${P}-gcc-4.3.patch"
-       sed -i -e "s/strrchr(n,'.')/const_cast<char*>(strrchr(n,'.'))/" common/scp_tab.cc || die "sed failed"
-}
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc-4.1.patch
+       "${FILESDIR}"/${P}-gcc-4.3.patch
+       "${FILESDIR}"/${P}-const_cast.patch
+)
 
 src_compile() {
-       emake -j1 vbs || die "Compilation failed"
+       emake -j1 vbs
 }
 
 src_install() {
        dobin vbs
-       cd ..
-       dodoc BUGS CHANGELOG* CONTRIBUTORS COPYRIGHT FAQ README vbs.txt
-       if use examples ; then
-               insinto /usr/share/${PF}/examples
-               doins EXAMPLES/*
-       fi
+       cd .. || die
+
+       einstalldocs
+       dodoc CHANGELOG* CONTRIBUTORS vbs.txt
+
+       insinto /usr/share/${PF}/examples
+       doins -r EXAMPLES/.
 }