gretl stable port information

Package: gretl
Version: 1.7.6
Revision: 3
Maintainer: Allin Cottrell
Description: GNU Econometrics package
Homepage: http://gretl.sourceforge.net/
DescDetail: <<
gretl is an econometrics package. It comprises a shared library,
a command-line client and a gui client that uses GTK. gretl offers
several least-squares based estimators. Besides reading data files
in its own format it also reads RATS 4 databases. It has a built-in
spreadsheet for editing data, and uses gnuplot for graphing. It can
output regression results in LaTeX format.
<<
License: GPL
Source: http://ricardo.ecn.wfu.edu/pub/gretl/%n-%v.tar.bz2
Source-MD5: cbf8079da05e06557d9a4388d1cc778e
BuildDepends: <<
atk1 (>= 1.28.0-1),
cairo (>= 1.8.8-3),
expat1,
fftw3,
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
gconf2-dev (>= 2.28.0-1),
gettext-tools,
glib2-dev (>= 2.22.0-1),
glitz,
gmp,
gnome-vfs2-unified-dev (>= 1:2.24.2-1),
gtk+2-dev (>= 2.18.0-1),
gtksourceview2-dev,
libart2,
libbonobo2-dev (>= 2.24.2-1),
libbonoboui2-dev (>= 2.24.1-2),
libgettext8-dev,
libgnome2-dev (>= 2.28.0-1),
libgnomecanvas2-dev (>= 2.26.0-3),
libgnomeui2-dev (>= 2.24.2-4),
libiconv-dev,
libmpfr1,
libncurses5 (>= 5.4-20041023-1006),
libxml2 (>= 2.6.32-1),
libxslt (>= 1.1.26-1),
orbit2-dev (>= 2.14.17-2),
pango1-xft2-ft219-dev (>= 1.24.5-4),
pixman (>= 0.16.0-1),
pkgconfig (>= 0.23),
popt,
readline5 (>= 5.0-1004),
unixodbc2,
x11-dev
<<
Depends: <<
%N-shlibs (= %v-%r),
gnuplot (>= 4.0.0-1002),
atk1-shlibs (>= 1.28.0-1),
cairo-shlibs (>= 1.8.8-3),
fftw3-shlibs,
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
gconf2-shlibs (>= 2.28.0-1),
glib2-shlibs (>= 2.22.0-1),
gmp-shlibs,
gnome-vfs2-unified-shlibs (>= 1:2.24.2-1),
gtk+2-shlibs (>= 2.18.0-1),
gtksourceview2-shlibs,
libart2-shlibs,
libbonobo2-shlibs (>= 2.24.2-1),
libbonoboui2-shlibs (>= 2.24.1-2),
libgettext8-shlibs,
libgnome2-shlibs (>= 2.28.0-1),
libgnomecanvas2-shlibs (>= 2.26.0-3),
libgnomeui2-shlibs (>= 2.24.2-4),
libiconv,
libmpfr1-shlibs,
libncurses5-shlibs (>= 5.4-20041023-1006),
libxml2-shlibs (>= 2.6.32-1),
libxslt-shlibs (>= 1.1.26-1),
orbit2-shlibs (>= 2.14.17-2),
pango1-xft2-ft219-shlibs (>= 1.24.5-4),
popt-shlibs,
readline5-shlibs (>= 5.0-1004),
unixodbc2-shlibs,
x11
<<
Recommends: tetex-base | system-tetex
Suggests: r-base, octave

PatchScript: <<
#!/bin/sh -ev
perl -pi.bak -e "s#need_relink=yes#need_relink=no#" tools/ltmain.sh
perl -pi.bak -e 's,([[:space:]])(\./),\1env DYLD_LIBRARY_PATH="../lib/.libs:\$\$DYLD_LIBRARY_PATH" \2,g' {gui2,tests}/Makefile.in
# use fink's gettext
sed -i.bak -e '/INTL_MACOSX_LIBS/s;-Wl,-framework -Wl,CoreFoundation;;' configure
# Avoid getting /usr/local into the .la files (and into the build)...
perl -pi.bak -e 's, \-lm \-ldl \-L/usr/local/lib,,' lib/Makefile.in
# Let the .pc and -config files specify the correct inc dir.
perl -pi.bak -e 's,/include$,$&/%N,' %N{.pc,-config}.in
# Avoid bogus linking against previously-installed alt %v of this pkg
perl -pi -e 's,-L./gtkextra-lite -lgtkextra-lite,gtkextra-lite/libgtkextra-lite.a,' gui2/Makefile.in
perl -pi -e 's,-L./gtksourceview-lite -lgtksourceview-lite,gtkextra-lite/libgtksourceview-lite.a,' gui2/Makefile.in
<<

