pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/gcc3-c++ Add DESTDIR support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bfcd00554d1f
branches:  trunk
changeset: 546717:bfcd00554d1f
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Sep 07 02:10:15 2008 +0000

description:
Add DESTDIR support.

diffstat:

 lang/gcc3-c++/Makefile |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r e9bcc3f2ae8e -r bfcd00554d1f lang/gcc3-c++/Makefile
--- a/lang/gcc3-c++/Makefile    Sun Sep 07 02:08:01 2008 +0000
+++ b/lang/gcc3-c++/Makefile    Sun Sep 07 02:10:15 2008 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.18 2006/12/07 11:24:28 markd Exp $
+# $NetBSD: Makefile,v 1.19 2008/09/07 02:10:15 dholland Exp $
 
 PKGNAME=       gcc3${GCC3_PKGMODIF}-c++-${GCC_VERSION}
 COMMENT=       GNU Compiler Collection, v3 - C++ compiler
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 INSTLIBS=      libstdc++-v3/libsupc++/libsupc++.la                     \
                libstdc++-v3/src/libstdc++.la
 
@@ -18,17 +20,20 @@
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} all-target-libstdc++-v3
 
 post-build:
-       @${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
+       ${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
 
 do-install:
-       ${INSTALL_PROGRAM_DIR} ${GCC_ARCHDIR}
-       ${INSTALL_PROGRAM} ${WRKSRC}/gcc/cc1plus ${GCC_ARCHDIR}
+       ${INSTALL_PROGRAM_DIR} ${DESTDIR}${GCC_ARCHDIR}
+       ${INSTALL_PROGRAM} ${WRKSRC}/gcc/cc1plus ${DESTDIR}${GCC_ARCHDIR}
        cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} \
-               c++.install-common c++.install-man
+               c++.install-common c++.install-man \
+               DESTDIR=${DESTDIR:Q}
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \
-               install-target-libstdc++-v3
+               install-target-libstdc++-v3 \
+               DESTDIR=${DESTDIR:Q}
 
 post-install:
-       ${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${GCC_PREFIX}/mk/c++.mk
+       ${INSTALL_DATA_DIR} ${DESTDIR:Q}${GCC_PREFIX}/mk
+       ${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${DESTDIR:Q}${GCC_PREFIX}/mk/c++.mk
 
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index