homebrew-kde icon indicating copy to clipboard operation
homebrew-kde copied to clipboard

Don't install directly to /usr/local

Open tlvince opened this issue 12 years ago • 8 comments

Currently, KDE libs are installed directly to /usr/local (https://github.com/adymo/homebrew-kde/issues/8#issuecomment-30715777).

homebrew discourages this (see brew doctor output).

tlvince avatar Dec 17 '13 14:12 tlvince

Agree, that the next thing we should try to do.

adymo avatar Dec 18 '13 17:12 adymo

I just found installed kde apps cannot be uninstalled because they are not installed to their Cellar prefixes, can we install all kde libraries and apps to a specific fomula's prefix like /usr/local/Cellar/kde_base ? Then if the user wants to uninstall all the kde stuff, just brew uninstall kde_base. now eveything is installed to /usr/local, it's difficult to pick those files from kde and delete them manually.

mxj4 avatar Dec 31 '13 16:12 mxj4

Besides a one-shot command to uninstall all KDE apps, are there any downsides from following homebrew conventions and installing them to their cellar prefixes?

tlvince avatar Dec 31 '13 17:12 tlvince

kbuildsycoca currently don't support many prefixes linked to a kde root dir. That's the only reason why all kde stuff removed from homebrew. If we can fix kbuildsycoca that's the best option.

mxj4 avatar Dec 31 '13 17:12 mxj4

Maybe I don't understand something, but why can't kde root dir be homebrew's prefix which contains proper symlinks and structure? Also KDEDIRS and KDESYCOCA env vars could be solution.

dant3 avatar Jan 10 '14 22:01 dant3

I just changed kdedir to /usr/local/kde4. I'm not sure why the KDEDIRS solution is not used in the past but I'll do some experiment about it.

mxj4 avatar Feb 18 '14 00:02 mxj4

My change caused some environment variable issue. After ~/.profile is set according to the readme, when can correctly open application through the terminal, but when we launch the app from finder directly, the environment variables are not correctly set. I found QA on stackoverflow that claims launchctl setenv DYLD_LIBRARY_PATH /usr/local/kde4/lib:$DYLD_LIBRARY_PATH works for apps launched by launchd, but at least on my 10.9.2 I found it no longer work.

mxj4 avatar Mar 02 '14 01:03 mxj4

launchd variables works for me like this:

dant3@Dant3-MacBook:~> cat /etc/launchd.conf 
setenv M2_HOME /Users/dant3/.homebrew/Cellar/maven/3.1.1/libexec
setenv ANDROID_HOME /Users/dant3/Tools/android-sdk

They are accessible from all apps launched with finder.

Note that this file is readed only launchd start, and I didn't found a way to restart launchd without restarting system, so you most likely have to reboot in order to changes take effect. Workaround is to load environment vars from kind of bootstrap launcher script.

Apple claims that future versions of launchd will also use ~/.launchd.conf for per-user settings but it's not the case atm.

dant3 avatar Mar 07 '14 07:03 dant3