===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/cad/leocad/Makefile ./Makefile
--- /usr/ports/cad/leocad/Makefile	2013-01-24 11:58:01.000000000 +0100
+++ ./Makefile	2013-01-31 22:16:45.000000000 +0100
@@ -2,23 +2,25 @@
 # $FreeBSD: head/cad/leocad/Makefile 310871 2013-01-23 15:00:18Z makc $
 
 PORTNAME=	leocad
-PORTVERSION=	0.79.0
-PORTREVISION=	1
+PORTVERSION=	0.79.2
 CATEGORIES=	cad
-MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
-DISTFILES=	${LEOCAD_DISTNAME} ${LEOCAD_PIECES}
-EXTRACT_ONLY=	${LEOCAD_DISTNAME}
+MASTER_SITES=	GOOGLE_CODE
+DISTFILES=	${PORTNAME}-${PORTVERSION}-src.tgz \
+		${LEOCAD_PIECES}
+DIST_SUBDIR=	${PORTNAME}
+EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}-src.tgz
 
-MAINTAINER=	ports@FreeBSD.org
-COMMENT=	CAD modeling with LEGO-like bricks
+MAINTAINER=	nemysis@gmx.ch
+COMMENT=	CAD program that uses bricks similar to those found in many toys
+
+LICENSE=	GPLv2
 
 EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
 LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg \
 		png15:${PORTSDIR}/graphics/png
 
-LEOCAD_DISTNAME=leocad-${PORTVERSION}-src.tgz
-LEOCAD_PIECES=	pieces-5823b.zip
 WRKSRC=		${WRKDIR}/${PORTNAME}
+LEOCAD_PIECES=	pieces-7114.zip
 
 USE_GL=		glut
 USE_XORG=	x11
@@ -26,25 +28,41 @@
 USE_GNOME=	gtk20
 MAKE_JOBS_UNSAFE=	yes
 
-DESKTOP_ENTRIES="Leocad" "${COMMENT}" "" "${PORTNAME}" "" "true"
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	CREDITS.txt README.txt
+
+DOCSRCDIR2=	${WRKSRC}/docs
+DOCSDIR2=	${DOCSDIR}/docs
+DOC_FILES2=	LINUX.txt TODO.txt
+
+INSTALLS_ICONS=	yes
+ICON_SIZES=	16x16 24x24 32x32 48x48 128x128 256x256
+
+DESKTOP_ENTRIES="LeoCAD" "${COMMENT}" "${PORTNAME}" \
+		"${PORTNAME}" "Development;Electronics;Engineering;" false
 
-PLIST_FILES=	bin/leocad \
-		${DATADIR_REL}/pieces.bin \
-		${DATADIR_REL}/pieces.idx
-PLIST_DIRS=	${DATADIR_REL}
 MAN1=		leocad.1
 
+.include <bsd.port.options.mk>
+
 post-extract:
