Bug 223875 - sci-chemistry/gperiodic-2.0.10 (update)
Bug#: 223875 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: CLOSED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: cryos@gentoo.org Reported By: rgkmg25@gmail.com
Component: Ebuilds
URL: 
Summary: sci-chemistry/gperiodic-2.0.10 (update)
Keywords:  
Status Whiteboard: 
Opened: 2008-05-27 18:27 0000
Description:   Opened: 2008-05-27 18:27 0000
Please find attached gperiodic-2.0.10.ebuild which is an update to
gperiodic-2.0.7.ebuild in portage.

GPeriodic is a program for looking up data of elements from the periodic table.
It is an easy reference to the periodic table if you ever need it. Go to
http://www.frantz.fi/software/gperiodic.php for more information.

rgk

------- Comment #1 From RGK 2008-05-27 18:29:25 0000 -------
Created an attachment (id=154509) [details]
http://www.frantz.fi/software/gperiodic.php

------- Comment #2 From Marek Miller 2008-05-28 10:20:26 0000 -------
My sed complains about '|' delimiter:

USE="-nls' emerge -v1 =gperiodic-2.0.10
-----
>>> Source unpacked.
>>> Compiling source in /tmp/portage/tmpdir/portage/sci-chemistry/gperiodic-2.0.10/work/gperiodic-2.0.10 ...
sed: -e expression #1, char 1: unknown command: `|'
sed: -e expression #1, char 1: unknown command: `|'
make gperiodic
-----

This is about lines:
26: sed -i -e "|make clean|d" Makefile
and 
29: sed -i -e "|make -C po|d" Makefile
Changing '|' to '/' fixes the case.

Another problem is that the ebuild doesn't check 
if cairo was compiled with USE="X". I had cairo without
X support and got following error:
-----
gcc `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED
-DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -march=pentium-m
-pipe -fomit-frame-pointer -g -ggdb -o gperiodic gperiodic.o `pkg-config --libs
gtk+-2.0`
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libgdk-x11-2.0.so: undefined
reference to `cairo_xlib_surface_create_for_bitmap'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libgdk-x11-2.0.so: undefined
reference to `cairo_xlib_surface_set_size'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libgdk-x11-2.0.so: undefined
reference to `cairo_xlib_surface_create'
collect2: ld returned 1 exit status
make[1]: *** [gperiodic] Error 1
make[1]: Leaving directory
`/tmp/portage/tmpdir/portage/sci-chemistry/gperiodic-2.0.10/work/gperiodic-2.0.10'
make: *** [all] Error 2
-----

Again, recompiling cairo with X fixex the case.
Tested on x86.
Hope it will help.

------- Comment #3 From Marek Miller 2008-05-28 16:21:46 0000 -------
One more thing: exactly the same is with the stable gperiodic-2.0.7.

------- Comment #4 From Markus Dittrich 2008-05-29 12:43:41 0000 -------
(In reply to comment #3)
> One more thing: exactly the same is with the stable gperiodic-2.0.7.
> 

Thanks guys, I'll have a look at this.

Best,
Markus

------- Comment #5 From Marcus D. Hanwell 2008-05-29 12:54:14 0000 -------
Did something change with sed? The | character has certainly always worked in
the past and was one of the preferred delimiters for a while. The current
stable ebuild still works here and I am at a loss as to why that would not
work. What does your emerge --info look like - I am sure there are many more
ebuilds in the tree using this delimiter.

------- Comment #6 From Markus Dittrich 2008-05-29 13:31:53 0000 -------
I've added gperiodic-2.0.10 to portage.
The sed errors should be fixed and I've added a
check for cairo's X use flag.

Thanks,
Markus

------- Comment #7 From Markus Dittrich 2008-05-29 13:34:40 0000 -------
(In reply to comment #5)
> Did something change with sed? The | character has certainly always worked in
> the past and was one of the preferred delimiters for a while. The current
> stable ebuild still works here and I am at a loss as to why that would not
> work. What does your emerge --info look like - I am sure there are many more
> ebuilds in the tree using this delimiter.
> 

I think "|" is allowed for regular expression type things (s|foo|bar|)
but invalid for delete expressions (/foobar/d). I am not sure if '|'
used to be valid in the latter case, but newer sed's clearly reject it.

Best,
Markus 

------- Comment #8 From Marcus D. Hanwell 2008-05-29 15:13:39 0000 -------
Which versions of sed? I have sys-apps/sed-4.1.5-r1 and it didn't reject it. I
am using ~amd64 and so would have thought I would have been able to reproduce
the error...

------- Comment #9 From Markus Dittrich 2008-05-29 15:22:08 0000 -------
(In reply to comment #8)
> Which versions of sed? I have sys-apps/sed-4.1.5-r1 and it didn't reject it. I
> am using ~amd64 and so would have thought I would have been able to reproduce
> the error...
> 

Hmm, interesting. I am using sys-apps/sed-4.1.5-r1 as well on ~amd64 and
here is what happens

# cat bla.txt 
foobar
# sed -e "|foobar|d" -i bla.txt 
sed: -e expression #1, char 1: unknown command: `|'
# sed -e "/foobar/d" -i bla.txt 
# cat bla.txt


Best,
Markus

------- Comment #10 From Markus Dittrich 2008-05-29 15:28:54 0000 -------
(In reply to comment #9)
> (In reply to comment #8)
> > Which versions of sed? I have sys-apps/sed-4.1.5-r1 and it didn't reject it. I
> > am using ~amd64 and so would have thought I would have been able to reproduce
> > the error...
> > 
> 
> Hmm, interesting. I am using sys-apps/sed-4.1.5-r1 as well on ~amd64 and
> here is what happens
> 
> # cat bla.txt 
> foobar
> # sed -e "|foobar|d" -i bla.txt 
> sed: -e expression #1, char 1: unknown command: `|'
> # sed -e "/foobar/d" -i bla.txt 
> # cat bla.txt
> 
> 
> Best,
> Markus
> 

Could it be locale related? I am using en_US.UTF-8, but plain "C"
fails as well.

Markus

------- Comment #11 From Marcus D. Hanwell 2008-05-29 15:51:20 0000 -------
Sorry - looking closer it does fail now. May be those sed statements should be
| die "sed failed". May be the author should bring back a build system too but
hey... Sorry for the noise. In related news I don't seem to be able to fetch
the 2.0.10 package.

------- Comment #12 From Marek Miller 2008-05-29 16:11:01 0000 -------
If it will help, my emerge --info is an in bug 218084, comment 3.

------- Comment #13 From Marek Miller 2008-05-29 18:56:23 0000 -------
Answer to comment 5

> I am sure there are many more
> ebuilds in the tree using this delimiter.

I scaned the whole portage tree, sunrise and science overlays
and there is only _one_ ebuild that uses '|' in delete expressions.
Guess which one.

------- Comment #14 From Markus Dittrich 2008-05-29 18:57:20 0000 -------
(In reply to comment #11)
>In related news I don't seem to be able to fetch
> the 2.0.10 package.

It should be on our mirrors, I just tried it. In any case,
both SRC_URI and HOMEPAGE were broken so I updated them.
It looks like the 2.0.7 tarball is gone from upstream's
download page and I've therefore changed SRC_URI to point to 
our mirrors instead.

Best,
Markus