diff --git a/lang/gcc/3.3/Makefile b/lang/gcc/3.3/Makefile index e92e94d1431..91639b247cc 100644 --- a/lang/gcc/3.3/Makefile +++ b/lang/gcc/3.3/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2006/10/20 11:03:38 espie Exp $ +# $OpenBSD: Makefile,v 1.20 2006/11/22 01:17:45 espie Exp $ ONLY_FOR_ARCHS= alpha i386 m68k sparc sparc64 powerpc vax @@ -6,7 +6,7 @@ V=3.3.6 FULL_VERSION=3.3.6 FULL_PKGVERSION=3.3.6 -PKGNAME= gcc-${FULL_PKGVERSION}p2 +PKGNAME-main= gcc-${FULL_PKGVERSION}p3 PKGNAME-c++ = g++-${FULL_PKGVERSION}p2 PKGNAME-estdc= libstdc++-${FULL_PKGVERSION}p0 PKGNAME-g77= g77-${FULL_PKGVERSION}p2 @@ -23,52 +23,31 @@ SHARED_LIBS= estdc++ 6.0 \ MAINTAINER= Marc Espie -MAKE_GXX=Yes -MAKE_FORTRAN=Yes -MAKE_OBJC=Yes -#MAKE_JAVA=Yes +PSEUDO_FLAVORS=c++ fortran objc java ada + .if ${MACHINE_ARCH} == "i386" -MAKE_ADA=Yes +FLAVOR?=c++ fortran objc ada +.else +FLAVOR?=c++ fortran objc .endif -MAKE_GXX?=No -MAKE_FORTRAN?=No -MAKE_OBJC?=No -MAKE_JAVA?=No -MAKE_ADA?=No +.if ${FLAVOR:L:Mjava} +FLAVOR+=c++ +.endif BUILD_DEPENDS= ::devel/autoconf/2.13 BUILD_DEPENDS+= ::devel/metaauto -SUBPACKAGE?= - -.if defined(PACKAGING) && ${SUBPACKAGE} != "-estdc" -WANTLIB=c -.endif - -.if ${MAKE_JAVA:L} == "yes" -. if !defined(PACKAGING) || ${SUBPACKAGE} == "-java" -LIB_DEPENDS+=gc::devel/boehm-gc -. endif -.endif # This can be patched out, apart from java that wants a pure parser. BUILD_DEPENDS+= :bison-*:devel/bison -.if ${MAKE_JAVA:L} == "yes" -MAKE_GXX=Yes -.endif - -MULTI_PACKAGES= +MULTI_PACKAGES=-main # No sub packages description DESCR=${PKGDIR}/DESCR REGRESS_DEPENDS=::devel/dejagnu -# No way around it, java wants a pure parser -.if ${MAKE_JAVA:L} == "yes" -BUILD_DEPENDS+=:bison-*:devel/bison -.endif DISTNAME= gcc-${FULL_VERSION} @@ -84,40 +63,41 @@ CONFIGURE_STYLE= gnu MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/gcc LANGS=c -.if ${MAKE_GXX:L} == "yes" + +.if ${FLAVOR:L:Mc++} LANGS:=${LANGS},c++ MULTI_PACKAGES+=-c++ -estdc .endif -.if ${MAKE_FORTRAN:L} == "yes" + +.if ${FLAVOR:L:Mfortran} LANGS:=${LANGS},f77 MULTI_PACKAGES+=-g77 .endif -.if ${MAKE_OBJC:L} == "yes" + +.if ${FLAVOR:L:Mobjc} LANGS:=${LANGS},objc MULTI_PACKAGES+=-objc .endif -.if ${MAKE_JAVA:L} == "yes" + +.if ${FLAVOR:L:Mjava} LANGS:=${LANGS},java MULTI_PACKAGES+=-java CONFIGURE_ARGS+=--enable-java-gc=system-boehm .endif -.if ${MAKE_ADA:L} == "yes" + +.if ${FLAVOR:L:Mada} LANGS:=${LANGS},ada MULTI_PACKAGES+=-ada DISTFILES+=adastrap-${MACHINE_ARCH}-3.3.6-4.tgz:0 -#CONFIGURE_ENV=ADAC=${LOCALBASE}/bin/egcc GNATBIND=${LOCALBASE}/bin/gnatbind -#MAKE_ENV=ADAC=${LOCALBASE}/bin/egcc GNATBIND=${LOCALBASE}/bin/gnatbind -#BUILD_DEPENDS+=:gnat-*:lang/gcc/3.3,-ada 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 ${MAKE_ADA:L} == "yes" +.if ${FLAVOR:L:Mada} . 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 @@ -129,6 +109,12 @@ post-extract: echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> ${WRKSRC}/libversions .endfor +post-install: +.if ${FLAVOR:L:Mada} + chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc-lib/*/$V/adainclude +.endif + chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc-lib/*/$V/include/* + CONFIGURE_ENV+=am_cv_func_iconv=no CONFIGURE_ARGS= \ @@ -142,8 +128,10 @@ CONFIGURE_ARGS= \ # visible beast CONFIGURE_ARGS+=--enable-cpp -.if ${MAKE_JAVA:L} == "yes" +.if ${FLAVOR:L:Mjava} CONFIGURE_ARGS+=--enable-sjlj-exceptions +# No way around it, java wants a pure parser +BUILD_DEPENDS+=:bison-*:devel/bison .endif @@ -154,7 +142,7 @@ CONFIGURE_ARGS += --with-gnu-as CONFIGURE_ARGS += --with-gnu-ld CONFIGURE_ARGS += ${CONFIGURE_SHARED} -SEPARATE_BUILD=concurrent +SEPARATE_BUILD=flavored USE_GMAKE= yes @@ -174,14 +162,17 @@ PKG_ARGS+=-DPPC=1 PKG_ARGS+=-DPPC=0 .endif -.if defined(PACKAGING) && defined(SUBPACKAGE) -. if !empty(SUBPACKAGE) && ${SUBPACKAGE} != "-estdc" -RUN_DEPENDS+=:gcc-${FULL_PKGVERSION}:${PKGPATH} -. endif -. if ${SUBPACKAGE} == "-c++" -RUN_DEPENDS+=::${PKGPATH},-estdc -. endif -.endif +RUN_DEPENDS= :gcc-${FULL_PKGVERSION}:${PKGPATH} +WANTLIB=c + +RUN_DEPENDS-main= + +RUN_DEPENDS-estdc= +WANTLIB-estdc= + +LIB_DEPENDS-java=gc::devel/boehm-gc + +RUN_DEPENDS-c++ =${RUN_DEPENDS} ::${PKGPATH},-estdc .include diff --git a/lang/gcc/3.3/pkg/PFRAG.PIC b/lang/gcc/3.3/pkg/PFRAG.PIC-main similarity index 50% rename from lang/gcc/3.3/pkg/PFRAG.PIC rename to lang/gcc/3.3/pkg/PFRAG.PIC-main index eb828fe29a6..71b2608bb22 100644 --- a/lang/gcc/3.3/pkg/PFRAG.PIC +++ b/lang/gcc/3.3/pkg/PFRAG.PIC-main @@ -1,3 +1,3 @@ -@comment $OpenBSD: PFRAG.PIC,v 1.1.1.1 2005/01/03 15:21:30 espie Exp $ +@comment $OpenBSD: PFRAG.PIC-main,v 1.1 2006/11/22 01:17:45 espie Exp $ lib/gcc-lib/${CONFIG}/${V}/fpic/ lib/gcc-lib/${CONFIG}/${V}/fpic/libgcc.a diff --git a/lang/gcc/3.3/pkg/PFRAG.PPC b/lang/gcc/3.3/pkg/PFRAG.PPC deleted file mode 100644 index 0d1d477800a..00000000000 --- a/lang/gcc/3.3/pkg/PFRAG.PPC +++ /dev/null @@ -1,2 +0,0 @@ -@comment $OpenBSD: PFRAG.PPC,v 1.1.1.1 2005/01/03 15:21:30 espie Exp $ -lib/gcc-lib/${CONFIG}/${V}/crtsavres.o diff --git a/lang/gcc/3.3/pkg/PFRAG.PPC-main b/lang/gcc/3.3/pkg/PFRAG.PPC-main new file mode 100644 index 00000000000..8e625c7cdc5 --- /dev/null +++ b/lang/gcc/3.3/pkg/PFRAG.PPC-main @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.PPC-main,v 1.1 2006/11/22 01:17:45 espie Exp $ +lib/gcc-lib/${CONFIG}/${V}/crtsavres.o diff --git a/lang/gcc/3.3/pkg/PLIST b/lang/gcc/3.3/pkg/PLIST-main similarity index 93% rename from lang/gcc/3.3/pkg/PLIST rename to lang/gcc/3.3/pkg/PLIST-main index 81edfb19966..a5545d66363 100644 --- a/lang/gcc/3.3/pkg/PLIST +++ b/lang/gcc/3.3/pkg/PLIST-main @@ -1,5 +1,6 @@ -@comment $OpenBSD: PLIST,v 1.2 2005/09/14 10:41:02 espie Exp $ +@comment $OpenBSD: PLIST-main,v 1.1 2006/11/22 01:17:45 espie Exp $ @conflict egcs-*-core +@pkgpath lang/gcc/3.3 @pkgpath lang/egcs/stable bin/ecpp bin/egcc