From owner-p4-projects@FreeBSD.ORG Thu Jul 6 23:16:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA87516A4E0; Thu, 6 Jul 2006 23:16:54 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95B6116A4DE for ; Thu, 6 Jul 2006 23:16:54 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4951A43D45 for ; Thu, 6 Jul 2006 23:16:54 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k66NGskg059175 for ; Thu, 6 Jul 2006 23:16:54 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k66NGs6m059172 for perforce@freebsd.org; Thu, 6 Jul 2006 23:16:54 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 6 Jul 2006 23:16:54 GMT Message-Id: <200607062316.k66NGs6m059172@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 100818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 23:16:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=100818 Change 100818 by gabor@gabor_spitfire on 2006/07/06 23:15:51 USE_LDCONFIG and INSTALL_SHLIB should also work with DESTDIR now. This still needs a thorough testing, however and might be refined later. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#11 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#11 (text+ko) ==== @@ -1342,17 +1342,25 @@ PREFIX?= ${LOCALBASE_REL} .endif -### FIXME: ldconfig in DESTDIR - .if defined(USE_LINUX_PREFIX) -LDCONFIG_CMD?= ${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE} +.if !defined(DESTDIR) +LDCONFIG_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} +.else +LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} +.endif LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD} .else -LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST} +.if !defined(DESTDIR) +LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST} LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG} -m ${LDCONFIG_PLIST} LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R +.else +LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST} +LDCONFIG_PLIST_EXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST} +LDCONFIG_PLIST_UNEXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -R .endif +.endif PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg @@ -2891,8 +2899,6 @@ # Put this as far down as possible so it will catch all PLIST_SUB definitions. -### FIXME: ldconfig in DESTDIR - .if defined(INSTALLS_SHLIB) LDCONFIG_DIRS?= %%PREFIX%%/lib LDCONFIG_PLIST!= ${ECHO_CMD} ${LDCONFIG_DIRS} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} @@ -3740,10 +3746,18 @@ .if defined(USE_LDCONFIG) .if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Running ldconfig" +.if !defined(DESTDIR) ${LDCONFIG} -m ${USE_LDCONFIG} .else + ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${USE_LDCONFIG} +.endif +.else @${ECHO_MSG} "===> Running ldconfig (errors are ignored)" +.if !defined(DESTDIR) -${LDCONFIG} -m ${USE_LDCONFIG} +.else + ${CHROOT} ${DESTDIR} -${LDCONFIG} -m ${USE_LDCONFIG} +.endif .endif .if ${USE_LDCONFIG:L} != "${PREFIX}/lib" @${ECHO_MSG} "===> Installing ldconfig configuration file" @@ -3761,10 +3775,18 @@ .if defined(USE_LDCONFIG32) .if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Running ldconfig" +.if !defined(DESTDIR) ${LDCONFIG} -32 -m ${USE_LDCONFIG32} .else + ${CHROOT} ${DESTDIR} ${LDCONFIG} -32 -m ${USE_LDCONFIG32} +.endif +.else @${ECHO_MSG} "===> Running ldconfig (errors are ignored)" +.if !defined(DESTDIR) -${LDCONFIG} -32 -m ${USE_LDCONFIG32} +.else + ${CHROOT} ${DESTDIR} -${LDCONFIG} -32 -m ${USE_LDCONFIG32} +.endif .endif @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" .if defined(NO_LDCONFIG_MTREE)