Bug 26115 - Singular - ppc support not included
Bug#: 26115 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: sci@gentoo.org Reported By: glowwormy@web.de
Component: Ebuilds
URL: 
Summary: Singular - ppc support not included
Keywords:  EBUILD
Status Whiteboard: 
Opened: 2003-08-07 02:39 0000
Description:   Opened: 2003-08-07 02:39 0000
Hi,

 SINGULAR   is a Computer Algebra System for polynomial computations with
special emphasis on the needs of commutative algebra, algebraic geometry, and
singularity theory. The current version is 2.0.4, and I'm using the one with gcc
3.x patches.

If you want to know more, visit http://www.singular.uni-kl.de.

I created an ebuild for this, but it wasn't to trivial, because it requires some
components to be installed before others are able to compile. Because of that,
the compiling is taking place in the install step. Also, I had to patch the
sources, because of the Directory-Structure of Singular (binaries and plugins in
/usr/ix86_Linux and platform independent libraries in /usr/LIB). There also was
a bug with ncurses, which caused singular to crash. But the patch fixes all this
issues.

I actually didn't set the dependecies really good, I think there should be more...

I also got a problem with the docs. It would be great if you manage to get them
compiling, for example in an extra ebuild singular-doc...

------- Comment #1 From glowwormy@web.de 2003-08-07 02:40:02 0000 -------
Created an attachment (id=15667) [details]
The ebuild

------- Comment #2 From glowwormy@web.de 2003-08-07 02:43:03 0000 -------
Created an attachment (id=15668) [details]
patch for singular

------- Comment #3 From Nicolas Kaiser 2003-08-07 04:36:16 0000 -------
Created an attachment (id=15672) [details]
initial ppc patch to singuname.sh

Thanks a lot for the ebuild. Please find attached an initial patch to
singuname.sh for compiling on Linux ppc. However, while it's working on x86, I
didn't manage to compile on ppc. I got

iparith.cc: In function `BOOLEAN jjRPAR(sleftv*, sleftv*)':
iparith.cc:3226: warning: cast to pointer from integer of different size
mod_raw.o(.text+0x6c): In function `dynl_open_binary_warn(char*, char const*)':

: undefined reference to `dynl_open'
mod_raw.o(.text+0xb8): In function `dynl_open_binary_warn(char*, char const*)':

: undefined reference to `dynl_error'
mod_raw.o(.text+0x128): In function `dynl_sym_warn(void*, char*, char const*)':

: undefined reference to `dynl_sym'
mod_raw.o(.text+0x170): In function `dynl_sym_warn(void*, char*, char const*)':

: undefined reference to `dynl_error'
p_Procs_Dynamic.o(.text+0x34d3c): In function `GetDynamicProc(char const*,
p_Proc, p_Field, p_Length, p_Ord)':
: undefined reference to `dynl_sym'
collect2: ld returned 1 exit status
make: *** [iparith.inc] Error 1

!!! ERROR: app-sci/singular-2.0.4 failed.
!!! Function einstall, Line 343, Exitcode 2
!!! einstall failed



These are my changes to the ebuild:

--- /usr/local/portage/app-sci/singular/singular-2.0.4.ebuild.orig     
2003-08-07 13:10:16.000000000 +0200
+++ /usr/local/portage/app-sci/singular/singular-2.0.4.ebuild	2003-08-07
13:10:34.000000000 +0200
@@ -31,6 +31,7 @@
	unpack ${A}
	cd ${S}
	epatch	$FILESDIR/singular-2.0.4-gentoo.diff
+	[ ${ARCH} = "ppc" ] && epatch $FILESDIR/singular-2.0.4-gentoo-ppc.diff
 }
 
 
@@ -65,11 +66,13 @@
	dodir /usr/bin
	dodir /usr/lib/singular
	insinto /usr/lib/singular
-	cd ${D}/usr/ix86-Linux
+	[ ${ARCH} = "x86" ] && cd ${D}/usr/ix86-Linux
+	[ ${ARCH} = "ppc" ] && cd ${D}/usr/ppc-Linux
	rm Singular
	dobin *Singular*
	doins *.so
	dosym /usr/bin/Singular-2-0-4 /usr/bin/Singular
	cd ${D}/usr
-	rm -r ix86-Linux
+	[ ${ARCH} = "x86" ] && rm -r ix86-Linux
+	[ ${ARCH} = "ppc" ] && rm -r ppc-Linux
 }

------- Comment #4 From glowwormy@web.de 2003-08-07 15:15:46 0000 -------
Created an attachment (id=15717) [details]
ppc patch (possibly will work)

This patch needs testing, because i dont have a ppc

------- Comment #5 From glowwormy@web.de 2003-08-07 15:18:48 0000 -------
(From update of attachment 15717 [details])
You got to change your singular-2.0.4.ebuild:
--- singular-2.0.4.ebuild.orig	2003-08-08 00:18:26.000000000 +0200
+++ singular-2.0.4.ebuild	2003-08-08 00:18:07.000000000 +0200
@@ -31,6 +31,7 @@
	unpack ${A}
	cd ${S}
	epatch	$FILESDIR/singular-2.0.4-gentoo.diff
+	epatch	$FILESDIR/ppc.diff
 }

------- Comment #6 From Nicolas Kaiser 2003-08-07 16:57:41 0000 -------
Ah, good eye. Yes, the ppc patch works for me.

------- Comment #7 From George Shapovalov 2003-10-13 17:47:56 0000 -------
reassigning..

------- Comment #8 From Patrick Kursawe 2003-10-24 03:14:26 0000 -------
Modified the ebuild slightly (added headers, changed x86->~x86, changed the
ARCH check for a little more length and a little less redundancy, unified
the patches, changed the LICENSE since it is definitely not GPL, made it
run "make" with CFLAGS/CXXFLAGS, fixed a lot of leading/trailing whitespace
problems, then put it into portage. Please try.

------- Comment #9 From Patrick Kursawe 2003-10-24 03:20:50 0000 -------
Oh, considering this fixed until someone complains, of course :-)

------- Comment #10 From Patrick Kursawe 2003-10-28 23:06:28 0000 -------
User reported that the docs are not installed completely. Have to check this.

------- Comment #11 From Patrick Kursawe 2003-10-29 08:20:04 0000 -------
Docs will be installed if "doc" is in USE with new revision -r1. Yes, it
would need support for a few more USE flags, but I think it's better to have
this one than none.

------- Comment #12 From Patrick Kursawe 2003-10-29 08:20:29 0000 -------
Perhaps I should declare this "fixed" again.

------- Comment #13 From glowwormy@web.de 2003-11-06 08:43:54 0000 -------
Seems like the ppc patches are not included in the ebuild! The diffs to the
ebuild are in the comments and the patches for Singular are attachments.

------- Comment #14 From Patrick Kursawe 2003-11-07 03:31:43 0000 -------
I don't see your problem. The ebuild is modified and singular-2.0.4-gentoo.diff
includes attachment #15717 [details]. Please make sure you have synced and check again.

------- Comment #15 From glowwormy@web.de 2003-11-07 05:31:38 0000 -------
But the attachment 15672 [details] is not included in singular-2.0.4-gentoo.diff. And
this one is also important! (Patches singuname.sh)

------- Comment #16 From Patrick Kursawe 2003-11-07 05:46:21 0000 -------
Ooops :-(
Thanks for the hint, have added it now. Since this is a compile time issue,
I did not do a revision bump.