summaryrefslogtreecommitdiff
path: root/hdf4/PKGBUILD
blob: bbcc6dd8e8b7a42b58ac5c626101dfbe4243cc44 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer:  Erich Eckner <arch at eckner dot net>
# Contributor: George Eleftheriou <eleftg>
# Contributor: XavierCLL <xavier dot corredor dot llano at gmail dot com>
# Contributor: Jingbei Li <petronny>
# Contributor: David Scholl <djscholl at gmail dot com>
pkgname=hdf4
pkgver=2.15
pkgrel=12
pkgdesc="General purpose library and file format for storing scientific data."
arch=('i686' 'pentium4' 'x86_64')
url="http://www.hdfgroup.org/hdf4.html"
license=('custom')
_pinned_dependencies=(
  'glibc>=2.31'
  'libaec=1.0.6'
  'libjpeg.so=8'
  'libtirpc=1.3.2'
  'zlib=1:1.2.12'
)
_pinned_dependencies_i686=(
  'gcc-libs=12.1.1'
)
_pinned_dependencies_pentium4=(
  'gcc-libs=12.1.1'
)
depends=('java-environment' "${_pinned_dependencies[@]}")
depends_i686=("${_pinned_dependencies_i686[@]}")
depends_pentium4=("${_pinned_dependencies_pentium4[@]}")
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")
sha512sums=('7d4037800ef8950ed74f225355ef5458444bed26fc189fbbd2ce7d36009998013ac1f6ba5d4e60834acf8f6f73550357238745acc35e162679919400a48191e9')

conflicts=('hdf4-java')
provides=('hdf4-java')
replaces=('hdf4-java')

prepare() {
    mkdir -p build
    cd "hdf-4.${pkgver}"
    autoreconf -i
}

build() {
    cd build

    "../hdf-4.${pkgver}"/configure \
        CFLAGS="${CFLAGS} -fPIC" \
        CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc/" \
        LDFLAGS="${LDFLAGS} -ltirpc" \
        FFLAGS="${FFLAGS} -fPIC -ffixed-line-length-none" \
        LIBS="${LIBS} -ljpeg -laec -lsz" \
        JAVADOC='javadoc -Xdoclint:none' \
        --enable-shared \
        --disable-static \
        --disable-fortran \
        --disable-netcdf \
        --enable-java \
        --enable-production \
        --with-zlib \
        --with-szlib=/usr \
        --prefix=/opt/hdf4
    make
}

package() {
    cd build
    make -j1 DESTDIR="${pkgdir}" install
    install -dm 755 "${pkgdir}/usr/share/licenses/${pkgname}"
    install -Dm 644 "../hdf-4.${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}"
    install -dm 755 "${pkgdir}/etc/ld.so.conf.d"
    echo "/opt/${pkgname}/lib" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
}