Sunday, June 10, 2012

Some notes for porting Fink packages to 10.7

For all .info file:
  • Add 10.7 to Distribution as a comma separated list.
    Distribution: 10.4, 10.5, 10.6, 10.7
  • Add x86_64 to Architecture
    Architecture: powerpc, i386, x86_64
If this is not done correctly, Fink would say "no package found for specification..." since the .info files are filtered by distribution and architecture. On 10.7, the Intel architecture is x86_64.

Specific to gcc43:
  • Change all gmp dependencies to gmp5 (and get rid of >= version constraints).
  • Change all libmpfr1 dependencies to libmpfr4 (and get rid of >= version constraints).
  • Change ecj-latest.jar MD5 to d7cd6a27c8801e66cbaa964a039ecfdb
  • Remove ln -s ... %i/bin/$binfile-4 and remove Conflicts and Replaces. There is no other reason why gcc 4.x cannot coexist.
  • Replace all traces of i686 with %m. Optionally change --with-tune=generic to --with-tune=core2.
  • To workaround build failure “error: redefinition of a 'extern inline' function 'xxx' is not supported in C99 mode.” Per clang instruction, set CC='gcc -std=gnu89' to workaround it. Another issue surfaced in the second stage is undefined symbol for architecture x86_64 '___builtin___stpncpy_chk' which is resolved by adding -D_FORTIFY_SOURCE=0 to CFLAGS.
    SetCC: gcc -std=gnu89
  • To resolve ld: duplicate symbol _init_inline_once issue, remove redundant tree-inline.o from CXX_C_OBJS in ${SRCDIR}/gcc/cp/
  • Add --enable-libgcj to the ConfigureParams. For some reason this flag is missing, and libgcj is not, but is expected, to be built.
  • Remove Type: -64bit and redundant references of the %lib expansion, particular those in the SplitOff.
The end.

No comments: