use bsd.port.arch.mk

This commit is contained in:
espie 2011-09-25 12:19:23 +00:00
parent 181d94d486
commit 7d0a0c4644

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.63 2011/09/16 10:31:20 espie Exp $
# $OpenBSD: Makefile,v 1.64 2011/09/25 12:19:23 espie Exp $
ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64
#BROKEN=adjust for types changes
@ -42,47 +42,19 @@ SHARED_LIBS = estdc++ 11.0 \
MAINTAINER = Marc Espie <espie@openbsd.org>
USE_GROFF = Yes
PSEUDO_FLAVORS = no_c++ no_fortran no_objc no_java no_ada
PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada
FLAVOR ?=
ONLY_FOR_ARCHS-ada = i386
ONLY_FOR_ARCHS-java = amd64 sparc64 i386
MULTI_PACKAGES = -main
MULTI_PACKAGES = -main -f95 -objc -java -ada -c++ -estdc
BUILD = c
.include <bsd.port.arch.mk>
.if !${FLAVOR:L:Mno_fortran}
MULTI_PACKAGES += -f95
BUILD += fortran
.endif
.if !${FLAVOR:L:Mno_objc}
MULTI_PACKAGES += -objc
BUILD += objc
.endif
.if !${FLAVOR:L:Mno_java}
MULTI_PACKAGES += -java
. for _a in ${MACHINE_ARCH} ${ARCH}
. if ${ONLY_FOR_ARCHS-java:M${_a}}
BUILD += java
. endif
. endfor
.endif
.if !${FLAVOR:L:Mno_ada}
MULTI_PACKAGES += -ada
. for _a in ${MACHINE_ARCH} ${ARCH}
. if ${ONLY_FOR_ARCHS-ada:M${_a}}
BUILD += ada
. endif
. endfor
.endif
.if !${FLAVOR:L:Mno_c++} || ${BUILD:Mjava}
MULTI_PACKAGES += -c++ -estdc
BUILD += c++
# kill both C++ subpackages
.if !${BUILD_PACKAGES:M-c++}
BUILD_PACKAGES := ${BUILD_PACKAGES:N-estdc}
.endif
DISTFILES = ${DISTNAME}.tar.bz2
@ -108,23 +80,23 @@ CONFIGURE_STYLE = gnu
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/gcc
LANGS = c
.if ${BUILD:Mc++}
.if ${BUILD_PACKAGES:M-c++}
LANGS := ${LANGS},c++
REGRESS_DEPENDS += libstdc++->=4.2,<4.3|libstdc++->=4.2v0,<4.3v0:${BUILD_PKGPATH},-estdc
.endif
.if ${BUILD:Mfortran}
.if ${BUILD_PACKAGES:M-f95}
LANGS := ${LANGS},fortran
CONFIGURE_ARGS += --with-gmp=${LOCALBASE}
.endif
.if ${BUILD:Mobjc}
.if ${BUILD_PACKAGES:M-objc}
LANGS := ${LANGS},objc
.endif
.if ${BUILD:Mjava}
.if ${BUILD_PACKAGES:M-java}
LANGS := ${LANGS},java
BUILD_DEPENDS += archivers/zip>=2.3p0
CONFIGURE_ARGS += --enable-libgcj
.endif
.if ${BUILD:Mada}
.if ${BUILD_PACKAGES:M-ada}
LANGS := ${LANGS},ada
DISTFILES += ${ADASTRAP}:0
CONFIGURE_ENV = ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind
@ -146,7 +118,7 @@ post-extract:
.endfor
post-install:
.if ${BUILD:Mada} == "yes"
.if ${BUILD_PACKAGES:M-ada}
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/adainclude
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/adalib
.endif