diff -ruN postgresql-libpqxx.orig/Makefile postgresql-libpqxx/Makefile
--- postgresql-libpqxx.orig/Makefile	2014-01-08 19:05:55.452226985 +0100
+++ postgresql-libpqxx/Makefile	2014-01-08 19:06:20.700644985 +0100
@@ -2,7 +2,7 @@
 # $FreeBSD: databases/postgresql-libpqxx/Makefile 334085 2013-11-17 14:45:22Z crees $
 
 PORTNAME=	libpqxx
-PORTVERSION=	4.0
+PORTVERSION=	4.0.1
 CATEGORIES=	databases
 MASTER_SITES=	http://pqxx.org/download/software/libpqxx/
 PKGNAMEPREFIX=	postgresql-
@@ -11,24 +11,27 @@
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	New C++ interface for PostgreSQL
 
+LICENSE=	BSD
+
+BUILD_DEPENDS=	python:${PORTSDIR}/lang/python
+
 CONFLICTS=	postgresql-libpqxx-3.* postgresql-libpqxx3-3.*
 PORTSCOUT=	limit:^2\.
 
 USE_PGSQL=	yes
-USES=		gmake
+USES=		gmake shebangfix
 GNU_CONFIGURE=	yes
-USE_LDCONFIG=	yes
+USE_LDCONFIG=	${STAGEDIR}${PREFIX}/lib
 SOVERSION=	4
-PLIST_SUB=	PORTVERSION=${PORTVERSION} \
-		SOVERSION=${SOVERSION}
+PLIST_SUB=	SOVERSION=${SOVERSION}
+SHEBANG_FILES=	${WRKSRC}/tools/splitconfig
 
 CONFIGURE_ARGS=	--enable-shared \
 		--disable-dependency-tracking
 
-NO_STAGE=	yes
 post-install:
 #	This is needed for ldconfig
-	${LN} -s ${PREFIX}/lib/libpqxx-${PORTVERSION}.so \
-		${PREFIX}/lib/libpqxx.so.${SOVERSION}
+	${LN} -s ${STAGEDIR}${PREFIX}/lib/libpqxx-${PORTVERSION}.so \
+		${STAGEDIR}${PREFIX}/lib/libpqxx.so.${SOVERSION}
 
 .include <bsd.port.mk>
diff -ruN postgresql-libpqxx.orig/distinfo postgresql-libpqxx/distinfo
--- postgresql-libpqxx.orig/distinfo	2014-01-08 19:05:55.452226985 +0100
+++ postgresql-libpqxx/distinfo	2014-01-08 19:06:20.700644985 +0100
@@ -1,2 +1,2 @@
-SHA256 (postgresql/libpqxx-4.0.tar.gz) = b160043289cfbf2a186d3b12f9976b6914e76d918d3d4469ff408bd199bbb8ed
-SIZE (postgresql/libpqxx-4.0.tar.gz) = 2631181
+SHA256 (postgresql/libpqxx-4.0.1.tar.gz) = 097ceda2797761ce517faa5bee186c883df1c407cb2aada613a16773afeedc38
+SIZE (postgresql/libpqxx-4.0.1.tar.gz) = 1582532
diff -ruN postgresql-libpqxx.orig/pkg-plist postgresql-libpqxx/pkg-plist
--- postgresql-libpqxx.orig/pkg-plist	2014-01-08 19:05:55.452226985 +0100
+++ postgresql-libpqxx/pkg-plist	2014-01-08 19:06:20.700644985 +0100
@@ -91,7 +91,7 @@
 include/pqxx/util.hxx
 include/pqxx/version
 include/pqxx/version.hxx
-lib/libpqxx-%%PORTVERSION%%.so
+lib/libpqxx-4.0.so
 lib/libpqxx.a
 lib/libpqxx.la
 lib/libpqxx.so