the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: gnuplot%type_pkg[-ui]
Version: 4.6.0
Revision: 2
Type: -ui (-nox -nogtk .)
Maintainer: Alexander Hansen
Conflicts: gnuplot, gnuplot-nox, gnuplot-nogtk
Replaces: gnuplot, gnuplot-nox, gnuplot-nogtk
Depends: <<
(%type_raw[-ui] != -nox) app-defaults,
aquaterm,
(%type_raw[-ui] = .) atk1-shlibs (>= 1.28.0-1),
(%type_raw[-ui] != -nox) cairo-shlibs (>= 1.8.8-3),
emacsen-common,
(%type_raw[-ui] != -nox) fontconfig2-shlibs (>= 2.8.0-1),
freetype219-shlibs (>= 2.3.12-1),
(%type_raw[-ui] != -nox) gd2-shlibs (>= 2.0.35-11),
(%type_raw[-ui] != -nox) glib2-shlibs (>= 2.22.0-1),
(%type_raw[-ui] = .) gtk+2-shlibs (>= 2.18.0-1),
libiconv,
libjpeg8-shlibs,
(%type_raw[-ui] != -nox) libpng15-shlibs,
(%type_raw[-ui] = -nox) libpng14-shlibs,
lua51-shlibs,
(%type_raw[-ui] != -nox) pango1-xft2-ft219-shlibs (>= 1.24.5-4),
pdflib6-shlibs,
(%type_raw[-ui] != -nox) plotutils,
(%type_raw[-ui] != -nox) plotutils-shlibs,
(%type_raw[-ui] = .) wxgtk2.8-shlibs,
(%type_raw[-ui] != -nox) x11
<<
BuildDepends: <<
aquaterm-dev,
(%type_raw[-ui] = .) atk1 (>= 1.28.0-1),
autoconf2.6,
automake1.11,
(%type_raw[-ui] != -nox) cairo (>= 1.8.8-3),
fink-package-precedence,
(%type_raw[-ui] != -nox) fontconfig2-dev (>= 2.8.0-1),
freetype219 (>= 2.3.12-1),
(%type_raw[-ui] != -nox) gd2 (>= 2.0.35-11),
(%type_raw[-ui] = -nox) gd2-nox (>= 2.0.35-9),
(%type_raw[-ui] != -nox) glib2-dev (>= 2.22.0-1),
(%type_raw[-ui] != -nox) glitz,
(%type_raw[-ui] = .) gtk+2-dev (>= 2.18.0-1),
libiconv-dev,
libjpeg8,
(%type_raw[-ui] != -nox) libpng15,
(%type_raw[-ui] = -nox) libpng14,
lua51-dev,
(%type_raw[-ui] != -nox) pango1-xft2-ft219-dev (>= 1.24.5-4),
pdflib6,
pkgconfig (>= 0.23-1),
(%type_raw[-ui] != -nox) plotutils-dev,
(%type_raw[-ui] = .) wxgtk2.8,
(%type_raw[-ui] != -nox) x11-dev
<<
GCC: 4.0
Source: mirror:sourceforge:%{ni}/%{ni}-%v.tar.gz
Source-MD5: 8e6e92b4596ea0eb75e16a57fc79efec
PatchFile: %{ni}.patch
PatchFile-MD5: 6066b6bae25263e93f4d56db3d3ee28f
PatchScript:<<
perl -pi -e 's/\bClass\b/GP_Class/g' `find src -name \*.c -o -name \*.cpp -o -name \*.h`
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
<<
ConfigureParams: <<
--mandir='${prefix}/share/man' --libexecdir='${prefix}/lib' --infodir='${prefix}/share/info' \
--without-tutorial --with-readline=builtin \
--with-lasergnu --with-texdir=%p/etc/texmf.local/latex/%{ni}
(%type_raw[-ui] = -nox) --without-x (%type_raw[-ui] != -nox) --with-plot=%p \
(%type_raw[-ui] != .) --disable-wxwidgets \
(%type_raw[-ui] = -nox) --without-cairo \
--without-kpsexpand --enable-history-file --enable-thin-splines --enable-rgip \
(%type_raw[-ui] != -nox) --x-includes=/usr/X11R6/include \
(%type_raw[-ui] != -nox) --x-libraries=/usr/X11R6/lib \
--with-lispdir='${prefix}/share/emacs/site-lisp/gnuplot-mode' \
--enable-dependency-tracking
<<
CompileScript: <<
#!/bin/sh -ev
export DIST_CONTACT="alexkhansen@users.sourceforge.net"
export CCACHE_DISABLE=1
export CPATH=%p/include
export PKG_CONFIG_PATH=%p/lib/glib-2.0/pkgconfig-strict:%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH
autoreconf
autoheader
autoconf
%{default_script}
fink-package-precedence .
<<
InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d
install %b/src/lasergnu %i/bin/lasergnu
chmod 755 %i/bin/lasergnu
mv %i/bin/%{ni} %i/bin/%{ni}x
echo '#!/bin/sh' > %i/bin/%{ni}
echo 'export AQUATERM_PATH=%p/Applications/AquaTerm.app' >> %i/bin/%{ni}
echo 'case ${DISPLAY-0} in' >> %i/bin/%{ni}
echo ' 0) export GNUTERM=aqua ;;' >> %i/bin/%{ni}
echo 'esac' >> %i/bin/%{ni}
echo '%p/bin/%{ni}x "$@"' >> %i/bin/%{ni}
chmod 755 %i/bin/%{ni}
mkdir -p %i/share/doc/%n
cp -R demo %i/share/doc/%n
mkdir %i/share/doc/%n/psdoc
cp docs/psdoc/*ps %i/share/doc/%n/psdoc
rm -f %i/share/emacs/site-lisp/gnuplot-mode/*.elc
install -m 755 -d %i/etc/emacs/site-start.d
install -m 644 fink/gnuplot-mode-startup %i/etc/emacs/site-start.d/50%n.el
install -m 755 -d %i/lib/emacsen-common/packages/{install,remove}
install -m 755 fink/gnuplot-mode-install %i/lib/emacsen-common/packages/install/%n
install -m 755 fink/gnuplot-mode-remove %i/lib/emacsen-common/packages/remove/%n
install -d %i/etc
install -d %i/etc/app-defaults
pushd %i/etc/app-defaults
ln -s ../share/%n/4.4/app-defaults/Gnuplot
rm -rf %i/lib/X11
install -d %i/etc/texmf.local
install -d %i/etc/texmf.local/latex
install -d %i/etc/texmf.local/latex/%{ni}
install %b/share/LaTeX/%{ni}.cfg %i/etc/texmf.local/latex/%{ni}
rm -rf %i/share/texmf-local
<<
ConfFiles: %p/etc/emacs/site-start.d/50%n.el
RuntimeVars: <<
GDFONTPATH: /Library/Fonts
GNUPLOT_DEFAULT_GDFONT: "Arial"
<<
PostInstScript:<<
if [ `which kpsexpand` ]; then kpsexpand %p/etc/texmf.local/latex/%{ni}; fi
if [ `which texhash` ]; then texhash %p/etc/texmf.local/latex/%{ni}; fi
if [ "$1" = "configure" ] && [ -x %p/lib/emacsen-common/emacs-package-install ]
then
%p/lib/emacsen-common/emacs-package-install %n
fi
<<
PreRmScript:<<
if [ `which kpsexpand` ]; then kpsexpand %p/etc/texmf.local/latex/%{ni}; fi
if [ `which texhash` ]; then texhash %p/etc/texmf.local/latex/%{ni}; fi
if [ -x %p/lib/emacsen-common/emacs-package-remove ] ; then
%p/lib/emacsen-common/emacs-package-remove %n
fi
<<
DocFiles: BUGS FAQ.pdf README NEWS ChangeLog Copyright
InfoDocs: %{ni}.info
Description: Command-driven interactive plotting program
DescDetail: <<
Gnuplot is a portable command-line driven interactive data and function
plotting utility for UNIX, IBM OS/2, MS Windows, DOS, Macintosh, VMS, Atari
and many other platforms. The software is copyrighted but freely distributed
(i.e., you don't have to pay for it). It was originally intended as to allow
scientists and students to visualize mathematical functions and data. It
does this job pretty well, but has grown to support many non-interactive
uses, including web scripting and integration as a plotting engine for third-
party applications like Octave. Gnuplot has been supported and under
development since 1986.
Gnuplot supports many types of plots in either 2D and 3D. It can draw using
lines, points, boxes, contours, vector fields, surfaces, and various
associated text. It also supports various specialized plot types.
Gnuplot supports many different types of output: interactive screen terminals
(with mouse and hotkey functionality), direct output to pen plotters or modern
printers, and output to many file formats (eps, fig, jpeg, LaTeX, metafont,
pbm, pdf, png, postscript, svg, ...). Gnuplot is easily extensible to include
new output modes.
<<
DescUsage: <<
The bare 'gnuplot' package has most of the available options included.
Use the -nox variant if you don't want X11 support at all.
Use the -nogtk variant if you want X11 but not the wxWidgets terminal.
Upstream's default font choice doesn't work on case-sensitive filesystems,
so we set the GDFONTDIR environment variable to /Library/Fonts, and the
GNUPLOT_DEFAULT_GDFONT environment variable to be "Arial". If you want
a different setup, you can set these yourself in your startup files, or in
your invocation of gnuplot, e.g.
env GNUPLOT_DEFAULT_GDFONT="Verdana" gnuplot
<<
DescPackaging: <<
PDF documentation has been moved to a separate package to avoid having to
BuildDepend on tetex.
Remove an %i/share/texmf-local that interferes with installing tetex-base.
Now includes lasergnu script as well as manpage.
As of 4.2.5: Rather than use the "arial" font by default as upstream would
have us do (from msttcorefonts), we'll set environment variables to use
"Arial" from /Library/Fonts.
4.2.6-1:
Apply terminal patch from Derek Bruening
http://www.burningcutlery.com/derek/bargraph/#gnuplot-bug
Thanks to Andreas Schiffler
this out.
4.2.6-2: Revert patch because it doesn't do multi-plot windows
properly
4.4.4-3: Fix emacs mode with startup files from Tomoaki Okayama.
4.4.4-4: Used popen() and fclose() without a pclose(), so apply a patch
from Martin Costabel that fixes that.
4.4.4-5: Use upstream patch to fix popen()/fclose() issue.
4.6.0-1: popen/fclose() fixed.
<<
DescPort: <<
Set DIST_CONTACT to mark Fink maintainer as contact person.
Uses Per Persson's aqua terminal (installed via the aquaterm package).
gnuplot is a shell script that sets environment variables and invokes
gnuplot binary (renamed to gnuplotx).
Install the configuration for epslatex terminal manually, because the
upstream build system runs kpsexpand and texhash.
As of 4.4.0: switch to --without-kpsexpand because apparently upstream actually _checks_
for that now.
As of 4.2.4-8, No longer uses fink's libedit because it seems
to disrupt the ability to zoom plots in the X terminals.
We'll go with the builtin "readline", so
if there are any license issues those are upstream's fault!
Before 4.2.4 Revision 8
Since gnuplot's licence isn't GPL2 compatible, apply patch created by
Axel Thimm for The Written Word, Inc., to use libedit instead of readline.
Since we've thereby modified gnuplot's source, under terms of their license
we've modified the contact information, versioning as shown internally,
(Fink's revisoning should count for external vendor-specific versioning)
and we've stuck a copy of the patch in the .deb .
<<
Homepage: http://www.gnuplot.info/
License: Restrictive/Distributable
<<
diff -Nurd gnuplot-4.4.4/fink/gnuplot-mode-install gnuplot-4.4.4.patched/fink/gnuplot-mode-install
--- gnuplot-4.4.4/fink/gnuplot-mode-install 1969-12-31 19:00:00.000000000 -0500
+++ gnuplot-4.4.4.patched/fink/gnuplot-mode-install 2012-01-06 11:04:08.000000000 -0500
@@ -0,0 +1,39 @@
+#! /bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/install/gnuplot-mode
+
+# Written by Jim Van Zandt
+# from the install scripts for gettext by Santiago Vila
+#
+
+FLAVOR=$1
+PACKAGE=gnuplot-mode
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+SITEFLAG="-no-site-file" # Do not load site files when byte-compiling
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+install -m 0755 -d ${ELCDIR}
+
+cd ${ELDIR}
+FILES=`echo *.el`
+
+cd ${ELCDIR}
+for i in $FILES; do
+ ln -sf ${ELDIR}/$i .
+done
+
+cat << EOF > path.el
+ (setq load-path (cons "." load-path) byte-compile-warnings nil)
+ (require 'font-lock)
+ (defun hilit-repaint-command (foo))
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f path.el
+
+exit 0
diff -Nurd gnuplot-4.4.4/fink/gnuplot-mode-remove gnuplot-4.4.4.patched/fink/gnuplot-mode-remove
--- gnuplot-4.4.4/fink/gnuplot-mode-remove 1969-12-31 19:00:00.000000000 -0500
+++ gnuplot-4.4.4.patched/fink/gnuplot-mode-remove 2012-01-06 11:04:08.000000000 -0500
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/remove/gnuplot-mode
+
+FLAVOR=$1
+PACKAGE=gnuplot-mode
+
+if [ ${FLAVOR} != emacs ]; then
+# if test -x /usr/sbin/install-info-altdir; then
+# echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+# install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/gnuplot-mode.info.gz
+# fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf @PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff -Nurd gnuplot-4.4.4/fink/gnuplot-mode-startup gnuplot-4.4.4.patched/fink/gnuplot-mode-startup
--- gnuplot-4.4.4/fink/gnuplot-mode-startup 1969-12-31 19:00:00.000000000 -0500
+++ gnuplot-4.4.4.patched/fink/gnuplot-mode-startup 2012-01-06 11:04:08.000000000 -0500
@@ -0,0 +1,33 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Fink gnuplot-mode package
+;;
+;; Originally contributed by Nils Naumann
+;; Modified by Dirk Eddelbuettel
+;; Adapted for dh-make by Jim Van Zandt
+
+;; The gnuplot-mode package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...). The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+
+(setq load-path
+ (cons
+ (concat "@PREFIX@/share/"
+ (symbol-name fink-emacs-flavor)
+ "/site-lisp/gnuplot-mode")
+ load-path))
+
+;; these lines enable the use of gnuplot mode
+ (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
+ (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t)
+
+;; this line automatically causes all files with the .gp extension to
+;; be loaded into gnuplot mode
+ (setq auto-mode-alist (append '(("\\.gp\\'" . gnuplot-mode)) auto-mode-alist))
+
+;; This line binds the function-9 key so that it opens a buffer into
+;; gnuplot mode
+;; (global-set-key [(f9)] 'gnuplot-make-buffer)
+