Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330389 - app-emulation/spim-{7.3,7.4,7.5,8.0}[X]: misses fonts, doesn't respect CC/CFLAGS/...
Summary: app-emulation/spim-{7.3,7.4,7.5,8.0}[X]: misses fonts, doesn't respect CC/CFL...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Ricardo Mendoza (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: 328973
  Show dependency tree
 
Reported: 2010-07-29 16:38 UTC by vose
Modified: 2010-09-27 19:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from "emerge app-emulation/spim" (foo,17.52 KB, text/plain)
2010-07-29 19:06 UTC, vose
Details
stolen from http://ftp.de.debian.org/debian/pool/main/s/spim/spim_8.0+dfsg-5.debian.tar.gz (xspim.svg,8.17 KB, text/plain)
2010-08-01 22:44 UTC, Michael Weber (RETIRED)
Details
respect Gentoo environement (spim-8.0-r1-respect_env.patch,4.93 KB, patch)
2010-08-01 22:52 UTC, Michael Weber (RETIRED)
Details | Diff
reviewed ebuild (spim-8.0-r1.ebuild,1.74 KB, text/plain)
2010-08-01 22:53 UTC, Michael Weber (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vose 2010-07-29 16:38:06 UTC
Bug#: 73510 is marked as RESOLVED FIXED... but it is NOT fixed for me; I get the indicated buggy behavior: "*-courier-medium-r-normal--12-*-75-*" is printed and xspim dies without bringing up any window.

I would like to try the "font patch" but cannot because:
1) I can't find it (it is not in /usr/portage/app-emulation/spim/files/).
2) I would not know how to use the patch (even if I could find it).

By the way, I would attach the output from emerge, but I cannot find the so-called '"Create a new Attachment" link on the bug' which presumably would be used for attachments.



Reproducible: Always

Steps to Reproduce:
1. emerge app-emulation/spim
2. xspim
3.

Actual Results:  
"*-courier-medium-r-normal--12-*-75-*" is printed and xspim dies without bringing up any window.

Expected Results:  
would be nice if xspim worked

Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r0, 2.6.34-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r1-x86_64-AMD_Phenom-tm-_9850_Quad-Core_Processor-with-gentoo-1.12.13
Timestamp of tree: Thu, 29 Jul 2010 13:30:01 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.5, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -march=native -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -march=native -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.osuosl.org/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://gentoo.llarian.net/ http://mirror.usu.edu/mirrors/gentoo/ "
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl amd64 avi berkdb bzip2 cli cracklib crypt cups cxx dbus dri ffmpeg fortran gdbm gif gpm hal iconv ipv6 jpeg mmx modules mpeg mudflap multilib ncurses nls nptl nptlonly nvidia opengl openmp pam pcre pdf perl png pppd ps pthreads python readline reflection session spl sse sse2 ssl sysfs tcpd tiff tk truetype unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-07-29 17:55:37 UTC
Hi, you can attach files once you've created the bug.

You don't need to apply these patches by yourself, emerge/ebuild does this for you, it's a reular part in this process.

We need to know the exact version of spim you're using, please post the output of `emerge -pv app-emulation/spim`.

Michael
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-07-29 18:16:48 UTC
I can confirm this with app-emulation/spim-{7.3,7.4,7.5,8.0} on amd64.
Comment 3 vose 2010-07-29 18:59:56 UTC
(In reply to comment #1)
> Hi, you can attach files once you've created the bug.
> 
> You don't need to apply these patches by yourself, emerge/ebuild does this for
> you, it's a reular part in this process.
> 
> We need to know the exact version of spim you're using, please post the output
> of `emerge -pv app-emulation/spim`.
> 
> Michael
> 

 emerge -pv app-emulation/spim       

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-emulation/spim-8.0  USE="X" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 4 vose 2010-07-29 19:06:24 UTC
Created attachment 240625 [details]
output from "emerge app-emulation/spim"
Comment 5 vose 2010-08-01 16:52:43 UTC
There evidently is much about the ebuild that is broken (see http://forums.gentoo.org/viewtopic-t-837920.html).

However, xspim can be made to at least bring up a window if the call to XtAppInitialize in main (of xspim.c) has its seventh argument changed from fallback_resources to NULL. 
Comment 6 Michael Weber (RETIRED) gentoo-dev 2010-08-01 22:26:27 UTC
from http://www.linuxquestions.org/questions/linux-software-2/xspim-525919/ try 
  `xspim -font 6x10`

for better results (having media-fonts/font-adobe-100dpi)
  `xspim -font "*-courier-medium-r-normal--14-*"`

It's a problem in the font selection over here, i'll post an updated ebuild soon.
Comment 7 Michael Weber (RETIRED) gentoo-dev 2010-08-01 22:42:57 UTC
It depends on a set of fonts defined at xspim/xspim.c in lines 135-137
135   "*font:               *-courier-medium-r-normal--12-*-75-*",
136   "*Label*font:         *-adobe-helvetica-bold-r-*-*-12-*-75-*",
137   "*panel*font:         *-adobe-helvetica-medium-r-*-*-12-*-75-*",

which is not available ?! The best match is done by 
`sed -i -e 's:-12-\*-75-:-14-\*-100-:g' xspim/xspim.c || die`

135   "*font:               *-courier-medium-r-normal--14-*-100-*",
136   "*Label*font:         *-adobe-helvetica-bold-r-*-*-14-*-100-*",
137   "*panel*font:         *-adobe-helvetica-medium-r-*-*-14-*-100-*",

and installing media-fonts/font-adobe-100dpi.

Unfortunately, this ebuild doesn't respect CC/LDFLAGS/CFLAGS and more.
I've extended the -respect_env.patch file and cleaned the ebuild.
IUSE doc was introduced for the shipped documentation.

So please consider a revbump.
Comment 8 Michael Weber (RETIRED) gentoo-dev 2010-08-01 22:44:06 UTC
Created attachment 240981 [details]
stolen from http://ftp.de.debian.org/debian/pool/main/s/spim/spim_8.0+dfsg-5.debian.tar.gz
Comment 9 Michael Weber (RETIRED) gentoo-dev 2010-08-01 22:52:20 UTC
Created attachment 240983 [details, diff]
respect  Gentoo environement
Comment 10 Michael Weber (RETIRED) gentoo-dev 2010-08-01 22:53:58 UTC
Created attachment 240985 [details]
reviewed ebuild

diff -ru is longer than the ebuild

--- spim-8.0.ebuild	2010-08-01 00:35:51.000000000 +0200
+++ spim-8.0-r1.ebuild	2010-08-02 00:51:00.000000000 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/app-emulation/spim/spim-8.0.ebuild,v 1.4 2010/07/31 22:17:57 hwoarang Exp $
 
-EAPI="3"
+EAPI=3
 
 inherit eutils toolchain-funcs
 
@@ -12,11 +12,12 @@
 
 LICENSE="as-is"
 SLOT="0"
-KEYWORDS="amd64 ~ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE="X"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="doc X"
 
-RDEPEND="X? ( x11-libs/libXaw
-		x11-libs/libXp )"
+RDEPEND="X? ( media-fonts/font-adobe-100dpi
+	x11-libs/libXaw
+	x11-libs/libXp )"
 DEPEND="${RDEPEND}
 	X? ( x11-misc/imake
 		x11-proto/xproto )
