You are not logged in.

#1 2012-10-13 08:46:46

splashy
Member
Registered: 2010-08-21
Posts: 128

Attempting to build scilab

Hi I want to install scilab on Arch but the current one is old so first I submited a new package to fix a dependency: https://aur.archlinux.org/packages.php?ID=63548 (flexdock to the last version). And then tried to modify this package https://aur.archlinux.org/packages.php?ID=54679 (scilab 5.3 the last one is 5.4 for info), like so:

pkgname=scilab
pkgver=5.4.0
pkgrel=1
pkgdesc='Scilab is a scientific software package for numerical computations.'
arch=('i686' 'x86_64')
url='http://www.scilab.org/'
license=('custom:CeCILL')
depends=('libxml2' 'pcre' 'lapack' 'java-batik' 'flexdock'
  'jogl' 'jeuclid-core' 'fftw' 'libmatio'  'bash' 'tk' 'jrosetta' 
  'ocaml' 'javahelp2' 'jgraphx' 'jlatexmath>=0.9.4' 
  'jlatexmath-fop>=0.9.4' 'junit' 'java-skinlf' 'xalan-java'
  'java-commons-logging' 'hdf5')
makedepends=('apache-ant' 'antlr2' 'gcc-fortran' 'java-avalon-framework' 'xorg-fonts-type1')
[[ $CARCH == x86_64 ]] && \
  source=("http://www.scilab.org/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" \
  "http://www.scilab.org/download/5.4.0/prerequirements-scilab-5.4.0-x86_64-src.tar.gz" \
  'scilab.desktop' 'classpath.xml' 'configure-hdf5-vercheck.patch')

[[ $CARCH == i686 ]] && \
  source=("http://www.scilab.org/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" \
  "http://www.scilab.org/download/5.4.0/prerequirements-scilab-5.4.0-src.tar.gz" \
  'scilab.desktop' 'classpath.xml' 'configure-hdf5-vercheck.patch')

[[ $CARCH == x86_64 ]] && md5sums=('914b96d9b6534166539e7fea46bfd7f1'
         '4fd32852de92bfd79462927bb56f55be'
         'ad6286f324891fe8b86c60e4012a36b7'
         'efe6e8d06968ba5e1a3e5ab540a79667'
         '7bf1a2149521db9e1c9a2ed684f9ce52')
[[ $CARCH == i686 ]] && md5sums=('0002653e670efabb8faf9e6403367134'
	 '7545859e4078d3b77436b7f322967f26'
         'ad6286f324891fe8b86c60e4012a36b7'
         'efe6e8d06968ba5e1a3e5ab540a79667'
         '7bf1a2149521db9e1c9a2ed684f9ce52')

options=('!libtool' '!emptydirs')

build() {
  # we do not want things we already have in Arch Linux
  cd ${pkgname}-${pkgver}/thirdparty
  rm  avalon* batik* commons-* flexdock* gluegen2-rt* jeuclid* jgraphx* \
    jhall* jlatexmath* jogl* jrosetta* junit* looks-2.1.1.jar xalan* \
    xml* skinlf*
  # fix undefined references (scilab needs to fix its cyclic dependencies)
  LDFLAGS=${LDFLAGS/ -Wl,--as-needed}
  # begin configuring and building
  cd ..

  # dirty hack to remove non-working hdf5 version check from configure
  ./configure \
    --prefix=/usr \
    --enable-build-localization \
    --without-pvm \
    --with-matio \
    --without-umfpack \
    --with-fftw \
    --with-hdf5 \
    --with-gfortran  # Needed for 64 bits, don't hurt for 32 bits
  make all doc
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install install-html

  install -d ${pkgdir}/usr/share/licenses/${pkgname}
  install -Dm644 ${srcdir}/scilab-${pkgver}/COPYING \
	${pkgdir}/usr/share/licenses/${pkgname}
  install -Dm644 ${srcdir}/${pkgname}.desktop \
	${pkgdir}/usr/share/applications/${pkgname}.desktop
  sed -i 's#/jni##' ${pkgdir}/usr/share/scilab/etc/librarypath.xml
  install -Dm644 $srcdir/classpath.xml $pkgdir/usr/share/scilab/etc/classpath.xml
  for i in jhdf5.jar fop.jar saxon.jar
  do 
    install -Dm644 $srcdir/$pkgname-$pkgver/thirdparty/$i \
      $pkgdir/usr/share/java/scilab/$i
  done
  install -Dm644 $srcdir/$pkgname-$pkgver/bin/libjhdf5.so \
    $pkgdir/usr/lib/libjhdf5.so
}

Indead during the ./configure step I got this error:

checking looks... no
configure: WARNING: Could not find or use the Java package/jar looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)
checking jgoodies-looks... no
configure: error: Could not find or use the Java package/jar jgoodies-looks used by Scilab Gui - Look and feel (looking for package com.jgoodies.looks.common.MenuItemRenderer)


Please I need some help, thanks. I know there is binary on scilab website but I want a working package for Arch community. Thanks.



Edit: The last thing I did was to remove the line

  # dirty hack to remove non-working hdf5 version check from configure
  patch -Np0 -i ${srcdir}/configure-hdf5-vercheck.patch

which is just before  ./configure because with it I had this message

Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.rej

Last edited by splashy (2012-10-13 08:54:22)

Offline

#2 2012-10-13 14:25:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,299

Re: Attempting to build scilab

rm  avalon* batik* commons-* flexdock* gluegen2-rt* jeuclid* jgraphx* \
    jhall* jlatexmath* jogl* jrosetta* junit* looks-2.1.1.jar xalan* \
    xml* skinlf*

it does seem possible that that statement removes to much.

Also removing files supplied in the source tarball is a dirty hack imo, ./configure likely has options to determine where it looks for dependencies.

There's also a chance that scilab needs specific versions of those dependencies, and that's the reason why they are included.
Best check the source tarball for install/compile instructions, and run ./configure --help .


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

Board footer

Powered by FluxBB