summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d59e8444802cffceacd158a5dcd1f4a2d2376bb (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: bartus <scilab-aur@bartus.33mail.com>
# Contributor: Felix Golatofski <contact@xdfr.de>
# Contributor: eolianoe <eolianoe [at] gmail [DoT] com>
# Contributor: Kurnevsky Evgeny <kurnevsky@gmail.com>
# Contributor: Victor Dmitriyev <mrvvitek@gmail.com>
pkgname=scilab
pkgver=2024.1.0
pkgrel=1
pkgdesc="A scientific software package for numerical computations"
arch=(i686 x86_64)
url="https://www.${pkgname}.org"
license=(GPL-2.0-or-later BSD-3-Clause CECILL-2.1)
depends=(arpack bwidget eigen fftw hdf5-openmpi libmatio suitesparse)
# 'jogl>=2.5.0' 'java-flexdock>=1.2.4' jaf-api jaxb-api
# jgoodies-looks jgoodies-common 'jrosetta>=1.0.4'
# 'apache-lucene>=8.4.0' java-skinlf inetutils beanshell eclipse-ecj
# fop-hyph jeuclid-core 'jgraphx>=1.4.0' javahelp2 saxon-he
# 'jlatexmath-fop>=1.0.3' java-qdox xalan-java docbook-xsl 'java-batik>=1.8'
# 'java-xmlgraphics-commons>=2.0.1')
# checkstyle java-commons-beanutils junit java-hamcrest cobertura
makedepends=(ant
  curl
  gcc-fortran
  libxml2
  ocaml-num
  pcre
  pkgconf
  time
  tk
)
source=(https://gitlab.com/${pkgname}/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
# hdf5-api.patch ${pkgname}-strict-jar.patch ${pkgname}-LD_LIBRARY_PATH.patch ${pkgname}-num.patch
sha512sums=('9c28109ec9b9e2c8cddf2d0a0201e30a6a32320ea1ab4d884d7485a9e573ea14dc2c69cee0da039fb59fa49b58efaf68b6ba32c908f6d734128c1c720bc83973')

# prepare() {
#   cd ${pkgname}-${pkgver}
# Linked to: https://codereview.scilab.org/#/c/18089
# patch <"${srcdir}"/${pkgname}-strict-jar.patch
# Fix path, to avoid the following error:
# An error has been detected while loading /usr/share/scilab//modules/functions/.libs/libscifunctions.so: /usr/share/scilab//modules/functions/.libs/libscifunctions.so: cannot open shared object file: No such file or directory
# patch -p0 <"${srcdir}"/${pkgname}-LD_LIBRARY_PATH.patch
# OCaml
# patch -p0 <"${srcdir}"/${pkgname}-num.patch
# # Jakarta
# patch -p0 <"${srcdir}"/jar_names_in_configure.patch
# sed -i 's/gluegen_rt/gluegen2_rt/' configure.ac
# sed -i 's/gluegen_rt/gluegen2_rt/' modules/gui/src/java/org/scilab/modules/gui/SwingView.java
# patch -p1 -i ../hdf5-api.patch
# }

# --with-xcos \
# --without-modelica \
# --with-jdk=/usr/lib/jvm/java-17-openjdk \
# --without-emf \
# --with-openmp \
# --enable-build-localization \
# --without-install-help-xml \

build() {
  cd ${pkgname}-${pkgver}/${pkgname}
  ./configure \
    --prefix=/usr \
    --with-fftw \
    --with-arpack-ng \
    --with-arpack-library=/usr/lib \
    --with-gcc \
    --with-gfortran \
    --with-tk \
    --with-umfpack \
    --with-umfpack-include=/usr/include/suitesparse \
    --with-umfpack-library=/usr/lib \
    --with-mpi \
    --with-matio \
    --with-hdf5-include=/usr/include \
    --with-hdf5-library=/usr/lib \
    --with-x \
    --without-gui \
    --without-javasci \
    --without-jdk \
    --disable-build-doxygen \
    --disable-build-help \
    --disable-debug-java \
    --disable-static-system-lib \
    FFLAGS="-fallow-argument-mismatch" \
    CFLAGS="$CFLAGS -fcommon" \
    CXXFLAGS="$CXXFLAGS -fcommon" # -DH5_USE_18_API
  make
  make doc
}

package() {
  cd ${pkgname}-${pkgver}/${pkgname}
  make DESTDIR="${pkgdir}" install
  make DESTDIR="${pkgdir}" install-data install-html
  install -Dm 644 COPYING* -t "${pkgdir}/usr/share/licenses/${pkgname}"
}