Index: Makefile
===================================================================
--- Makefile	(revision 341830)
+++ Makefile	(working copy)
@@ -20,15 +20,15 @@
 USE_SQLITE=	3
 USE_LDCONFIG=	${PREFIX}/lib/ircd-ratbox
 
+#MAKE_JOBS_UNSAFE=	yes
+
 USERS=		ircd
 GROUPS=		${USERS}
 
-LOGDIR?=	/var/log/${PORTNAME}
-RUNDIR?=	/var/run/${PORTNAME}
-DBDIR?=		/var/db/${PORTNAME}
 SUB_FILES=	pkg-message pkg-install
-PLIST_SUB=	LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR}
-SUB_LIST=	LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR}
+SUB_LIST=	LOGDIR=/var/log/${PORTNAME} \
+		RUNDIR=/var/run/${PORTNAME} \
+		DBDIR=/var/db/${PORTNAME}
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-confdir=${PREFIX}/etc/${PORTNAME}		\
@@ -39,6 +39,7 @@
 		--libdir=${PREFIX}/lib/${PORTNAME}			\
 		--with-sqlite3=${LOCALBASE}				\
 		--disable-backups
+STRIP=
 
 PORTDOCS=	[^i]*.txt README.* technical/[^i]*.txt Tao-of-IRC.*
 
@@ -60,7 +61,6 @@
 
 #----------------------------------------------------------------------
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MOPENSSL}
@@ -71,15 +71,21 @@
 .endif
 
 .if ${PORT_OPTIONS:MIPV6}
+CONFIGURE_ARGS+=	--enable-ipv6
+.else
 CONFIGURE_ARGS+=	--disable-ipv6
 .endif
 
 .if ${PORT_OPTIONS:MZIPLINKS}
+CONFIGURE_ARGS+=	--enable-zlib
+.else
 CONFIGURE_ARGS+=	--disable-zlib
 .endif
 
 .if ${PORT_OPTIONS:MSHARED_MODS}
-CONFIGURE_ARGS+=	--disable-shared-modules
+CONFIGURE_ARGS+=	--disable-static
+.else
+CONFIGURE_ARGS+=	--enable-static
 .endif
 
 .if ${PORT_OPTIONS:MASSERT}
@@ -194,7 +200,7 @@
 .endif
 
 post-build:
