freebsd-ports/net/olsrd/files/patch-make-Makefile.fbsd
Bernhard Froehlich 80701d3484 net/olsrd:
- Update to 0.9.8
- Switch to fetch from GitHub because they don't provide tarballs anymore
- Fix portlint warnings
- Fix some GNUisms (cp -t)
- Fix compile error when RTF_CLONING is not defined

PR:		240563
Submitted by:	myself
Approved by:	Nikola Kolev <koue@chaosophia.net> (maintainer)
MFH:		2019Q4
2019-10-01 14:43:18 +00:00

71 lines
1.8 KiB
Text

--- make/Makefile.fbsd.orig 2019-08-11 08:09:47 UTC
+++ make/Makefile.fbsd
@@ -47,44 +47,47 @@
LDCONFIG ?= /sbin/ldconfig
-PREFIX ?= /usr/local
-SBINDIR = $(PREFIX)/sbin
-ETCDIR = $(PREFIX)/etc/olsrd
-LIBDIR = $(PREFIX)/lib
-DOCDIR = $(PREFIX)/share/doc
-MANDIR = $(PREFIX)/man
+DESTDIR ?=
+prefix ?= /usr/local
+etcdir ?= $(prefix)/etc/olsrd
+libdir ?= $(prefix)/lib
+datarootdir ?= $(prefix)/share
+mandir ?= $(prefix)/man
+sbindir ?= $(prefix)/sbin
-SRCS += $(sort $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c))
-HDRS += $(sort $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h))
+# the rest are defined in Makefile.inc, but we don't need to override defaults
+ETCDIR = $(DESTDIR)$(etcdir)
+LIBDIR = $(DESTDIR)$(libdir)
+MANDIR = $(DESTDIR)$(mandir)
+SBINDIR = $(DESTDIR)$(sbindir)
+SHAREDIR = $(DESTDIR)$(datarootdir)
-LIBS =
+SRCS += $(wildcard src/bsd/*.c src/unix/*.c)
+HDRS += $(wildcard src/bsd/*.h src/unix/*.h)
CPPFLAGS += -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
+LIBS +=
ifdef NO_80211
CPPFLAGS += -DFBSD_NO_80211=1
endif
ifdef LIBNET
-
-CPPFLAGS += -DSPOOF -I$(PREFIX)/include
-LIBS += -L$(PREFIX)/lib -lnet
-
+CPPFLAGS += -I$(prefix)/include -DSPOOF
+LIBS += -L$(prefix)/lib -lnet
endif
+PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so
+PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
+INSTALL_LIB = install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME)
+UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME)
+
ifdef OLSRD_PLUGIN
CFLAGS += -fPIC
LDFLAGS += -fPIC
endif
-PLUGIN_SONAME ?= $(PLUGIN_NAME)
-PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
-INSTALL_LIB = install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
- $(LDCONFIG)
-UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
- $(LDCONFIG)
-
-OS_LIB_PTHREAD = -pthread
+OS_LIB_PTHREAD = -lpthread
OS_CFLAG_PTHREAD = -pthread
OS_LIB_DYNLOAD =