aboutsummaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2013-07-27 02:21:02 +0800
committerdeischen <deischen@FreeBSD.org>2013-07-27 02:21:02 +0800
commita2869ae7fa2a98dddb24ebda753a94e779ca8ce0 (patch)
treea1e245567096a53b5beb8c6249758407a141626a /cad
parent2a5d7e7ea3edd58ea9bf1356cfc17dd80c1e2ed9 (diff)
downloadfreebsd-ports-gnome-a2869ae7fa2a98dddb24ebda753a94e779ca8ce0.tar.gz
freebsd-ports-gnome-a2869ae7fa2a98dddb24ebda753a94e779ca8ce0.tar.zst
freebsd-ports-gnome-a2869ae7fa2a98dddb24ebda753a94e779ca8ce0.zip
Change maintainership from @ports to new maintainer. From the
new maintainer: Trim comment Add license (GPLv2) New world order USES: gmake, pkgconfg, shared-mime-info Add docs Add DOCS option Trim icons Trim pkg-descr Trim pkg-plist PR: 174911 Submitted by: nemysis at gmx dot ch
Diffstat (limited to 'cad')
-rw-r--r--cad/leocad/Makefile80
-rw-r--r--cad/leocad/pkg-descr7
-rw-r--r--cad/leocad/pkg-plist14
3 files changed, 69 insertions, 32 deletions
diff --git a/cad/leocad/Makefile b/cad/leocad/Makefile
index a24d0b64ca7a..871624902159 100644
--- a/cad/leocad/Makefile
+++ b/cad/leocad/Makefile
@@ -5,56 +5,88 @@ PORTNAME= leocad
PORTVERSION= 0.79.3
CATEGORIES= cad
MASTER_SITES= GOOGLE_CODE
-DISTFILES= ${PORTNAME}-${PORTVERSION}-src.tgz ${LEOCAD_PIECES}
+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_CMD}:${PORTSDIR}/archivers/unzip
LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/${PORTNAME}
+LEOCAD_PIECES= pieces-7114.zip
-USES= pkgconfig
-USE_GL= gl
+USES= gmake pkgconfig shared-mime-info
+USE_GL= glut
USE_GNOME= gtk20
-USE_GMAKE= yes
-INSTALLS_ICONS= yes
MAKE_JOBS_SAFE= yes
MAN1= leocad.1
-LEOCAD_PIECES= pieces-7114.zip
+PORTDOCS= *
-.include <bsd.port.pre.mk>
+DOCSRCDIR1= ${WRKSRC}
+DOC_FILES1= CREDITS.txt README.txt
-.if ${ARCH} == "sparc64"
-BROKEN= Does not compile on sparc64
-.endif
+DOCSRCDIR2= ${WRKSRC}/docs
+DOCSDIR2= ${DOCSDIR}/docs
+DOC_FILES2= LINUX.txt TODO.txt
+
+INSTALLS_ICONS= yes
+ICON_SIZES= 16x16 24x24 32x32 48x48 128x128 256x256
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.pre.mk>
post-extract:
- @${UNZIP_CMD} -q -o ${DISTDIR}/${DIST_SUBDIR}/${LEOCAD_PIECES} \
- -d ${WRKDIR}/pieces
+ @${UNZIP_CMD} -q -o ${_DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
post-patch:
@${REINPLACE_CMD} -e \
- 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/config.mk
- @${REINPLACE_CMD} -e \
- 's|+= -g|+=| ; \
- s|@$$(CXX)|$$(CXX)| ; \
- s|@install -c -m 0755|$${BSD_INSTALL_PROGRAM}| ; \
- s|@install -c -m 0644|$${BSD_INSTALL_DATA}| ; \
- s|share/man|man|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e \
's|-ldl||' ${WRKSRC}/common/module.mk
+ @${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} && ${SETENV} PREFIX="${PREFIX}" ${GMAKE} config)
+ cd ${WRKSRC} && ${SETENV} PREFIX="${PREFIX}" ${GMAKE} config
post-install:
- (cd ${WRKDIR}/pieces && ${INSTALL_DATA} * ${DATADIR})
+ @${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
+
+.if ${ARCH} == "sparc64"
+BROKEN= Does not compile on sparc64
+.endif
.include <bsd.port.post.mk>
diff --git a/cad/leocad/pkg-descr b/cad/leocad/pkg-descr
index 678e9bc7adc7..7c1ee627fc9e 100644
--- a/cad/leocad/pkg-descr
+++ b/cad/leocad/pkg-descr
@@ -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 --git a/cad/leocad/pkg-plist b/cad/leocad/pkg-plist
index 4e76d7b141f2..8d5d01841d07 100644
--- a/cad/leocad/pkg-plist
+++ b/cad/leocad/pkg-plist
@@ -1,11 +1,17 @@
bin/leocad
share/applications/leocad.desktop
+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/packages/leocad-mime.xml
-share/pixmaps/leocad.svg
+share/mime/application/vnd.leocad.xml
+share/mime/packages/leocad-mime.xml
+share/pixmaps/leocad.png
+share/pixmaps/leocad.svg
@dirrm %%DATADIR%%
@dirrmtry share/applications
-@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
-@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime