Yuck. This really gets ugly fast. A minimal handling of
the info and manpages makes the changes look like...

--- gcc46-x86_64.info.current   2010-04-24 19:50:20.000000000 -0400
+++ gcc46-x86_64.info   2010-04-24 22:30:21.000000000 -0400
@@ -13,12 +13,12 @@
 Architecture: x86_64
 NoSetCPPFLAGS: True
 NoSetLDFLAGS: True
-Conflicts: gcc4, gcc42, gcc43, gcc44, gcc45
-Replaces: gcc4, gcc42, gcc43, gcc44, gcc45
+Conflicts: gcc42, gcc43, gcc44, gcc45
+Replaces: gcc42, gcc43, gcc44, gcc45
 Depends: gmp-shlibs (>= 4.3.1-1000), libgmpxx-shlibs (>= 4.3.1-1000), 
libmpfr1-shlibs (>= 2.4.1-1), %N-shlibs (>= %v-%r), libiconv, 
libgettext8-shlibs, ppl-shlibs (>= 0.10.2-1), cloog-shlibs (>= 0.15.9-1), 
libmpc2-shlibs (>= 0.8-1), xcode (>= 3.1.2)
 BuildDepends: gmp (>= 4.3.1-1000), libmpfr1 (>= 2.4.1-1), libiconv-dev, 
gettext-tools, libgettext8-dev, ppl (>= 0.10.2-1), cloog (>= 0.15.9-1), libmpc2 
(>= 0.8-1),  xcode (>= 3.1.2), fink (>= 0.27.2)
 ConfigureParams: <<
- --prefix=%p/lib/gcc4.6 --mandir=%p/share/man --infodir=%p/share/info 
--enable-languages=c,c++,fortran,objc,obj-c++,java \
+ --prefix=%p/lib/gcc4.6 --mandir=%p/lib/gcc4.6/share/man 
--infodir=%p/lib/gcc4.6/share/info 
--enable-languages=c,c++,fortran,objc,obj-c++,java \
  --with-gmp=%p  --with-libiconv-prefix=%p --with-ppl=%p --with-cloog=%p 
--with-mpc=%p --with-system-zlib \
  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib 
 <<
@@ -44,28 +44,17 @@
  cd ../darwin_objdir
  make install DESTDIR=%d 
  mkdir -p %i/bin
- ln -s %p/lib/gcc4.6/bin/gfortran %i/bin/gfortran
- ln -s %p/lib/gcc4.6/bin/gcc %i/bin/gcc-4
- ln -s %p/lib/gcc4.6/bin/g++ %i/bin/g++-4
- ln -s %p/lib/gcc4.6/bin/c++ %i/bin/c++-4
- ln -s %p/lib/gcc4.6/bin/cpp %i/bin/cpp-4
- ln -s %p/lib/gcc4.6/bin/gcov %i/bin/gcov-4
- ln -s %p/lib/gcc4.6/bin/gcj %i/bin/gcj
- ln -s %p/lib/gcc4.6/bin/gcj-dbtool %i/bin/gcj-dbtool
- ln -s %p/lib/gcc4.6/bin/gcjh %i/bin/gcjh
- ln -s %p/lib/gcc4.6/bin/gij %i/bin/gij
- ln -s %p/lib/gcc4.6/bin/gjnih %i/bin/gjnih
- ln -s %p/lib/gcc4.6/bin/grmiregistry %i/bin/grmiregistry
- ln -s %p/lib/gcc4.6/bin/grmic %i/bin/grmic
- ln -s %p/lib/gcc4.6/bin/jcf-dump %i/bin/jcf-dump
- ln -s %p/lib/gcc4.6/bin/jv-convert %i/bin/jv-convert
- ln -s %p/lib/gcc4.6/bin/jv-scan %i/bin/jv-scan
- mv %i/share/info/cpp.info %i/share/info/cpp-4.info
- mv %i/share/info/gcc.info %i/share/info/gcc-4.info
- mv %i/share/man/man1/cpp.1 %i/share/man/man1/cpp-4.1
- mv %i/share/man/man1/g++.1 %i/share/man/man1/g++-4.1
- mv %i/share/man/man1/gcc.1 %i/share/man/man1/gcc-4.1
- mv %i/share/man/man1/gcov.1 %i/share/man/man1/gcov-4.1
+ mv %i/lib/gcc4.6/bin/gcc %i/lib/gcc4.6/bin/gcc-4
+ mv %i/lib/gcc4.6/bin/g++ %i/lib/gcc4.6/bin/g++-4
+ mv %i/lib/gcc4.6/bin/c++ %i/lib/gcc4.6/bin/c++-4
+ mv %i/lib/gcc4.6/bin/cpp %i/lib/gcc4.6/bin/cpp-4
+ mv %i/lib/gcc4.6/bin/gcov %i/lib/gcc4.6/bin/gcov-4
+ mv %i/lib/gcc4.6/share/info/cpp.info %i/lib/gcc4.6/share/info/cpp-4.info
+ mv %i/lib/gcc4.6/share/info/gcc.info %i/lib/gcc4.6/share/info/gcc-4.info
+ mv %i/lib/gcc4.6/share/man/man1/cpp.1 %i/lib/gcc4.6/share/man/man1/cpp-4.1
+ mv %i/lib/gcc4.6/share/man/man1/g++.1 %i/lib/gcc4.6/share/man/man1/g++-4.1
+ mv %i/lib/gcc4.6/share/man/man1/gcc.1 %i/lib/gcc4.6/share/man/man1/gcc-4.1
+ mv %i/lib/gcc4.6/share/man/man1/gcov.1 %i/lib/gcc4.6/share/man/man1/gcov-4.1
  # Surrender ffi related man pages to libffi package.
  rm %i/share/man/man3/ffi.3 %i/share/man/man3/ffi_call.3 
