pkgsrc/mail/fdm/patches/patch-aa
marino 70eeb6c300 mail/fdm: Fix non-privileged build and MAXNAMLEN
- The patch was added to define the non-posix MAXNAMLEN macro if it was
  not already defined.
- The Makefile had to patched and then inline-replaced to fix the
  invocation of the install program.  Without this, non-root builds fail.
2012-08-23 18:04:12 +00:00

38 lines
1 KiB
Text

$NetBSD: patch-aa,v 1.2 2012/08/23 18:04:12 marino Exp $
cleanup cpp args dans adjust/fix Darwin build
--- Makefile.orig 2008-12-22 16:20:05.000000000 +0000
+++ Makefile
@@ -37,7 +37,7 @@ HDRS= fdm.h array.h fetch.h match.h deli
YACC= yacc -d
CC?= cc
-INCDIRS+= -I. -I- -I/usr/local/include
+INCDIRS+= -I.
.ifdef PROFILE
# Don't use ccache
CC= /usr/bin/gcc
@@ -70,7 +70,8 @@ LIBS+= -lpcre
.if ${OS} == "Darwin"
SRCS+= compat/strtonum.c
INCDIRS+= -Icompat -I/usr/local/include/openssl
-CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE
+CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE -DNO_QUEUE_H -DNO_TREE_H
+LIBS+= -lresolv
.endif
# NetBSD
@@ -93,9 +94,9 @@ CFLAGS+= -DNO_STRTONUM
.endif
PREFIX?= /usr/local
-INSTALLDIR= install -d
-INSTALLBIN= install -g bin -o root -m 555
-INSTALLMAN= install -g bin -o root -m 444
+INSTALLDIR= @INSTALL_PROGRAM_DIR@
+INSTALLBIN= @INSTALL_PROGRAM@
+INSTALLMAN= @INSTALL_MAN@
LDFLAGS+= -L/usr/local/lib
.ifdef PROFILE