I suspect that fink may not be able to cope with
the changes required for gcc4x's to co-exist. The plan
was to pull the overlapping files out of gcc4x into
a gcc4x-bin split-off (and create the overlapping files with
calls to update-alternatives in PostInstScript and
PreRmScript). The sticking point is that we have to
be able to upgrade from the old-style two-part
packages (gcc4x and gcc4x-shlibs) to the new style.
The problem is what to add for the new gcc4x package
which lacks overlapping files? I had hoped the following
would work...
Package: gcc46
...
SplitOff: <<
Package: %N-shlibs
...
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)
...
Such that if the old-style gcc45 package was installed (with overlapping
files)...
fink install gcc46
..would install the new-style gcc46 (without overlapping files)
along side the old-style gcc45 package. Only when gcc46-bin is
installed would the old-style gcc45 package be forced to deinstall
because of the overlapping files. Instead, I get an error
when it seems to attempt to reinstall both gcc45 and gcc46
(which seems odd since gcc45 is already installed). I suspect
that the fact that old-style gcc45 package already has its own
Conflicts/Replaces on gcc46 may be to blame. Does anyone see a
way around this mess of transitioning from a two-way split
(with overlapping files in gcc4x) to a three-way split (with
overlapping files in gcc4x-bin)? The current mockup for doing
this is appended below.
Jack
Info2: <<
Package: gcc46
Version: 4.5.999
Revision: 20100423
Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-4.6-%r.tar.bz2
Source-MD5: c89ac54c22eda4be67ef8ca34ab3f74b
Source2: ftp://sourceware.org/pub/java/ecj-latest.jar
Source2-MD5: fd299f26c02268878b5d6c0e86f57c43
PatchFile: %n.patch
PatchFile-MD5: 7c279824f0a0544259837dbae1ecf28c
Distribution: 10.5, 10.6
Type: -64bit .
Architecture: x86_64
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
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 \
--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
--program-suffix=-fsf-4.6
<<
CompileScript: <<
#!/bin/bash -ev
ulimit -s `ulimit -s`
mv ../ecj-latest.jar ecj.jar
mkdir ../darwin_objdir
cd ../darwin_objdir
darwinvers=`uname -r|cut -f1 -d.`
../gcc-4.6-%r/configure %c
num_cpu=$(echo `sysctl -n hw.ncpu`)
make -j $num_cpu
## make check requires autogen, dejagnu and expect, and should be run, in
darwin_objdir, after install.
## on 32-bit processors use
# make -k check
## on 64-bit processors use
# make -k check RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'"
<<
InstallScript: <<
#!/bin/sh -ev
darwinvers=`uname -r`
cd ../darwin_objdir
make install DESTDIR=%d
mkdir -p %i/bin
# Add symlinks to recreate previous naming of executables
# in %p/lib/gcc4.6/bin and new -fsf-4.6 naming in %p/bin.
binfiles="gcc g++ c++ cpp gcov"
for binfile in $binfiles ; do
ln -s %p/lib/gcc4.6/bin/$binfile-fsf-4.6 %i/lib/gcc4.6/bin/$binfile-4
ln -s %p/lib/gcc4.6/bin/$binfile-fsf-4.6 %i/bin/$binfile-fsf-4.6
done
binfiles="gfortran gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump
jv-convert jv-scan"
for binfile in $binfiles ; do
ln -s %p/lib/gcc4.6/bin/$binfile-fsf-4.6 %i/lib/gcc4.6/bin/$binfile
ln -s %p/lib/gcc4.6/bin/$binfile-fsf-4.6 %i/bin/$binfile-fsf-4.6
done
# Rename manpages with -fsf-4.6 suffix.
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-4.6.7
done
# Rename info files with -fsf-4.6 suffix.
infofiles="cpp cppinternals gcc gccinstall gccint gcj gfortran"
for infofile in $infofiles ; do
mv %i/share/info/$infofile.info %i/share/info/$infofile-fsf-4.6.info
done
cp %b/gcc/config/darwin-sections.def
%i/lib/gcc4.6/lib/gcc/%m-apple-darwin${darwinvers}/4.6.0/plugin/include/config
# remove build path from .la files
perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find
%i/lib/gcc4.6/lib -name '*.la'`
<<
SplitOff: <<
Package: %N-shlibs
Replaces: gcc4 (<= 20050130-4), gfortran-shlibs
Provides: gfortran-shlibs
Description: Shared libraries for gcc4
DocFiles: gcc/COPYING gcc/COPYING.LIB
Homepage: http://gcc.gnu.org/
Files: <<
lib/gcc4.6/lib/libgfortran.3*.dylib
lib/gcc4.6/lib/libffi.4*.dylib
lib/gcc4.6/lib/libstdc++.6*.dylib
lib/gcc4.6/lib/libgcc_s.1*.dylib
lib/gcc4.6/lib/libgcc_ext.1*.dylib
lib/gcc4.6/lib/libgcj.11*.dylib
lib/gcc4.6/lib/libgcj-tools.11*.dylib
lib/gcc4.6/lib/libgij.11*.dylib
lib/gcc4.6/lib/libssp.0*.dylib
lib/gcc4.6/lib/libobjc-gnu.2*.dylib
lib/gcc4.6/lib/libgomp.1*.dylib
lib/gcc4.6/lib/gcj-4.6.0-11
lib/gcc4.6/lib/i386/libgfortran.3*.dylib
lib/gcc4.6/lib/i386/libffi.4*.dylib
lib/gcc4.6/lib/i386/libgcj.11*.dylib
lib/gcc4.6/lib/i386/libgcj-tools.11*.dylib
lib/gcc4.6/lib/i386/libgij.11*.dylib
lib/gcc4.6/lib/i386/libstdc++.6*.dylib
lib/gcc4.6/lib/i386/libssp.0*.dylib
lib/gcc4.6/lib/i386/libobjc-gnu.2*.dylib
lib/gcc4.6/lib/i386/libgomp.1*.dylib
lib/gcc4.6/lib/i386/gcj-4.6.0-11
<<
Shlibs: <<
%p/lib/gcc4.6/lib/libgfortran.3.dylib 4.0.0 %n (>= 4.3-20070711)
%p/lib/gcc4.6/lib/libffi.4.dylib 5.0.0 %n (>= 20050130-5)
%p/lib/gcc4.6/lib/libstdc++.6.dylib 7.0.0 %n (>= 4.1-1)
%p/lib/gcc4.6/lib/libgcc_s.1.dylib 1.0.0 %n (>= 4.1-1)
%p/lib/gcc4.6/lib/libgcj.11.dylib 12.0.0 %n (>= 4.1.999-20060915)
%p/lib/gcc4.6/lib/libgcj-tools.11.dylib 12.0.0 %n (>= 4.1.999-20060915)
%p/lib/gcc4.6/lib/libgij.11.dylib 12.0.0 %n (>= 4.1.999-20060915)
%p/lib/gcc4.6/lib/libssp.0.dylib 1.0.0 %n (>= 4.1-1)
%p/lib/gcc4.6/lib/libobjc-gnu.2.dylib 3.0.0 %n (>= 20050130-5)
%p/lib/gcc4.6/lib/libgomp.1.dylib 2.0.0 %n (>= 2:4.1.99-20060513)
%p/lib/gcc4.6/lib/gcj-4.6.0-11/libjvm.dylib 0.0.0 %n (>= 4.1-1)
%p/lib/gcc4.6/lib/i386/libgfortran.3.dylib 4.0.0 %n (>= 4.3-20070711) 32
%p/lib/gcc4.6/lib/i386/libffi.4.dylib 5.0.0 %n (>= 20050130-5) 32
%p/lib/gcc4.6/lib/i386/libgcj.11.dylib 12.0.0 %n (>= 4.1.999-20060915) 32
%p/lib/gcc4.6/lib/i386/libgcj-tools.11.dylib 12.0.0 %n (>=
4.1.999-20060915) 32
%p/lib/gcc4.6/lib/i386/libgij.11.dylib 12.0.0 %n (>= 4.1.999-20060915) 32
%p/lib/gcc4.6/lib/i386/libstdc++.6.dylib 7.0.0 %n (>= 4.1-1) 32
%p/lib/gcc4.6/lib/i386/libssp.0.dylib 1.0.0 %n (>= 4.1-1) 32
%p/lib/gcc4.6/lib/i386/libobjc-gnu.2.dylib 3.0.0 %n (>= 20050130-5) 32
%p/lib/gcc4.6/lib/i386/libgomp.1.dylib 2.0.0 %n (>= 2:4.1.99-20060513) 32
%p/lib/gcc4.6/lib/i386/gcj-4.6.0-11/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)
PostInstScript: <<
# Add symlinks to recreate previous naming of executables
priority=`echo %N | sed -e 's/[^0-9]//g'`
binfiles="cpp gcc g++ c++ gcov"
for binfile in $binfiles ; do
update-alternatives --install %p/bin/$binfile-4 $binfile-4
%p/lib/gcc4.6/bin/$binfile-fsf-4.6 $priority
done
binfiles="gfortran gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic
jcf-dump jv-convert jv-scan"
for binfile in $binfiles ; do
update-alternatives --install %p/bin/$binfile $binfile
%p/lib/gcc4.6/bin/$binfile-fsf-4.6 $priority
done
# Add symlinks for manpages under old names.
man1files="cpp g++ gcc gcov"
for man1file in $man1files ; do
update-alternatives --install %p/share/man/man1/$man1file-4
$man1file-4 %p/share/man/man1/$man1file-fsf-4.6.1 $priority
done
man1files="aot-compile gappletviewer gc-analyze gcj-dbtool gcj gcjh
gfortran gij gjar gjarsigner gjavah gjdoc gkeytool gnative2ascii gorbd grmic
grmid grmiregistry gserialver gtnameserv jcf-dump jv-convert rebuild-gcj-db"
for man1file in $man1files ; do
update-alternatives --install %p/share/man/man1/$man1file $man1file
%p/share/man/man1/$man1file-fsf-4.6.1 $priority
done
man3files="ffi ffi_call ffi_prep_cif"
for man3file in $man3files ; do
update-alternatives --install %p/share/man/man3/$man3file $man3file
%p/share/man/man3/$man3file-fsf-4.6.1 $priority
done
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
update-alternatives --install %p/share/man/man7/$man7file $man7file
%p/share/man/man7/$man7file-fsf-4.6.1 $priority
done
# Add symlinks for info files under old names.
infofiles="cpp gcc"
for infofile in $infofiles ; do
update-alternatives --install %p/share/info/$infofile-4 $infofile-4
%p/share/info/$infofile-fsf-4.6.1 $priority
done
infofiles="cppinternals gccinstall gccint gcj gfortran"
for infofile in $infofiles ; do
update-alternatives --install %p/share/info/$infofile $infofile
%p/share/info/$infofile-fsf-4.6.1 $priority
done
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
# Remove symlinks from previous naming of executables
binfiles="gcc-4 g++-4 c++-4 cpp-4 gcov-4 gfortran 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
# Remove symlinks for manpages under old names.
man1files="cpp-4 g++-4 gcc-4 gcov-4 aot-compile gappletviewer
gc-analyze gcj-dbtool gcj gcjh gfortran gij gjar gjarsigner gjavah gjdoc
gkeytool gnative2ascii gorbd grmic grmid grmiregistry gserialver gtnameserv
jcf-dump jv-convert rebuild-gcj-db"
for man1file in $man1files ; do
update-alternatives --remove $man1file %p/share/man/man1/$man1file
done
man3files="ffi ffi_call ffi_prep_cif"
for man3file in $man3files ; do
update-alternatives --remove $man3file %p/share/man/man3/$man3file
done
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
update-alternatives --remove $man7file %p/share/man/man7/$man7file
done
# Remove symlinks for info files under old names.
infofiles="cpp-4 gcc-4 cpp-4 internals gccinstall gccint gcj gfortran"
for infofile in $infofiles ; do
update-alternatives --remove $infofile %p/share/info/$infofile
done
fi
<<
<<
License: GPL
Description: GNU Compiler Collection Version 4.6
InfoDocs: cpp-fsf-4.6.info cppinternals-fsf-4.6.info gcc-fsf-4.6.info
gccinstall-fsf-4.6.info gccint-fsf-4.6.info gcj-fsf-4.6.info
gfortran-fsf-4.6.info
DescDetail: <<
GCC, the GNU Compiler Collection, includes front ends for
C, C++, Objective-C, Objective-C++, Fortran, Java, and Ada.
.
C, C++, Objective C and Fortran and Java are included in this package.
.
The C and C++ compilers are named gcc-4 and g++-4 to avoid
conflicts with gcc and g++ installed by the Apple Developer Tools
<<
Homepage: http://gcc.gnu.org/
Maintainer: Jack Howarth <[email protected]>
<<
------------------------------------------------------------------------------
_______________________________________________
Fink-devel mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel