pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gcc-ssp Make this package looking more like the o...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ea5357efb58c
branches:  trunk
changeset: 459856:ea5357efb58c
user:      seb <seb%pkgsrc.org@localhost>
date:      Sat Aug 09 12:43:01 2003 +0000

description:
Make this package looking more like the other gcc packages.

Most user visible change is: this version of gcc is now installed
in its own directory hierachy.

Else and among other things:
- remove build dependency on bison.
- install info files.
- remove per OPSYS PLISTs.
- example mk file style changed to match with other gcc packages.
- ...

Bump PKGREVISION.

diffstat:

 lang/gcc-ssp/MESSAGE       |    8 +-
 lang/gcc-ssp/MESSAGE.SunOS |    7 -
 lang/gcc-ssp/Makefile      |  149 +++++++++++---------
 lang/gcc-ssp/PLIST         |  229 +--------------------------------
 lang/gcc-ssp/PLIST.SunOS   |  312 ---------------------------------------------
 lang/gcc-ssp/files/gcc.mk  |   14 +-
 6 files changed, 94 insertions(+), 625 deletions(-)

diffs (truncated from 798 to 300 lines):

diff -r 8cf06747a79a -r ea5357efb58c lang/gcc-ssp/MESSAGE
--- a/lang/gcc-ssp/MESSAGE      Sat Aug 09 12:30:51 2003 +0000
+++ b/lang/gcc-ssp/MESSAGE      Sat Aug 09 12:43:01 2003 +0000
@@ -1,9 +1,9 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.2 2002/09/24 12:30:07 wiz Exp $
+$NetBSD: MESSAGE,v 1.3 2003/08/09 12:43:01 seb Exp $
 
-To use ${PKGNAME} invoke "${MAKE}" like this:
-
-${MAKE} MAKECONF=${PREFIX}/etc/${PKGBASENAME}.mk [...]
+To use ${PKGNAME} include
+"${PREFIX}/share/examples/${PKGNAME_NOREV}/mk.conf"
+in your BSD style makefile.
 
 This compiler can not compile the NetBSD kernel easily at this moment.
 ===========================================================================
diff -r 8cf06747a79a -r ea5357efb58c lang/gcc-ssp/MESSAGE.SunOS
--- a/lang/gcc-ssp/MESSAGE.SunOS        Sat Aug 09 12:30:51 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.SunOS,v 1.2 2002/09/24 12:30:07 wiz Exp $
-
-To avoid conflicts with e.g. Sun WorkShop the GNU C compiler can only be
-invoked as "gcc" but not as "cc".
-
-===========================================================================
diff -r 8cf06747a79a -r ea5357efb58c lang/gcc-ssp/Makefile
--- a/lang/gcc-ssp/Makefile     Sat Aug 09 12:30:51 2003 +0000
+++ b/lang/gcc-ssp/Makefile     Sat Aug 09 12:43:01 2003 +0000
@@ -1,12 +1,8 @@
-# $NetBSD: Makefile,v 1.27 2003/07/17 21:44:25 grant Exp $
+# $NetBSD: Makefile,v 1.28 2003/08/09 12:43:01 seb Exp $
 
 DISTNAME=              gcc-2.95.3
-GCC_VERSION=           2.95.3
 PKGNAME=               gcc-ssp-2.95.3.13
-PKGVERSION=            ${GCC_VERSION}
-PKGREVISION=
-PKGBASENAME=           gcc-ssp
-WRKSRC=                        ${WRKDIR}/objdir
+PKGREVISION=           1
 CATEGORIES=            lang security
 MASTER_SITES=          ${MASTER_SITE_GNU:=gcc/}
 
@@ -20,8 +16,9 @@
 SSP_PATCH=             protector-2.95.3-13.tar.gz
 DISTFILES+=            ${DISTNAME}.tar.gz ${SSP_PATCH}
 SITES_protector-2.95.3-13.tar.gz=      http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
-PATCHDIR=              ../gcc/patches
-GCC_FILESDIR=          ${FILESDIR}/../../gcc/files
+
+PATCHDIR=              ${.CURDIR}/../gcc/patches
+GCC_FILESDIR=          ${.CURDIR}/../gcc/files
 
 #ONLY_FOR_PLATFORM=    NetBSD-*-i386 NetBSD-*-sparc
 #
@@ -31,70 +28,79 @@
 #                      NetBSD-*-prep NetBSD-*-bebox NetBSD-*-ofppc \
 #                      NetBSD-*-amigappc NetBSD-*-sandpoint
 
-BUILD_DEPENDS+=                bison-[0-9]*:../../devel/bison
+USE_BUILDLINK2=                YES
+USE_PKGINSTALL=                YES
+USE_GMAKE=             YES
 
-USE_GMAKE=             YES
 HAS_CONFIGURE=         YES
-CONFIGURE_ARGS=                --host=${MACHINE_GNU_PLATFORM} \
-                       --prefix=${GCC_PREFIX} \
-                       --enable-shared
-CONFIGURE_SCRIPT=      ${SRCDIR}/configure
-INFO_FILES=            # Not instal info files.
+CONFIGURE_SCRIPT=      ${WRKSRC}/configure
+CONFIGURE_ARGS=                --host=${MACHINE_GNU_PLATFORM}
+CONFIGURE_ARGS+=       --prefix=${GCC_PREFIX}
+CONFIGURE_ARGS+=       --enable-shared
 
-MESSAGE_SUBST+=                MAKE=${MAKE} \
-                       PKGBASENAME=${PKGBASENAME}
-PLIST_SUBST+=          PKGBASENAME=${PKGBASENAME}
-SRCDIR=                        ${WRKDIR}/${DISTNAME}
+CONFIGURE_DIRS=                ${WRKDIR}/objdir
+BUILD_DIRS=            ${CONFIGURE_DIRS}
+
+FILES_SUBST+=          PKGNAME_NOREV=${PKGNAME_NOREV} GCC_PREFIX=${GCC_PREFIX}
+MESSAGE_SUBST+=                PKGNAME_NOREV=${PKGNAME_NOREV}
+
+INFO_DIR=              ${GCC_PREFIX:S|^${PREFIX}/||}/info
+INFO_FILES=            chill.info cpp.info g77.info gcc.info
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} != "SunOS"
-CONFIGURE_ARGS+=       --with-gnu-as --with-gnu-ld
-GCC_PREFIX=            ${LOCALBASE}/${PKGBASENAME}
-.else
+.if ${OPSYS} == "SunOS"
 .  if ${CC:M*gcc*} == ""
 ALL_TARGET=            bootstrap
 .  endif
-GCC_PREFIX=            ${LOCALBASE}
-PLIST_SRC=             ${PKGDIR}/PLIST.SunOS
-PLIST_SUBST+=          GCC_VERSION=${GCC_VERSION}
-CONFLICTS+=            gcc-[0-9]* pgcc-[0-9]*
+# we know it's a GNU toolchain on Linux and the BSDs.
+.elif ${OPSYS:M*BSD} != "" || ${OPSYS} == "Linux"
+CONFIGURE_ARGS+=       --with-gnu-as
+CONFIGURE_ARGS+=       --with-gnu-ld
+.else
+# play it safe, force a bootstrap build if we don't know for sure it
+# is gcc.
+.  if ${CC:M*gcc*} == ""
+ALL_TARGET=            bootstrap
+.  endif
 .endif
 
+GCC_PREFIX=    ${PREFIX}/${PKGNAME_NOREV}
+GCC_VERSION=   ${DISTNAME:C/^.*-//}
+GCC_ARCHDIR=   ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}
+PLIST_SRC=     ${WRKDIR}/PLIST_DYNAMIC
+
 post-extract:
        ${MKDIR} ${WRKSRC}
-       cd ${WRKSRC}/../${DISTNAME}/gcc/config; \
-       ${CP} ${GCC_FILESDIR}/xm-netbsd.h .; \
-       ${CP} ${GCC_FILESDIR}/xm-target64.h .; \
-       for FILE in ${GCC_FILESDIR}/*_* ; do \
-         ARCH=`basename $${FILE} | ${CUT} -d_ -f1`; \
-         DEST=`basename $${FILE} | ${SED} -e "s/$${ARCH}_//"`; \
-         ${MKDIR} $${ARCH}; \
-         ${CP} $${FILE} $${ARCH}/$${DEST}; \
+       ${CP} ${GCC_FILESDIR}/xm-netbsd.h ${WRKSRC}/gcc/config
+       ${CP} ${GCC_FILESDIR}/xm-target64.h ${WRKSRC}/gcc/config
+       for file in ${GCC_FILESDIR}/*_* ; do \
+               arch=`${BASENAME} $${file} | ${SED} -e "s/_.*//"`;      \
+               dest=`${BASENAME} $${file} | ${SED} -e "s/$${arch}_//"`; \
+               ${MKDIR} ${WRKSRC}/gcc/config/$${arch};                 \
+               ${CP} $${file} ${WRKSRC}/gcc/config/$${arch}/$${dest};  \
        done; \
