First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 138252
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Science Related Packages <sci@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Wilfried Holzke <gentoo@wilfried.holzke.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
scilab-4.0-gtk-fix.patch patch to fix gtk crashes patch Markus Dittrich 2006-06-29 09:22 0000 929 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 138252 depends on: Show dependency tree
Bug 138252 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-06-27 12:30 0000
Everytime I click into the scicos-window it crashes and scilab too. 

The build 4 branch should fix this.
http://www.scilab.org/download/index_download.php?page=unstable.php

But I am not able to write a new ebuild for this.

The url of the new source:
http://www.scilab.org/download/unstable/scilab-4.0-b4-20060515-src.tar.gz

My attempt for an new ebuild based on version 4.0:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/scilab/scilab-4.0.ebuild,v
1.4 2006/06/01 15:34:16 markusle Exp $

inherit eutils fortran toolchain-funcs multilib autotools

DESCRIPTION="Scientific software package for numerical computations (Matlab
lookalike)"
LICENSE="scilab"
SRC_URI="http://scilabsoft.inria.fr/download/unstable/scilab-4.0-b4-20060515-src.tar.gz"
HOMEPAGE="http://www.scilab.org/"

SLOT="0"
IUSE="ocaml tcltk gtk Xaw3d java"
KEYWORDS="~x86 ~ppc"

RDEPEND="virtual/blas
        virtual/lapack
        sys-libs/ncurses
        gtk? (
                media-libs/jpeg
                media-libs/libpng
                sys-libs/zlib
                >=x11-libs/gtk+-2
                >=x11-libs/libzvt-2
                x11-libs/vte
                =gnome-extra/gtkhtml-2*
        )
        tcltk? ( >=dev-lang/tk-8.4
                >=dev-lang/tcl-8.4 )
        Xaw3d? ( x11-libs/Xaw3d )
        ocaml? ( dev-lang/ocaml )"

DEPEND="${RDEPEND}
        app-text/sablotron"

pkg_setup() {
        if ! use gtk && ! use tcltk; then
                echo
                eerror 'scilab must be built with either USE="gtk" or
USE="tcltk"'
                die
        fi

        need_fortran gfortran g77

#       echo "A = ${A}" 
#       echo "P = ${P}"
#       echo "D = ${D}"

#       die
}

src_unpack() {
        unpack ${A}
        cd "scilab-4.0-b4-20060515"

#       epatch "${FILESDIR}"/${P}-makefile.patch

        # fix gfortran problems on ppc
        if [[ "${ARCH}" == "ppc" ]];then
                epatch "${FILESDIR}"/${PN}-ppc-gcc4.patch
                eautoconf || die "autoconf failed"
        fi

        sed -e '/^ATLAS_LAPACKBLAS\>/s,=.*,= $(ATLASDIR)/liblapack.so
$(ATLASDIR)/libblas.so $(ATLASDIR)/libcblas.so,' \
                -e 's,$(SCIDIR)/libs/lapack.a,,' \
                -i Makefile.OBJ.in || die "Failed to fix Makefile.OBJ.in"

        sed -e "s:\$(PREFIX):\${D}/\$(PREFIX):g" \
                -i Makefile.in || die "Failed to fix Makefile.in"

        sed -e "s:@CC_OPTIONS@:${CFLAGS}:" \
                -e "s:@FC_OPTIONS@:${FFLAGS}:" \
                -e "s:@LD_LDFLAGS@:${LDFLAGS} -lpthread:" \
                -i Makefile.incl.in || die "Failed to fix Makefile.incl.in"
}

src_compile() {
        cd "${WORKDIR}/scilab-4.0-b4-20060515"

        local myopts
        myopts="${myopts} --with-atlas-library=/usr/$(get_libdir)"

        if [[ ${FORTRANC} == gfortran ]]; then
                myopts="${myopts} --with-gfortran"
        fi

        econf $(use_with tcltk tk) \
                $(use_with Xaw3d xaw3d) \
                $(use_with gtk gtk2 ) \
                $(use_with ocaml) \
                $(use_with java ) \
                ${myopts} || die "econf failed"
        env HOME="${S}" emake -j1 all || die "emake failed"
}

