You are not logged in.

#1 2007-05-02 22:28:15

nv
Member
Registered: 2006-10-24
Posts: 39

gnuplot 4.2 PKGBUILD

Hello everyone,

as there was no update of the gnuplot PKGBUILD lately, I have written my own one, inspired by the old one and by the (outdated) gnuplot-cvs PKGBUILD from AUR.  This is it:

# $Id$
# Maintainer:
# Contributor: Niklas Volbers <mithrandir42@web.de>

pkgname=gnuplot
pkgver=4.2.0
pkgrel=1
pkgdesc="Command-line driven interactive data and function plotting utility"
url="http://www.gnuplot.info"
depends=('gd>=2.0.29' 'libpng' 'libx11' 'wxgtk')
makedepends=('texinfo')
source=(http://download.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=(f688a578ddb4c376fd7d91ce444a0745)

build() {
  cd $startdir/src/$pkgname-$pkgver

 ./configure --prefix=/usr \
    --libexecdir=/usr/bin \
    --datadir=/usr/share \
    --with-readline=gnu \
    --enable-history-file \
    --with-x

 make || return 1

 make DESTDIR=$startdir/pkg \
    libexecdir=/usr/bin \
    pkglibexecdir=/usr/bin \
    datadir=/usr/share install

  install -D $startdir/src/$pkgname-$pkgver/Copyright $startdir/pkg/usr/share/licenses/custom/gnuplot/Copyright
}

I am not sure if the wxwidget terminal should be included by default. If so, then I guess I can remove the libx11 dependency.

The corresponding file tree looks like this:

pkg
`-- usr
    |-- bin
    |   |-- gnuplot
    |   `-- gnuplot_x11
    |-- lib
    |   `-- X11
    |       `-- app-defaults
    |           `-- Gnuplot.app-defaults
    |-- man
    |   `-- man1
    |       `-- gnuplot.1.gz
    `-- share
        |-- emacs
        |   `-- site-lisp
        |       |-- gnuplot-gui.el
        |       |-- gnuplot-gui.elc
        |       |-- gnuplot.el
        |       |-- gnuplot.elc
        |       |-- info-look.20.2.el
        |       `-- info-look.20.3.el
        |-- gnuplot
        |   `-- 4.2
        |       |-- PostScript
        |       |   |-- 8859-1.ps
        |       |   |-- 8859-15.ps
        |       |   |-- 8859-2.ps
        |       |   |-- cp1250.ps
        |       |   |-- cp437.ps
        |       |   |-- cp850.ps
        |       |   |-- cp852.ps
        |       |   |-- koi8r.ps
        |       |   |-- koi8u.ps
        |       |   `-- prologue.ps
        |       `-- gnuplot.gih
        |-- licenses
        |   `-- custom
        |       `-- gnuplot
        |           `-- Copyright
        `-- texmf-local
            `-- tex
                `-- latex
                    `-- gnuplot
                        `-- gnuplot.cfg

Last edited by nv (2007-05-02 22:28:50)

Offline

#2 2007-05-03 09:23:27

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: gnuplot 4.2 PKGBUILD

Hehe, interesting, yesterday I found myself copying the PKGBUILD from abs and just changing version and md5sums to get the new version. Looks so much better with antialiasing!


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#3 2007-05-03 09:31:17

nv
Member
Registered: 2006-10-24
Posts: 39

Re: gnuplot 4.2 PKGBUILD

My first PKGBUILD had a problem with the x11 terminal.

Updated PKGBUILD

# $Id$
# Maintainer:
# Contributor: Niklas Volbers <mithrandir42@web.de>

pkgname=gnuplot
pkgver=4.2.0
pkgrel=2
pkgdesc="Command-line driven interactive data and function plotting utility"
url="http://www.gnuplot.info"
depends=('gd>=2.0.29' 'libpng' 'libx11' 'wxgtk')
makedepends=('texinfo')
license='custom'
source=(http://download.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=(f688a578ddb4c376fd7d91ce444a0745)

build() {
  cd $startdir/src/$pkgname-$pkgver

  ./configure --prefix=/usr \
    --datadir=/usr/share \
    --libexecdir=/usr/bin \
    --with-readline=gnu \
    --enable-history-file \
    --with-x

   make X11_DRIVER_DIR='/usr/bin' || return 1

   make DESTDIR=$startdir/pkg \
      libexecdir=/usr/bin \
    pkglibexecdir=/usr/bin install

   install -D $startdir/src/$pkgname-$pkgver/Copyright $startdir/pkg/usr/share/licenses/custom/gnuplot/Copyright
}

Last edited by nv (2007-05-03 10:58:02)

Offline

#4 2007-05-03 10:51:40

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: gnuplot 4.2 PKGBUILD

Shouldn't there be a license='custom' field too since you're storing the copyright file in /usr/share/licenses?


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#5 2007-05-03 10:58:46

nv
Member
Registered: 2006-10-24
Posts: 39

Re: gnuplot 4.2 PKGBUILD

[vEX] wrote:

Shouldn't there be a license='custom' field too since you're storing the copyright file in /usr/share/licenses?

I guess you are right, so I added it to the PKGBUILD.

Offline

#6 2007-05-09 04:52:42

nv
Member
Registered: 2006-10-24
Posts: 39

Re: gnuplot 4.2 PKGBUILD

Updated PKGBUILD:
* libpng was an unnecessary dependency, because gd depends on libpng
* libx11 was an unnecessary dependency, because wxgtk depneds on libx11.

# $Id$
# Maintainer:
# Contributor: Niklas Volbers <mithrandir42@web.de>

pkgname=gnuplot
pkgver=4.2.0
pkgrel=3
pkgdesc="Command-line driven interactive data and function plotting utility"
url="http://www.gnuplot.info"
depends=('gd>=2.0.29' 'wxgtk')
makedepends=('texinfo')
license='custom'
source=(http://download.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=(f688a578ddb4c376fd7d91ce444a0745)

build() {
  cd $startdir/src/$pkgname-$pkgver

  ./configure --prefix=/usr \
    --datadir=/usr/share \
    --libexecdir=/usr/bin \
    --with-readline=gnu \
    --enable-history-file \
    --with-x

   make X11_DRIVER_DIR='/usr/bin' || return 1

   make DESTDIR=$startdir/pkg \
      libexecdir=/usr/bin \
      pkglibexecdir=/usr/bin install

   install -D $startdir/src/$pkgname-$pkgver/Copyright $startdir/pkg/usr/share/licenses/custom/gnuplot/Copyright
}

Offline

#7 2007-05-11 06:48:48

nicholai
Member
Registered: 2005-04-26
Posts: 51

Re: gnuplot 4.2 PKGBUILD

What would it require to enable pdf-output? Something like libpdf or something,

Any one else tried that? Otherwise I'll give it a try.

(The new texlive doesn't seem to include the eps2pdf converter, so native pdf output would be awsome).

Cheers,

Nicholai


Desktop :Athlon64       2.2 GHz
Laptop   :Toshiba R100    1GHz

Offline

#8 2007-05-11 18:33:32

nv
Member
Registered: 2006-10-24
Posts: 39

Re: gnuplot 4.2 PKGBUILD

You would need to include pdflite (or something like this). There is a bug about this in the bug tracker. I personally don't believe this is a good idea, because it adds yet another (totally unneeded) dependency.

There are better possibilities! One way is to produce postscript files using ps2pdf. Quick and easy!

For my own needs, I often need to join several graphs into one file. For this I use a combination of ghostscript and ps2pdf The following is my script called 'summary' which I use, and which joins multiple ps files into a single pdf 'summary.pdf':

#!/bin/bash

if [ "$#" == "0" ]; then
  echo "usage: summary postscriptfile(s)"
  exit 1
fi

gs -sDEVICE=pswrite -sOutputFile=summary.ps -dNOPAUSE -dBATCH $* && ps2pdf summary.ps

Offline

#9 2007-06-18 17:19:05

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: gnuplot 4.2 PKGBUILD

FYI, gnuplot 4.2.0 has been available from the  extra repo for a while.

Offline

#10 2007-06-19 12:29:37

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: gnuplot 4.2 PKGBUILD

strange problem with gnuplot:

Can't find PostScript prologue file /usr/share/gnuplot/gnuplot/4.2/PostScript/prologue.ps
        loadpath is empty
Please copy prologue.ps to one of the above directories
or set the loadpath appropriately
or set the environmental variable GNUPLOT_PS_DIR
"ga_weights_histogram.gp", line 19: Plot failed!

The file is there and readable...

Offline

#11 2007-06-19 13:16:01

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: gnuplot 4.2 PKGBUILD

the problem is in the pkgbuild (the one in extra): /usr/share/gnuplot/gnuplot/4.2/PostScript/prologue.ps

Offline

Board footer

Powered by FluxBB