ports/cad/abc/patches/patch-Makefile

43 lines
1,011 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -56,7 +56,7 @@ ARCHFLAGS := $(ARCHFLAGS)
OPTFLAGS ?= -g -O
-CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(ARCHFLAGS)
+CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare -Wno-unused-variable $(ARCHFLAGS)
ifneq ($(findstring arm,$(shell uname -m)),)
CFLAGS += -DABC_MEMALIGN=4
endif
@@ -77,6 +77,9 @@ endif
ABC_READLINE_INCLUDES ?=
ABC_READLINE_LIBRARIES ?= -lreadline
+ifeq ($(OS), OpenBSD)
+ ABC_READLINE_LIBRARIES += -lcurses
+endif
# whether to use libreadline
ifndef ABC_USE_NO_READLINE
@@ -137,12 +140,17 @@ endif
# LIBS := -ldl -lrt
LIBS += -lm
-ifneq ($(OS), FreeBSD)
+ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD))
LIBS += -ldl
endif
+LIBS += -lrt
+
ifneq ($(findstring Darwin, $(shell uname)), Darwin)
- LIBS += -lrt
+ LIBS := $(filter-out -lrt, $(LIBS))
+endif
+ifeq ($(OS), OpenBSD)
+ LIBS := $(filter-out -lrt, $(LIBS))
endif
ifdef ABC_USE_LIBSTDCXX