mirror of https://github.com/XEphem/XEphem.git
Get macOS compilation working on GitHub Actions
This commit is contained in:
parent
1312f91f9e
commit
a838395bcc
|
|
@ -18,3 +18,14 @@ jobs:
|
|||
run: grep 'sudo apt install' INSTALL | sed 's/\$//' | sh
|
||||
- name: Compile
|
||||
run: make -C GUI/xephem
|
||||
|
||||
compile-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install OpenSSL
|
||||
run: brew install openssl
|
||||
- name: Install XQuartz
|
||||
run: brew install xquartz --cask
|
||||
- name: Compile
|
||||
run: make -C GUI/xephem MOTIF=../../libXm/osx
|
||||
|
|
|
|||
|
|
@ -28,13 +28,25 @@ ifndef MOTIFL
|
|||
MOTIFL = /usr/lib
|
||||
endif
|
||||
|
||||
# for linux and Apple OS X
|
||||
# For Linux and Apple OS X
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
PLATI :=
|
||||
PLATL :=
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
PLATI := -I/opt/X11/include -I/usr/local/opt/openssl@3/include
|
||||
PLATL := -L/opt/X11/lib -L/usr/local/opt/openssl@3/lib
|
||||
LASTLIB := xprint_fake.o
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
CLDFLAGS = -g
|
||||
CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include
|
||||
LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib
|
||||
CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) $(PLATI)
|
||||
LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) $(PLATL)
|
||||
XLIBS = -lXm -lXt -lXext -lXmu -lX11
|
||||
LIBS = $(XLIBS) $(LIBLIB) -lm -lssl
|
||||
LIBS = $(XLIBS) $(LIBLIB) -lm -lssl $(LASTLIB)
|
||||
|
||||
# static linking on Apple using X11 libs from ports
|
||||
# CC = gcc
|
||||
|
|
@ -183,7 +195,8 @@ OBJS = \
|
|||
xe2.o \
|
||||
xe3.o \
|
||||
xephem.o \
|
||||
xmisc.o
|
||||
xmisc.o \
|
||||
xprint_fake.o
|
||||
|
||||
all: libs xephem xephem.1
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
void *_XpEndJob = 0;
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Shell.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/Print.h>
|
||||
/* #include <X11/extensions/Print.h> */
|
||||
#include <Xm/XmStrDefs.h>
|
||||
#include <Xm/XmStrDefs22.h>
|
||||
#include <Xm/XmStrDefs23.h>
|
||||
|
|
@ -847,7 +847,7 @@ typedef struct
|
|||
{
|
||||
int reason; /* XmCR_START_JOB, XmCR_END_JOB, XmCR_PAGE_SETUP */
|
||||
XEvent *event;
|
||||
XPContext context;
|
||||
/* XPContext context; */
|
||||
Boolean last_page; /* in_out */
|
||||
XtPointer detail;
|
||||
} XmPrintShellCallbackStruct;
|
||||
|
|
|
|||
Loading…
Reference in New Issue