cartr / homebrew-qt4

Homebrew tap for Qt4 and dependent formulae on Sierra
BSD 2-Clause "Simplified" License
105 stars 42 forks source link

Phonon support >= MacOS 10.12 Sierra #42

Open YKdvd opened 6 years ago

YKdvd commented 6 years ago

Since support for including the Qt4 Phonon classes has been turned off when compiling on Xcode >= 8, perhaps the README.md could mention this?

As I understand it, Phonon is unsupported only because the required QTKit.framework is not available in the base SDK that comes with Xcode 8 and higher? MacOS Sierra itself DOES still have that framework (in , and would run any resulting Phonon stuff that relied on it, if only it could get compiled? Would it be possible to do something like this and install the old MacOS 10.11 SDK, then brew Qt4 up somehow with "-phonon" to override the "-no-phonon" and somehow pointing the compile to use the 10.11 SDK instead of the its default (current) one? I think that is the "--sysroot" option, but I'm not sure if ?

This is all theoretical for me - I'm looking at an old PyQt4 video player project that uses the Phonon classes, and it would be nice to be able to play with it on a Sierra Mac, instead of my limited access to a Windows box. Would this fail for some obvious reason?

cartr commented 6 years ago

You're correct that the reason we disable Phonon is because QTKit was removed from the SDK shipped with Xcode 8. I'm not really sure how well your idea to fix that would work; I've never tried to make Homebrew compile using an older version of the SDK.

You might also consider installing Phonon separately from source.

Please let me know if you get it working. It'd be great to have Phonon support in this repo!

YKdvd commented 6 years ago

I forked this tap, uncommented the "-no-phonon" line, installed the 10.11SDK and then tried this:

SDKROOT=/path/to/SDK10.11
export SDKDUMMY
export SDKROOT
brew reinstall qt@4 --build-from-source --debug --verbose

This eventually threw an error (presumably the expected one because phonon wouldn't compile, although that wasn't obvious). From the debug console, I saw that while my made-up SDKDUMMY environment variable had survived, SDKROOT was not present. I'm assuming that the make system is setting it to a default blank value. Is there any way to somehow specify something on the brew invocation that will pass through to set an environment variable during the make? Or something that can be added to the formula to convince the configure/make to include -isysroot /path/to/SDK10.11 on clang invocations, which I think will do the same thing. I don't really know homebrew or the modern Mac compilation tools and don't know if I'll have the time to dig in deep enough for awhile. If anyone can try this out, or can provide me a head start on where to tap in to get either the environment variable or the clang parameter working, that would be great.

YKdvd commented 5 years ago

I may try to another crack at this - I can't seem to find any other reliable way to get PyQt4 for Python 2.7 on current MacOS?. I've posted a request in the homebrew discussion forum asking for any build gurus to weigh in on compiling with an older SDK. https://discourse.brew.sh/t/compiling-with-older-macos-sdk/3034

Assuming I can get qt@4 to compile, would I have to change things like "depends_on "cartr/qt4/qt@4" in pyqt@4 to point to my fork as well?

cartr commented 5 years ago

Yes, you'll want to change "cartr/qt/qt@4" dependencies to point to your fork. (Although depending on how complicated your solution ends up being, I'd be open to merging it in so you wouldn't have to maintain a fork.)

On Fri, Sep 21, 2018, 7:40 PM YKdvd notifications@github.com wrote:

I may try to another crack at this - I can't seem to find any other reliable way to get PyQt4 for Python 2.7 on current MacOS?. I've posted a request in the homebrew discussion forum asking for any build gurus to weigh in on compiling with an older SDK. https://discourse.brew.sh/t/compiling-with-older-macos-sdk/3034

Assuming I can get qt@4 to compile, would I have to change things like "depends_on "cartr/qt4/qt@4" in pyqt@4 to point to my fork as well?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/cartr/homebrew-qt4/issues/42#issuecomment-423711039, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_71dEGhuz-K7xTE2ZwQltgVFKL9UC1ks5udaMMgaJpZM4QqfSn .