Update of /cvsroot/fink/experimental/jfmertens/main/finkinfo/sci
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31707

Modified Files:
        saclib.info qepcad.info 
Log Message:
further tweaks; still runtime trouble

Index: qepcad.info
===================================================================
RCS file: /cvsroot/fink/experimental/jfmertens/main/finkinfo/sci/qepcad.info,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- qepcad.info 7 Nov 2008 20:01:41 -0000       1.4
+++ qepcad.info 11 Nov 2008 16:29:39 -0000      1.5
@@ -1,29 +1,31 @@
 Info2: <<
-Package: qepcad%type_pkg[d]
+Package: qepcad%type_pkg[d]%type_pkg[-gcc4.3]
 Version: 1.50
 Revision: 1
 #Source: http://www.cs.usna.edu/~qepcad/INSTALL/%{Ni}-B.%v.tar.gz
 Source: http://www.cs.usna.edu/~wcbrown/qesource.tar.gz
 Source-MD5: 517f5a8c49a8a89ecbae37897288f522
 SourceDirectory: qesource
-Type: d (boolean)
+Type: d (boolean), -gcc4.3 (boolean)
 # type d for debug version
-BuildDepends: freeglut, readline5, saclib%type_pkg[d], sed
+BuildDepends: freeglut, readline5, saclib%type_pkg[d]%type_pkg[-gcc4.3], sed
 Depends: freeglut-shlibs, readline5-shlibs, singular
-Conflicts: %{Ni}, %{Ni}d
-Replaces: %{Ni}, %{Ni}d
+Conflicts: %{Ni}, %{Ni}d, %{Ni}-gcc43, %{Ni}d-gcc43
+Replaces: %{Ni}, %{Ni}d, %{Ni}-gcc43, %{Ni}d-gcc43
 
 PatchScript: <<
 #!/bin/sh -ev
 find . -name '*.o' -exec rm -f \{\} \;
+if [ "%type_raw[-gcc4.3]" == "-gcc4.3" ] ; then nopic=''; else 
nopic="-mdynamic-no-pic"; fi
 # to strip binaries :
 echo '__mh_execute_header' > symlst
 if [ "%type_pkg[d]" == "d" ]
-   then sed -i'' -e 's,O4,g,' {.,cad2d,plot2d,source}/Makefile 
extensions/adj2d/new_make
+   then sed -i'' -e "s,O4,g $nopic -Wall," {.,cad2d,plot2d,source}/Makefile 
extensions/adj2d/new_make
    else
+       # using "-s" would lead at launch to dyld error "lazy pointer not found"
        sed -i'' -e 's;(EXE)\|(LIBS);& -Wl,-x -exported_symbols_list %b/symlst 
-dead_strip;' \
                {cad2d,plot2d,source}/Makefile
-       sed -i'' -e 's,O4,O3 -fstrict-aliasing -Wall -mdynamic-no-pic,' \
+       sed -i'' -e "s,O4,O3 -fstrict-aliasing $nopic -Wall," \
                {.,cad2d,plot2d,source}/Makefile extensions/adj2d/new_make
 fi
 sed -i'' -e 's,gmake,make,' Makefile
@@ -35,9 +37,13 @@
 sed -i'' -e 's,getenv("qe"),"%p",' {cad2d/src,source/main}/MAIN.c 
extensions/rend/PLOT_2D_CAD.cc source/userint/HELPFRD.c
 sed -i'' -e '$a\
 SINGULAR %p/bin' default.qepcadrc
+  ## gcc43 requires the following (first for srtcpy, second and third for 
memmove):
+  sed -i'' -e 's,#include <string>,#include <cstring>\n&,' 
extensions/rend/PLOT_2D_CAD.cc source/db/convenientstreams.h
+  sed -i'' -e 's,#include <cstdlib>,#include <cstring>\n&,' 
source/db/unnamedpipe.h
 <<
 CompileScript: <<
 #!/bin/sh -ev
+if [ "%type_raw[-gcc4.3]" == "-gcc4.3" ] ; then export 
PATH=%p/lib/gcc4.3/bin:$PATH CC=gcc; fi
 export saclib=%p
 export qe=`pwd`
 make opt

Index: saclib.info
===================================================================
RCS file: /cvsroot/fink/experimental/jfmertens/main/finkinfo/sci/saclib.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- saclib.info 7 Nov 2008 20:01:41 -0000       1.8
+++ saclib.info 11 Nov 2008 16:29:39 -0000      1.9
@@ -1,13 +1,14 @@
 Info2: <<
-Package: saclib%type_pkg[d]
+Package: saclib%type_pkg[d]%type_pkg[-gcc4.3]
 Version: 2.2.0
 Revision: 1
 #Source: http://www.cs.usna.edu/~qepcad/INSTALL/%{Ni}%v.tar.gz
 Source: http://www.cs.usna.edu/~wcbrown/%{Ni}%v.tar.gz
 Source-MD5: 6fd2489018a0d163338a9dcd42f72e48
-Type: d (boolean)
-Conflicts: %{Ni}, %{Ni}d
-Replaces: %{Ni}, %{Ni}d
+Type: d (boolean), -gcc4.3 (boolean)
+# type d for debug version
+Conflicts: %{Ni}, %{Ni}d, %{Ni}-gcc43, %{Ni}d-gcc43
+Replaces: %{Ni}, %{Ni}d, %{Ni}-gcc43, %{Ni}d-gcc43
 
 PatchScript: <<
 #!/bin/sh -ev
