--- /usr/ports/print/fontforge/Makefile	Sun Oct 28 09:37:33 2007
+++ /kirby/shared/ports/fontforge/Makefile	Fri Dec 14 06:13:32 2007
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	fontforge
-PORTVERSION=	20071002
+PORTVERSION=	20071210
 CATEGORIES=	print
 MASTER_SITES=	SF
 DISTFILES=	${EXTRACT_ONLY} ${DOCFILES}
@@ -29,7 +29,9 @@
 .endif
 
 .if !defined(NOPORTDOCS)
-DOC_VERSION=	${PORTVERSION}
+#DOC_VERSION=	${PORTVERSION}
+# This version of Fontforge has a different version number for the docs as opposed to the actual source
+DOC_VERSION=	20071211
 DOCFILES=	${PORTNAME}_htdocs-${DOC_VERSION}.tar.bz2
 .endif
 
@@ -41,16 +43,19 @@
 PATCH_STRIP=	-l
 
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+
 .if !defined(FONTFORGE_NO_MULTILAYER)
 WITH_MULTILAYER=	--with-multilayer
 .endif
+
 .if !defined(WITHOUT_TTF_BYTECODE_ENABLED) && defined(FONTFORGE_WITH_TTF_DEBUGGER)
 WITH_FREETYPE_SRC=	--with-freetype-src=${WRKDIR}/freetype-${FREETYPE_VERSION}
 .else
 WITH_FREETYPE_SRC=	--without-freetype-src
 .endif
+
 CONFIGURE_ARGS=	${WITH_MULTILAYER} --with-devicetables ${WITH_FREETYPE_SRC}
-CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib" CFLAGS="${CFLAGS} \
+CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib -lutil" CFLAGS="${CFLAGS} \
 		-I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2" \
 		CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2"
 
@@ -67,6 +72,14 @@
 PLIST_SUB+=	NO_PLUGINS=""
 .endif
 
+.if defined(WITH_PYTHON)
+USE_PYTHON=	yes
+ONLY_FOR_ARCHS=	i386
+ONLY_FOR_ARCHS_REASON=	Python on non-i386 systems doesn't link with Fontforge (issues with use of Python's .a file)
+.else
+CONFIGURE_ARGS+=	--without-python
+.endif
+
 pre-everything::
 .if !defined(WITHOUT_TTF_BYTECODE_ENABLED) && !defined(FONTFORGE_WITH_TTF_DEBUGGER)
 	@${ECHO_MSG} "If you have built freetype2 port with bytecode interpreter enabled,"
@@ -84,6 +97,7 @@
 	@${ECHO_MSG} ""
 .endif
 
+.if !defined(NOPORTDOCS)
 post-extract:
 	${MKDIR} ${WRKDIR}/html ${WRKSRC}/cidmap
 	for doc in ${DOCFILES} ; \
@@ -91,6 +105,7 @@
 	done
 	${TAR} -xzC ${WRKSRC}/cidmap -f ${WRKDIR}/html/cidmaps.tgz
 	${RM} ${WRKDIR}/html/cidmaps.tgz
+.endif
 
 .if !defined(FONTFORGE_NO_PLUGINS)
 post-build:
