sethrfore / homebrew-r-srf

Custom Homebrew R formula with tcl-tk support and additional options
59 stars 15 forks source link

Made tcltk workable #24

Closed yukio-takeuchi closed 4 years ago

yukio-takeuchi commented 4 years ago

As an alternative approach to the dev-tcl branch, I defined two configure variables TCLTK_CPPFLAGS adn TCLTK_LIBS, that are mentioned in A.2.1 Tcl/Tk of R Installation and Administration in the formula. In addition, TCL_INCLUDE_SPEC, TK_INCLUDE_SPEC are redefined in formula to overwrite values in tclConfig.sh or tkConfig.sh. for Catalina

Values of --with-tcl-config and --with-tk-config are modified to use MacOS.sdk_path defined by homebrew.

These changes works in my Mac (10.15.4) at home.

yukio-takeuchi commented 4 years ago

Though I do not know if my changes caused a problem, I met an error to upgrade some other R packages which requires to compile C++ codes. Please be careful for my PR. I continue to test my changes at least for a while.

yukio-takeuchi commented 4 years ago

After I spent whole morning, it appeared that the problem, I met, was probably caused by aliases set in my .bashrc for clang and clang++ to included path to the path of headers from MacOS SDK. After I reset those aliases, problems disappeared.

Could you test if these change is OK on other than my machine?

luispuerto commented 4 years ago

🎉 at least in my case seems that it's working —it builds properly— and I've been building packages without a problem.

@sethrfore probably it's worth merging, but perhaps someone with catalina should try it.

yukio-takeuchi commented 4 years ago

As you can see, my change have a conditional block conditional if Catalina or not, at least it is necessary to check this PR can work both on Catalina and MacOS prior to Catalina. I only have Mac's Catalina installed so that I had not chance to test my change on MacOS with previous versions.

sethrfore commented 4 years ago

Thanks for all the work on this! While I’ve been following the conversation, I haven’t had time to adequately follow up with testing I my end. I should be able spend some time with it in the next day or two and then merge the PR if everything works. Sorry for the delay! I’ll move things forward as soon as I can. Thanks for all the help!

sethrfore commented 4 years ago

Proposed changes regarding tcl-tk functionality have been merged into the standard R formula. Several of us have successfully tested these changes on macOS Catalina (10.15.4). If these specific changes result in errors on other macOS versions, raise a new issue, provide a detailed description of the problem and I'll do my best to address them.

For all those reliant on R tcl-tk functionality and benefit from these changes, you can thank @yukio-takeuchi who deserves the credit. Thank you all for your help in improving the formula!