nriley / brightness

Command-line display brightness control for macOS.
BSD 2-Clause "Simplified" License
605 stars 55 forks source link

Build fails on El Capitan #28

Closed chdiza closed 1 year ago

chdiza commented 4 years ago

I'm doing this via Homebrew, with my own custom formula that worked previously. (I.e., prior to the changes that got brightness working on newer versions of macOS.

clang  -mmacosx-version-min=10.8  brightness.c -c -o brightness.o
clang -mmacosx-version-min=10.8  \
        -framework IOKit \
        -framework ApplicationServices \
        -framework CoreDisplay \
        -F /System/Library/PrivateFrameworks \
        -framework DisplayServices \
        -Wl,-U,_CoreDisplay_Display_SetUserBrightness \
        -Wl,-U,_CoreDisplay_Display_GetUserBrightness \
        -Wl,-U,_DisplayServicesCanChangeBrightness \
        -Wl,-U,_DisplayServicesBrightnessChanged \
        brightness.o -o brightness
ld: framework not found CoreDisplay
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [brightness] Error 1
nriley commented 4 years ago

Not familiar with Homebrew except as a user and how it handles old macOS versions — can you package an older version of the source? Do you need me to tag a version as compatible?

chdiza commented 4 years ago

The formula worked fine before, with a tarball of the source just prior to eb182a4857. You don't need to tag anything. If it turns out that eb182a4857 just means that El Cap is now lost, that should go in the readme. But I'm not sure that El Cap needs to be lost.

The formula does nothing but this:

make
make prefix=whereveryouwant install