@@ -25,57 +26,50 @@
 
 src_prepare() {
 	# fix bugs 240005 and 243588
-	epatch "${FILESDIR}/${P}-respect_env.patch"
-	tc-export CC
+	epatch "${FILESDIR}/${PF}-respect_env.patch"
 
-	# Fix documentation files
-	cd "${S}/Documentation"
-	mv spim.man spim.1
-	mv xspim.man xspim.1
+	#fix bug 330389
+	sed -i -e 's:-12-\*-75-:-14-\*-100-:g' xspim/xspim.c || die
 }
 
 src_configure() {
-	cd "${S}/spim"
-	./Configure || die "Configure Failed!"
+	tc-export CC
+	emake -C spim configuration || die
 
 	if use X; then
-		cd "${S}/xspim"
-		./Configure || die "Configure Failed!"
+		emake -C xspim configuration || die
 	fi
 }
 
 src_compile() {
-	cd "${S}/spim"
-	emake DESTDIR="${EPREFIX}" || die
+	emake DESTDIR="${EPREFIX}" -C spim || die
 
 	if use X; then
-		cd "${S}/xspim"
-		emake DESTDIR="${EPREFIX}" -j1 xspim || die
+		emake DESTDIR="${EPREFIX}" EXCEPTION_DIR=/var/lib/spim \
+			-C xspim -j1 xspim || die
 	fi
 }
 
 src_install() {
-	dodir /var/lib/spim || die
-	dodoc README VERSION ChangeLog || die
-
-	cd "${S}/spim"
-	emake DESTDIR="${ED}" install || die "Unable to install spim"
+	emake DESTDIR="${ED}" -C spim install || die
+	newman Documentation/spim.man spim.1 || die
 
 	if use X; then
-		cd "${S}/xspim"
-		emake DESTDIR="${ED}" install || die "Unable to install xspim"
-
-		doman "${S}/Documentation/xspim.1"
+		emake DESTDIR="${ED}" -C xspim install || die
+		newman Documentation/xspim.man xspim.1 || die
 	fi
 
-	cd "${S}/Documentation"
-	doman spim.1 || die
-
-	dohtml SPIM.html || die
-	dodoc BLURB || die
+	doicon "${FILESDIR}"/xspim.svg || die
+	make_desktop_entry xspim xSPIM xspim "ComputerScience;Science;Education" \
+		"Comment=Graphical MIPS32 Assembly language emulator"
+
+	dohtml Documentation/SPIM.html || die
+	dodoc ChangeLog Documentation/BLURB README VERSION || die
+	if use doc ; then
+		dodoc Documentation/TeX/{cycle,spim}.ps || die
+	fi
 }
 
 src_test() {
-	cd "${S}/spim"
-	make test || die "Failed to pass tests!"
+	emake -C spim test || die
 }
Comment 11 Ricardo Mendoza (RETIRED) gentoo-dev 2010-08-14 01:50:15 UTC
Thanks to Michael for the updated ebuild, it is now in. Please give it a go, vose.
Comment 12 vose 2010-08-17 12:55:24 UTC
I appreciate all the help, and the updated ebuild.

Thanks

Michael
Comment 13 Michael Weber (RETIRED) gentoo-dev 2010-09-27 13:58:08 UTC
Hi, can you close this and stable 0.8-r1? Michael