openbsd-ports/lang/gcc/3.3/Makefile

194 lines
4.6 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.56 2012/04/23 14:06:42 pascal Exp $
ONLY_FOR_ARCHS = alpha amd64 i386 m68k sparc sparc64 powerpc vax
V = 3.3.6
FULL_VERSION = 3.3.6
FULL_PKGVERSION = 3.3.6
2010-02-14 15:13:18 -05:00
BOOTSTRAP_GEN = 8
2008-08-20 05:56:17 -04:00
ADASTRAP = adastrap-i386-3.3.6-${BOOTSTRAP_GEN}.tgz
PKGNAME-main = gcc-${FULL_PKGVERSION}
PKGNAME-c++ = g++-${FULL_PKGVERSION}
PKGNAME-estdc = libstdc++-${FULL_PKGVERSION}
PKGNAME-g77 = g77-${FULL_PKGVERSION}
PKGNAME-java = gcj-${FULL_PKGVERSION}
PKGNAME-objc = gobjc-${FULL_PKGVERSION}
PKGNAME-ada = gnat-${FULL_PKGVERSION}
SHARED_LIBS = estdc++ 7.0 \
2006-01-13 15:07:53 -05:00
g2c 1.0 \
-org-w3c-dom 1.0 \
-org-xml-sax 1.0 \
gcj 5.0 \
objc 2.0 \
objc_gc 2.0
2005-09-14 06:41:02 -04:00
REVISION-main = 2
REVISION-c++ = 3
#REVISION-estdc =
REVISION-g77 = 3
REVISION-java = 3
REVISION-objc = 3
REVISION-ada = 3
EPOCH = 0
MAINTAINER = Marc Espie <espie@openbsd.org>
2011-09-26 10:06:51 -04:00
PSEUDO_FLAVORS = no_c++ no_g77 no_objc no_java no_ada
FLAVOR ?=
# currently broken on i386 ? so empty
ONLY_FOR_ARCHS-ada =
# not really interesting either
ONLY_FOR_ARCHS-java =
BUILD_DEPENDS = devel/autoconf/2.13
2010-11-22 04:20:34 -05:00
BUILD_DEPENDS += devel/metaauto
# This can be patched out, apart from java that wants a pure parser.
2010-11-17 03:05:12 -05:00
BUILD_DEPENDS += devel/bison
2011-09-26 10:06:51 -04:00
MULTI_PACKAGES = -main -g77 -objc -java -c++ -estdc -ada
2011-09-26 10:06:51 -04:00
.include <bsd.port.arch.mk>
2011-09-26 10:06:51 -04:00
# kill both C++ subpackages
.if !${BUILD_PACKAGES:M-c++}
BUILD_PACKAGES := ${BUILD_PACKAGES:N-estdc}
.endif
2010-11-17 03:05:12 -05:00
USE_GROFF = Yes
2010-11-17 03:05:12 -05:00
REGRESS_DEPENDS = devel/dejagnu
DISTNAME = gcc-${FULL_VERSION}
DISTFILES = ${DISTNAME}.tar.bz2
SUPDISTFILES = ${ADASTRAP}:0
MASTER_SITES = ${MASTER_SITE_GCC:=releases/gcc-$(FULL_VERSION)/}
MASTER_SITES0 = ftp://quatramaran.ens.fr/pub/espie/
CONFIGURE_STYLE = gnu
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/gcc
LANGS = c
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-c++}
LANGS := ${LANGS},c++
.endif
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-g77}
LANGS := ${LANGS},f77
.endif
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-objc}
LANGS := ${LANGS},objc
.endif
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-java}
LANGS := ${LANGS},java
CONFIGURE_ARGS += --enable-java-gc=system-boehm
.endif
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-ada}
LANGS := ${LANGS},ada
DISTFILES += ${ADASTRAP}:0
CONFIGURE_ENV = ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind
MAKE_ENV = ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind
post-build:
cd ${WRKBUILD}/gcc && ${MAKE_PROGRAM} gnatlib_and_tools
.endif
post-extract:
.if ${BUILD_PACKAGES:M-ada}
. for f in egcc gnatbind gnatmake gnatlink
echo "#! /bin/sh" >${WRKDIR}/bin/$f
echo 'GNAT_ROOT=${WRKDIR}/bootstrap GCC_ROOT=${WRKDIR}/bootstrap exec ${WRKDIR}/bootstrap/bin/$f "$$@"' >>${WRKDIR}/bin/$f
chmod a+x ${WRKDIR}/bin/$f
. endfor
.endif
echo "# This file automatically generated" >> ${WRKSRC}/libversions
.for l v in ${SHARED_LIBS}
echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> ${WRKSRC}/libversions
.endfor
post-install:
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-ada}
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc-lib/*/$V/adainclude
.endif
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc-lib/*/$V/include
CONFIGURE_ENV += am_cv_func_iconv=no
CONFIGURE_ARGS = \
--verbose \
--program-transform-name=s,^,e, \
--disable-nls \
--with-system-zlib \
--enable-languages=${LANGS}
# This is needed, as internal cpp is no longer compatible with the
# visible beast
CONFIGURE_ARGS += --enable-cpp
2011-09-26 10:06:51 -04:00
.if ${BUILD_PACKAGES:M-java}
CONFIGURE_ARGS += --enable-sjlj-exceptions
# No way around it, java wants a pure parser
2010-11-17 03:05:12 -05:00
BUILD_DEPENDS += devel/bison
.endif
CONFIGURE_ARGS += --enable-threads=posix
CONFIGURE_ARGS += --with-gnu-as
CONFIGURE_ARGS += --with-gnu-ld
CONFIGURE_ARGS += ${CONFIGURE_SHARED}
SEPARATE_BUILD = flavored
USE_GMAKE = Yes
# you shouldn't skip bootstrap unless you know what you're doing
# use bootstrap-lean if you're pressed for space
ALL_TARGET = bootstrap
.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "sparc"
PKG_ARGS += -DPIC=1
.else
PKG_ARGS += -DPIC=0
.endif
.if ${MACHINE_ARCH} == "powerpc"
PKG_ARGS += -DPPC=1
.else
PKG_ARGS += -DPPC=0
.endif
RUN_DEPENDS = gcc-${FULL_PKGVERSION}v0:${PKGPATH}
WANTLIB = c
RUN_DEPENDS-main =
RUN_DEPENDS-estdc =
WANTLIB-estdc =
2010-11-17 03:05:12 -05:00
LIB_DEPENDS-java = devel/boehm-gc
WANTLIB-java = ${WANTLIB} gc
RUN_DEPENDS-c++ = ${RUN_DEPENDS} libstdc++->=3.3,<3.4|libstdc++->=3.3v0,<3.4v0:${PKGPATH},-estdc
2008-08-20 05:56:17 -04:00
.include <bsd.port.mk>
2008-08-20 05:56:17 -04:00
ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}${PKG_SUFX}
GCC_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-main}${PKG_SUFX}
2008-08-20 05:56:17 -04:00
adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE}
mkdir -p ${WRKDIR}/prepare/bootstrap
cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE}
cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE}
rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man}
cd ${WRKDIR}/prepare && tar zcf ${FULLDISTDIR}/${ADASTRAP} bootstrap