freebsd-ports/mail/ecartis/files/patch-Makefile
Dmitry Marakasov 916b6a8192 - Fix build from plain user; don'r set set[ug]id bits from install, set them via plist
PR:		203198
Submitted by:	amdmi3
Approved by:	jtrigg@ecartis.net (maintainer)
2015-10-01 17:31:33 +00:00

57 lines
1.7 KiB
Text

--- Makefile.orig 2015-09-18 17:22:35 UTC
+++ Makefile
@@ -6,8 +6,8 @@
# they should be set. All of them are conditional on options set in this
# file, so it should be relatively easy to determine which branch is correct
-BINDIR = ..
-MODDIR = ../modules
+BINDIR = ${DESTDIR}${PREFIX}/ecartis
+MODDIR = ${BINDIR}/modules
# First things first we need to set up some various options since OS's aren't
# as nice about things are they could be.
@@ -33,7 +33,7 @@ MODDIR = ../modules
# Uncomment this if you are on a BSD system AND you want dynamic modules
# SunOS (4 and 5 both) also needs this setting.
#
-#BSDMOD = 1
+BSDMOD = 1
# Uncomment this if you are compiling on OpenBSD with modules (BSDMOD = 1)
#OBSDMOD = 1
@@ -120,7 +120,6 @@ GNU_STRFTIME=-DGNU_STRFTIME
ifdef BSDIMOD
CC=shlicc
else
-CC=gcc
endif
# Warning-level flags. Under SunOS (4 and 5), this NEEDS TO BE BLANK.
@@ -129,9 +128,7 @@ endif
#
# It appears that IRIX is also rather stupid, and may require this
# to be removed.
-WFLAGS=-Wall -Werror
-# Uncomment this to build with gdb symbols (comment above line)
-#WFLAGS=-ggdb -Wall -Werror
+WFLAGS:=${CFLAGS}
# Now set up the initial command line. SUNOS_5 makes this a bit wierd.
ifndef SUNOS_5
@@ -301,7 +298,6 @@ targets: make_modules ecartis
ecartis: ${OBJS}
${CC} ${EXTRA_LFLAGS} ${LFLAGS} -o ecartis ${OBJS} ${EXTRA_LIBS} ${LIBS}
cp ecartis build/ecartis
- chmod ug+s build/ecartis
make_modules:
@for dir in ${MODULES}; \
@@ -321,7 +317,6 @@ make_modules:
install: targets
cp build/ecartis ${BINDIR}
- chmod ug+s ${BINDIR}/ecartis
ifdef DYNMOD
@for dir in ${MODULES}; do \
cp build/$${dir}.lpm ${MODDIR}/$${dir}.lpm; \