d7f69e47ce
have it be automatically included by bsd.pkg.mk if USE_PKGINSTALL is set to "YES". This enforces the requirement that bsd.pkg.install.mk be included at the end of a package Makefile. Idea suggested by Julio M. Merino Vidal <jmmv at menta.net>.
71 lines
1.9 KiB
Makefile
71 lines
1.9 KiB
Makefile
# $NetBSD: Makefile,v 1.4 2003/01/28 22:03:27 jlam Exp $
|
|
|
|
# Make sure that the version number in "Makefile.gcc" matches this.
|
|
DISTNAME= gcc-3.2.1
|
|
CATEGORIES= lang
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
|
|
MAINTAINER= packages@netbsd.org
|
|
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
|
|
COMMENT= GNU Compiler Collection
|
|
|
|
NOT_FOR_PLATFORM= Darwin-*-*
|
|
|
|
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
|
|
CONFLICTS+= pgcc-[0-9]*
|
|
|
|
USE_BUILDLINK2= YES
|
|
USE_PKGINSTALL= YES
|
|
USE_GMAKE= YES
|
|
|
|
HAS_CONFIGURE= YES
|
|
CONFIGURE_ARGS= --host=${MACHINE_GNU_PLATFORM}
|
|
CONFIGURE_ARGS+= --infodir=${PREFIX}/info
|
|
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
|
|
|
|
FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX}
|
|
FILES_SUBST+= PKGNAME=${PKGNAME}
|
|
PLIST_SUBST+= PKGNAME=${PKGNAME}
|
|
|
|
INFO_FILES= cpp.info g77.info gcc.info gcj.info
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
CONFIGURE_ARGS+= --enable-shared
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-shared
|
|
. if ${CC:M*gcc*} == ""
|
|
ALL_TARGET= bootstrap
|
|
. endif
|
|
.endif
|
|
|
|
GCC_PREFIX= ${PREFIX}/${PKGNAME}
|
|
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
|
|
|
|
GCC_ARCHDIR= ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}
|
|
|
|
pre-configure:
|
|
${MKDIR} ${BUILD_DIRS}
|
|
${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/gcc/c-gperf.h
|
|
${ECHO} "bogus" > ${WRKSRC}/gcc/cstamp-h.in
|
|
|
|
post-build:
|
|
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
|
|
|
|
post-install:
|
|
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${PREFIX}/etc/${PKGNAME}.mk
|
|
${LN} -f ${GCC_PREFIX}/bin/gcc ${GCC_PREFIX}/bin/cc
|
|
# ${LN} -f ${GCC_PREFIX}/bin/g77 ${GCC_PREFIX}/bin/f77
|
|
${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
|
|
${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
|
|
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
|
|
>> ${PLIST_SRC}
|
|
${FIND} ${GCC_PREFIX} -type d -print \
|
|
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
|
|
>> ${PLIST_SRC}
|
|
|
|
.include "../../mk/texinfo.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|
|
|
|
# Make bootstrap with compiler != gcc possible.
|
|
LDFLAGS= ${_STRIPFLAG_CC}
|