Info2: << Package: saclib%type_pkg[-gcc4.6] Version: 2.2.5 Revision: 2 Architecture: i386, x86_64 ## Would be relativel to revive ppc too, if there was any genuine demand for it.. # But apparently currently abandoned upstream Source: http://www.usna.edu/Users/cs/qepcad/INSTALL/%{Ni}%v.tar.gz Source-MD5: 84bc4f972b1362d635edce8c1ba6bb30 Type: -gcc4.6 (boolean) BuildDepends: fink (>= 0.24.12), (%type_pkg[-gcc4.6]) gcc46-compiler Conflicts: %{Ni}, %{Ni}-gcc44, %{Ni}-gcc45, %{Ni}-gcc46 Replaces: %{Ni}, %{Ni}-gcc44, %{Ni}-gcc45, %{Ni}-gcc46 PatchScript: << #!/bin/sh -ev rm -fR RCS chmod -R a+rX . # else gdb can't find files when not working as root if grep -q 64 %p/var/lib/fink/path-prefix-10.6/compiler_wrapper ; then pt=x86_64; else pt=x86; fi sed -i.bak -e '/macosKernelTest/d' -e "/32-bit or 64-bit/s,$,\n\t\$ptype = $pt," bin/mksysdep.pl ## powerpc seems excluded in this new version.. To fix if there is any demand... ## __STDC__ is not an exhaustive test whether the compiler supports prototypes; ## is defined under FSF gcc, but Apple's defines only __STDC_HOSTED__: sed -i.bak -e 's,ifdef __STDC__,if defined (__STDC__) || defined (__APPLE__),' include/sacsys.h src/FAIL.c ### Getting control over CFLAGS ... if [ "%type_raw[-gcc4.6]" == "-gcc4.6" ] ; then nopic=''; else nopic="-mdynamic-no-pic"; fi nopic="$nopic -Wall -Wextra -Wstrict-prototypes -Wstrict-aliasing=2" ## first line next is to avoid optimizing away the flushing of regs in GC. sed -i.bak \ -e "/Compiling/,\${ \X%{Ni}/lib/objo\$Xa\\ make CC=\$CC \"SACFLAG=$nopic\" EXTENSION=o GC.o }" \ -e 's,\(SACFLAG=\)",\1-O3 -fstrict-aliasing",' \ -e 's,=-g ,=-ggdb3 -gfull ,' \ -e "s,SACFLAG=,&$nopic ," bin/mklib ### Some "implicit declaration of function 'GCASET'" warnings (GCASET is also an apparenly equivalent macro in sacmacros.h ...) # Why the strange "#ifdef NO_SACLIB_MACROS" under "Macros that are always defined" in sacmacros.h ? # Could at least CGASET be moved out of that list ? ( If '#ifdef' is not a typo for '#ifndef' ...). ## Remain a couple of implicit declaration warnings for FPCATCH, NORMFCT and NORMLHS; fixed in the CompileScript. << CompileScript: << #!/bin/sh -ev if [ "%type_raw[-gcc4.6]" == "-gcc4.6" ] then export PATH=%p/lib/gcc4.6/bin:$PATH CC=gcc-4 CXX=g++-4 elif test -f /usr/bin/gcc-4.2 then export CC=gcc-4.2 CXX=g++-4.2 else export CC=gcc CXX=g++ fi export %{Ni}=%b bin/sconf bin/mkproto ## mkproto missed the following (leading a.o. to "implicit declaration" warnings) : echo "extern void FPCATCH P__((void)); extern void GCASET P__((Word A, Word i, Word a)); extern void NORMFCT P__((Word N, Word n, Word p, Word Q, Word Qp, Word q, Word B, Word L, Word T, Word G, Word C, Word e, Word d, Word k, Word N1, Word *F_, Word *Nb_, Word *Bb_, Word *Lb_, Word *Tb_, Word *Gb_, Word *Cb_, Word *Nb1_)); extern void NORMLHS P__((Word q, Word Q, Word Qpp, Word Ab, Word Bb, Word Sb, Word Tb, Word Ap, Word Bp, Word Yp, Word Zp, Word U, Word D, Word A, Word B, Word *Qs_, Word *Y_, Word *Z_, Word *Us_, Word *As_, Word *Bs_));" \ >> include/sacproto.h bin/mkmake bin/mklib all << InstallScript: << #!/bin/sh -ev mkdir -p %i/bin %i/lib %i/include %i/share/doc/%N %i/share/%{Ni} cp -p lib/*.a %i/lib ln -s %{Ni}o.a %i/lib/%{Ni}.a cp -p include/*.h %i/include cp -p doc/{,maint_guide/}*.dvi %i/share/doc/%N # pkg must remain usable if user doesn't keep build-dir, so rm the 'perl' line : sed -e '/perl/d' -e 's,[$]%{Ni}/[bindoc]\{3\},%p/share/%{Ni},' < bin/sdesc > %i/bin/sdesc chmod a+x %i/bin/sdesc cp -p bin/{b2l,l2b}.awk doc/*.doc %i/share/%{Ni} chmod -R a+rX %i sed -e '/INSTALLATION/,/done\.$/d' -e 's,COPYRIGHT ,LICENSE ,' < README | uniq > HELP << DocFiles: HELP LICENSE Description: Computer algebra, specially on ordered fields DescUsage: << To get the elementary equivalent of a man3 page, use first "sdesc pattern" (with "pattern" eg "Algebraic number field" _ or "FPCATCH" _ ; it is not case-sensitive) to see what you are looking for, then grep that (those) items in %p/include/sacproto.h . << DescPackaging: Installation "by hand"; there is no install target. DescPort: << Patching the linuxX86 build to apply also on darwin. Take care of missing headers and missing declarations. << License: OSI-Approved Homepage: http://www.usna.edu/Users/cs/qepcad/B/QEPCAD.html Maintainer: JF Mertens <<