# The following 3 (and the "export CPATH") may not be strictly needed _ bulletproofing
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetLIBRARY_PATH: %p/lib
UseMaxBuildJobs: false

SetCFLAGS: -Wall -Os -fstrict-aliasing -ftree-loop-im -ftree-loop-linear -ftree-loop-ivcanon -fivopts -funroll-loops -freorder-blocks -ffast-math
ConfigureParams: --without-tramo-seats --without-x-12-arima --enable-static --with-gmp-prefix=%p --with-readline-prefix=%p --with-libintl-prefix=%p --with-iconv-prefix=%p --with-odbc --with-ODBC-prefix=%p --disable-dependency-tracking PKG_CONFIG_PATH="%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH"
CompileScript: export CPATH=%p/include; ./configure %c; make; make check
InstallScript: <<
#!/bin/sh -ev
make -j1 install DESTDIR=%d
# -L%p/lib not needed in .la files (all corresponding libs have absolute paths)
# Being there, we may as well also remove homonyms of libSystem, which is always there, and must be searched last.
find %i/lib -name "*.la" | xargs perl -pi -e "s, \-L%p/lib([^/]),\$1,g; s, \-l([mc]|dl|pthread)\b,,g"
# May as well do the same for the config file _ and install it, since gretl-config.1 gets installed.
perl -pi -e "s, \-l([mc]|dl|pthread)\b,,g" %N-config
install -m 755 %N-config %i/bin
# Misc
rm -fR %i/share/%N/COPYING %i/share/aclocal
chmod -R -x,+X %i/lib
# Installing utils
cd utils
mv economagic/magicget %i/bin
ln -s %p/bin/magicget economagic
mv nber/get_nber_data.sh %i/bin/get_nber_data
ln -s %p/bin/get_nber_data nber/get_nber_data.sh
mv nber/idx_abbrev.pl %i/bin/idx_abbrev
ln -s %p/bin/idx_abbrev nber/idx_abbrev.pl
mv nber/nberhist.pl %i/bin/nberhist
ln -s %p/bin/nberhist nber/nberhist.pl
mkdir -p %i/share/emacs/site-lisp
mv emacs/%N.el %i/share/emacs/site-lisp
ln -s %p/share/emacs/site-lisp/%N.el emacs
cd -
cp -pfR utils %i/share/%N
# The DocFiles
mkdir -p %i/share/doc
ln -s %N-shlibs %i/share/doc/%n
<<
# the following needed for upgrade, since dpkg doesn't overwrite a dir with a symlink:
PreInstScript: if [ upgrade = "$1" ]; then rm -fR %p/share/doc/%n ; fi
SplitOff: <<
Package: %N-dev
Replaces: %N (<< 1.4.2-1)
Depends: %N-shlibs (= %v-%r)
BuildDependsOnly: true
Files: include lib/%N-gtk2/*.{l,}a lib/pkgconfig lib/lib%N-1.0.{a,la,dylib} bin/%N-config
InstallScript: <<
mkdir -p %i/share/doc
ln -s %N-shlibs %i/share/doc/%n
<<
<<
SplitOff2: <<
Package: %N-shlibs
Replaces: %N (<< 1.4.2-1)
Depends: fftw3-shlibs, glib2-shlibs (>= 2.22.0-1), gmp-shlibs, libgettext8-shlibs, libxml2-shlibs (>= 2.6.32-1)
Files: lib/*.dylib
Shlibs: %p/lib/libgretl-1.0.0.dylib 1.0.0 gretl (>= 1.4.99-1)
DocFiles: README COPYING INSTALL TODO ChangeLog
<<