aboutsummaryrefslogtreecommitdiff
path: root/lang/gnat-gcc43
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2006-08-03 20:25:08 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2006-08-03 20:25:08 +0000
commit99dc16658c585c6acb013c86345458f2269bd6ec (patch)
tree4f7bf5ea126383638c894c6d0cfd8332e8ce9817 /lang/gnat-gcc43
parent3feec7d740b69f760f550fb34d85c260ebb60496 (diff)
downloadports-99dc16658c585c6acb013c86345458f2269bd6ec.tar.gz
ports-99dc16658c585c6acb013c86345458f2269bd6ec.zip
Notes
Diffstat (limited to 'lang/gnat-gcc43')
-rw-r--r--lang/gnat-gcc43/Makefile172
-rw-r--r--lang/gnat-gcc43/distinfo12
-rw-r--r--lang/gnat-gcc43/files/patch-gengtype-yacc.y12
-rw-r--r--lang/gnat-gcc43/pkg-descr6
-rw-r--r--lang/gnat-gcc43/pkg-plist28
5 files changed, 230 insertions, 0 deletions
diff --git a/lang/gnat-gcc43/Makefile b/lang/gnat-gcc43/Makefile
new file mode 100644
index 000000000000..3588e8dba027
--- /dev/null
+++ b/lang/gnat-gcc43/Makefile
@@ -0,0 +1,172 @@
+# ex:ts=4
+# Ports collection makefile for: gnat-gcc
+# Date created: 22 Jun 2006
+# Whom: Karel Miklav <karel@lovetemple.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gnat-gcc
+PORTVERSION= 3.4.6
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_GCC}
+MASTER_SITE_SUBDIR= releases/gcc-${PORTVERSION}
+DISTFILES= gcc-core-${PORTVERSION}.tar.bz2 \
+ gcc-ada-${PORTVERSION}.tar.bz2
+
+MAINTAINER= karel@lovetemple.net
+COMMENT= The GNU Ada Compiler system
+
+USE_GMAKE= yes
+USE_PERL5= yes
+USE_BISON= yes
+
+CONFLICTS= gcc-3.4.*
+WRKSRC= ${WRKDIR}/gcc-${PORTVERSION}
+
+MAN1= cpp${gcc_suffix}.1 \
+ gcc${gcc_suffix}.1 \
+ gcov${gcc_suffix}.1
+MAN7= fsf-funding.7 gfdl.7 gpl.7
+NOMANCOMPRESS= yes # too hard to deal with differences on 5-cur and releng4
+INFO= gcc${gcc_suffix}/cpp \
+ gcc${gcc_suffix}/cppinternals \
+ gcc${gcc_suffix}/gcc \
+ gcc${gcc_suffix}/gccinstall \
+ gcc${gcc_suffix}/gccint \
+ gcc${gcc_suffix}/gnat-style \
+ gcc${gcc_suffix}/gnat_rm \
+ gcc${gcc_suffix}/gnat_ugn_unw
+
+.include <bsd.port.pre.mk>
+
+gcc_suffix= 34
+targlib= ${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/${PORTVERSION}
+
+PATCH_WRKSRC= ${WRKSRC}
+
+GNU_CONFIGURE= yes
+CONFIGURE_WRKSRC= ${WRKDIR}/build
+CONFIGURE_SCRIPT= ../${WRKSRC:C/${WRKDIR}\///}/configure
+CONFIGURE_ARGS= --enable-languages="c,ada" \
+ --disable-nls \
+ --with-system-zlib \
+ --with-libiconv-prefix=${LOCALBASE} \
+ --enable-threads=posix \
+ --program-suffix=${gcc_suffix} \
+ --bindir=${PREFIX}/bin/gcc${gcc_suffix} \
+ --libdir=${targlib} \
+ --infodir=${PREFIX}/${INFO_PATH}/gcc${gcc_suffix}
+
+BUILD_WRKSRC= ${WRKDIR}/build
+
+INSTALL_WRKSRC= ${WRKDIR}/build
+INSTALLS_SHLIB= yes
+
+USE_LDCONFIG= ${targlib}
+
+PLIST_SUB= GCC_VER=${PORTVERSION} \
+ GNU_HOST=${CONFIGURE_TARGET} \
+ SUFFIX=${gcc_suffix}
+
+ONLY_FOR_ARCHS= i386
+
+# You need a compiler who calls an existing GNAT compiler (3.15 or greater).
+# By default, we'll look for one in the path. If we can't find one, we'll
+# fetch a distfile containing a minimum (still pretty large) compiler toolset
+# and use that to build.
+gnat_gcc!= if ${WHICH} adagcc > /dev/null 2>&1; then \
+ ${ECHO_CMD} "`${WHICH} adagcc`"; \
+ else \
+ ${ECHO_CMD} ""; \
+ fi
+gnat_bind!= if ${WHICH} gnatbind > /dev/null 2>&1; then \
+ ${ECHO_CMD} "`${WHICH} gnatbind`"; \
+ else \
+ ${ECHO_CMD} ""; \
+ fi
+.if empty(gnat_gcc)
+gnat_gcc!= if ${WHICH} gnatgcc > /dev/null 2>&1; then \
+ ${ECHO_CMD} "`${WHICH} gnatgcc`"; \
+ else \
+ ${ECHO_CMD} ""; \
+ fi
+.endif
+
+.if !empty(gnat_gcc) && !empty(gnat_bind)
+bootstrap_path!= if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
+ ${ECHO_CMD} "$$PATH"; \
+ else \
+ ${ECHO_CMD} ""; \
+ fi
+.else
+bootstrap_path=
+.endif
+
+.if empty(bootstrap_path)
+ONLY_FOR_ARCHS= i386
+DISTFILES+= gnat-3.15p-boot.tar.gz:boot
+MASTER_SITES+= ${MASTER_SITE_LOCAL}:boot
+.if ${OSVERSION} >= 500000
+BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libc.so.4:${PORTSDIR}/misc/compat4x
+.endif
+# Warning! You need the trailing slash on GCC_EXEC_PREFIX.
+compiler_data= GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
+ ADA_INCLUDE_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adainclude \
+ ADA_OBJECTS_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adalib
+bootstrap_path= ${WRKDIR}/adaboot/bin:${PATH}
+gnat_gcc= adagcc
+.endif
+
+# Make sure we use the Ada-aware gcc compiler.
+CC= ${gnat_gcc}
+# C compiler from GNAT 3.15 doesn't understand modern flags.
+CFLAGS=
+CONFIGURE_ENV+= ${compiler_data} PATH=${bootstrap_path}
+MAKE_ENV+= ${compiler_data} PATH=${bootstrap_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
+
+pre-everything::
+ @${ECHO_MSG} "Making GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} target=${CONFIGURE_TARGET}"
+
+# Append ' [FreeBSD]' to gcc version string.
+post-patch:
+ @${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
+ ${WRKSRC}/gcc/version.c
+
+pre-configure:
+ cd ${WRKSRC} ; contrib/gcc_update --touch
+ @${RM} -f ${WRKSRC}/gcc/*/*.info*
+ @${MKDIR} ${CONFIGURE_WRKSRC}
+
+do-build:
+ (cd ${BUILD_WRKSRC}; \
+ ${MAKE_ENV} ${GMAKE} bootstrap)
+ (cd ${BUILD_WRKSRC}; \
+ ${MAKE_ENV} ${GMAKE} -C gcc gnatlib)
+ (cd ${BUILD_WRKSRC}; \
+ ${MAKE_ENV} ${GMAKE} -C gcc gnattools)
+
+post-install:
+ ${LN} -s ${PREFIX}/bin/gcc${gcc_suffix}/gcc${gcc_suffix} \
+ ${PREFIX}/bin/gcc${gcc_suffix}/gcc
+ # Man pages can only be generated if Perl >= 5.6 is installed;
+ # fake them otherwise.
+ for mp in ${_MANPAGES}; do \
+ ${TEST} -e $${mp} || ${TOUCH} ${TOUCH_FLAGS} $${mp}; \
+ done
+ # Add target libraries and include files to packaging list.
+ ${RM} -f ${WRKDIR}/PLIST.lib
+ for d in ${targlib:S/^${PREFIX}\///} ${targlib:S/^${PREFIX}\///:S/lib/libexec/}; do \
+ cd ${PREFIX} ; \
+ if [ -d $${d} ]; then \
+ ${FIND} $${d} -type f -o -type l >>${WRKDIR}/PLIST.lib ; \
+ ${FIND} $${d} -type d | ${SORT} -r | ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib ; \
+ fi ; \
+ done
+ ${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
+ ${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
+ ${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
+ ${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
+ cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
+
+.include <bsd.port.post.mk>
diff --git a/lang/gnat-gcc43/distinfo b/lang/gnat-gcc43/distinfo
new file mode 100644
index 000000000000..c5396d8db26f
--- /dev/null
+++ b/lang/gnat-gcc43/distinfo
@@ -0,0 +1,12 @@
+MD5 (gcc-core-3.4.6.tar.bz2) = 5324ace5145b12afd9ca867af7ec084d
+SHA256 (gcc-core-3.4.6.tar.bz2) = 3aab171d86e5a6c14cb9de35467a0472a7d5ef1d5b79a1df72ca533f8e82a133
+SIZE (gcc-core-3.4.6.tar.bz2) = 13366790
+MD5 (gcc-ada-3.4.6.tar.bz2) = 91c43393637247fe1f1ee629aa208610
+SHA256 (gcc-ada-3.4.6.tar.bz2) = d5bfb166b2ad287ba85ebba533cca4453b521479cffc1bd3c6d273f6b3d794e2
+SIZE (gcc-ada-3.4.6.tar.bz2) = 3784327
+MD5 (gcc-testsuite-3.4.6.tar.bz2) = 32a1057b841b4782ae3f4be84a98c085
+SHA256 (gcc-testsuite-3.4.6.tar.bz2) = 87f8c7ca951fd13ea241328de2e0e1af8281f1aa3a68e5831e37ff746a256574
+SIZE (gcc-testsuite-3.4.6.tar.bz2) = 2646715
+MD5 (gnat-3.15p-boot.tar.gz) = 3b25873a90978b8b4113d71dc3df315f
+SHA256 (gnat-3.15p-boot.tar.gz) = dfa61b98ad7f26ca46f8c5e61d87c42e17ad139616f315df16f25dce38044a9d
+SIZE (gnat-3.15p-boot.tar.gz) = 4608818
diff --git a/lang/gnat-gcc43/files/patch-gengtype-yacc.y b/lang/gnat-gcc43/files/patch-gengtype-yacc.y
new file mode 100644
index 000000000000..4afaae159533
--- /dev/null
+++ b/lang/gnat-gcc43/files/patch-gengtype-yacc.y
@@ -0,0 +1,12 @@
+--- gcc/gengtype-yacc.y.orig Fri Sep 20 00:33:24 2002
++++ gcc/gengtype-yacc.y Tue Apr 22 09:11:27 2003
+@@ -24,6 +24,9 @@
+ #include "system.h"
+ #include "gengtype.h"
+ #define YYERROR_VERBOSE
++
++#define malloc xmalloc
++#define realloc xrealloc
+ %}
+
+ %union {
diff --git a/lang/gnat-gcc43/pkg-descr b/lang/gnat-gcc43/pkg-descr
new file mode 100644
index 000000000000..f6bb20a58f80
--- /dev/null
+++ b/lang/gnat-gcc43/pkg-descr
@@ -0,0 +1,6 @@
+The GNU Ada compiler system built from GCC 3.4.6.
+
+Please add ${PREFIX}/bin/gcc34 to your PATH variable
+before using this port.
+
+WWW: http://gcc.gnu.org/
diff --git a/lang/gnat-gcc43/pkg-plist b/lang/gnat-gcc43/pkg-plist
new file mode 100644
index 000000000000..38eec6516868
--- /dev/null
+++ b/lang/gnat-gcc43/pkg-plist
@@ -0,0 +1,28 @@
+bin/gcc%%SUFFIX%%/cpp%%SUFFIX%%
+bin/gcc%%SUFFIX%%/gcc
+bin/gcc%%SUFFIX%%/gcc%%SUFFIX%%
+bin/gcc%%SUFFIX%%/gccbug%%SUFFIX%%
+bin/gcc%%SUFFIX%%/gcov%%SUFFIX%%
+bin/gcc%%SUFFIX%%/gnat
+bin/gcc%%SUFFIX%%/gnatbind
+bin/gcc%%SUFFIX%%/gnatbl
+bin/gcc%%SUFFIX%%/gnatchop
+bin/gcc%%SUFFIX%%/gnatclean
+bin/gcc%%SUFFIX%%/gnatfind
+bin/gcc%%SUFFIX%%/gnatkr
+bin/gcc%%SUFFIX%%/gnatlink
+bin/gcc%%SUFFIX%%/gnatls
+bin/gcc%%SUFFIX%%/gnatmake
+bin/gcc%%SUFFIX%%/gnatname
+bin/gcc%%SUFFIX%%/gnatprep
+bin/gcc%%SUFFIX%%/gnatxref
+bin/gcc%%SUFFIX%%/gpr2make
+bin/gcc%%SUFFIX%%/gprcmd
+bin/gcc%%SUFFIX%%/%%GNU_HOST%%-gcc-%%GCC_VER%%
+bin/gcc%%SUFFIX%%/%%GNU_HOST%%-gcc%%SUFFIX%%
+info/gcc%%SUFFIX%%/dir
+share/gnat/Makefile.generic
+share/gnat/Makefile.prolog
+@dirrm share/gnat
+@dirrm bin/gcc%%SUFFIX%%
+@comment Insert PLIST.lib here