Info2: << Package: gcc7 # v7.5.0 is the last gcc7 release Version: 7.5.0 Revision: 4 Distribution: 10.9, 10.10, 10.11, 10.12, 10.13 Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.xz Source-Checksum: SHA256(b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661) PatchFile: %n.patch PatchFile-MD5: 07a7b64b31864ff2344c42104fd48d0e PatchFile2: %n-apfs.patch PatchFile2-MD5: 6f281ae553506c142114c06bf48eb269 PatchScript: << #!/bin/sh -ev %{default_script} # don't update live infodoc dir find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g' << Type: -64bit . NoSetCPPFLAGS: True NoSetLDFLAGS: True UseMaxBuildJobs: True Conflicts: << gcc5, gcc6, gcc7, gcc8, gcc9, gcc10, gcc11, gcc12, gcc13 << Replaces: << gcc5, gcc6, gcc7, gcc8, gcc9, gcc10, gcc11, gcc12, gcc13 << Depends: << %N-compiler (= %v-%r) << BuildDepends: << fink (>= 0.32), fink-package-precedence, gettext-tools, gmp5 (>= 6.0.0a-3), isl3, libgettext8-dev, libiconv-dev, libmpc3 (>= 1.0.3-1), libmpfr4 (>= 3.1.3-1), x11-dev << ConfigureParams: << --prefix=%p/lib/gcc7 \ --mandir=%p/share/man \ --infodir=%p/lib/gcc7/info \ --enable-languages=c,c++,fortran,lto,objc,obj-c++ \ --with-gmp=%p \ --with-libiconv-prefix=%p \ --with-isl=%p \ --with-mpc=%p \ --with-system-zlib \ --program-suffix=-fsf-7 << InfoTest: << TestDepends: << autogen, dejagnu, apple-gdb << TestScript: << #!/bin/bash -ev if [ $UID = 0 ]; then if [ -e /usr/bin/csrutil && `csrutil status | grep -c disabled` ]; then cd ../darwin_objdir; make -k check RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'" || : else echo "The gcc testsuite must be run with SIP disabled or package installed." exit 0 fi else echo "The gcc testsuite must be run as root due to its use of gdb." exit 0 fi << << InfoDocs: gcc.info gfortran.info cpp.info gccinstall.info libgomp.info cppinternals.info gccint.info CompileScript: << #!/bin/bash -ev set +x if [ -e /usr/local/lib/libgmp.a ] || [ -e /usr/local/lib/libgmp.dylib ]; then echo "-----WARNING-----WARNING-----WARNING-----" echo "You seem to have GMP installed in /usr/local." echo "This is known to cause %N to fail to build." echo "Please move aside /usr/local and try again." echo "-----WARNING-----WARNING-----WARNING-----" exit 1 else echo "Good, /usr/local/lib/libgmp* not present." fi set -x ulimit -s `ulimit -s` mkdir ../darwin_objdir cd ../darwin_objdir # build doesn't play well with GNU-make # unsupported option '-static-libgcc' export MAKE=/usr/bin/make # check for incompatible clang clangvers=`clang --version | cut -d\ -f4` $(`dpkg --compare-versions $clangvers '>>' 6.0`) && $(`dpkg --compare-versions $clangvers '<<' 7.2`) && clangcheck='y' if [ "$clangcheck" = "y" ]; then ../gcc-%v/configure %c --with-build-config=bootstrap-debug else ../gcc-%v/configure %c fi # Use bootstrap-lean to reduce disk usage. # Note that this causes plugin testsuite failures # since the plugin headers must come from prev-gcc. # make bootstrap-lean make bootstrap fink-package-precedence --prohibit-bdep=%n . << InstallScript: << #!/bin/sh -ev darwinvers=`uname -r` cd ../darwin_objdir make -j 1 install DESTDIR=%d mkdir -p %i/bin # Add symlinks to recreate previous naming of executables in %p/bin # as well as %p/lib/gcc7/bin and new -fsf-7 naming in %p/bin. binfiles="gcc g++ c++ cpp gcov" for binfile in $binfiles ; do ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/lib/gcc7/bin/$binfile-7 ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/bin/$binfile-7 ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/bin/$binfile-fsf-7 done binfiles="gfortran" for binfile in $binfiles ; do ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/lib/gcc7/bin/$binfile ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/bin/$binfile ln -s %p/lib/gcc7/bin/$binfile-fsf-7 %i/bin/$binfile-fsf-7 done # Remove unsupported executables binfiles="gcc-ar gcc-nm gcc-ranlib" for binfile in $binfiles ; do rm -f %i/lib/gcc7/bin/$binfile-fsf-7 %i/lib/gcc7/bin/%m-apple-darwin`uname -r`-$binfile-fsf-7 done # Add symlinks for manpages under old names. man1files="cpp g++ gcc gcov" for man1file in $man1files ; do ln -s $man1file-fsf-7.1 %i/share/man/man1/$man1file-7.1 done man1files="gfortran" for man1file in $man1files ; do ln -s $man1file-fsf-7.1 %i/share/man/man1/$man1file.1 done # Rename manpages with -fsf-7 suffix and create symlinks to old names. man7files="fsf-funding gfdl gpl" for man7file in $man7files ; do mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-7.7 ln -s $man7file-fsf-7.7 %i/share/man/man7/$man7file.7 done # Add dir for installed info files, and link them to %i/share/info. # the %i/lib/gcc7/info/* files will go into the -compiler package # and the files in %i/share/info go into the main package, this allows # the info files for specific compiler versions to be accessed with # e.g. `info -d /fink_install_dir/lib/gcc7/info gcc', but the "main" info files will # be available for the install gccXX package in %p/share/info, as usual install -d -m 755 %i/share/info for infofile in $(find %i/lib/gcc7/info -name '*.info*'); do infobase=$(basename $infofile) case $infofile in *info) /usr/bin/install-info --infodir=%i/lib/gcc7/info ${infofile} ;; esac ln -s %p/lib/gcc7/info/$infobase %i/share/info/$infobase done cp %b/gcc/config/darwin-sections.def %i/lib/gcc7/lib/gcc/%m-apple-darwin${darwinvers}/%v/plugin/include/config # remove build path from .la files perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc7/lib -name '*.la'` perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc7/lib -name 'libasan.la'` perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc7/lib -name 'libubsan.la'` << SplitOff: << Package: %N-shlibs Replaces: << gcc4 (<= 20050130-4), gfortran-shlibs << Provides: << gfortran-shlibs << Description: Shared libraries for %N DocFiles: gcc/COPYING gcc/COPYING.LIB Files: << lib/gcc7/lib/libgfortran.4*.dylib lib/gcc7/lib/libstdc++.6*.dylib lib/gcc7/lib/libgcc_s.1*.dylib lib/gcc7/lib/libgcc_ext.1*.dylib lib/gcc7/lib/libitm.1*.dylib lib/gcc7/lib/libssp.0*.dylib lib/gcc7/lib/libobjc-gnu.4*.dylib lib/gcc7/lib/libgomp.1*.dylib lib/gcc7/lib/libquadmath.0*.dylib lib/gcc7/lib/libatomic.1*.dylib lib/gcc7/lib/libasan.4*.dylib lib/gcc7/lib/libubsan.0*.dylib lib/gcc7/lib/libcilkrts.5*.dylib lib/gcc7/lib/i386/libgfortran.4*.dylib lib/gcc7/lib/i386/libitm.1*.dylib lib/gcc7/lib/i386/libstdc++.6*.dylib lib/gcc7/lib/i386/libssp.0*.dylib lib/gcc7/lib/i386/libobjc-gnu.4*.dylib lib/gcc7/lib/i386/libgomp.1*.dylib lib/gcc7/lib/i386/libquadmath.0*.dylib lib/gcc7/lib/i386/libatomic.1*.dylib lib/gcc7/lib/i386/libasan.4*.dylib lib/gcc7/lib/i386/libubsan.0*.dylib lib/gcc7/lib/i386/libcilkrts.5*.dylib << Shlibs: << %p/lib/gcc7/lib/libgfortran.4.dylib 5.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libstdc++.6.dylib 7.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libgcc_s.1.dylib 1.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libitm.1.dylib 2.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libssp.0.dylib 1.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libobjc-gnu.4.dylib 5.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libgomp.1.dylib 2.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libquadmath.0.dylib 1.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libatomic.1.dylib 4.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libasan.4.dylib 5.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libubsan.0.dylib 1.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/libcilkrts.5.dylib 6.0.0 %n (>= 7.1.0-1) %p/lib/gcc7/lib/i386/libgfortran.4.dylib 5.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libitm.1.dylib 2.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libstdc++.6.dylib 7.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libssp.0.dylib 1.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libobjc-gnu.4.dylib 5.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libgomp.1.dylib 2.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libquadmath.0.dylib 1.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libatomic.1.dylib 4.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libasan.4.dylib 5.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libubsan.0.dylib 1.0.0 %n (>= 7.1.0-1) 32 %p/lib/gcc7/lib/i386/libcilkrts.5.dylib 6.0.0 %n (>= 7.1.0-1) 32 << << SplitOff2: << Package: %N-compiler Depends: << gmp5-shlibs (>= 6.0.0a-3), isl3-shlibs, libgettext8-shlibs, libgmpxx5-shlibs (>= 6.0.0a-3), libiconv, libmpc3-shlibs (>= 1.0.3-1), libmpfr4-shlibs (>= 3.1.3-1), %N-shlibs (= %v-%r) << BuildDependsOnly: False Description: Compiler Binaries for gcc7 DocFiles: gcc/COPYING gcc/COPYING.LIB Files: << bin/*-fsf-7 lib/gcc7 share/man/man1/*-fsf-7.1 share/man/man7/*-fsf-7.7 << << License: GPL Description: GNU Compiler Collection Version 7 DescDetail: << GCC, the GNU Compiler Collection, includes front ends for C, C++, Objective-C, Objective-C++, Fortran and Ada. . C, C++, Objective C and Fortran are included in this package. . The C and C++ compilers are named gcc-7 and g++-7 to avoid conflicts with gcc and g++ installed by the Apple Developer Tools << DescPackaging: << Build with -fsf-7 suffix and place non-overlapping files into new gcc7-compiler package which can co-exist with other gccXX-compiler packages. Overlapping files are left in main gcc7 package which still conflicts with other gccXX packages. Add apfs patch to suppress https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797 by adding ".NOTPARALLEL: install-headers" to libstdc++-v3/include/Makefile.in. << Homepage: http://gcc.gnu.org/ Maintainer: None <<