Don't install directly to /usr/local
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).
Agree, that the next thing we should try to do.
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.
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?
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.
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.
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.
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.
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.