aboutsummaryrefslogtreecommitdiffstats
path: root/cad/leocad
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2012-07-12 04:28:58 +0800
committerpawel <pawel@FreeBSD.org>2012-07-12 04:28:58 +0800
commit9eaaab4a6f94582a599cf947e63e69c3a7490863 (patch)
tree8bea78a89f9840991ed60abb056728e3bdf41267 /cad/leocad
parentf08f8687e6eb3c26fb83a1372850b1b0e57e15ed (diff)
downloadfreebsd-ports-gnome-9eaaab4a6f94582a599cf947e63e69c3a7490863.tar.gz
freebsd-ports-gnome-9eaaab4a6f94582a599cf947e63e69c3a7490863.tar.zst
freebsd-ports-gnome-9eaaab4a6f94582a599cf947e63e69c3a7490863.zip
- Update to version 0.77.0
- Switch to official mirror - Add desktop entry - Use PLIST_ macros instead of separate pkg-plist file - Port is now GTK+ 2.x based
Diffstat (limited to 'cad/leocad')
-rw-r--r--cad/leocad/Makefile40
-rw-r--r--cad/leocad/distinfo8
-rw-r--r--cad/leocad/files/patch-Makefile13
-rw-r--r--cad/leocad/files/patch-config.mk24
-rw-r--r--cad/leocad/files/patch-gtkmisc.cpp10
-rw-r--r--cad/leocad/files/patch-im_png.cpp56
-rw-r--r--cad/leocad/pkg-plist6
7 files changed, 34 insertions, 123 deletions
diff --git a/cad/leocad/Makefile b/cad/leocad/Makefile
index c7730cc3416c..1fd2f19d65d1 100644
--- a/cad/leocad/Makefile
+++ b/cad/leocad/Makefile
@@ -6,29 +6,39 @@
#
PORTNAME= leocad
-PORTVERSION= 0.73
-PORTREVISION= 10
+PORTVERSION= 0.77.0
CATEGORIES= cad
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= arved
-DISTFILES= leocad-${PORTVERSION:S/.p/pre/}.tgz leocad-pieces-20030330.zip
-EXTRACT_ONLY= leocad-${PORTVERSION:S/.p/pre/}.tgz
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+DISTFILES= ${LEOCAD_DISTNAME} ${LEOCAD_PIECES}
+EXTRACT_ONLY= ${LEOCAD_DISTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= A CAD program that uses bricks similar to those found in many toys
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
-LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png
+LEOCAD_DISTNAME=leocad-${PORTVERSION}-src.tgz
+LEOCAD_PIECES= pieces-5823b.zip
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
USE_GL= glut
USE_XORG= x11
USE_GMAKE= yes
-USE_GNOME= gtk12
+USE_GNOME= gtk20
MAKE_JOBS_UNSAFE= yes
+DESKTOP_ENTRIES="Leocad" "${COMMENT}" "" "${PORTNAME}" "Engineering;" "true"
+
+PLIST_FILES= bin/leocad \
+ ${DATADIR_REL}/pieces.bin \
+ ${DATADIR_REL}/pieces.idx
+PLIST_DIRS= ${DATADIR_REL}
+MAN1= leocad.1
+
post-extract:
- @${UNZIP_CMD} -q -o ${DISTDIR}/leocad-pieces-20030330.zip -d ${WRKDIR}/pieces
+ @${UNZIP_CMD} -q -o ${DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
post-patch:
@${REINPLACE_CMD} -e \
@@ -36,13 +46,13 @@ post-patch:
s|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|; \
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
${WRKSRC}/config.mk
- @cd ${WRKSRC}/linux/&&${REINPLACE_CMD} -e 's|[(]int[)]data|(intptr_t)data|'\
- dialogs.cpp dlgpiece.cpp main.cpp toolbar.cpp
- @${REINPLACE_CMD} -Ee 's|[(]int[)](.*Group)|(intptr_t)\1|'\
- ${WRKSRC}/common/project.cpp
+ @${REINPLACE_CMD} 's|share/man|man|g' \
+ ${WRKSRC}/Makefile
+
+do-configure:
+ cd ${WRKSRC} && ${GMAKE} config
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/leocad ${PREFIX}/bin
+post-install:
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/pieces/* ${DATADIR}
diff --git a/cad/leocad/distinfo b/cad/leocad/distinfo
index afbdb17b750c..26b82847dc8b 100644
--- a/cad/leocad/distinfo
+++ b/cad/leocad/distinfo
@@ -1,4 +1,4 @@
-SHA256 (leocad-0.73.tgz) = 89a39365542db28a63b84a0e41c8535e45e80d06a6761e3448caab7faddaa443
-SIZE (leocad-0.73.tgz) = 525390
-SHA256 (leocad-pieces-20030330.zip) = 4d35ad6b9db559fdaa30030d206244fa29ccc5f8ec5780ebc97ed59339ceb2d8
-SIZE (leocad-pieces-20030330.zip) = 9069852
+SHA256 (leocad-0.77.0-src.tgz) = 17afed6174a04f429ba230b21ee0f03472ebb7645fb45d8715b97953fb7ba788
+SIZE (leocad-0.77.0-src.tgz) = 645424
+SHA256 (pieces-5823b.zip) = 4c833bd1d89730757d8b391e20ba20ab133cd242b6717e89cee8fdf1c26f9a23
+SIZE (pieces-5823b.zip) = 44541797
diff --git a/cad/leocad/files/patch-Makefile b/cad/leocad/files/patch-Makefile
deleted file mode 100644
index 3813b5e2b418..000000000000
--- a/cad/leocad/files/patch-Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$FreeBSD$
-
---- Makefile.orig Sun Jan 27 15:58:14 2002
-+++ Makefile Sun Jan 27 15:58:41 2002
-@@ -38,7 +38,7 @@
- static: bin/leocad.static
-
- bin/leocad: $(OBJ) bin
-- $(CXX) -o $@ $(OBJ) $(LIBS)
-+ $(CXX) -o $@ $(OBJ) $(LIBS) ${LDFLAGS}
-
- bin/leocad.static: $(OBJ) bin
- $(CXX) -static -o $@ $(OBJ) $(LIBS)
diff --git a/cad/leocad/files/patch-config.mk b/cad/leocad/files/patch-config.mk
index 262869ebeeff..592d704b7afb 100644
--- a/cad/leocad/files/patch-config.mk
+++ b/cad/leocad/files/patch-config.mk
@@ -1,8 +1,6 @@
-$FreeBSD$
-
---- config.mk.orig Mon Sep 18 21:06:37 2000
-+++ config.mk Sat Mar 2 19:21:24 2002
-@@ -4,11 +4,11 @@
+--- config.mk.orig 2012-03-17 22:55:49.000000000 +0100
++++ config.mk 2012-07-11 20:57:38.000000000 +0200
+@@ -6,11 +6,12 @@
default: all
@@ -13,20 +11,8 @@ $FreeBSD$
# (Add a -g for debugging)
-CPPFLAGS += -O2 -Wall
-+CPPFLAGS += -Wall
++CPPFLAGS += -Wall -I%%LOCALBASE%%/include %%PTHREAD_CFLAGS%%
++LDFLAGS += %%PTHREAD_LIBS%%
# Add compile options, such as -I option to include jpeglib's headers
# CPPFLAGS += -I/home/fred/jpeglib
-@@ -33,9 +33,10 @@
-
- OS := -DLC_LINUX
- OSDIR := linux
--PREFIX := /usr/local
-+PREFIX := %%LOCALBASE%%
- GTK_CONFIG := gtk12-config
--CPPFLAGS += -L/usr/local/lib
-+CPPFLAGS += ${CFLAGS} -L%%LOCALBASE%%/lib -I%%LOCALBASE%%/include %%PTHREAD_CFLAGS%%
-+LDFLAGS += -L%%LOCALBASE%%/lib %%PTHREAD_LIBS%%
-
- endif
-
diff --git a/cad/leocad/files/patch-gtkmisc.cpp b/cad/leocad/files/patch-gtkmisc.cpp
deleted file mode 100644
index 763cca347ca6..000000000000
--- a/cad/leocad/files/patch-gtkmisc.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux/gtkmisc.cpp Sun Jul 23 14:17:56 2000
-+++ linux/gtkmisc.cpp Wed Mar 26 14:17:55 2003
-@@ -4,6 +4,7 @@
-
- #include <gtk/gtk.h>
- #include <gdk/gdkx.h>
-+#include <string.h>
- #include "gtkmisc.h"
- #include "globals.h"
- #include "project.h"
diff --git a/cad/leocad/files/patch-im_png.cpp b/cad/leocad/files/patch-im_png.cpp
deleted file mode 100644
index 39415c645ea7..000000000000
--- a/cad/leocad/files/patch-im_png.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
---- common/im_png.cpp.orig 2000-09-16 19:18:01.000000000 +0200
-+++ common/im_png.cpp 2012-04-27 08:02:21.000000000 +0200
-@@ -34,7 +34,7 @@
- return NULL;
-
- fread(sig, 1, 8, f);
-- if (!png_check_sig(sig, 8))
-+ if (png_sig_cmp(sig, 0, 8))
- {
- fclose(f);
- return NULL; // bad signature
-@@ -55,7 +55,7 @@
- return NULL; // out of memory
- }
-
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
- fclose(f);
-@@ -69,7 +69,7 @@
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
- NULL, NULL, NULL);
-
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
- fclose(f);
-@@ -80,7 +80,7 @@
- {
- png_get_bKGD(png_ptr, info_ptr, &pBackground);
-
-- if (setjmp (png_ptr->jmpbuf))
-+ if (setjmp (png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
- fclose(f);
-@@ -113,7 +113,7 @@
- }
- else
- {
-- if (setjmp (png_ptr->jmpbuf))
-+ if (setjmp (png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
- fclose(f);
-@@ -283,7 +283,7 @@
- return false;
- }
-
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
- fclose(fp);
diff --git a/cad/leocad/pkg-plist b/cad/leocad/pkg-plist
deleted file mode 100644
index ffdc5be9fed7..000000000000
--- a/cad/leocad/pkg-plist
+++ /dev/null
@@ -1,6 +0,0 @@
-bin/leocad
-share/leocad/pieces.bin
-share/leocad/pieces.idx
-share/leocad/textures.bin
-share/leocad/textures.idx
-@dirrm share/leocad