Menu

Broken on MacPorts

2017-10-08
2017-10-08
  • Phos Quartz

    Phos Quartz - 2017-10-08

    Hey guys, thank you for this project! It's great!

    I own a desktop with macOS 10.12, and have installed Sunwait through MacPorts. This was evidently outside your direct intention as the developers, because some of the code is wrapped in #ifdefs that neglect OSX, and it therefore doesn't execute.

    Because with most inputs this causes no crash, the MacPorts maintainers seem not to have noticed. (I will link them to this discussion too.) Instead all the outputs are nonsense.

    I got it to compile with only a slight change to the makefile in response to this, which no doubt the MacPorts folks did too. When I add the __APPLE__ preprocessor signal to the Linux code blocks, it appears to work fine.

    This seems like an easy fix, and OSX support would be quite nice, especially since it's already been packaged for it.

    Thanks again! God bless.

     

    Last edit: Phos Quartz 2017-10-08
  • Phos Quartz

    Phos Quartz - 2017-10-08

    Turns out MacPorts knew it was broken but didn't know why. I linked them to this discussion.

     
  • Phos Quartz

    Phos Quartz - 2017-10-08
    sunriset.cpp
    
    95c95
    <   if (abs(cost) < 1.0)
    ---
    >   if (fabs(cost) < 1.0)
    
    makefile
    
    12a13
    > OBJECTS_ONLY=sunwait.o sunriset.o print.o
    18c19
    <   $(C) $(OBJECTS) -o $@ $(LDFLAGS)
    ---
    >   $(C) $(OBJECTS_ONLY) -o $@ $(LDFLAGS)
    
    sunwait.cpp 
    
    37c37
    < #if defined __linux__
    ---
    > #if defined __linux__ || defined __APPLE__
    398c398
    <       #if defined __linux__
    ---
    >       #if defined __linux__ || defined __APPLE__
    418c418
    <       #if defined __linux__
    ---
    >       #if defined __linux__ || defined __APPLE__
    480c480
    <   #if defined __linux__
    ---
    >   #if defined __linux__ || defined __APPLE__
    1124c1124
    <   #if defined __linux__
    ---
    >   #if defined __linux__ || defined __APPLE__
    
     

    Last edit: Phos Quartz 2017-10-08

Log in to post a comment.