Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jun 2013 15:27:01 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r321476 - in head/lang: . dragonegg46-33 dragonegg46-33/files dragonegg47-33
Message-ID:  <201306211527.r5LFR1eL028720@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Jun 21 15:27:01 2013
New Revision: 321476
URL: http://svnweb.freebsd.org/changeset/ports/321476

Log:
  Add ports of DragonEgg version 3.3 for GCC 4.6 and 4.7.

Added:
  head/lang/dragonegg46-33/
     - copied from r310196, head/lang/dragonegg46/
  head/lang/dragonegg46-33/files/hello.c   (contents, props changed)
  head/lang/dragonegg47-33/
  head/lang/dragonegg47-33/Makefile   (contents, props changed)
Modified:
  head/lang/Makefile
  head/lang/dragonegg46-33/Makefile
  head/lang/dragonegg46-33/distinfo
  head/lang/dragonegg46-33/files/patch-README
  head/lang/dragonegg46-33/pkg-descr

Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile	Fri Jun 21 15:17:40 2013	(r321475)
+++ head/lang/Makefile	Fri Jun 21 15:27:01 2013	(r321476)
@@ -51,6 +51,8 @@
     SUBDIR += dmd2
     SUBDIR += dragonegg-devel46
     SUBDIR += dragonegg46
+    SUBDIR += dragonegg46-33
+    SUBDIR += dragonegg47-33
     SUBDIR += ecl
     SUBDIR += elan
     SUBDIR += elk

Modified: head/lang/dragonegg46-33/Makefile
==============================================================================
--- head/lang/dragonegg46/Makefile	Thu Jan 10 18:25:17 2013	(r310196)
+++ head/lang/dragonegg46-33/Makefile	Fri Jun 21 15:27:01 2013	(r321476)
@@ -1,27 +1,31 @@
 # $FreeBSD$
-#
 
