html and postscript viewer

Mark Brethen mark.brethen at gmail.com
Sat Apr 2 06:20:19 PDT 2016


After reviewing: https://trac.macports.org/wiki/PortfileRecipes#compiler I tried:

    compiler.blacklist      *clang* *llvm-gcc-4.2
    compiler.whitelist      macports-gcc-4.9

    pre-build {
        build.args      CC=${configure.cc} \
            CXX=${configure.cxx}
    }

This builds with gcc 4.9 successfully. 




> On Apr 2, 2016, at 2:04 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
> 
> From their installation guide:
> 
> For the compilation of cgx, therefore, the unmodified GCC 4.9 is required because the modified (by Apple) GCC for several reasons is not suitable for the compilation of cgx … The modified GCC includes the individual compilers: gcc (GNU c compiler), g++ and clang. Because the modified GCC has a problem with function overloading it is not suitable for the 2compilation of cgx.
> 
> 2In particular, the compilation of function: #define abs(x) ((x) >= 0 ? (x) : -(x)) in the cgx-routine: “extUtil.h“ causes a compiler error. A bug fix for the compiler was not available at the time the installation of cgx was tested. 
> 
> 
> 
> I have looked at that link but it doesn’t explain how, for example, to set a default compiler. The compilers group gives more instruction, but it’s not completely clear to me. I guess something like
> 
> compilers.choose    cc cxx cpp
> configure.cc <http://configure.cc/>            macports-gcc-4.9
> 
> 
>> On Apr 1, 2016, at 11:59 PM, Ryan Schmidt <ryandesign at macports.org <mailto:ryandesign at macports.org>> wrote:
>> 
>>> On Apr 1, 2016, at 23:03, Mark Brethen <mark.brethen at gmail.com <mailto:mark.brethen at gmail.com>> wrote:
>>> 
>>> I’ve run into a snag building calculix. glut and libSNL are libraries that calculix uses. I set 
>>> 
>>> "compiler.whitelist      macports-gcc-4.9” 
>>> 
>>> per the developers instructions.
>> 
>> Why? We usually do not want to use FSF GCC. 
>> 
>>> However there isn’t a configure so I’m not sure what else needs to be passed.
>>> 
>>> subport ${name}-cgx {
>>>   revision                0
>>>   master_sites            http://www.dhondt.de/ <http://www.dhondt.de/>
>>>   distname                cgx_${version}.all
>>> 
>>>   checksums               rmd160  02302101f16c2b4cdd570e81986cc4d36c2110d8 \
>>>       sha256 64810dab1c22152c7946282fac5763cc36b9e31e309f962c23b8bf8238537c7e
>>> 
>>>   depends_run-append      port:openbrowser 
>>> 
>>>   worksrcdir              CalculiX
>>>   build.dir               ${worksrcpath}/cgx_${version}/src
>>>   build.target            
>>> 
>>>   compiler.whitelist      macports-gcc-4.9
>>> 
>>>   patchfiles              patch-cgx-build.diff \
>>>       patch-libSNL-build.diff
>>>   patch.dir               ${workpath}
>>> 
>>>   post-patch {
>>>       reinplace "s|@@PREFIX@@|${prefix}|g" \
>>>           ${worksrcpath}/cgx_${version}/src/cgx.h
>>>   }
>>> 
>>>   use_configure           no
>>> 
>>> livecheck.regex         {ccx_${version}.all}
>>> }
>> 
>> When you set "use_configure no", you must add code to use the right compiler and -arch flags and offer a universal variant. See:
>> 
>> https://trac.macports.org/wiki/UsingTheRightCompiler <https://trac.macports.org/wiki/UsingTheRightCompiler>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20160402/b97518f8/attachment-0001.html>


More information about the macports-dev mailing list