INDI and kstars
November 28, 2009
I've been gravitating towards KStars as an open-source & "pretty" planetarium program. It was originally written for the K Desktop Environment and (in general) for use on Linux systems. Although KStars can be installed through MacPorts (as a component of the "kdeedu4" port), this version has its INDI client capabilities disabled on non-Linux systems. I was able to re-enable INDI support by taking the following steps:

Hopefully INDI will be officially supported in OSX in later releases of kdeedu4/kstars, rendering this complicated process unnecessary!
- install the indi port (see prior post) before attempting to install the kdeedu4 port and be sure that the indi port is installed & working okay to your satisfaction
- type "sudo port -v install kdeedu4". Many dependencies may need to build before MacPorts attempts to build the kdeedu4 package. If this is the case, allow these other ports to build uninterrupted. When kdeedu4 begins to build, the first step will be to download and unzip the source code. Once this is complete, use "control-c" to halt the install (this is a very crude way to handle the problem, but it should work). At the command line, navigate to
/opt/local/var/macports/build(replace/opt/localwith your MacPorts root directory if it is installed in a non-standard location). You should be able to see some long folder-name that contains the kdeedu4 source code. Navigate inside this folder, then toworkand then inside a folder that will be called something likekdeedu-4.3.3(the version number will change as time goes by). Finally, navigate inside the folder markedkstars. Open the fileCMakeLists.txtas root with a command likesudo pico -w CMakeLists.txt. The offending code is:
# INDI is a Linux-specific addon
IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
macro_optional_find_package(INDI)
macro_bool_to_01(INDI_FOUND HAVE_INDI_H)
macro_log_feature(INDI_FOUND "libindi" "A framework for controlling astronomical devices such as telescopes, CCDs, filter wheels..etc." "http://indi.sf.net" FALSE "0.6" "Gives KStars support for controlling astronomical devices.")
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
Comment out the linesIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")andENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")by adding a#sign in front of them. Save the file, exit, and re-start the configuration process by typingsudo port -v install kdeedu4again. The kdeedu4 port should continue to configure, build and install without trouble.
- Once installed, you will need to create two soft links or kstars will not run properly. On my system, these links were the following (you may need to change the directories and/or file names to fit your installation):
/usr/share/indi -> /opt/local/share/indi
/usr/lib/libindi.0.dylib -> /opt/local/lib/libindi.0.6.dylib
The commands for these are something like:
sudo ln -s /opt/local/share/indi /usr/share/indi
sudo ln -s /opt/local/lib/libindi.0.6.dylib /usr/lib/libindi.0.dylib
Actually, the first link (to /opt/local/share/indi) is probably not really necessary -- one could alternately just point kstars toward the correct "share" location by making a change in thekstars|Preferences|INDImenu.
- Also, if you previously had KStars installed on your machine, you may need to delete your old configuration files (in
~/Library/Preferences/KDE/share/apps/kstars) for the changes to take effect. In the end, you should be able to see something like this:
Hopefully INDI will be officially supported in OSX in later releases of kdeedu4/kstars, rendering this complicated process unnecessary!