@@ -16,53 +17,55 @@
        -e '/Get OS type/,/else/s,else,elsif ($uname =~ /Darwin/)\n{\n\t$ostype 
= "darwin";\n}\n&,' \
        -e '/Create sysdep.h$/a\
        $Endian = "/* Created by $saclib/bin/mksysdep.pl */\
-#ifdef __APPLE__\
-#include <machine/endian.h>\
-#ifdef LITTLE_ENDIAN\
+#ifdef __LITTLE_ENDIAN__\
 #define _LITTLE_ENDIAN_\
-#undef _BIG_ENDIAN_\
 #endif\
-#ifdef BIG_ENDIAN\
+#ifdef __BIG_ENDIAN__\
 #define _BIG_ENDIAN_\
-#undef _LITTLE_ENDIAN_\
 #endif\
-#endif /* __APPLE__ */\
 ";' \
        -e '$i \
 elsif ($ostype eq "darwin")\
 {\
        print SYSDEP $Endian;\
-       if($ptype eq "x86")\
-       {\
-               print SYSDEP "#define _X86_DARWIN_\\n";\
-       }\
-       elsif ($ptype eq "ppc")\
-       {\
-               print SYSDEP "#define _PPC_DARWIN_\\n";\
-       }\
        system("bash -c \\"pushd >/dev/null $ENV{X%{Ni}X}/sysdep/darwin ; 
./install %b ; popd >/dev/null\\"");\
 }' < %a/%{Ni}.patch | sed -e "s,X%{Ni}X,'%{Ni}',"  > bin/mksysdep.pl 
 ## %a/%{Ni}.patch is the file "bin/mksysdep.pl~" from the official distribution
   cp -pPR sysdep/archive/generic sysdep/darwin
   cp -p sysdep/linuxX86/GC.c sysdep/darwin/src
-  sed -i'' -e 's,generic,darwin,' sysdep/darwin/install
   rm sysdep/darwin/src/FAIL_varargs.c
+  sed -i'' -e 's,generic,darwin,' sysdep/darwin/install
   add_def="`grep -e BETA2 -e 'define LARGE' -e 'define SMALL' -e 
'N[MLS]PRIME_' include/sacsys.h~|sed -e 's,$,\\\,'`"
   sed -i'' -e "/BETA1/a\
 $add_def
 " sysdep/darwin/include/sacsys.h 
-  sed -i'' -e '/<malloc\.h>/d' src/IQR.c
+  sed -i'' -e '/<malloc\.h>/c\
+#ifndef __APPLE__\
+#include <malloc.h>\
+#endif' src/IQR.c
+  if [ "%type_raw[-gcc4.3]" == "-gcc4.3" ] ; then nopic=''; else 
nopic="-mdynamic-no-pic"; fi
   if [ "%type_pkg[d]" == "d" ]
-     then sed -i'' -e 's,SACFLAG= ,"SACFLAG=-g" ,' sysdep/darwin/bin/mklib
+     then sed -i'' -e "s,SACFLAG= ,\"SACFLAG=-g $nopic -Wall 
-DNO_SACLIB_MACROS\" ," sysdep/darwin/bin/mklib
      else
        ## avoid "...will break strict-aliasing rules" warnings:
-       sed -i'' -e 's;%{Ni}/lib/obj$;&\nmake CC=$CC "SACFLAG=-O3 -Wall 
-mdynamic-no-pic" EXTENSION=  MMAPFS.o MMPDDF.o MMPFBL.o;' \
-                -e 's,SACFLAG= ,"SACFLAG=-O3 -fstrict-aliasing -Wall 
-mdynamic-no-pic" ,' sysdep/darwin/bin/mklib
+       sed -i'' -e 's;%{Ni}/lib/obj$;&\nmake CC=$CC "SACFLAG=-O3 $nopic -Wall" 
EXTENSION=  MMAPFS.o MMPDDF.o MMPFBL.o;' \
+                -e 's,SACFLAG= ,"SACFLAG=-O3 -fstrict-aliasing $nopic -Wall" 
,' sysdep/darwin/bin/mklib
   fi
-  sed -i'' -e 's,_X86_LINUX_,__APPLE__,' -e '/ieee754\.h/d' include/hfloats.h
+  sed -i'' -e '/_X86_LINUX_/c\
+#if defined (_X86_LINUX_) || defined (__APPLE__)' \
+       -e '/ieee754\.h/c\
+#ifdef _X86_LINUX_\
+#include <ieee754.h>\
+#endif' include/hfloats.h
+
+## Some "implicit declaration of function 'GCASET'" warnings (GCASET is also 
an apparenly equivalent  macro in sacmacros.h ...)
+# Could be cured by removing the strange "#ifdef NO_SACLIB_MACROS" under 
"Macros that are always defined"  in sacmacros.h...
+# or at least moving CGASET out of that list
+## Remain a couple of implicit declaration warnings for FPCATCH, NORMFCT and 
NORMLHS _ no .h file has such declarations..; too bad !
 <<
 CompileScript: <<
   #!/bin/sh -ev
+  if [ "%type_raw[-gcc4.3]" == "-gcc4.3" ]; then export 
PATH=%p/lib/gcc4.3/bin:$PATH CC=gcc; fi
   export %{Ni}=%b
   mkdir -p lib/obj
   cd bin; ./sconf


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to