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

Collapse All | Expand All

(-)lang/see/Makefile (-25 / +18 lines)
Lines 2-57 Link Here
2
# $FreeBSD: head/lang/see/Makefile 340722 2014-01-22 17:00:46Z mat $
2
# $FreeBSD: head/lang/see/Makefile 340722 2014-01-22 17:00:46Z mat $
3
3
4
PORTNAME=	see
4
PORTNAME=	see
5
PORTVERSION=	2.0.1131
5
PORTVERSION=	3.1.1424
6
PORTREVISION=	1
7
CATEGORIES=	lang devel
6
CATEGORIES=	lang devel
8
MASTER_SITES=	http://www.powerband.net.au/~david.leonard/ \
7
MASTER_SITES=	http://download.openpkg.org/components/cache/see/ \
9
		http://freshmeat.net/redir/see/45974/url_tgz/
8
		http://lil.fr.distfiles.macports.org/see/ \
9
		ftp://ftp7.freebsd.org/sites/distfiles.macports.org/see/ \
10
		ftp://ftp.mirrorservice.org/sites/distfiles.macports.org/see/ \
11
		ftp://kuiper.mirrorservice.org/sites/distfiles.macports.org/see/ \
12
		ftp://copernicus.mirrorservice.org/sites/distfiles.macports.org/see/ \
13
		ftp://ftp2.uk.i-scream.org/sites/distfiles.macports.org/see/ \
14
		ftp://mirror.csclub.uwaterloo.ca/MacPorts/mpdistfiles/see/
10
15
11
MAINTAINER=	numisemis@yahoo.com
16
MAINTAINER=	numisemis@yahoo.com
12
COMMENT=	Simple ECMAScript Engine (SEE)
17
COMMENT=	Simple ECMAScript Engine (SEE)
13
18
14
OPTIONS_DEFINE=	GC OPTIMIZED_CFLAGS SEE_DEBUG THREADS DOCS
19
LICENSE=	BSD
15
OPTIONS_DEFAULT=	GC THREADS
20
21
OPTIONS_DEFINE=	GC SEE_DEBUG DOCS
22
OPTIONS_DEFAULT=	GC DOCS
16
GC_DESC=	Use Boehm-Weiser garbage collection package
23
GC_DESC=	Use Boehm-Weiser garbage collection package
17
SEE_DEBUG_DESC=	Internal SEE library debugging
24
SEE_DEBUG_DESC=	Internal SEE library debugging
18
25
19
CONFLICTS=	see-devel-[0-9]*
26
CONFLICTS=	see-devel-[0-9]*
20
27
21
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
28
USES=		pathfix perl5
22
LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
23
24
USE_LDCONFIG=	yes
29
USE_LDCONFIG=	yes
25
USES=		perl5
26
USE_PERL5=	build
30
USE_PERL5=	build
27
GNU_CONFIGURE=	yes
31
GNU_CONFIGURE=	yes
28
32
29
CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
33
CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
30
LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
34
LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
31
35
32
NO_STAGE=	yes
33
.include <bsd.port.options.mk>
36
.include <bsd.port.options.mk>
34
37
35
.if ${PORT_OPTIONS:MMULTIPLE_THREADS}
38
CFLAGS+=	-O3 -fno-strict-aliasing
36
CFLAGS+=	-DMULTIPLE_THREADS
37
.endif
38
39
39
.if ! ${PORT_OPTIONS:MSEE_DEBUG}
40
.if ! ${PORT_OPTIONS:MSEE_DEBUG}
40
CFLAGS+=	-DNDEBUG
41
CFLAGS+=	-DNDEBUG
41
.endif
42
.endif
42
43
43
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
44
CFLAGS+=	-O3 -fomit-frame-pointer
45
.endif
46
47
.if ${PORT_OPTIONS:MGC}
44
.if ${PORT_OPTIONS:MGC}
48
LIB_DEPENDS+=	gc:${PORTSDIR}/devel/boehm-gc
45
LIB_DEPENDS+=	libgc.so:${PORTSDIR}/devel/boehm-gc
49
.else
46
.else
50
CONFIGURE_ARGS+=	--without-boehm-gc
47
CONFIGURE_ARGS+=	--without-boehm-gc
51
.if ! ${PORT_OPTIONS:MTHREADS}
52
PTHREAD_CFLAGS=
53
PTHREAD_LIBS=
54
.endif
55
.endif
48
.endif
56
49
57
post-patch:
50
post-patch:
Lines 60-68 Link Here
60
53
61
.if ${PORT_OPTIONS:MDOCS}
54
.if ${PORT_OPTIONS:MDOCS}
62
post-install:
55
post-install:
63
	${MKDIR} ${DOCSDIR}