-	@${UNZIP_CMD} -q -o ${DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
+	@${UNZIP_CMD} -q -o ${_DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
 
 post-patch:
-	@${REINPLACE_CMD} -e \
-		's|%%LOCALBASE%%|${LOCALBASE}|g; \
-		s|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|; \
-		s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
+	@${REINPLACE_CMD} \
+		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		-e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|' \
+		-e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
 		${WRKSRC}/config.mk
 	@${REINPLACE_CMD} 's|share/man|man|g' \
 		${WRKSRC}/Makefile
+.for s in 16 24 32 48 128 256
+	@cd ${WRKSRC}/tools/icon && \
+		${MV} icon${s}.png ${PORTNAME}_${s}x${s}.png
+.endfor
+	@cd ${WRKSRC}/tools/icon && ${CP} -a ${PORTNAME}_128x128.png icon128.png
 
 do-configure:
 	cd ${WRKSRC} && ${GMAKE} config
@@ -53,6 +71,20 @@
 	${MKDIR} ${DATADIR}
 	${INSTALL_DATA} ${WRKDIR}/pieces/* ${DATADIR}
 
+.for s in ${ICON_SIZES}
+	${MKDIR} ${PREFIX}/share/icons/hicolor/${s}/apps
+	${INSTALL_DATA} ${WRKSRC}/tools/icon/${PORTNAME}_${s}.png \
+		${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
+.endfor
+	@${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps
+
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+	${MKDIR} ${DOCSDIR2}
+	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "sparc64"
diff -ruN --exclude=CVS /usr/ports/cad/leocad/distinfo ./distinfo
--- /usr/ports/cad/leocad/distinfo	2013-01-14 17:53:35.000000000 +0100
+++ ./distinfo	2013-01-31 12:49:15.000000000 +0100
@@ -1,4 +1,4 @@
-SHA256 (leocad-0.79.0-src.tgz) = 85f34dd560dec590ac5b0a5a7983359758fa58a729dbe3208a89c61f12440f24
-SIZE (leocad-0.79.0-src.tgz) = 624961
-SHA256 (pieces-5823b.zip) = 4c833bd1d89730757d8b391e20ba20ab133cd242b6717e89cee8fdf1c26f9a23
-SIZE (pieces-5823b.zip) = 44541797
+SHA256 (leocad/leocad-0.79.2-src.tgz) = d2b0a515ce8302cd9234450773a339e330718463edf52d721e20edf6ccfa74e3
+SIZE (leocad/leocad-0.79.2-src.tgz) = 2115720
+SHA256 (leocad/pieces-7114.zip) = 16506da21d139769524d140ce47bfce57bc5415f541fbd6f66a67025c1f535ab
+SIZE (leocad/pieces-7114.zip) = 20546651
diff -ruN --exclude=CVS /usr/ports/cad/leocad/files/patch-config.mk ./files/patch-config.mk
--- /usr/ports/cad/leocad/files/patch-config.mk	2013-01-14 17:53:35.000000000 +0100
+++ ./files/patch-config.mk	2013-01-02 18:49:24.000000000 +0100
@@ -1,6 +1,6 @@
---- config.mk.orig	2012-12-14 12:16:05.000000000 -0500
-+++ config.mk	2012-12-14 12:16:51.000000000 -0500
-@@ -6,12 +6,13 @@ ERROR_SETTING=2> /dev/null
+--- config.mk.orig	2013-01-02 08:56:54.000000000 +0100
++++ config.mk	2013-01-02 18:38:58.000000000 +0100
+@@ -6,17 +6,17 @@
  
  default: all
  
@@ -12,8 +12,13 @@
  
  # (Add a -g for debugging)
 -CPPFLAGS += -O2 -Wall
-+CPPFLAGS += -Wall -I%%LOCALBASE%%/include %%PTHREAD_CFLAGS%%
-+LDFLAGS	+= %%PTHREAD_LIBS%%
  
  ### FreeBSD configuration
  
+ ifeq ($(shell uname), FreeBSD)
+-CPPFLAGS += -L/usr/local/lib
++CPPFLAGS += -Wall -I%%LOCALBASE%%/include %%PTHREAD_CFLAGS%%
++LDFLAGS += -L%%LOCALBASE%%/lib %%PTHREAD_LIBS%%
+ endif
+ 
+ ### Default directory
diff -ruN --exclude=CVS /usr/ports/cad/leocad/pkg-descr ./pkg-descr
--- /usr/ports/cad/leocad/pkg-descr	2013-01-14 17:53:35.000000000 +0100
+++ ./pkg-descr	2013-01-02 19:00:02.000000000 +0100
@@ -1,6 +1,5 @@
-LeoCAD is a CAD program that uses bricks similar to those found in
-many toys (but they don't represent any particular brand). Currently
-it has a library of more than 1000 different pieces, most of them
-were created by James Jessiman (the author of LDraw).
+LeoCAD is a CAD program that can be used to create virtual LEGO models.
+It has an easy to use interface and currently features over 4000 different
+pieces created by the LDraw community.
 
 WWW: http://www.leocad.org
diff -ruN --exclude=CVS /usr/ports/cad/leocad/pkg-plist ./pkg-plist
--- /usr/ports/cad/leocad/pkg-plist	1970-01-01 01:00:00.000000000 +0100
+++ ./pkg-plist	2013-01-31 12:59:39.000000000 +0100
@@ -0,0 +1,35 @@
+bin/leocad
+share/icons/hicolor/128x128/apps/leocad.png
+share/icons/hicolor/16x16/apps/leocad.png
+share/icons/hicolor/24x24/apps/leocad.png
+share/icons/hicolor/256x256/apps/leocad.png
+share/icons/hicolor/32x32/apps/leocad.png
+share/icons/hicolor/48x48/apps/leocad.png
+share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg
+%%DATADIR%%/icon.png
+%%DATADIR%%/library.bin
+share/mime/XMLnamespaces
+share/mime/application/vnd.leocad.xml
+share/mime/packages/leocad-mime.xml
+share/pixmaps/leocad.png
+share/pixmaps/leocad.svg
+@dirrmtry share/mime/packages
+@dirrmtry share/mime/application
+@dirrmtry share/mime
+@dirrm %%DATADIR%%
+@dirrmtry share/icons/hicolor/scalable/mimetypes
+@dirrmtry share/icons/hicolor/scalable
+@dirrmtry share/icons/hicolor/48x48/apps
+@dirrmtry share/icons/hicolor/48x48
+@dirrmtry share/icons/hicolor/32x32/apps
+@dirrmtry share/icons/hicolor/32x32
+@dirrmtry share/icons/hicolor/256x256/apps
+@dirrmtry share/icons/hicolor/256x256
+@dirrmtry share/icons/hicolor/24x24/apps
+@dirrmtry share/icons/hicolor/24x24
+@dirrmtry share/icons/hicolor/16x16/apps
+@dirrmtry share/icons/hicolor/16x16
+@dirrmtry share/icons/hicolor/128x128/apps
+@dirrmtry share/icons/hicolor/128x128
+@dirrmtry share/icons/hicolor
+@dirrmtry share/icons
===> Done