%i/share/man/man3/ffi_prep_cif.3
  cp %b/gcc/config/darwin-sections.def 
%i/lib/gcc4.6/lib/gcc/%m-apple-darwin${darwinvers}/4.6.0/plugin/include/config
@@ -127,6 +116,51 @@
     %p/lib/gcc4.6/lib/i386/gcj-4.6.0-12/libjvm.dylib 0.0.0 %n (>= 4.1-1) 32
   <<
 <<
+SplitOff2: <<
+  Package: %N-bin
+  Conflicts: gcc42 (<= 4.2.4-1002), gcc43 (<= 4.3.4-1000), gcc44 (<= 
4.4.2-1000), gcc45 (<= 4.5.0-1000), gcc42-bin (>> 4.2.4-1002), gcc43-bin (>> 
4.3.4-1000), gcc44-bin (>> 4.4.2-1000), gcc45-bin (>> 4.5.0-1000)
+  Replaces: gcc42 (<= 4.2.4-1002), gcc43 (<= 4.3.4-1000), gcc44 (<= 
4.4.2-1000), gcc45 (<= 4.5.0-1000), gcc42-bin (>> 4.2.4-1002), gcc43-bin (>> 
4.3.4-1000), gcc44-bin (>> 4.4.2-1000), gcc45-bin (>> 4.5.0-1000)
+  Depends: %N (= %v-%r), %N-shlibs (= %v-%r)
+  Files: <<
+         bin
+   <<
+ PostInstScript: <<
+       binfiles="gfortran gcc-4 g++-4 c++-4 cpp-4 gcov-4 gcj gcj-dbtool gcjh 
gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan"
+       priority=`echo %N | sed -e 's/[^0-9]//g'`
+       for binfile in $binfiles ; do
+         update-alternatives --install %p/bin/$binfile $binfile 
%p/lib/gcc4.6/bin/$binfile $priority
+       done
+       man1files="aot-compile cpp-4 g++-4 gappletviewer gc-analyze gcc-4 
gcj-dbtool gcj gcjh gcov-4 gfortran gij gjar gjarsigner gjavah gjdoc gkeytool 
gnative2ascii gorbd grmic grmid grmiregistry gserialver gtnameserv jcf-dump 
jv-convert rebuild-gcj-db"
+       man7files="fsf-funding gfdl gpl"
+       for man1file in $man1files ; do
+          update-alternatives --install %p/share/man/man1/$man1file.1 
$man1file.1 %p/lib/gcc4.6/share/man/man1/$man1file.1 $priority
+       done
+       for man7file in $man7files ; do
+           update-alternatives --install %p/share/man/man1/$man7file.7 
$man1file.7 %p/lib/gcc4.6/share/man/man1/$man7file.7 $priority
+       done
+       infofiles="cpp-4 cppinternals gcc-4 gccinstall gccint gcj gfortran"
+       for infofile in $infofiles ; do
+           update-alternatives --install %p/share/info/$infofile.1 $infofile.1 
%p/lib/gcc4.6/share/info/$infofile.1 $priority
+        done
+  <<
+  PreRmScript: <<
+       binfiles="gfortran gcc-4 g++-4 c++-4 cpp-4 gcov-4 gcj gcj-dbtool gcjh 
gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan"
+       for binfile in $binfiles ; do
+         update-alternatives --remove $binfile %p/bin/$binfile
+       done
+        man1files="aot-compile cpp-4 g++-4 gappletviewer gc-analyze gcc-4 
gcj-dbtool gcj gcjh gcov-4 gfortran gij gjar gjarsigner gj
+avah gjdoc gkeytool gnative2ascii gorbd grmic grmid grmiregistry gserialver 
gtnameserv jcf-dump jv-convert rebuild-gcj-db"        man7files="fsf-funding 
gfdl gpl"
+       for man1file in $man1files ; do
+          update-alternatives --remove $man1file.1 
%p/share/man/man1/$man1file.1 
+        done
+       for man7file in $man7files ; do
+          update-alternatives --remove $man7file.7 
%p/share/man/man7/$man7file.7
+        done
+       infofiles="cpp-4 cppinternals gcc-4 gccinstall gccint gcj gfortran"
+          update-alternatives --remove $infofile.1 %p/share/info/$infofile.1
+       done
+  <<
+<<
 License: GPL
 Description: GNU Compiler Collection Version 4.6
 InfoDocs: cpp-4.info cppinternals.info gcc-4.info gccinstall.info gccint.info 
gcj.info gfortran.info

And this still leaves the user with the situation where the info and manpages
are only readily available if the appropriate %N-bin file is installed.
I could add a 45 suffix to their core names but that just makes things
horribly confusing when users want to access them quickly. This all reinforces
my original approach of keeping gcc4X current and strongly urging developers
to migrate to the latest release.
           Jack

------------------------------------------------------------------------------
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to