56
	${MKDIR} ${STAGEDIR}${DOCSDIR}
64
.for f in doc/USAGE.html AUTHORS NEWS README TODO COPYING
57
.for f in doc/USAGE.html AUTHORS NEWS README TODO COPYING
65
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
58
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
66
.endfor
59
.endfor
67
.endif
60
.endif
68
61
(-)lang/see/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (see-2.0.1131.tar.gz) = 0d398fd5f7a2e86ddbe361a80d9658bf0f0f6c11dad186953c3c064c56d12d93
1
SHA256 (see-3.1.1424.tar.gz) = 04c58de4f56894f05ebb3b7c61b35e4090cd15710d42b3918f867eea50ab8f5c
2
SIZE (see-2.0.1131.tar.gz) = 948647
2
SIZE (see-3.1.1424.tar.gz) = 1015347
(-)lang/see/files/patch-libsee_dtoa.c (-24 lines)
Lines 1-24 Link Here
1
--- libsee/dtoa.c.orig	2005-12-24 04:35:38.000000000 +0100
2
+++ libsee/dtoa.c	2008-04-07 11:30:11.529829910 +0200
3
@@ -168,6 +168,11 @@
4
  *	the result overflows to +-Infinity or underflows to 0.
5
  */
6
 
7
+#ifdef MULTIPLE_THREADS
8
+#include <pthread.h>
9
+static pthread_mutex_t mylock[2] = { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
10
+#endif
11
+
12
 #ifndef Long
13
 #define Long long
14
 #endif
15
@@ -470,6 +475,9 @@
16
 #ifndef MULTIPLE_THREADS
17
 #define ACQUIRE_DTOA_LOCK(n)	/*nothing*/
18
 #define FREE_DTOA_LOCK(n)	/*nothing*/
19
+#else
20
+#define ACQUIRE_DTOA_LOCK(n)	pthread_mutex_lock(&mylock[n]);
21
+#define FREE_DTOA_LOCK(n)	pthread_mutex_unlock(&mylock[n]);
22
 #endif
23
 
24
 #define Kmax 15
(-)lang/see/files/patch-libsee_input__utf8.c (-20 lines)
Lines 1-20 Link Here
1
--- libsee/input_utf8.c.orig	Wed Jan 18 12:40:19 2006
2
+++ libsee/input_utf8.c	Tue Dec 12 08:48:44 2006
3
@@ -63,7 +63,7 @@
4
 
5
 struct input_utf8 {
6
 	struct SEE_input	inp;
7
-	const char *	s;
8
+	const unsigned char *	s;
9
 };
10
 
11
 static SEE_unicode_t
12
@@ -141,7 +141,7 @@
13
 	inpu->inp.inputclass = &input_utf8_class;
14
 	inpu->inp.filename = NULL;
15
 	inpu->inp.first_lineno = 1;
16
-	inpu->s = s;
17
+	inpu->s = (const unsigned char *)s;
18
 	SEE_INPUT_NEXT((struct SEE_input *)inpu);	/* prime */
19
 	return (struct SEE_input *)inpu;
20
 }
(-)lang/see/files/patch-libsee_obj__Date.c (-11 lines)
Lines 1-11 Link Here
1
--- libsee/obj_Date.c.orig	Sun May  7 06:43:55 2006
2
+++ libsee/obj_Date.c	Tue Sep  5 09:11:09 2006
3
@@ -335,7 +335,7 @@
4
 	struct SEE_interpreter *interp;
5
 	SEE_number_t t;
6
 {
7
-	return t + LocalTZA(interp) + DaylightSavingTA(interp, t);
8
+	return t + LocalTZA(interp) - DaylightSavingTA(interp, t);
9
 }
10
 
11
 /*
(-)lang/see/files/patch-libsee_system.c (-11 lines)
Lines 1-11 Link Here
1
--- libsee/system.c.orig	2009-12-17 14:05:43.000000000 -0800
2
+++ libsee/system.c	2009-12-17 14:07:20.000000000 -0800
3
@@ -70,6 +70,8 @@
4
 #include "dprint.h"
5
 #include "platform.h"
6
 
7
+typedef	void * GC_PTR;
8
+
9
 /* Prototypes */
10
 static unsigned int simple_random_seed(void);
11
 #if HAVE_GC_MALLOC
