[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2024-04-11 Thread Arthur Zamarin
commit: 228b327d67dbc08eaa5d0197bc55967c44d4a3d5
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Thu Apr 11 10:58:06 2024 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Thu Apr 11 10:59:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=228b327d

sci-electronics/spice: drop 3.5.5-r3, EAPI6--

Signed-off-by: Arthur Zamarin  gentoo.org>

 sci-electronics/spice/spice-3.5.5-r3.ebuild | 75 -
 1 file changed, 75 deletions(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r3.ebuild 
b/sci-electronics/spice/spice-3.5.5-r3.ebuild
deleted file mode 100644
index 3228789e8fc9..
--- a/sci-electronics/spice/spice-3.5.5-r3.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic toolchain-funcs
-
-MY_P="spice3f5sfix"
-DESCRIPTION="general-purpose circuit simulation program"
-HOMEPAGE="http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/";
-SRC_URI="http://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz";
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc ~x86"
-
-RDEPEND="sys-libs/ncurses:0=
-   x11-libs/libXaw
-   >=app-misc/editor-wrapper-3"
-
-DEPEND="${RDEPEND}
-   virtual/pkgconfig
-   x11-base/xorg-proto
-   "
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
-   # spice accepts -O1 at most
-   replace-flags -O* -O1
-
-   # Avoid re-creating WORKDIR due to stupid mtime
-   touch ..
-
-   sed -i -e "s:termcap:ncurses:g" \
-   -e "s:joe:/usr/libexec/editor:g" \
-   -e "s:-O2 -s:${CFLAGS}:g" \
-   -e "s:-lncurses -lm -s:-lncurses -lm ${LDFLAGS}:" \
-   -e "s:SPICE_DIR)/lib:SPICE_DIR)/$(get_libdir)/spice:g" \
-   -e "s:/usr/local/spice:/usr:g" \
-   -e "s:/X11R6::" \
-   conf/linux || die
-   sed -i -e "s:head -1:head -n 1:" util/build || die
-   eapply "${FILESDIR}"/${P}-gcc-4.1.patch
-   # Bug https://bugs.gentoo.org/783192
-   eapply "${FILESDIR}"/${P}-arlocal.patch
-
-   # fix possible buffer overflow (bug #339539)
-   sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \
-   src/lib/fte/misccoms.c || die
-
-   # fix missing libtinfo if ncurses compiled with USE=tinfo (bug #605718)
-   sed -i -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" 
conf/linux || die
-
-   eapply_user
-}
-
-src_compile() {
-   ./util/build linux || die "build failed"
-   obj/bin/makeidx lib/helpdir/spice.txt || die "makeidx failed"
-}
-
-src_install() {
-   # install binaries
-   dobin obj/bin/{spice3,nutmeg,sconvert,multidec,proc2mod}
-   newbin obj/bin/help spice.help
-   dosym spice3 /usr/bin/spice
-   # install runtime stuff
-   rm -f lib/make*
-   dodir /usr/$(get_libdir)/spice
-   cp -R lib/* "${D}"/usr/$(get_libdir)/spice/ || die "failed to copy 
libraries"
-   # install docs
-   doman man/man1/*.1
-   dodoc readme readme.Linux notes/spice2
-}



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2023-12-15 Thread Sam James
commit: fc59b6a5f5dc67d527a9f45d716f590608345bad
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec 16 03:04:23 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 16 03:04:40 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc59b6a5

sci-electronics/spice: Stabilize 3.5.5-r4 amd64, #920070

Signed-off-by: Sam James  gentoo.org>

 sci-electronics/spice/spice-3.5.5-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r4.ebuild 
b/sci-electronics/spice/spice-3.5.5-r4.ebuild
index 931d96996b3b..383863ebe1d0 100644
--- a/sci-electronics/spice/spice-3.5.5-r4.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r4.ebuild
@@ -13,7 +13,7 @@ S=${WORKDIR}/${MY_P}
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="amd64 ~ppc ~x86"
 
 RDEPEND="
sys-libs/ncurses:0=



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2023-09-12 Thread Andrew Ammerlaan
commit: c567506c9ca7f9254aae07b84f53c2a8f47f246b
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Tue Sep 12 07:09:57 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Tue Sep 12 07:13:37 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c567506c

sci-electronics/spice: update EAPI 6 -> 8, replace sed delimiter

Closes: https://bugs.gentoo.org/711036
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 sci-electronics/spice/spice-3.5.5-r4.ebuild | 82 +
 1 file changed, 82 insertions(+)

diff --git a/sci-electronics/spice/spice-3.5.5-r4.ebuild 
b/sci-electronics/spice/spice-3.5.5-r4.ebuild
new file mode 100644
index ..931d96996b3b
--- /dev/null
+++ b/sci-electronics/spice/spice-3.5.5-r4.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+MY_P="spice3f5sfix"
+DESCRIPTION="general-purpose circuit simulation program"
+HOMEPAGE="http://bwrcs.EECS.Berkeley.EDU/Classes/IcBook/SPICE/";
+SRC_URI="https://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz";
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="
+   sys-libs/ncurses:0=
+   x11-libs/libXaw
+   >=app-misc/editor-wrapper-3
+"
+
+DEPEND="${RDEPEND}
+   x11-base/xorg-proto
+"
+
+BDEPEND="
+   virtual/pkgconfig
+"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-gcc-4.1.patch
+   # Bug https://bugs.gentoo.org/783192
+   "${FILESDIR}"/${P}-arlocal.patch
+)
+
+src_prepare() {
+   # spice accepts -O1 at most
+   replace-flags -O* -O1
+
+   # Avoid re-creating WORKDIR due to stupid mtime
+   touch ..
+
+   sed -i -e "s/termcap/ncurses/g" \
+   -e "s/joe/\/usr\/libexec\/editor/g" \
+   -e "s/-O2 -s/${CFLAGS}/g" \
+   -e "s/-lncurses -lm -s/-lncurses -lm ${LDFLAGS}/" \
+   -e "s/SPICE_DIR)\/lib/SPICE_DIR)\/$(get_libdir)\/spice/g" \
+   -e "s/\/usr\/local\/spice/\/usr/g" \
+   -e "s/\/X11R6//" \
+   conf/linux || die
+   sed -i -e "s/head -1/head -n 1/" util/build || die
+
+   # fix possible buffer overflow (bug #339539)
+   sed -i -e "s/fgets(buf, BSIZE_SP/fgets(buf, sizeof(buf)/g" \
+   src/lib/fte/misccoms.c || die
+
+   # fix missing libtinfo if ncurses compiled with USE=tinfo (bug #605718)
+   sed -i -e "s/-lncurses/$($(tc-getPKG_CONFIG) --libs ncurses)/g" 
conf/linux || die
+
+   default
+}
+
+src_compile() {
+   ./util/build linux || die "build failed"
+   obj/bin/makeidx lib/helpdir/spice.txt || die "makeidx failed"
+}
+
+src_install() {
+   # install binaries
+   dobin obj/bin/{spice3,nutmeg,sconvert,multidec,proc2mod}
+   newbin obj/bin/help spice.help
+   dosym spice3 /usr/bin/spice
+   # install runtime stuff
+   rm lib/make* || die
+   dodir /usr/$(get_libdir)/spice
+   cp -R lib/* "${ED}"/usr/$(get_libdir)/spice/ || die "failed to copy 
libraries"
+   # install docs
+   doman man/man1/*.1
+   dodoc readme readme.Linux notes/spice2
+}



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/, sci-electronics/spice/files/

2023-09-12 Thread Andrew Ammerlaan
commit: 68bf11d86ea4291ef232923bd66caf860c30122d
Author: Vitaliy Kirsanov  gmail  com>
AuthorDate: Sun Jul 23 13:57:34 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Tue Sep 12 07:13:36 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68bf11d8

sci-electronics/spice: remove unnecessary -l argument from ar

Closes: https://bugs.gentoo.org/783192
Closes: https://github.com/gentoo/gentoo/pull/32012
Signed-off-by: Vitaliy Kirsanov  gmail.com>
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 sci-electronics/spice/files/spice-3.5.5-arlocal.patch | 11 +++
 sci-electronics/spice/spice-3.5.5-r3.ebuild   |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/sci-electronics/spice/files/spice-3.5.5-arlocal.patch 
b/sci-electronics/spice/files/spice-3.5.5-arlocal.patch
new file mode 100644
index ..575726fdb7b0
--- /dev/null
+++ b/sci-electronics/spice/files/spice-3.5.5-arlocal.patch
@@ -0,0 +1,11 @@
+--- spice3f5sfix/conf/deaults.orig 2023-07-23 16:26:09.073788130 +0300
 spice3f5sfix/conf/defaults 2023-07-23 16:26:36.772571639 +0300
+@@ -173,7 +173,7 @@
+ # spice3 source directory than in /tmp.  Set to 'l' (lowercase 'L')
+ # to use the source directory, otherwise leave blank.
+ 
+-ARLOCAL   = l
++ARLOCAL   =
+ 
+ # DEPEND_PROG is the command to generate dependencies from '.c' files
+ # (for "make depend").  Output should be of the form "x11.o: fte.h".

diff --git a/sci-electronics/spice/spice-3.5.5-r3.ebuild 
b/sci-electronics/spice/spice-3.5.5-r3.ebuild
index c1b8851af6c0..3228789e8fc9 100644
--- a/sci-electronics/spice/spice-3.5.5-r3.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r3.ebuild
@@ -42,6 +42,8 @@ src_prepare() {
conf/linux || die
sed -i -e "s:head -1:head -n 1:" util/build || die
eapply "${FILESDIR}"/${P}-gcc-4.1.patch
+   # Bug https://bugs.gentoo.org/783192
+   eapply "${FILESDIR}"/${P}-arlocal.patch
 
# fix possible buffer overflow (bug #339539)
sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2022-01-16 Thread Mike Gilbert
commit: 037c7724dfba96bd62c0ecd018a0a5844877e373
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Jan 16 23:47:54 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Jan 16 23:56:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=037c7724

sci-electronics/spice: install relative symlink

Signed-off-by: Mike Gilbert  gentoo.org>

 sci-electronics/spice/spice-3.5.5-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r3.ebuild 
b/sci-electronics/spice/spice-3.5.5-r3.ebuild
index e20171071a19..3939818a929b 100644
--- a/sci-electronics/spice/spice-3.5.5-r3.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -62,7 +62,7 @@ src_install() {
# install binaries
dobin obj/bin/{spice3,nutmeg,sconvert,multidec,proc2mod}
newbin obj/bin/help spice.help
-   dosym /usr/bin/spice3 /usr/bin/spice
+   dosym spice3 /usr/bin/spice
# install runtime stuff
rm -f lib/make*
dodir /usr/$(get_libdir)/spice



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2022-01-16 Thread Mike Gilbert
commit: 50955ec9015a688bb459c0908ed3556cdc801545
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Jan 16 23:50:04 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Jan 16 23:56:07 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50955ec9

sci-electronics/spice: use apply

Signed-off-by: Mike Gilbert  gentoo.org>

 sci-electronics/spice/spice-3.5.5-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r3.ebuild 
b/sci-electronics/spice/spice-3.5.5-r3.ebuild
index 3939818a929b..ed2fa12832f5 100644
--- a/sci-electronics/spice/spice-3.5.5-r3.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r3.ebuild
@@ -41,7 +41,7 @@ src_prepare() {
-e "s:/X11R6::" \
conf/linux || die
sed -i -e "s:head -1:head -n 1:" util/build || die
-   epatch "${FILESDIR}"/${P}-gcc-4.1.patch
+   eapply "${FILESDIR}"/${P}-gcc-4.1.patch
 
# fix possible buffer overflow (bug #339539)
sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2018-05-21 Thread Matt Turner
commit: 8254e1799730d07f71c945d5a7ccb1eead3df3e9
Author: Arfrever Frehtes Taifersar Arahesis  Apache  Org>
AuthorDate: Tue May 22 00:26:57 2018 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 22 01:05:16 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8254e179

sci-electronics/spice: Update dependencies (x11-proto/* -> x11-base/xorg-proto).

 sci-electronics/spice/spice-3.5.5-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r2.ebuild 
b/sci-electronics/spice/spice-3.5.5-r2.ebuild
index 0f73d839633..3b1e87cbbb5 100644
--- a/sci-electronics/spice/spice-3.5.5-r2.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r2.ebuild
@@ -20,7 +20,7 @@ RDEPEND="sys-libs/ncurses:0
>=app-misc/editor-wrapper-3"
 
 DEPEND="${RDEPEND}
-   x11-proto/xproto"
+   x11-base/xorg-proto"
 
 S=${WORKDIR}/${MY_P}
 



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2018-05-21 Thread Aaron Bauman
commit: ae4064db580da0b6199a5d141b6466ead77e17a9
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Mon May 21 07:49:23 2018 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Mon May 21 17:03:54 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae4064db

sci-electronics/spice: remove old

Closes: https://github.com/gentoo/gentoo/pull/8509

 sci-electronics/spice/spice-3.5.5-r1.ebuild | 70 -
 1 file changed, 70 deletions(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r1.ebuild 
b/sci-electronics/spice/spice-3.5.5-r1.ebuild
deleted file mode 100644
index 7d19e22dfe3..000
--- a/sci-electronics/spice/spice-3.5.5-r1.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils flag-o-matic multilib
-
-IUSE=""
-
-MY_P="spice3f5sfix"
-DESCRIPTION="general-purpose circuit simulation program"
-HOMEPAGE="http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/";
-SRC_URI="http://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz";
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
-
-RDEPEND="sys-libs/ncurses
-   x11-libs/libXaw
-   >=app-misc/editor-wrapper-3"
-
-DEPEND="${RDEPEND}
-   x11-proto/xproto"
-
-S=${WORKDIR}/${MY_P}
-
-src_unpack() {
-   # spice accepts -O1 at most
-   replace-flags -O* -O1
-
-   unpack ${A}
-   cd "${S}"
-   # Avoid re-creating WORKDIR due to stupid mtime
-   touch ..
-
-   sed -i -e "s:termcap:ncurses:g" \
-   -e "s:joe:/usr/libexec/editor:g" \
-   -e "s:-O2 -s:${CFLAGS}:g" \
-   -e "s:-lncurses -lm -s:-lncurses -lm ${LDFLAGS}:" \
-   -e "s:SPICE_DIR)/lib:SPICE_DIR)/$(get_libdir)/spice:g" \
-   -e "s:/usr/local/spice:/usr:g" \
-   -e "s:/X11R6::" \
-   conf/linux || die
-   sed -i -e "s:head -1:head -n 1:" util/build || die
-   epatch "${FILESDIR}"/${P}-gcc-4.1.patch
-
-   # fix possible buffer overflow (bug #339539)
-   sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \
-   src/lib/fte/misccoms.c || die
-}
-
-src_compile() {
-   ./util/build linux || die "build failed"
-   obj/bin/makeidx lib/helpdir/spice.txt || die "makeidx failed"
-}
-
-src_install() {
-   # install binaries
-   dobin obj/bin/{spice3,nutmeg,sconvert,multidec,proc2mod} || die "failed 
to copy binaries"
-   newbin obj/bin/help spice.help || die
-   dosym /usr/bin/spice3 /usr/bin/spice || die
-   # install runtime stuff
-   rm -f lib/make*
-   dodir /usr/$(get_libdir)/spice || die
-   cp -R lib/* "${D}"/usr/$(get_libdir)/spice/ || die "failed to copy 
libraries"
-   # install docs
-   doman man/man1/*.1 || die
-   dodoc readme readme.Linux notes/spice2 || die
-}



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2018-03-31 Thread Aaron Bauman
commit: c55d619ca58c23e55b46428251629dd260c9150c
Author: Aaron Bauman  gentoo  org>
AuthorDate: Sat Mar 31 21:39:03 2018 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sat Mar 31 21:39:03 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55d619c

sci-electronics/spice: amd64 stable

Bug: https://bugs.gentoo.org/648342
Package-Manager: Portage-2.3.27, Repoman-2.3.9

 sci-electronics/spice/spice-3.5.5-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-electronics/spice/spice-3.5.5-r2.ebuild 
b/sci-electronics/spice/spice-3.5.5-r2.ebuild
index 36f942311ab..0f73d839633 100644
--- a/sci-electronics/spice/spice-3.5.5-r2.ebuild
+++ b/sci-electronics/spice/spice-3.5.5-r2.ebuild
@@ -13,7 +13,7 @@ 
SRC_URI="http://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz";
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~amd64 ~ppc x86"
+KEYWORDS="amd64 ~ppc x86"
 
 RDEPEND="sys-libs/ncurses:0
x11-libs/libXaw



[gentoo-commits] repo/gentoo:master commit in: sci-electronics/spice/

2017-05-24 Thread Thomas Beierlein
commit: 6af201adee1f44586b3aef239222ac6aee20ba00
Author: Thomas Beierlein  gentoo  org>
AuthorDate: Wed May 24 17:14:58 2017 +
Commit: Thomas Beierlein  gentoo  org>
CommitDate: Wed May 24 17:16:16 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af201ad

sci-electronics/spice: Bump EAPI and fix missing libtinfo (bug #605718)

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 sci-electronics/spice/spice-3.5.5-r2.ebuild | 74 +
 1 file changed, 74 insertions(+)

diff --git a/sci-electronics/spice/spice-3.5.5-r2.ebuild 
b/sci-electronics/spice/spice-3.5.5-r2.ebuild
new file mode 100644
index 000..654e79729e2
--- /dev/null
+++ b/sci-electronics/spice/spice-3.5.5-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit eutils flag-o-matic multilib
+
+IUSE=""
+
+MY_P="spice3f5sfix"
+DESCRIPTION="general-purpose circuit simulation program"
+HOMEPAGE="http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/";
+SRC_URI="http://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="sys-libs/ncurses:0
+   x11-libs/libXaw
+   >=app-misc/editor-wrapper-3"
+
+DEPEND="${RDEPEND}
+   x11-proto/xproto"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+   # spice accepts -O1 at most
+   replace-flags -O* -O1
+
+   # Avoid re-creating WORKDIR due to stupid mtime
+   touch ..
+
+   sed -i -e "s:termcap:ncurses:g" \
+   -e "s:joe:/usr/libexec/editor:g" \
+   -e "s:-O2 -s:${CFLAGS}:g" \
+   -e "s:-lncurses -lm -s:-lncurses -lm ${LDFLAGS}:" \
+   -e "s:SPICE_DIR)/lib:SPICE_DIR)/$(get_libdir)/spice:g" \
+   -e "s:/usr/local/spice:/usr:g" \
+   -e "s:/X11R6::" \
+   conf/linux || die
+   sed -i -e "s:head -1:head -n 1:" util/build || die
+   epatch "${FILESDIR}"/${P}-gcc-4.1.patch
+
+   # fix possible buffer overflow (bug #339539)
+   sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \
+   src/lib/fte/misccoms.c || die
+
+   # fix missing libtinfo if ncurses compiled with USE=tinfo (bug #605718)
+   if has_version 'sys-libs/ncurses:0[tinfo]' ;then
+   sed -i -e "s:-lncurses:-lncurses -ltinfo:g" conf/linux || die
+   fi
+
+   eapply_user
+}
+
+src_compile() {
+   ./util/build linux || die "build failed"
+   obj/bin/makeidx lib/helpdir/spice.txt || die "makeidx failed"
+}
+
+src_install() {
+   # install binaries
+   dobin obj/bin/{spice3,nutmeg,sconvert,multidec,proc2mod}
+   newbin obj/bin/help spice.help
+   dosym /usr/bin/spice3 /usr/bin/spice
+   # install runtime stuff
+   rm -f lib/make*
+   dodir /usr/$(get_libdir)/spice
+   cp -R lib/* "${D}"/usr/$(get_libdir)/spice/ || die "failed to copy 
libraries"
+   # install docs
+   doman man/man1/*.1
+   dodoc readme readme.Linux notes/spice2
+}