-       cd ${WRKSRC}/../${DISTNAME}; \
-       for i in gcc/config/alpha/netbsd-elf.h gcc/config/arm/t-netbsd \
-               gcc/config/mips/x-netbsd libf2c/libF77/dtime_.c libf2c/libF77/etime_.c; do \
-         ${RM} $${i};\
-       done
+       ${RM} ${WRKSRC}/gcc/config/alpha/netbsd-elf.h
+       ${RM} ${WRKSRC}/gcc/config/arm/t-netbsd
+       ${RM} ${WRKSRC}/gcc/config/mips/x-netbsd
+       ${RM} ${WRKSRC}/libf2c/libF77/dtime_.c
+       ${RM} ${WRKSRC}/libf2c/libF77/etime_.c
 
 post-patch:
-       ${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
        cd ${WRKDIR} && ${PAX} -O -zrf ${_DISTDIR}/${SSP_PATCH}
-       ${CP} ${WRKDIR}/protector.c ${WRKDIR}/protector.h ${WRKDIR}/${DISTNAME}/gcc/
-       ${PATCH} -p0 -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protector.dif
-       ${PATCH} -p0 -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protectonly.dif
+       ${CP} ${WRKDIR}/protector.c ${WRKDIR}/protector.h ${WRKSRC}/gcc/
+       ${PATCH} -p0 -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protector.dif
+       ${PATCH} -p0 -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protectonly.dif
 
-.if ${OPSYS} != "SunOS"
+pre-configure:
+       ${MKDIR} ${BUILD_DIRS}
+       cd ${WRKSRC} && contrib/egcs_update --touch
+
 post-build:
-       for FILE in ${FILESDIR}/gcc.mk; do \
-         ${SED} -e 's#@@MAKE@@#${MAKE}#g' \
-                -e 's#@@PKGBASENAME@@#${PKGBASENAME}#g' \
-                -e 's#@@PREFIX@@#${PREFIX}#g' \
-          <$$FILE >${WRKDIR}/`basename $$FILE`; \
-       done
+       @${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc.mk > ${WRKDIR}/gcc.mk
+.if ${OPSYS} != "SunOS"
        @${ECHO} "===> Check whether stack protection works or not"
-       ${WRKSRC}/gcc/xgcc -B${WRKSRC}/gcc/ -O2 -o ${WRKDIR}/buffer ${FILESDIR}/buffer.c
+       ${BUILD_DIRS}/gcc/xgcc -B${BUILD_DIRS}/gcc/ -O2 -o ${WRKDIR}/buffer ${FILESDIR}/buffer.c
        ulimit -c 0 && ${WRKDIR}/buffer abcdefghijklmnopqrstuvwxyz  2> ${WRKDIR}/output || ${TRUE}
        @if [ x"`${CAT} ${WRKDIR}/output`" = "x: stack smashing attack in function main" ]; then \
            ${ECHO} "===> Stack protection succeeded."; \
@@ -105,24 +111,31 @@
        fi
 .endif
 
-pre-install:
-#      ${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} any PRE-INSTALL
-#      This is not needed because of no info.
-
-.if ${OPSYS} != "SunOS"
+.if ${OPSYS} == "SunOS" 
+# 
+# remove empty file and directories that show up when one does: 
+#       make install; make deinstall; make install
+# 
+post-install: 
+       -cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
+.else
 post-install:
-       ${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}/include/curses.h ${PREFIX}/${PKGBASENAME}/bin/cc
-       ${LN} -s gcc ${PREFIX}/${PKGBASENAME}/bin/cc
-       ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGBASENAME}.mk
-       ${RM} -fr ${GCC_PREFIX}/info
-.else
-# remove empy file and directories that show up when one
-# does make install; make deinstall; make install
-post-install:
-       -cd ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}/include && \
-       ${RM} -f fixed && \
-       ${RMDIR} v7 v9
+.  if exists(/usr/include/g++/FlexLexer.h)
+       ${LN} -fs /usr/include/g++/FlexLexer.h                          \
+               ${GCC_PREFIX}/include/g++-3/FlexLexer.h
+.  endif
+        ${RM} -f ${GCC_ARCHDIR}/include/curses.h ${GCC_PREFIX}/bin/cc
 .endif
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${PKGNAME_NOREV}
+       ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/share/examples/${PKGNAME_NOREV}/mk.conf
+       ${LN} -s gcc ${GCC_PREFIX}/bin/cc
+       ${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/bsd.pkg.mk"
 
diff -r 8cf06747a79a -r ea5357efb58c lang/gcc-ssp/PLIST
--- a/lang/gcc-ssp/PLIST        Sat Aug 09 12:30:51 2003 +0000
+++ b/lang/gcc-ssp/PLIST        Sat Aug 09 12:43:01 2003 +0000
@@ -1,226 +1,3 @@
-@comment $NetBSD: PLIST,v 1.5 2002/10/06 13:38:56 dmcmahill Exp $
-etc/gcc-ssp.mk
-${PKGBASENAME}/bin/c++
-${PKGBASENAME}/bin/c++filt
-${PKGBASENAME}/bin/cc
-${PKGBASENAME}/bin/chill
-${PKGBASENAME}/bin/cpp
-${PKGBASENAME}/bin/g++
-${PKGBASENAME}/bin/g77
-${PKGBASENAME}/bin/gcc
-${PKGBASENAME}/bin/gcj
-${PKGBASENAME}/bin/gcjh
-${PKGBASENAME}/bin/gcov
-${PKGBASENAME}/bin/${MACHINE_GNU_PLATFORM}-gcc
-${PKGBASENAME}/bin/jcf-dump
-${PKGBASENAME}/bin/jv-scan
-${PKGBASENAME}/${MACHINE_GNU_PLATFORM}/include/_G_config.h
-${PKGBASENAME}/include/g++-3/PlotFile.h
-${PKGBASENAME}/include/g++-3/SFile.h
-${PKGBASENAME}/include/g++-3/algo.h
-${PKGBASENAME}/include/g++-3/algobase.h
-${PKGBASENAME}/include/g++-3/algorithm
-${PKGBASENAME}/include/g++-3/alloc.h
-${PKGBASENAME}/include/g++-3/bitset
-${PKGBASENAME}/include/g++-3/builtinbuf.h
-${PKGBASENAME}/include/g++-3/bvector.h
-${PKGBASENAME}/include/g++-3/cassert
-${PKGBASENAME}/include/g++-3/cctype
-${PKGBASENAME}/include/g++-3/cerrno
-${PKGBASENAME}/include/g++-3/cfloat
-${PKGBASENAME}/include/g++-3/ciso646
-${PKGBASENAME}/include/g++-3/climits
-${PKGBASENAME}/include/g++-3/clocale
-${PKGBASENAME}/include/g++-3/cmath
-${PKGBASENAME}/include/g++-3/complex
-${PKGBASENAME}/include/g++-3/complex.h
-${PKGBASENAME}/include/g++-3/csetjmp
-${PKGBASENAME}/include/g++-3/csignal
-${PKGBASENAME}/include/g++-3/cstdarg
-${PKGBASENAME}/include/g++-3/cstddef
-${PKGBASENAME}/include/g++-3/cstdio
-${PKGBASENAME}/include/g++-3/cstdlib
-${PKGBASENAME}/include/g++-3/cstring
-${PKGBASENAME}/include/g++-3/ctime
-${PKGBASENAME}/include/g++-3/cwchar
-${PKGBASENAME}/include/g++-3/cwctype
-${PKGBASENAME}/include/g++-3/defalloc.h
-${PKGBASENAME}/include/g++-3/deque
-${PKGBASENAME}/include/g++-3/deque.h
-${PKGBASENAME}/include/g++-3/editbuf.h
-${PKGBASENAME}/include/g++-3/floatio.h
-${PKGBASENAME}/include/g++-3/fstream
-${PKGBASENAME}/include/g++-3/fstream.h
-${PKGBASENAME}/include/g++-3/function.h
-${PKGBASENAME}/include/g++-3/functional
-${PKGBASENAME}/include/g++-3/hash_map
-${PKGBASENAME}/include/g++-3/hash_map.h
-${PKGBASENAME}/include/g++-3/hash_set
-${PKGBASENAME}/include/g++-3/hash_set.h
-${PKGBASENAME}/include/g++-3/hashtable.h
-${PKGBASENAME}/include/g++-3/heap.h
-${PKGBASENAME}/include/g++-3/indstream.h
-${PKGBASENAME}/include/g++-3/iolibio.h
-${PKGBASENAME}/include/g++-3/iomanip
-${PKGBASENAME}/include/g++-3/iomanip.h
-${PKGBASENAME}/include/g++-3/iosfwd



Home | Main Index | Thread Index | Old Index