(-)lang/see/pkg-plist (-1 / +2 lines)
Lines 23-33 Link Here
23
lib/libsee.a
23
lib/libsee.a
24
lib/libsee.la
24
lib/libsee.la
25
lib/libsee.so
25
lib/libsee.so
26
lib/libsee.so.1
26
lib/libsee.so.2
27
lib/see/libFile.a
27
lib/see/libFile.a
28
lib/see/libFile.la
28
lib/see/libFile.la
29
lib/see/libFile.so
29
lib/see/libFile.so
30
lib/see/libFile.so.0
30
lib/see/libFile.so.0
31
libdata/pkgconfig/see.pc
31
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
32
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
32
%%PORTDOCS%%%%DOCSDIR%%/COPYING
33
%%PORTDOCS%%%%DOCSDIR%%/COPYING
33
%%PORTDOCS%%%%DOCSDIR%%/NEWS
34
%%PORTDOCS%%%%DOCSDIR%%/NEWS
(-)lang/see-devel/Makefile (-67 lines)
Lines 1-67 Link Here
1
# Created by: Simun Mikecin <numisemis@yahoo.com>
2
# $FreeBSD: head/lang/see-devel/Makefile 340722 2014-01-22 17:00:46Z mat $
3
4
PORTNAME=	see
5
PORTVERSION=	3.0.1376
6
PORTREVISION=	2
7
CATEGORIES=	lang devel
8
MASTER_SITES=	http://www.evolane.com/download/mirror/etcl/ \
9
		http://www.evolane.fr/download/mirror/etcl/
10
PKGNAMESUFFIX=	-devel
11
12
MAINTAINER=	numisemis@yahoo.com
13
COMMENT=	Simple ECMAScript Engine (SEE)
14
15
OPTIONS_DEFINE=	GC OPTIMIZED_CFLAGS SEE_DEBUG THREADS DOCS
16
OPTIONS_DEFAULT=	GC THREADS
17
GC_DESC=	Use Boehm-Weiser garbage collection package
18
SEE_DEBUG_DESC=	Internal SEE library debugging
19
20
CONFLICTS=	see-[0-9]*
21
22
USES=		pathfix perl5
23
USE_LDCONFIG=	yes
24
USE_PERL5=	build
25
GNU_CONFIGURE=	yes
26
27
CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
28
LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
29
30
NO_STAGE=	yes
31
.include <bsd.port.options.mk>
32
33
.if ${PORT_OPTIONS:MMULTIPLE_THREADS}
34
CFLAGS+=	-DMULTIPLE_THREADS
35
.endif
36
37
.if ! ${PORT_OPTIONS:MSEE_DEBUG}
38
CFLAGS+=	-DNDEBUG
39
.endif
40
41
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
42
CFLAGS+=	-O3 -fomit-frame-pointer
43
.endif
44
45
.if ${PORT_OPTIONS:MGC}
46
LIB_DEPENDS+=	gc:${PORTSDIR}/devel/boehm-gc
47
.else
48
CONFIGURE_ARGS+=	--without-boehm-gc
49
.if ! ${PORT_OPTIONS:MTHREADS}
50
PTHREAD_CFLAGS=
51
PTHREAD_LIBS=
52
.endif
53
.endif
54
55
post-patch:
56
	@${REINPLACE_CMD} -e "s|PACKAGE_BUGREPORT='leonard@users|PACKAGE_BUGREPORT='leonard\\\@users|" \
57
		${WRKSRC}/configure
58
59
.if ${PORT_OPTIONS:MDOCS}
60
post-install:
61
	${MKDIR} ${DOCSDIR}
62
.for f in doc/USAGE.html AUTHORS NEWS README TODO COPYING
63
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
64
.endfor
65
.endif
66
67
.include <bsd.port.mk>
(-)lang/see-devel/distinfo (-2 lines)
Lines 1-2 Link Here
1
SHA256 (see-3.0.1376.tar.gz) = e06dc6182adc2d4abb7b23b92472c02b8a1016d58038533770de4c26988d51f7
2
SIZE (see-3.0.1376.tar.gz) = 1066852
(-)lang/see-devel/files/patch-libsee_dtoa.c (-24 lines)
Lines 1-24 Link Here
1
--- libsee/dtoa.c.orig	2005-12-24 04:35:38.000000000 +0100
2
+++ libsee/dtoa.c	2008-04-07 11:30:11.529829910 +0200
3
@@ -168,6 +168,11 @@
4
  *	the result overflows to +-Infinity or underflows to 0.
5
  */
6
 
