Like with openSUSE 11.1, openSUSE 11.2 and 11.3 have compilation
errors due to incompatibilities with libreadline.  This diff should
fix those problems by checking for 11.1, 11.2, and 11.3 instead of
just 11.1.  This should also make it easier to update for future
releases of openSUSE.  I have tested it on 11.3 and it works, and it
should behave identically to how it did on 11.1, so I assume it will
work with 11.2 as well.  I also changed the copy commands to symlink
commands, which should help in the case of upgrades, but if you are
strongly opposed to that you can leave that part out.  The only change
that is actually essential is changing line 166-167 from:

    if [ `grep 11.1 /etc/SuSE-release > /dev/null; echo $?` -eq 0 ]; then
        echo "OpenSUSE 11.1 detected"

to


    if [ `grep -e 11\.[123] /etc/SuSE-release > /dev/null; echo $?`
-eq 0 ]; then
        echo "OpenSUSE 11.1, 11.2, or 11.3 detected"


Even line 167 can be kept as-is, but it makes the informational
message incorrect.  The other changes are cosmetic or are for the
above-mentioned symlink change.


I am not sure the proper way to submit this, so I just included the
diff in an attachment. It is for the spkg-install file for
libreadline.-6.0.p2.spkg.  Considering the number of changes it may be
easier to just copy and paste the lines rather than actually applying
the diff.  The target file in the diff is probably also not correct,
making copying and pasting easier from that regard.

-Todd

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
--- sage-4.5.1/spkg/standard/readline-6.0.p2/spkg-install	2010-08-02 11:55:45.000000000 -0400
+++ sage-4.5.1/spkg/standard/readline-6.0.p2/spkg-install	2010-08-02 12:36:21.000000000 -0400
@@ -158,21 +158,21 @@

 # OVERWRITE_READLINE=false; export OVERWRITE_READLINE

-# First we check for OpenSUSE 11.1 since bash is linked dynamically with a
+# First we check for OpenSUSE 11.1-11.3 since bash is linked dynamically with a
 # readline that breaks when we build Sage's readline, so we work around this
 # for now.

 if [ -f /etc/SuSE-release ]; then
-    if [ `grep 11.1 /etc/SuSE-release > /dev/null; echo $?` -eq 0 ]; then
-        echo "OpenSUSE 11.1 detected"
+    if [ `grep -e 11\.[123] /etc/SuSE-release > /dev/null; echo $?` -eq 0 ]; then
+        echo "OpenSUSE 11.1, 11.2, or 11.3 detected"
         if [ -d /usr/include/readline/ ]; then
             echo "The development version of libreadline is installed -> copying"
             if [ `uname -p` = "x86_64" ]; then
-                cp /lib64/libreadline.so.* "$SAGE_LOCAL"/lib
+                ln -s /lib64/libreadline.so.* "$SAGE_LOCAL"/lib
             else
-                cp /lib/libreadline.so.* "$SAGE_LOCAL"/lib
+                ln -s/lib/libreadline.so.* "$SAGE_LOCAL"/lib
             fi
-            cp -r /usr/include/readline  "$SAGE_LOCAL"/include
+            ln -s /usr/include/readline  "$SAGE_LOCAL"/include
             exit 0
         else
             echo "No headers found, building library."

Reply via email to