-PORTNAME=	dragonegg46
-PORTVERSION=	3.2
+PORTNAME=	dragonegg
+PORTVERSION=	3.3
 CATEGORIES=	lang devel
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
+PKGNAMESUFFIX=	${USE_GCC:S/.//g}
 DISTNAME=	dragonegg-${PORTVERSION}.src
 
 MAINTAINER=	brooks@FreeBSD.org
 COMMENT=	GCC plugin to use the LLVM backend
 
-CONFLICTS=	dragonegg46-devel-3*
+CONFLICTS=	dragonegg46-devel-3.3*
 
 BUILD_DEPENDS+=	llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
 RUN_DEPENDS+=	${CC}:${PORTSDIR}/lang/gcc \
-		llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
+		llvm-config33:${PORTSDIR}/devel/llvm${LLVM_SUFFIX}
+
+LLVM_SUFFIX=	${PORTVERSION:S/.//g}
 
 OPTIONS_DEFINE=	DOCS
 
-USE_GCC=	4.6
+USE_GCC?=	4.6
 USE_GMAKE=	yes
 USE_LDCONFIG=	yes
 MAKE_JOBS_SAFE=	yes
+UNIQUENAME=	${PORTNAME}${PKGNAMESUFFIX}-${LLVM_SUFFIX}
+DOCSDIR=	${PREFIX}/share/doc/${UNIQUENAME}
 
 DRAGONEGG_RELEASE=	${PORTVERSION:C/\.r[0-9]*//}
 DRAGONEGG_SO=		dragonegg-${DRAGONEGG_RELEASE}.so
@@ -29,7 +33,7 @@ DRAGONEGG_PATH=		${GCC_LIBDIR}/${DRAGONE
 GCC_LIBDIR=		lib/${CC}
 
 ALL_TARGET=
-MAKE_ARGS=	GCC=${LOCALBASE}/bin/${CC}
+MAKE_ARGS=	GCC=${LOCALBASE}/bin/${CC} LLVM_CONFIG=llvm-config33
 
 PLIST_FILES=		${GCC_LIBDIR}/${DRAGONEGG_SO}
 
@@ -53,4 +57,12 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
 .endif
 
+test:
+	${CC} -fplugin=${PREFIX}/${DRAGONEGG_PATH} ${FILESDIR}/hello.c \
+	    -o ${WRKDIR}/hello
+	if [ "`${WRKDIR}/hello`" != "hello" ]; then \
+		${ECHO_CMD} wrong answer from ${WRKDIR}/test/hello ;\
+		${FALSE} ;\
+	fi
+
 .include <bsd.port.mk>

Modified: head/lang/dragonegg46-33/distinfo
==============================================================================
--- head/lang/dragonegg46/distinfo	Thu Jan 10 18:25:17 2013	(r310196)
+++ head/lang/dragonegg46-33/distinfo	Fri Jun 21 15:27:01 2013	(r321476)
@@ -1,2 +1,2 @@
-SHA256 (dragonegg-3.2.src.tar.gz) = 6f19a1925147a1c9a0ecb6c5bf49cbdfbb65f904d5dcf737cded9c303c86dd49
-SIZE (dragonegg-3.2.src.tar.gz) = 665450
+SHA256 (dragonegg-3.3.src.tar.gz) = 3153a827e9a3cef4212d0240ffc5ab7a2ce92dcf1283520d1eb0c3f295f4d9cd
+SIZE (dragonegg-3.3.src.tar.gz) = 457196

Added: head/lang/dragonegg46-33/files/hello.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/dragonegg46-33/files/hello.c	Fri Jun 21 15:27:01 2013	(r321476)
@@ -0,0 +1,9 @@
+/* $FreeBSD$ */
+#include <stdio.h>
+
+int
+main(void)
+{
+	printf("hello\n");
+	return 0;
+}

Modified: head/lang/dragonegg46-33/files/patch-README
==============================================================================
--- head/lang/dragonegg46/files/patch-README	Thu Jan 10 18:25:17 2013	(r310196)
+++ head/lang/dragonegg46-33/files/patch-README	Fri Jun 21 15:27:01 2013	(r321476)
@@ -3,7 +3,7 @@ $FreeBSD$
 
 --- README.orig
 +++ README
-@@ -1,82 +1,15 @@
+@@ -1,74 +1,9 @@
  ----------------------
 -- BUILD INSTRUCTIONS -
 -----------------------
@@ -11,7 +11,7 @@ $FreeBSD$
 -Prerequisites
 --------------
 -
--The dragonegg plugin works with gcc 4.5, gcc 4.6 or gcc-4.7, so you will need to
+-The dragonegg plugin works with gcc 4.5, 4.6, 4.7 or 4.8, so you will need to
 -have one of these installed.  Many linux distributions ship one or both of them,
 -perhaps as an addon package; binaries can be downloaded for most platforms.
 -Otherwise you can always build gcc yourself.  Plugin support (--enable-plugin)
@@ -74,17 +74,9 @@ $FreeBSD$
  
 -Run gcc as usual, but pass -fplugin=./dragonegg.so as an extra command line
 -argument.  Make sure you use the gcc you built dragonegg against (see step 1)!
-+Run %%CC%% as usual, but pass -fplugin=%%PLUGINPATH%%
+-
++Run %CC% as usual, but pass -fplugin=%%PLUGINPATH%%
 +as an extra command line argument.
  
- 
  ------------------
  - USEFUL OPTIONS -
- ------------------
- 
--If you renamed dragonegg.so to something else, for example llvm.so, replace
---fplugin-arg-dragonegg with -fplugin-arg-llvm in the options below.
--
- -fplugin-arg-dragonegg-emit-ir
- -flto
-   Output LLVM IR rather than target assembler.  You need to use -S with this,

Modified: head/lang/dragonegg46-33/pkg-descr
==============================================================================
--- head/lang/dragonegg46/pkg-descr	Thu Jan 10 18:25:17 2013	(r310196)
+++ head/lang/dragonegg46-33/pkg-descr	Fri Jun 21 15:27:01 2013	(r321476)
@@ -1,6 +1,6 @@
 DragonEgg is a gcc plugin that replaces GCC's optimizers and code
-generators with those from the LLVM project. It works with gcc-4.5
-or gcc-4.6, can target the x86-32/x86-64 and ARM processor families,
+generators with those from the LLVM project. It works with gcc-4.6
+or gcc-4.7, can target the x86-32/x86-64 and ARM processor families,
 and has been successfully used on the Darwin, FreeBSD, KFreeBSD,
 Linux and OpenBSD platforms. It fully supports Ada, C, C++ and
 Fortran. It has partial support for Go, Java, Obj-C and Obj-C++.

Added: head/lang/dragonegg47-33/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/dragonegg47-33/Makefile	Fri Jun 21 15:27:01 2013	(r321476)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+USE_GCC=	4.7
+MASTERDIR=	${.CURDIR}/../dragonegg46-33
+
+.include "${MASTERDIR}/Makefile"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306211527.r5LFR1eL028720>