SrainApp / srain

Modern IRC client written in GTK
https://srain.silverrainz.me/
Other
306 stars 34 forks source link

Fixing issue with newer macOS build #418

Closed step21 closed 3 months ago

step21 commented 3 months ago

After fixing my issues with x86_64/arm64, I ran into some other issues. I noticed that some pkg-config paths in https://github.com/SrainApp/srain/blob/master/script/macos-pkgconfig-path.sh are hardcoded. For one, these did not reflect the move to libsoup-3.0, but also they are hardcoded, so depending on which method people use to install additional libraries, they will differ. On older systems which have packages installed with homebrew, macports (not sure) or manually, the locations under /usr/local might be accurate. But afaik due to changes in the OS security architecture, most modern install will have the libraries under /opt such as


  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/opt/homebrew/Cellar/libsoup/3.4.4/lib/pkgconfig"
  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"/opt/homebrew/Cellar/openssl@3/3.3.1/lib/pkgconfig"```

Of course, ideally this script would determine the correct locations, or some other part of the build process would. I would be happy to do a PR, but not sure what to do, as just updating the hard coding is probably not helpful. However, I am also not sure how to manually write a script that covers all cases, so maybe an addition to the Readme to update these locations for macOS might be best?
step21 commented 3 months ago

Forgot that there are already instructions for this :)