View | Details | Raw Unified | Return to bug 174911 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-25 / +60 lines)
Lines 3-59 Link Here
3
3
4
PORTNAME=	leocad
4
PORTNAME=	leocad
5
PORTVERSION=	0.79.2
5
PORTVERSION=	0.79.2
6
PORTREVISION=	1
6
CATEGORIES=	cad
7
CATEGORIES=	cad
7
MASTER_SITES=	GOOGLE_CODE
8
MASTER_SITES=	GOOGLE_CODE
8
DISTFILES=	${PORTNAME}-${PORTVERSION}-src.tgz ${LEOCAD_PIECES}
9
DISTFILES=	${PORTNAME}-${PORTVERSION}-src.tgz \
10
		${LEOCAD_PIECES}
9
DIST_SUBDIR=	${PORTNAME}
11
DIST_SUBDIR=	${PORTNAME}
10
EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}-src.tgz
12
EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}-src.tgz
11
13
12
MAINTAINER=	ports@FreeBSD.org
14
MAINTAINER=	nemysis@gmx.ch
13
COMMENT=	CAD modeling with LEGO-like bricks
15
COMMENT=	CAD program that uses bricks similar to those found in many toys
16
17
LICENSE=	GPLv2
14
18
15
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
19
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
20
BUILD_DEPENDS=	update-mime-database:${PORTSDIR}/misc/shared-mime-info
16
LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg \
21
LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg \
17
		png15:${PORTSDIR}/graphics/png
22
		png15:${PORTSDIR}/graphics/png
18
23
19
WRKSRC=		${WRKDIR}/${PORTNAME}
24
WRKSRC=		${WRKDIR}/${PORTNAME}
25
LEOCAD_PIECES=	pieces-7114.zip
20
26
21
USE_GL=		gl
27
USE_GL=		glut
22
USE_GNOME=	gtk20
28
USE_GNOME=	gtk20
23
USE_GMAKE=	yes
29
USE_GMAKE=	yes
24
INSTALL_ICONS=	yes
25
MAKE_JOBS_SAFE=	yes
30
MAKE_JOBS_SAFE=	yes
26
31
27
MAN1=		leocad.1
32
PORTDOCS=	*
28
33
29
LEOCAD_PIECES=	pieces-7114.zip
34
DOCSRCDIR1=	${WRKSRC}
35
DOC_FILES1=	CREDITS.txt README.txt
30
36
31
.include <bsd.port.pre.mk>
37
DOCSRCDIR2=	${WRKSRC}/docs
38
DOCSDIR2=	${DOCSDIR}/docs
39
DOC_FILES2=	LINUX.txt TODO.txt
32
40
33
.if ${ARCH} == "sparc64"
41
INSTALLS_ICONS=	yes
34
BROKEN=		Does not compile on sparc64
42
ICON_SIZES=	16x16 24x24 32x32 48x48 128x128 256x256
35
.endif
43
44
MAN1=		leocad.1
45
46
.include <bsd.port.options.mk>
36
47
37
post-extract:
48
post-extract:
38
	@${UNZIP_CMD} -q -o ${DISTDIR}/${DIST_SUBDIR}/${LEOCAD_PIECES} \
49
	@${UNZIP_CMD} -q -o ${_DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
39
		-d ${WRKDIR}/pieces
40
50
41
post-patch:
51
post-patch:
42
	@${REINPLACE_CMD} -e \
52
	@${REINPLACE_CMD} \
43
		's|%%LOCALBASE%%|${LOCALBASE}| ; \
53
		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
44
		 s|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}| ; \
54
		-e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|' \
45
		 s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' ${WRKSRC}/config.mk
55
		-e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
46
	@${REINPLACE_CMD} -e \
56
			${WRKSRC}/config.mk
47
		's|+= -g|+=| ; \
57
	@${REINPLACE_CMD} 's|share/man|man|g' \
48
		 s|@$$(CXX)|$$(CXX)| ; \
58
		${WRKSRC}/Makefile
49
		 s|@install -c -m 0755|$${BSD_INSTALL_PROGRAM}| ; \
59
.for s in 16 24 32 48 128 256
50
		 s|@install -c -m 0644|$${BSD_INSTALL_MAN}| ; \
60
	@cd ${WRKSRC}/tools/icon && \
51
		 s|share/man|man|' ${WRKSRC}/Makefile
61
		${MV} icon${s}.png ${PORTNAME}_${s}x${s}.png
62
.endfor
63
	@cd ${WRKSRC}/tools/icon && ${CP} -a ${PORTNAME}_128x128.png icon128.png
52
64
53
do-configure:
65
do-configure:
54
	(cd ${WRKSRC} && ${SETENV} PREFIX="${PREFIX}" ${GMAKE} config)
66
	cd ${WRKSRC} && ${SETENV} PREFIX="${PREFIX}" ${GMAKE} config
55
67
56
post-install:
68
post-install:
57
	(cd ${WRKDIR}/pieces && ${INSTALL_DATA} * ${DATADIR})
69
	${MKDIR} ${DATADIR}
