aboutsummaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorRusmir Dusko <nemysis@FreeBSD.org>2013-09-17 19:14:02 +0000
committerRusmir Dusko <nemysis@FreeBSD.org>2013-09-17 19:14:02 +0000
commit8b256735687ab35a7ea13e68e1ff7446b84b25eb (patch)
tree01e0d05f9d46262c9fdfa12151ad3229c336020e /cad
parent71d9afd4b5f9293223aefca1763ba979c919a4fb (diff)
downloadports-8b256735687ab35a7ea13e68e1ff7446b84b25eb.tar.gz
ports-8b256735687ab35a7ea13e68e1ff7446b84b25eb.zip
Notes
Diffstat (limited to 'cad')
-rw-r--r--cad/leocad/Makefile64
-rw-r--r--cad/leocad/distinfo8
-rw-r--r--cad/leocad/files/patch-config.mk25
-rw-r--r--cad/leocad/files/patch-qt-qtmain.cpp13
-rw-r--r--cad/leocad/pkg-plist7
5 files changed, 50 insertions, 67 deletions
diff --git a/cad/leocad/Makefile b/cad/leocad/Makefile
index b3028e02cbd7..57d677dc2509 100644
--- a/cad/leocad/Makefile
+++ b/cad/leocad/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= leocad
-PORTVERSION= 0.79.3
+PORTVERSION= 0.80.1
CATEGORIES= cad
MASTER_SITES= GOOGLE_CODE
DISTFILES= ${PORTNAME}-${PORTVERSION}-src.tgz \
@@ -10,82 +10,76 @@ DISTFILES= ${PORTNAME}-${PORTVERSION}-src.tgz \
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}-src.tgz
-MAINTAINER= nemysis@gmx.ch
+MAINTAINER= nemysis@FreeBSD.org
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
+LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libpng15.so:${PORTSDIR}/graphics/png
+RUN_DEPENDS= ${LOCALBASE}/share/ldraw/models/car.dat:${PORTSDIR}/cad/ldraw
WRKSRC= ${WRKDIR}/${PORTNAME}
-LEOCAD_PIECES= pieces-7114.zip
+LEOCAD_PIECES= pieces-7439.zip
+
+USES= desktop-file-utils gmake pkgconfig shared-mime-info
+USE_QT4= moc_build qmake_build rcc_build uic_build iconengines imageformats \
+ corelib gui network opengl
-USES= gmake pkgconfig shared-mime-info
USE_GL= glut
USE_GNOME= gtk20
MAN1= leocad.1
-PORTDOCS= *
-
-DOCSRCDIR1= ${WRKSRC}
-DOC_FILES1= CREDITS.txt README.txt
-
-DOCSRCDIR2= ${WRKSRC}/docs
-DOCSDIR2= ${DOCSDIR}/docs
-DOC_FILES2= LINUX.txt TODO.txt
+PORTDOCS= CREDITS.txt README.txt TODO.txt
INSTALLS_ICONS= yes
ICON_SIZES= 16x16 24x24 32x32 48x48 128x128 256x256
OPTIONS_DEFINE= DOCS
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
post-extract:
@${UNZIP_CMD} -q -o ${_DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
post-patch:
- @${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
+ @${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
+ -e 's|share/man/man1|man/man1|' \
+ ${WRKSRC}/${PORTNAME}.pro
+ @${REINPLACE_CMD} -e 's|docs.files = docs/README.txt docs/CREDITS.txt docs/COPYING.txt|docs.files = |' \
+ ${WRKSRC}/${PORTNAME}.pro
+
.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
+ @cd ${WRKSRC}/tools/icon && ${MV} icon.svg ${PORTNAME}.svg
do-configure:
- cd ${WRKSRC} && ${SETENV} PREFIX="${PREFIX}" ${GMAKE} config
+ @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
+ ${QMAKE} ${QMAKEFLAGS} PREFIX=${PREFIX}
post-install:
@${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/pieces/* ${DATADIR}
.for s in ${ICON_SIZES}
- ${MKDIR} ${PREFIX}/share/icons/hicolor/${s}/apps
+ @${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
+ @${MKDIR} ${PREFIX}/share/icons/hicolor/scalable/apps
+ ${INSTALL_DATA} ${WRKSRC}/tools/icon/${PORTNAME}.svg \
+ ${PREFIX}/share/icons/hicolor/scalable/apps/
+ @${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps/
+ ${INSTALL_MAN} ${WRKSRC}/docs/${MAN1} ${MAN1PREFIX}/man/man1/
.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
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/cad/leocad/distinfo b/cad/leocad/distinfo
index 7866c79b5d05..f68b8ef8064f 100644
--- a/cad/leocad/distinfo
+++ b/cad/leocad/distinfo
@@ -1,4 +1,4 @@
-SHA256 (leocad/leocad-0.79.3-src.tgz) = 588abe0b9415e550cb5087af131fd048228ea9b8e79e8ef831f104e3e5faf703
-SIZE (leocad/leocad-0.79.3-src.tgz) = 2124587
-SHA256 (leocad/pieces-7114.zip) = 16506da21d139769524d140ce47bfce57bc5415f541fbd6f66a67025c1f535ab
-SIZE (leocad/pieces-7114.zip) = 20546651
+SHA256 (leocad/leocad-0.80.1-src.tgz) = e1db5db1ad9bf9b25eb760b88a4833caeba4e9b96bc793e76c9622a0160bc160
+SIZE (leocad/leocad-0.80.1-src.tgz) = 963073
+SHA256 (leocad/pieces-7439.zip) = f826115999296800a8cb22a85521eb019d8fbeb91e8a92d3485bcbf0e94a15fd
+SIZE (leocad/pieces-7439.zip) = 22023619
diff --git a/cad/leocad/files/patch-config.mk b/cad/leocad/files/patch-config.mk
deleted file mode 100644
index abefe4503f8b..000000000000
--- a/cad/leocad/files/patch-config.mk
+++ /dev/null
@@ -1,25 +0,0 @@
---- config.mk.orig 2012-12-14 07:50:24.000000000 +0900
-+++ config.mk 2012-12-15 04:42:02.000000000 +0900
-@@ -6,17 +6,18 @@
-
- default: all
-
--CC := gcc
--CXX := g++
-+CC ?= gcc
-+CXX ?= g++
- OSDIR := linux
-
- # (Add a -g for debugging)
--CPPFLAGS += -O2 -Wall
-+CPPFLAGS += -Wall
-
- ### FreeBSD configuration
-
- ifeq ($(shell uname), FreeBSD)
--CPPFLAGS += -L/usr/local/lib
-+CPPFLAGS += -I%%LOCALBASE%%/include
-+LDFLAGS += -L%%LOCALBASE%%/lib
- endif
-
- ### Default directory
diff --git a/cad/leocad/files/patch-qt-qtmain.cpp b/cad/leocad/files/patch-qt-qtmain.cpp
new file mode 100644
index 000000000000..b44503f9028c
--- /dev/null
+++ b/cad/leocad/files/patch-qt-qtmain.cpp
@@ -0,0 +1,13 @@
+--- qt/qtmain.cpp.orig 2013-08-13 06:54:12.000000000 +0200
++++ qt/qtmain.cpp 2013-08-30 23:52:45.000000000 +0200
+@@ -149,6 +149,10 @@
+ const char* libPath = LC_INSTALL_PREFIX"/share/leocad/";
+ #endif
+
++#ifdef Q_OS_FREEBSD
++ const char* libPath = LC_INSTALL_PREFIX"/local/share/leocad/";
++#endif
++
+ #ifdef Q_OS_MAC
+ QDir bundlePath = QDir(QCoreApplication::applicationDirPath());
+ bundlePath.cdUp();
diff --git a/cad/leocad/pkg-plist b/cad/leocad/pkg-plist
index 8d5d01841d07..610dbf8071ad 100644
--- a/cad/leocad/pkg-plist
+++ b/cad/leocad/pkg-plist
@@ -6,12 +6,13 @@ 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/apps/leocad.svg
share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg
-%%DATADIR%%/icon.png
%%DATADIR%%/library.bin
share/mime/application/vnd.leocad.xml
-share/mime/packages/leocad-mime.xml
+share/mime/packages/leocad.xml
share/pixmaps/leocad.png
-share/pixmaps/leocad.svg
+@dirrmtry share/mime/application
+@dirrmtry share/mime
@dirrm %%DATADIR%%
@dirrmtry share/applications