-	@cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE} \
+	cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE} \
 		${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
 
 # ----- Need to build the m_rsshortcut.so module for ircd-shortcut.pl ----
@@ -205,21 +211,21 @@
 .endif
 
 pre-su-install:
-	${MKDIR} ${PREFIX}/etc/${PORTNAME}
-	${MKDIR} ${DATADIR}/help
-	${MKDIR} ${PREFIX}/lib/${PORTNAME}/modules
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
+	${MKDIR} ${STAGEDIR}${DATADIR}/help
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 .endif
 	@cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE} \
 		${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install
-	${INSTALL_DATA} ${WRKSRC}/doc/ircd.motd ${PREFIX}/etc/${PORTNAME}/ircd.motd.sample
-	${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
-	${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
-	${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${PREFIX}/etc/${PORTNAME}/genssl.sh
+	${INSTALL_DATA} ${WRKSRC}/doc/ircd.motd ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.motd.sample
+	${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/genssl.sh
 
 # ----- We need to install the shortcut.pl module ----
 .if ${PORT_OPTIONS:MSHORTCUTS}
@@ -228,19 +234,20 @@
 		${PREFIX}/lib/${PORTNAME}/modules/contrib
 .endif
 
-	@if [ ! -f ${PREFIX}/etc/${PORTNAME}/ircd.conf ]; then \
+	@if [ ! -f ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf ]; then \
 		${ECHO} "Installing default configuration file."; \
-		${CP} -p ${PREFIX}/etc/${PORTNAME}/ircd.conf.sample ${PREFIX}/etc/${PORTNAME}/ircd.conf ; \
+		${CP} -p ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf ; \
 	fi
 
-	@if [ ! -f ${PREFIX}/etc/${PORTNAME}/ircd.motd ]; then \
+	@if [ ! -f ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.motd ]; then \
 		${ECHO} "Installing default motd file."; \
-		${CP} -p ${PREFIX}/etc/${PORTNAME}/ircd.motd.sample ${PREFIX}/etc/${PORTNAME}/ircd.motd ; \
+		${CP} -p ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.motd.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.motd ; \
 	fi
 
+.if empty(STAGEDIR)
 	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
-
+.endif
 #-----------------------------------------------------------------------
 
 .include <bsd.port.mk>
Index: files/patch-Makefile.in
===================================================================
--- files/patch-Makefile.in	(revision 0)
+++ files/patch-Makefile.in	(working copy)
@@ -0,0 +1,43 @@
+--- Makefile.in	2012-03-11 01:12:06.000000000 +0100
++++ Makefile.in	2014-02-17 16:06:51.000000000 +0100
+@@ -597,7 +597,7 @@
+ 	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ 	case $$dist_files in \
+ 	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
++			   sed '/\//!d;s|^|$(DESTDIR)$(distdir)/|;s,/[^/]*$$,,' | \
+ 			   sort -u` ;; \
+ 	esac; \
+ 	for file in $$dist_files; do \
+@@ -609,8 +609,8 @@
+ 	    fi; \
+ 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ 	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+-	    fi; \
++	      find "$(distdir)/$$file" -type d ! 
++	    
+ 	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ 	  else \
+ 	    test -f "$(distdir)/$$file" \
+@@ -620,8 +620,8 @@
+ 	done
+ 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ 	  if test "$$subdir" = .; then :; else \
+-	    test -d "$(distdir)/$$subdir" \
+-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
++	    test -d "$(DESTDIR)$(distdir)/$$subdir" \
++	    || $(MKDIR_P) "$(DESTDIR)$(distdir)/$$subdir" \
+ 	    || exit 1; \
+ 	  fi; \
+ 	done
+@@ -917,7 +917,8 @@
+ 	cd contrib && $(MAKE) install
+ 
+ install_data-local:
+-	-@if test ! -d @logdir@; then mkdir @logdir@;fi
++	echo "ROS=============================================================>"
++	if test ! -d $(DESTDIR)@logdir@; then mkdir -p $(DESTDIR)@logdir@;fi
+ 
+ contrib: build_contrib
+ 

Property changes on: files/patch-Makefile.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: files/patch-contrib_Makefile.in
===================================================================
--- files/patch-contrib_Makefile.in	(revision 0)
+++ files/patch-contrib_Makefile.in	(working copy)
@@ -0,0 +1,13 @@
+--- contrib/Makefile.in.orig	2012-03-11 01:12:06.000000000 +0100
++++ contrib/Makefile.in	2014-02-17 11:27:01.000000000 +0100
+@@ -429,8 +429,8 @@
+ 	$(LIBTOOL) --mode=clean $(RB_RM) -f $(S_OBJS) $(S_CORE_OBJS)  $(ST_OBJS)
+ 
+ install_modules: $(S_OBJS)
+-	-@@$(MKDIR_P) $(contribdir); \
+-	for x in $(S_OBJS); do $(SHELL) ../install-mod.sh $$x $(contribdir);done
++	-@@$(MKDIR_P) $(DESTDIR)$(contribdir); \
++	for x in $(S_OBJS); do $(SHELL) ../install-mod.sh $$x $(DESTDIR)$(contribdir);done
+ 
+ #install-mkdirs:
+ #	@echo "ircd: setting up modular directory structure"

Property changes on: files/patch-contrib_Makefile.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 341830)
+++ pkg-plist	(working copy)
@@ -242,12 +242,9 @@
 etc/ircd-ratbox/ircd-efnet.conf.sample
 @unexec if cmp -s "%D/etc/ircd-ratbox/ircd.conf.sample" "%D/etc/ircd-ratbox/ircd.conf"; then rm -f "%D/etc/ircd-ratbox/ircd.conf"; fi
 etc/ircd-ratbox/ircd.conf.sample
-@exec if [ ! -f "%D/etc/ircd-ratbox/ircd.conf" ] ; then cp -p "%D/%F" "%B/ircd.conf"; fi
 @unexec if cmp -s "%D/etc/ircd-ratbox/ircd.motd.sample" "%D/etc/ircd-ratbox/ircd.motd"; then rm -f "%D/etc/ircd-ratbox/ircd.motd"; fi
 etc/ircd-ratbox/ircd.motd.sample
 @exec if [ ! -f "%D/etc/ircd-ratbox/ircd.motd" ] ; then cp -p "%D/%F" "%B/ircd.motd"; fi
 @dirrmtry etc/ircd-ratbox
+@dirrmtry /var/log/ircd-ratbox
 @cwd /
-@dirrmtry %%LOGDIR%%
-@dirrmtry %%RUNDIR%%
-@dirrmtry %%DBDIR%%
Service unavailableService unavailableService unavailable