$NetBSD: patch-ae,v 1.11 2012/08/27 00:35:08 dholland Exp $

- configure for pkgsrc
- use tcl/tk 8.5 instead of 8.4

--- Makefile.bsd.orig	2005-03-29 16:49:22.000000000 +0000
+++ Makefile.bsd
@@ -32,7 +32,7 @@
 X11BASE         ?= /usr/X11R6
 LOCALBASE       ?= /usr/local
 PREFIX          ?= $(X11BASE)
-
+BUILD_DIR	= build-netbsd
 prefix          = $(PREFIX)
 TK_LIBRARY_BASE = $(LOCALBASE)/lib
 ifeq ($(OS), FreeBSD)
@@ -46,10 +46,10 @@ WANT_USER_DBDIR = 1
 # other settings
 # On FreeBSD there is only a modified tclsh with a message to launch
 # tclsh8.3 or tclsh8.4 , so this is hardcoded here
-TCL_VER         = 8.4
+TCL_VER         = 8.5
 LDLIBS          = -L$(LOCALBASE)/lib\
                   -L$(X11BASE)/lib\
-                  -ltk84 -ltcl84 -lX11 -lXmu -lm
+                  -ltk85 -ltcl85 -lX11 -lXmu -lm
 
 INCS            += -I$(LOCALBASE)/include/tcl$(TCL_VER)\
                    -I$(LOCALBASE)/include/tk$(TCL_VER)
@@ -64,7 +64,7 @@ endif
 ### Common part for all UN*X variants  ###
 
 # Tools
-PERL            ?= /usr/bin/perl
+PERL            ?= ${LOCALBASE}/bin/perl
 CC              ?= gcc
 ECHO            ?= @echo
 
@@ -125,7 +125,7 @@ WARN    = -Wall -Wnested-externs -Wstric
 #WARN  += -Wpointer-arith -Werror
 # the following flags can be overridden by an environment variable with the same name
 CFLAGS ?= $(OPTFLAGS)
-CFLAGS += $(WARN) $(INCS) $(DEFS)
+CFLAGS += $(WARN) $(INCS) $(DEFS) -I$(BUILD_DIR)
 #LDLIBS += -pg
 
 
