Diff spice-3.5.5-r3 with a spice-3.5.5-r4

/usr/portage/sci-electronics/spice/spice-3.5.5-r4.ebuild 2023-10-09 14:52:35.044368490 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="6"
4
EAPI=8
5 5

  
6 6
inherit flag-o-matic toolchain-funcs
7 7

  
8 8
MY_P="spice3f5sfix"
9 9
DESCRIPTION="general-purpose circuit simulation program"
10
HOMEPAGE="http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/"
11
SRC_URI="http://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz"
10
HOMEPAGE="http://bwrcs.EECS.Berkeley.EDU/Classes/IcBook/SPICE/"
11
SRC_URI="https://www.ibiblio.org/pub/Linux/apps/circuits/${MY_P}.tar.gz"
12
S=${WORKDIR}/${MY_P}
12 13

  
13 14
LICENSE="BSD"
14 15
SLOT="0"
15
KEYWORDS="amd64 ~ppc ~x86"
16
KEYWORDS="~amd64 ~ppc ~x86"
16 17

  
17
RDEPEND="sys-libs/ncurses:0=
18
RDEPEND="
19
	sys-libs/ncurses:0=
18 20
	x11-libs/libXaw
19
	>=app-misc/editor-wrapper-3"
21
	>=app-misc/editor-wrapper-3
22
"
20 23

  
21 24
DEPEND="${RDEPEND}
22
	virtual/pkgconfig
23 25
	x11-base/xorg-proto
24
	"
26
"
25 27

  
26
S=${WORKDIR}/${MY_P}
28
BDEPEND="
29
	virtual/pkgconfig
30
"
31

  
32
PATCHES=(
33
	"${FILESDIR}"/${P}-gcc-4.1.patch
34
	# Bug https://bugs.gentoo.org/783192
35
	"${FILESDIR}"/${P}-arlocal.patch
36
)
27 37

  
28 38
src_prepare() {
29 39
	# spice accepts -O1 at most
......
32 42
	# Avoid re-creating WORKDIR due to stupid mtime
33 43
	touch ..
34 44

  
35
	sed -i -e "s:termcap:ncurses:g" \
36
		-e "s:joe:/usr/libexec/editor:g" \
37
		-e "s:-O2 -s:${CFLAGS}:g" \
38
		-e "s:-lncurses -lm -s:-lncurses -lm ${LDFLAGS}:" \
39
		-e "s:SPICE_DIR)/lib:SPICE_DIR)/$(get_libdir)/spice:g" \
40
		-e "s:/usr/local/spice:/usr:g" \
41
		-e "s:/X11R6::" \
45
	sed -i -e "s/termcap/ncurses/g" \
46
		-e "s/joe/\/usr\/libexec\/editor/g" \
47
		-e "s/-O2 -s/${CFLAGS}/g" \
48
		-e "s/-lncurses -lm -s/-lncurses -lm ${LDFLAGS}/" \
49
		-e "s/SPICE_DIR)\/lib/SPICE_DIR)\/$(get_libdir)\/spice/g" \
50
		-e "s/\/usr\/local\/spice/\/usr/g" \
51
		-e "s/\/X11R6//" \
42 52
		conf/linux || die
43
	sed -i -e "s:head -1:head -n 1:" util/build || die
44
	eapply "${FILESDIR}"/${P}-gcc-4.1.patch
45
	# Bug https://bugs.gentoo.org/783192
46
	eapply "${FILESDIR}"/${P}-arlocal.patch
53
	sed -i -e "s/head -1/head -n 1/" util/build || die
47 54

  
48 55
	# fix possible buffer overflow (bug #339539)
49
	sed -i -e "s:fgets(buf, BSIZE_SP:fgets(buf, sizeof(buf):g" \
56
	sed -i -e "s/fgets(buf, BSIZE_SP/fgets(buf, sizeof(buf)/g" \
50 57
		src/lib/fte/misccoms.c || die
51 58

  
52 59
	# fix missing libtinfo if ncurses compiled with USE=tinfo (bug #605718)
53
	sed -i -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" conf/linux || die
60
	sed -i -e "s/-lncurses/$($(tc-getPKG_CONFIG) --libs ncurses)/g" conf/linux || die
54 61

  
55
	eapply_user
62
	default
56 63
}
57 64

  
58 65
src_compile() {
......
66 73
	newbin obj/bin/help spice.help
67 74
	dosym spice3 /usr/bin/spice
68 75
	# install runtime stuff
69
	rm -f lib/make*
76
	rm lib/make* || die
70 77
	dodir /usr/$(get_libdir)/spice
71
	cp -R lib/* "${D}"/usr/$(get_libdir)/spice/ || die "failed to copy libraries"
78
	cp -R lib/* "${ED}"/usr/$(get_libdir)/spice/ || die "failed to copy libraries"
72 79
	# install docs
73 80
	doman man/man1/*.1
74 81
	dodoc readme readme.Linux notes/spice2
Thank you!