7
+#ifdef MULTIPLE_THREADS
8
+#include <pthread.h>
9
+static pthread_mutex_t mylock[2] = { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
10
+#endif
11
+
12
 #ifndef Long
13
 #define Long long
14
 #endif
15
@@ -470,6 +475,9 @@
16
 #ifndef MULTIPLE_THREADS
17
 #define ACQUIRE_DTOA_LOCK(n)	/*nothing*/
18
 #define FREE_DTOA_LOCK(n)	/*nothing*/
19
+#else
20
+#define ACQUIRE_DTOA_LOCK(n)	pthread_mutex_lock(&mylock[n]);
21
+#define FREE_DTOA_LOCK(n)	pthread_mutex_unlock(&mylock[n]);
22
 #endif
23
 
24
 #define Kmax 15
(-)lang/see-devel/files/patch-libsee_parse.c (-18 lines)
Lines 1-18 Link Here
1
--- libsee/parse.c.orig	Sun Feb 10 05:59:48 2008
2
+++ libsee/parse.c	Thu Aug 21 13:07:30 2008
3
@@ -27,7 +27,7 @@
4
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5
  * POSSIBILITY OF SUCH DAMAGE.
6
  */
7
-/* $Id: parse.c 1371 2008-02-10 04:59:09Z d $ */
8
+/* $Id: parse.c 1381 2008-03-05 07:29:31Z d $ */
9
 
10
 /*
11
  * Combined parser and evaluator.
12
@@ -12317,6 +12317,7 @@
13
 		&SourceElements_nodeclass); 
14
 	ss->statements = s;
15
 	ss->functions = NULL;
16
+	ss->vars = NULL;
17
 	return (struct node *)ss;
18
 }
(-)lang/see-devel/files/patch-libsee_value.c (-40 lines)
Lines 1-40 Link Here
1
--- libsee/value.c.orig	Sat Feb  9 13:54:59 2008
2
+++ libsee/value.c	Thu Aug 21 13:07:30 2008
3
@@ -27,7 +27,7 @@
4
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5
  * POSSIBILITY OF SUCH DAMAGE.
6
  */
7
-/* $Id: value.c 1370 2008-02-09 12:54:24Z d $ */
8
+/* $Id: value.c 1383 2008-07-03 13:56:11Z d $ */
9
 
10
 #if HAVE_CONFIG_H
11
 # include <config.h>
12
@@ -289,14 +289,17 @@
13
 		} else if (SEE_NUMBER_ISPINF(val)) {
14
 			SEE_SET_STRING(res, STR(Infinity));
15
 		} else {
16
-			char *a, *endstr;
17
+			char *a0, *a, *endstr;
18
 			struct SEE_string *s;
19
 			int sign, k, n, i, exponent;
20
 			int len;
21
 
22
-			a = SEE_dtoa(val->u.number, DTOA_MODE_SHORT_SW, 31, 
23
+			a0 = SEE_dtoa(val->u.number, DTOA_MODE_SHORT_SW, 31, 
24
 				&n, &sign, &endstr);
25
-			k = (int)(endstr - a);
26
+			k = (int)(endstr - a0);
27
+			a = SEE_STRING_ALLOCA(interp, char, k);
28
+			memcpy(a, a0, k);
29
+			SEE_freedtoa(a0);
30
 
31
 			/* Numbers converted to strings are generally
32
 			 * small and short-lived. */
33
@@ -359,7 +362,6 @@
34
 			}
35
 			SEE_ASSERT(interp, len == s->length);
36
 			SEE_SET_STRING(res, s);
37
-			SEE_freedtoa(a);
38
 		} 
39
 		break;
40
 	case SEE_STRING:
(-)lang/see-devel/pkg-descr (-3 lines)
Lines 1-3 Link Here
1
Library that provides an ECMAScript (JavaScript) run-time environment.
2
3
WWW: http://www.adaptive-enterprises.com.au/~d/software/see/
(-)lang/see-devel/pkg-plist (-40 lines)
Lines 1-40 Link Here
1
bin/libsee-config
2
bin/see-shell
3
include/see/cfunction.h
4
include/see/context.h
5
include/see/debug.h
6
include/see/error.h
7
include/see/eval.h
8
include/see/input.h
9
include/see/intern.h
10
include/see/interpreter.h
11
include/see/mem.h
12
include/see/module.h
13
include/see/native.h
14
include/see/no.h
15
include/see/object.h
16
include/see/see.h
17
include/see/string.h
18
include/see/system.h
19
include/see/try.h
20
include/see/type.h
21
include/see/value.h
22
include/see/version.h
23
lib/libsee.a
24
lib/libsee.la
25
lib/libsee.so
26
lib/libsee.so.2
27
lib/see/libFile.a
28
lib/see/libFile.la
29
lib/see/libFile.so
30
lib/see/libFile.so.0
31
libdata/pkgconfig/see.pc
32
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
33
%%PORTDOCS%%%%DOCSDIR%%/COPYING
34
%%PORTDOCS%%%%DOCSDIR%%/NEWS
35
%%PORTDOCS%%%%DOCSDIR%%/README
36
%%PORTDOCS%%%%DOCSDIR%%/TODO
37
%%PORTDOCS%%%%DOCSDIR%%/USAGE.html
38
%%PORTDOCS%%@dirrm %%DOCSDIR%%
39
@dirrm include/see
40
@dirrm lib/see

Return to bug 187954