src_install() {
        cd "${WORKDIR}/scilab-4.0-b4-20060515"

        DESTDIR="${D}" make install || die "installation failed"

        echo "Make Install successfull!"        

        echo "get_libdir: $(get_libdir)"

        # some postinstall fixes
#       echo "SCIDIR=/usr/$(get_libdir)/${P}" > \
#               "${D}/usr/$(get_libdir)/${P}/Path.incl"
#       strip "${D}/usr/$(get_libdir)/${P}/bin/scilex"

        # install docs
        dodoc ACKNOWLEDGEMENTS CHANGES README_Unix RELEASE_NOTES \
                Readme_Visual.txt license.txt \
                || die "failed to install docs"

        # install examples
        insinto /usr/share/${P}/
        doins -r examples/ || die "failed to install examples"

        # The compile and install process causes the work folder 
        # to be registered as the runtime folder in many files. 
        # This is corrected here.
        BAD_REF="${WORKDIR}/scilab-4.0-b4-20060515"
        FIXED_REF="/usr/$(get_libdir)/${P}"
        BIN_TO_FIX="Blpr BEpsf Blatexpr2 Blatexprs Blatexpr scilab"
        for i in ${BIN_TO_FIX}; do
                sed -e "s%${BAD_REF}%${FIXED_REF}%" -i \
                "${D}"/usr/$(get_libdir)/${P}/bin/${i} || \
                die "Failed to fix wrapper scripts"
        done
        MAN_TO_FIX="eng fr"
        for i in ${MAN_TO_FIX}; do
                for j in "${D}"/usr/$(get_libdir)/${P}/man/${i}/*.h*; do
                        sed -e "s%${BAD_REF}%${FIXED_REF}%" -i ${j} || \
                        die "Failed to fix manuals"
                done
        done
        MISC_TO_FIX="util/Blatdoc util/Blatdocs"
        for i in ${MISC_TO_FIX}; do
                sed -e "s%${BAD_REF}%${FIXED_REF}%" -i \
                "${D}"/usr/$(get_libdir)/${P}/${i} || \
                die "Failed to fix Blatdocs"
        done
}

pkg_postinst() {
        einfo "To tell Scilab about your printers, set the environment"
        einfo "variable PRINTERS in the form:"
        einfo
        einfo "PRINTERS=\"firstPrinter:secondPrinter:anotherPrinter\""
}

------- Comment #1 From Jakub Moc (RETIRED) 2006-06-27 13:06:05 0000 -------
Most certainly not a bugzilla bug.

------- Comment #2 From Markus Dittrich 2006-06-28 13:06:29 0000 -------
Hi Wilfried,

Thanks for your report! Is there any chance you could provide a 
patch that fixes this particular issue from the list of fixed bugs at the
link you posted.

Thanks,
Markus 

------- Comment #3 From Wilfried Holzke 2006-06-28 13:35:59 0000 -------
No, I don't have a patch, only the build-4 archive. I tried to get this ebuild
to work, but I can't get the part after "echo "Make Install successfull!"" to
work.

------- Comment #4 From Markus Dittrich 2006-06-29 09:22:44 0000 -------
Created an attachment (id=90442) [edit]
patch to fix gtk crashes

I can confirm the crashing scicos window. The attached patch fixes this
for me. Please give it a try and report back.

Thanks,
Markus

------- Comment #5 From Wilfried Holzke 2006-07-03 15:48:20 0000 -------
How can I use this patch with an ebuild?
Or do I have to use it with the source manually?

------- Comment #6 From Markus Dittrich 2006-07-03 18:06:02 0000 -------
Move the patch file into the files directory of the scilab directory
(best in your local portage overlay), add the line

epatch "${FILESDIR}"/${P}-gtk-fix.patch

just below the already existing epatch line, re-digest the ebuild and
then re-emerge scilab.

Best,
Markus

------- Comment #7 From Wilfried Holzke 2006-07-04 03:33:41 0000 -------
Yes, the patch solves the problem.
Thanks.

------- Comment #8 From Markus Dittrich 2006-07-04 08:18:58 0000 -------
Hi Wilfried,

Great and thanks for testing!
The patch is now in portage cvs.

Best,
Markus

First Last Prev Next    No search results available      Search page      Enter new bug