Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39966 - sci-mathermatic/gretl-1.6.5 (new package)
Summary: sci-mathermatic/gretl-1.6.5 (new package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-01-31 05:17 UTC by Steve Walesch
Modified: 2007-11-07 09:21 UTC (History)
5 users (show)

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


Attachments
app-misc/gretl-1.3.0 (gretl-1.3.0.ebuild,2.24 KB, text/plain)
2004-12-22 06:23 UTC, Christoph Brill (egore) (RESIGNED)
Details
gretl ebuild plus blas and lapack revisions (ebuilds.tar,10.00 KB, application/octet-stream)
2005-04-02 03:26 UTC, Dan
Details
sci-mathematics/gretl-1.5.1 (gretl-1.5.1.ebuild,1.63 KB, text/plain)
2006-07-04 15:40 UTC, Markus Luisser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Walesch 2004-01-31 05:17:26 UTC
It would be great to have an ebuild for "gretl". I tried to write one myself, but I'm too much of a n00b to succeed.
DESCRIPTION="A software package for econometric analysis"
HOMEPAGE="http://gretl.sourceforge.net/"


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Emil Erlandsson 2004-05-10 14:11:10 UTC
I have started creating an ebuild for this app. Will post it as a new (bug) ebuild when it is ready. There are still some bugs that needs to be fixed.
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2004-05-21 00:07:33 UTC
Please look at http://www.gentoo.org/doc/en/gentoo-howto.xml for instructions how to create ebuild files.
Comment 3 Emil Erlandsson 2004-05-21 10:25:45 UTC
Don't need to since I have an almost complete ebuild to submit.
Comment 4 Steve Walesch 2004-10-10 02:27:02 UTC
I just wanted to know if there's anything new yet as I would still be very much interested in this ebuild. Thanks
Comment 5 Emil Erlandsson 2004-10-10 07:37:36 UTC
I haven't looked into this for a while, but I can take a look at it later. I think I have some sort of working ebuild, but there were some dep-probs earlier.
Comment 6 Christoph Brill (egore) (RESIGNED) 2004-12-22 06:23:56 UTC
Created attachment 46627 [details]
app-misc/gretl-1.3.0

I made an ebuild. It doesn't work because of lapack ... since that ebuild only
produces a static library and we need a dynamic one.

Maybe I will look at it later.
Comment 7 Michele Alzetta 2005-02-02 08:42:05 UTC
Gretl 1.3.2 is out with localized versions and several bugfixes - any luck with the ebuild ?
Comment 8 Dan 2005-02-24 17:50:49 UTC
I also am hoping this gets done.  Is there any progress being made?
Comment 9 Dan 2005-02-24 17:55:29 UTC
I also am hoping this gets done.  Is there any progress being made?
Comment 10 Dan 2005-03-04 04:09:14 UTC
The lapack ebuild is set up to only compile static libs, but there is a shared option available in the Makefile.  The lapack ebuild does this:

src_compile() {
	cp ${FILESDIR}/Makefile SRC/Makefile
	cd SRC
	# ncessary to be able to link against liblapack.a on amd64
	use amd64 && CFLAGS="${CFLAGS} -fPIC"
	FC="g77" FFLAGS="${CFLAGS}" make static || die "make failed"
}

src_install() {
	dolib.a SRC/liblapack.a || die "dolib failed"
}

If we add a "make shared" to the lapack ebuild in addition to the "make static", it should build the shared libs too.  Then the src_install would have to install the .so files.  Same deal for blas.  Then gretl should build.
Comment 11 Dan 2005-04-02 03:26:48 UTC
Created attachment 55086 [details]
gretl ebuild plus blas and lapack revisions

This tar file has an ebuild in it for gretl-1.3.3 based on Christoph's first
attempt.  It also contains new versions of the blas and lapack ebuilds which
are dependencies needed to build the shared libs.  This works on my gnome
machine.  The non-gnome part is mostly a guess and is not tested.
Comment 12 Hauser Wong 2006-04-16 06:07:04 UTC
I wrote an ebuild (based on Dan's ebuild) for gretl-1.5.1. I'm not using gnome, but it works very well. Here's the command I issued:

# emerge -av gretl

These are the packages that I would merge, in order:

Calculating dependencies        ...done!
[ebuild  N    ] media-libs/gdk-pixbuf-0.22.0-r5  +X -doc +mmx 388 kB
[ebuild  N    ] media-libs/gd-2.0.33  -fontconfig +jpeg +png +truetype -xpm 573 kB
[ebuild  N    ] sci-visualization/gnuplot-4.0-r1  +X -doc -emacs +gd -ggi -pdf -plotutils +png +readline +svga -xemacs 2,110 kB
[ebuild  N    ] sci-libs/blas-19980702  -debug 92 kB
[ebuild  N    ] sci-libs/lapack-3.0  4,874 kB
[ebuild  N    ] sci-mathematics/gretl-1.5.1  -debug -gmp -gnome +gtk2 -gtkextra -ole2 +png +readline -sourceview 4,365 kB [1]

Total size of downloads: 12,406 kB
Portage overlays:
 [1] /usr/local/portage

Do you want me to merge these packages? [Yes/No]

And here's gretl-1.5.1.ebuild:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils gnome2
DESCRIPTION="gretl is a cross-platform software package for econometric analysis"
HOMEPAGE="http://gretl.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gmp gnome gtk2 gtkextra ole2 png readline sourceview"
DEPEND="x11-libs/gtk+
   dev-libs/libxml2
   sci-visualization/gnuplot
   sci-libs/lapack
   media-libs/gdk-pixbuf
   sourceview? (x11-libs/gtksourceview)
   png? (media-libs/libpng)
   readline? (sys-libs/readline)
   gnome? (gnome-base/gnome)
   gmp? (dev-libs/gmp)
   !gtk2 (
      ole2? (dev-libs/libole2)
   )"
RDEPEND=""

src_compile() {
   local myconf
   if ! use gtk2 ; then
      ewarn "Running ${PN} without GTK+-2.0 reduces functionality"
      myconf="${myconf} --without-gtk2"
      if ! use ole2 ; then
          myconf="${myconf} --without-libole2"
      fi
      if ! use gtkextra ; then
          myconf="${myconf} --without-gtkextra"
      fi
   fi
   if ! use gnome ; then
       myconf="${myconf} --without-gnome"
   fi
   econf  || die "configure failed"
   emake || die "emake failed"
}

src_install() {
   make check
   if use gnome ; then
      gnome2_src_install \
         gnome_prefix=${D}/usr \
         langdir=${D}/usr/share/gtksourceview-1.0/language-specs
   else
      make   prefix=${D}/usr  \
         bindir=${D}/usr/bin  \
         mandir=${D}/usr/share/man  \
         infodir=${D}/usr/share/info  \
         datadir=${D}/usr/share  \
         gretldir=${D}/usr/share/gretl  \
         localedir=${D}/usr/share/locale  \
         langdir=${D}/usr/share/gtksourceview-1.0/language-specs \
         libdir=${D}/usr/$(get_libdir)  \
         sysconfdir=${D}/etc \
         install || die
   fi
}
Comment 13 Hauser Wong 2006-04-16 06:18:47 UTC
The "png" USE and relevant dependency "libpng" probably are not needed as they are handled by gnuplot.
Comment 14 Markus Luisser 2006-07-04 15:40:03 UTC
Created attachment 90914 [details]
sci-mathematics/gretl-1.5.1

This is the update ebuild as proposed in the last posting. Since the png dependencies are indeed uneccessary, I removed them, nothing else changed.

I propose to place it under sci-mathematics, since it can be applied to all sorts of statistical prediction problems, not only economic stuff.
Comment 15 Jukka Ruohonen 2006-09-07 08:58:02 UTC
Hi,

just wanted to say that the updated ebuild works well.

I hope to see this soon in the official portage tree, as the application can be considered to be a great addition to the list of open source statistical software.
Comment 16 Jukka Ruohonen 2006-09-20 04:06:40 UTC
Markus,

to get this one into the official tree, dependencies for sci-libs/lapack should be changed to match the upcoming new lapack-scheme (see the tracker bug #30453).
Comment 17 Jukka Ruohonen 2006-11-17 01:10:04 UTC
Notes again:

1. The ebuild in the Comment #14 works for 1.6.0 also.

2. Tested with x86 and amd64. Both compile and run fine.

3. Due to the new lapack/blas-scheme, the correct dependency in the posted ebuild should be virtual/lapack.

4. Due to the removal of Gnome 1.x from the official tree, dependency for media-libs/gdk-pixbuf can be omitted, as it should be included in the newer gtk+.
Comment 18 BORGULYA Gábor 2006-12-12 13:15:21 UTC
I would like to install and try gretl! Will it get into the portage tree? I don't know how to use the ebuild I downloaded.
Comment 19 Smiffy 2007-01-08 05:05:49 UTC
Successful build on Thinkpad z61m (Intel Core Duo->amd_64), kernel 2.6.19-gentoo-r3.   Programme opens OK, but I'm no mathematician so cannot really test if fully.

Required points 17.3 and 17.4 of this bug to be observed and the following in /etc/portage/package.keywords:

sci-libs/blas-atlas ~amd64
sci-libs/lapack-atlas ~amd64
app-admin/eselect-blas ~amd64
app-admin/eselect-cblas ~amd64
app-admin/eselect-lapack ~amd64
Comment 20 Andriy Baranskyy 2007-02-27 03:10:46 UTC
Version 1.6.1 has just been released. No problem compiling.
Comment 21 Jukka Ruohonen 2007-04-01 07:08:49 UTC
Subsequent release 1.6.2 followed. 

Compiled fine (x86_64) and no problems with calculations.
Comment 22 Andriy Baranskyy 2007-04-01 07:33:30 UTC
Same here - compiled on x86. No problem whatsoever.

Comment 23 Sébastien Fabbro (RETIRED) gentoo-dev 2007-05-26 18:54:03 UTC
Hi

Thanks all for your inputs. I put a well updated ebuild for gretl-1.6.5 in the gentooscience overlay. Test at your leisure with various USE flags combinations (especially the gnome one which I have not tested). I don't know much of this package, but it seems fairly handy. When anything runs fine, I'll push it to the main tree later on.
To get it from the overlay, use layman (layman -a science)

Sébastien
Comment 24 Jukka Ruohonen 2007-10-15 22:08:01 UTC
Hi.

(Hopefully it is okay for me to post this comment here instead of opening a new bug report.)

The stabilization of sci-visualization/gnuplot-4.2.0-r2 changed the way png-files are handled. Since there is no longer a png USE Flag in gnuplot, commenting out the check

#   if ! built_with_use sci-visualization/gnuplot png; then
#      eerror "You need to build gnuplot with png to use the gretl gtk GUI"
#                      die "configuring with gnuplot failed"
#   fi

results a failure 

checking for GMP - version >= 4.0.1... yes
checking for MPFR - version >= 2.2.0... yes
checking for libgfortran... checking for etime_ in -lgfortran... yes
checking for LAPACK... yes
checking for gnuplot... yes
checking for PNG support in gnuplot... no

* gretl needs PNG support in gnuplot.
* The current version of gnuplot is available from www.gnuplot.info
make: *** No targets specified and no makefile found.  Stop.
 *
 * ERROR: sci-mathematics/gretl-1.6.5 failed.

The changes in gnuplot also broke majority of the runtime plotting capabilities of Gretl. Typical runtime error reads:

set term png size 680,400 xffffff x000000 x202020 xff0000 x0000ff x00cc00
         ^
"/home/drear/study/gretl/gpttmp.0gcONx", line 1: unknown or ambiguous terminal type; type just 'set terminal' for a list

Note that, as instructed in the gnuplot-ebuild, media-libs/gd is built with png-support:

[ebuild   R   ] media-libs/gd-2.0.35  USE="jpeg png truetype -fontconfig -xpm" 0 kB

With the gnuplot-4.0-r2 I can indeed do:

gnuplot> set terminal png
Terminal type set to 'png'
Options are 'small color picsize 640 480 '

but with gnuplot-4.2.0-r2 (or with gnuplot-4.2.2) I get

Terminal type set to 'x11'
gnuplot> set terminal png
                      ^
        unknown or ambiguous terminal type; type just 'set terminal' for a list


I will try to examine the issue more when I have time.
Comment 25 Sébastien Fabbro (RETIRED) gentoo-dev 2007-11-07 09:21:39 UTC
gretl-1.6.5 now in cvs main tree. Thanks everyone!