summaryrefslogtreecommitdiff
path: root/hdf4/PKGBUILD
blob: 8bf650d4fbedfec1312ee1207e994f9bae588f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer:  Erich Eckner <arch at eckner dot net>
# Contributor: David Scholl <djscholl at gmail dot com>
pkgname=hdf4
pkgver=2.14
pkgrel=1
pkgdesc="General purpose library and file format for storing scientific data."
arch=('i686' 'x86_64')
url="http://www.hdfgroup.org/hdf4.html"
license=('custom')
depends=('zlib' 'libjpeg-turbo')
makedepends=('gcc-libs' 'gcc-fortran' 'flex' 'bison')
conflicts=('netcdf')
source=(
  "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.${pkgver}/src/hdf-4.${pkgver}.tar.bz2"
  'config.patch'
)
sha512sums=('5689525e18bfc6be205a0a21cded68d66630020c9a1445ce5afae41d58246e26ed9ba349da1bb197c31557aba127f51a2b697a868ec7e2747ac6153858171718'
            '7c05f0bcaf769723e8dc4dcb05e9ec2d59516c3c1ab4be5a9948632c24e5e43677b4a732de72574075928aae3f15cc2dcb75b8f22f02d6b97d4c6d905cfb964b')

prepare() {
  cd "$srcdir/hdf-4.$pkgver"
  patch -p3 -i "${srcdir}/config.patch"
  autoreconf -i
}

build() {
  cd "$srcdir/hdf-4.$pkgver"
  export CFLAGS="$CFLAGS -fPIC"
  export LDFLAGS=" -l:libjpeg.so.8 $LDFLAGS"
  ./configure --prefix=/usr F77=gfortran 
  make
}
package() {
  cd "$srcdir/hdf-4.$pkgver"
  make prefix="$pkgdir/usr" install
  mkdir -p "$pkgdir/usr/share/doc/$pkgname"
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
  cp "$srcdir/hdf-4.$pkgver/COPYING" "$pkgdir/usr/share/licenses/$pkgname"
}