70
	${INSTALL_DATA} ${WRKDIR}/pieces/* ${DATADIR}
71
72
.for s in ${ICON_SIZES}
73
	${MKDIR} ${PREFIX}/share/icons/hicolor/${s}/apps
74
	${INSTALL_DATA} ${WRKSRC}/tools/icon/${PORTNAME}_${s}.png \
75
		${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
76
.endfor
77
	@${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps
78
79
.if ${PORT_OPTIONS:MDOCS}
80
	${MKDIR} ${DOCSDIR}
81
	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
82
	${MKDIR} ${DOCSDIR2}
83
	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
84
.endif
85
86
	@-update-mime-database ${PREFIX}/share/mime
87
88
.include <bsd.port.pre.mk>
89
90
.if ${ARCH} == "sparc64"
91
BROKEN=		Does not compile on sparc64
92
.endif
58
93
59
.include <bsd.port.post.mk>
94
.include <bsd.port.post.mk>
(-)./files/patch-config.mk (-7 / +7 lines)
Lines 1-13 Link Here
1
--- config.mk.orig	2012-12-14 07:50:24.000000000 +0900
1
--- config.mk.orig	2013-01-22 00:21:07.000000000 +0100
2
+++ config.mk	2012-12-15 04:42:02.000000000 +0900
2
+++ config.mk	2013-02-04 17:25:50.000000000 +0100
3
@@ -6,17 +6,18 @@
3
@@ -5,17 +5,18 @@
4
 
4
 
5
 default: all
5
 default: all
6
 
6
 
7
-CC    := gcc
7
-CC    := gcc
8
-CXX   := g++
8
-CXX   := g++
9
+CC    ?= gcc
9
+CC    := cc
10
+CXX   ?= g++
10
+CXX   := c++
11
 OSDIR := linux
11
 OSDIR := linux
12
 
12
 
13
 # (Add a -g for debugging)
13
 # (Add a -g for debugging)
Lines 18-25 Link Here
18
 
18
 
19
 ifeq ($(shell uname), FreeBSD)
19
 ifeq ($(shell uname), FreeBSD)
20
-CPPFLAGS += -L/usr/local/lib
20
-CPPFLAGS += -L/usr/local/lib
21
+CPPFLAGS += -I%%LOCALBASE%%/include %%PTHREAD_LIBS%%
21
+CPPFLAGS += -I%%LOCALBASE%%/include %%PTHREAD_CFLAGS%%
22
+LDFLAGS  += -L%%LOCALBASE%%/lib %%PTHREAD_LIBS%%
22
+LDFLAGS += -L%%LOCALBASE%%/lib %%PTHREAD_LIBS%%
23
 endif
23
 endif
24
 
24
 
25
 ### Default directory
25
 ### Default directory
(-)./pkg-descr (-4 / +3 lines)
Lines 1-6 Link Here
1
LeoCAD is a CAD program that uses bricks similar to those found in
1
LeoCAD is a CAD program that can be used to create virtual LEGO models.
2
many toys (but they don't represent any particular brand). Currently
2
It has an easy to use interface and currently features over 4000 different
3
it has a library of more than 1000 different pieces, most of them
3
pieces created by the LDraw community.
4
were created by James Jessiman (the author of LDraw).
5
4
6
WWW: http://www.leocad.org
5
WWW: http://www.leocad.org
(-)./pkg-plist (-3 / +29 lines)
Lines 1-12 Link Here
1
bin/leocad
1
bin/leocad
2
share/applications/leocad.desktop
2
share/applications/leocad.desktop
3
share/icons/hicolor/128x128/apps/leocad.png
4
share/icons/hicolor/16x16/apps/leocad.png
5
share/icons/hicolor/24x24/apps/leocad.png
6
share/icons/hicolor/256x256/apps/leocad.png
7
share/icons/hicolor/32x32/apps/leocad.png
8
share/icons/hicolor/48x48/apps/leocad.png
3
share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg
9
share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg
4
share/icons/hicolor/icon-theme.cache
5
%%DATADIR%%/icon.png
10
%%DATADIR%%/icon.png
6
%%DATADIR%%/library.bin
11
%%DATADIR%%/library.bin
7
share/mime/packages/leocad-mime.xml 
12
share/mime/application/vnd.leocad.xml
8
share/pixmaps/leocad.svg 
13
share/mime/packages/leocad-mime.xml
14
share/pixmaps/leocad.png
15
share/pixmaps/leocad.svg
16
@dirrmtry share/mime/packages
17
@dirrmtry share/mime/application
18
@dirrmtry share/mime
9
@dirrm %%DATADIR%%
19
@dirrm %%DATADIR%%
20
@dirrmtry share/icons/hicolor/scalable/mimetypes
21
@dirrmtry share/icons/hicolor/scalable
22
@dirrmtry share/icons/hicolor/48x48/apps
23
@dirrmtry share/icons/hicolor/48x48
24
@dirrmtry share/icons/hicolor/32x32/apps
25
@dirrmtry share/icons/hicolor/32x32
26
@dirrmtry share/icons/hicolor/256x256/apps
27
@dirrmtry share/icons/hicolor/256x256
28
@dirrmtry share/icons/hicolor/24x24/apps
29
@dirrmtry share/icons/hicolor/24x24
30
@dirrmtry share/icons/hicolor/16x16/apps
31
@dirrmtry share/icons/hicolor/16x16
32
@dirrmtry share/icons/hicolor/128x128/apps
33
@dirrmtry share/icons/hicolor/128x128
34
@dirrmtry share/icons/hicolor
35
@dirrmtry share/icons
10
@dirrmtry share/applications
36
@dirrmtry share/applications
11
@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
37
@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
12
@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
38
@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime

Return to bug 174911