Date: Wed, 21 Jun 2006 12:57:26 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 99754 for review Message-ID: <200606211257.k5LCvQMi082045@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99754 Change 99754 by gabor@spitfire on 2006/06/21 12:56:53 Add basic DESTDIR support. It already works for the simplest ports without USE_* that don't use [pre|do|post]-install targets don't have dependencies, and don't have things like PREFIX?= ${LINUXBASE}. Those must be PREFIX?= ${LINUXBASE_REL} in the future. Similarly we have X11BASE_REL. Several things have to be fixed: - OSVERSION handling in DESTDIR and in jail while here - ldconfig handling in DESTDIR - conflict checking in DESTDIR [1] - pkg_info usage in DESTDIR [1] - deinstall from DESTDIR [1] - plist summary with DESTDIR - more testing with manpages, as I'm not sure they install fine [1] These are going to be very complicated because the current infrastructure uses pkg_* tools for these and pkg_* tools don't have DESTDIR or chroot support except pkg_add but that is irrelevant in this case. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.apache.mk#3 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.emacs.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.gnome.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.mail.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.openssl.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#3 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.subdir.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.python.mk#2 edit .. //depot/projects/soc2006/gabor_ports/Mk/bsd.ruby.mk#2 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.apache.mk#3 (text+ko) ==== @@ -175,7 +175,7 @@ --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \ --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" .if ${USE_APACHE:Mcommon2*} != "" -CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" +CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-bin="${DESTDIR}${PREFIX}/sbin/suexec" .endif . if defined(WITH_SUEXEC_UMASK) ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.emacs.mk#2 (text+ko) ==== @@ -236,8 +236,8 @@ # find where emacsen is installed # look for it in PREEFIX first and fall back to LOCALBASE then -.if exists(${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER}) -EMACS_BASE?= ${PREFIX} +.if exists(${DESTDIR}${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER}) +EMACS_BASE?= ${DESTDIR}${PREFIX} .else EMACS_BASE?= ${LOCALBASE} .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.gnome.mk#2 (text+ko) ==== @@ -106,13 +106,13 @@ GNOME_HTML_DIR?= ${PREFIX}/share/doc GCONF_CONFIG_OPTIONS?= merged GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults -GCONF_CONFIG_SOURCE?=xml:${GCONF_CONFIG_OPTIONS}:${PREFIX}/${GCONF_CONFIG_DIRECTORY} +GCONF_CONFIG_SOURCE?=xml:${GCONF_CONFIG_OPTIONS}:${DESTDIR}${PREFIX}/${GCONF_CONFIG_DIRECTORY} GNOME_LOCALSTATEDIR?= ${PREFIX}/share/gnome gnomeprefix_CONFIGURE_ENV=GTKDOC="false" -gnomeprefix_CONFIGURE_ARGS=--localstatedir=${GNOME_LOCALSTATEDIR} \ - --datadir=${PREFIX}/share/gnome \ - --with-html-dir=${GNOME_HTML_DIR} \ - --with-help-dir=${PREFIX}/share/gnome/help \ +gnomeprefix_CONFIGURE_ARGS=--localstatedir=${DESTDIR}${GNOME_LOCALSTATEDIR} \ + --datadir=${DESTDIR}${PREFIX}/share/gnome \ + --with-html-dir=${DESTDIR}${GNOME_HTML_DIR} \ + --with-help-dir=${DESTDIR}${PREFIX}/share/gnome/help \ --disable-gtk-doc \ --with-gconf-source=${GCONF_CONFIG_SOURCE} gnomeprefix_USE_GNOME_IMPL=gnomehier @@ -725,10 +725,10 @@ gnome-pre-su-install: .if defined(_USE_GNOME) && ${_USE_GNOME:Mgnomeprefix}!="" && !defined(NO_MTREE) - @${MTREE_CMD} ${MTREE_ARGS:S/${MTREE_FILE}/${GNOME_MTREE_FILE}/} ${PREFIX}/ >/dev/null + @${MTREE_CMD} ${MTREE_ARGS:S/${MTREE_FILE}/${GNOME_MTREE_FILE}/} ${DESTDIR}${PREFIX}/ >/dev/null .endif .if defined(GCONF_SCHEMAS) - @${MKDIR} ${PREFIX}/etc/gconf/gconf.xml.defaults/ + @${MKDIR} ${DESTDIR}${PREFIX}/etc/gconf/gconf.xml.defaults/ .else @${DO_NADA} .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.mail.mk#2 (text+ko) ==== @@ -51,9 +51,9 @@ .endif .if defined(QMAIL_SLAVEPORT) -QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:L} +QMAIL_DEPENDS= ${DESTDIR}${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:L} .else -QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail +QMAIL_DEPENDS= ${DESTDIR}${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail .endif .if defined(USE_QMAIL) || defined(USE_QMAIL_RUN) ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.openssl.mk#2 (text+ko) ==== @@ -59,10 +59,10 @@ .endif .if defined(WITH_OPENSSL_BASE) -OPENSSLBASE= /usr -OPENSSLDIR= /etc/ssl +OPENSSLBASE= ${DESTDIR}/usr +OPENSSLDIR= ${DESTDIR}/etc/ssl -.if !exists(/usr/lib/libcrypto.so) +.if !exists(${DESTDIR}/usr/lib/libcrypto.so) check-depends:: @${ECHO_CMD} "Dependency error: this port requires the OpenSSL library, which is part of" @${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your" @@ -98,7 +98,7 @@ .endif MAKE_ARGS+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" .endif -OPENSSLRPATH= /usr/lib:${LOCALBASE}/lib +OPENSSLRPATH= ${DESTDIR}$/usr/lib:${LOCALBASE}/lib .else ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#3 (text+ko) ==== @@ -491,6 +491,16 @@ # Various directory definitions and variables to control them. # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. # +# DESTDIR - The path to the environment we are installing to. Define +# this if you want to install packages into a jail +# or into an another FreeBSD environment mounted +# elsewhere than /. ${PREFIX}, ${LOCALBASE}, +# ${LINUXBASE} and ${X11BASE} are all relative to +# ${DESTDIR}. E.g. setting DESTDIR=/bla LOCALBASE=/opt +# results packages installed under /bla/opt and registered +# under /bla/var/db/pkg. +# Default: / (not set) +# # X11BASE - Where X11 ports install things. # Default: /usr/X11R6 # LOCALBASE - Where non-X11 ports install things. @@ -1127,6 +1137,8 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(].*//' .endif +### FIXME: OSVERSION in DESTDIR and in jail + # Get __FreeBSD_version .if !defined(OSVERSION) OSVERSION!= ${SYSCTL} -n kern.osreldate @@ -1261,9 +1273,15 @@ # tree we are and thus can't go relative. They can, of course, be overridden # by individual Makefiles or local system make configuration. PORTSDIR?= /usr/ports -LOCALBASE?= ${DESTDIR}/usr/local -X11BASE?= ${DESTDIR}/usr/X11R6 -LINUXBASE?= ${DESTDIR}/compat/linux +LOCALBASE?= /usr/local +X11BASE?= /usr/X11R6 +LINUXBASE?= /compat/linux +LOCALBASE_REL:= ${LOCALBASE} +X11BASE_REL:= ${X11BASE} +LINUXBASE_REL:= ${LINUXBASE} +LOCALBASE:= ${DESTDIR}${LOCALBASE_REL} +X11BASE:= ${DESTDIR}${X11BASE_REL} +LINUXBASE:= ${DESTDIR}${LINUXBASE_REL} DISTDIR?= ${PORTSDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} INDEXDIR?= ${PORTSDIR} @@ -1308,14 +1326,16 @@ USE_XLIB= yes .endif .if defined(USE_X_PREFIX) -PREFIX?= ${X11BASE} +PREFIX?= ${X11BASE_REL} .elif defined(USE_LINUX_PREFIX) -PREFIX?= ${LINUXBASE} +PREFIX?= ${LINUXBASE_REL} NO_MTREE= yes .else -PREFIX?= ${LOCALBASE} +PREFIX?= ${LOCALBASE_REL} .endif +### FIXME: ldconfig in DESTDIR + .if defined(USE_LINUX_PREFIX) LDCONFIG_CMD?= ${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE} LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} @@ -1378,8 +1398,8 @@ SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} .if ${PERL_LEVEL} < 500600 -PERL5= /usr/bin/perl${PERL_VERSION} -PERL= /usr/bin/perl +PERL5= ${DESTDIR}/usr/bin/perl${PERL_VERSION} +PERL= ${DESTDIR}/usr/bin/perl .else PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} PERL= ${LOCALBASE}/bin/perl @@ -1489,8 +1509,8 @@ BUILD_WRKSRC?= ${WRKSRC} INSTALL_WRKSRC?=${WRKSRC} -PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} -SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \ +PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} +SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \ DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} PLIST_REINPLACE+= dirrmtry @@ -1830,10 +1850,10 @@ PL_BUILD?= Build CONFIGURE_ARGS+= \ create_packlist=0 \ - install_path=lib="${PREFIX}/${SITE_PERL_REL}" \ - install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \ - install_path=script="${PREFIX}/bin" \ - install_path=bin="${PREFIX}/bin" \ + install_path=lib="${DESTDIR}${PREFIX}/${SITE_PERL_REL}" \ + install_path=arch="${DESTDIR}${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \ + install_path=script="${DESTDIR}${PREFIX}/bin" \ + install_path=bin="${DESTDIR}${PREFIX}/bin" \ install_path=libdoc="${MAN3PREFIX}/man/man3" \ install_path=bindoc="${MAN1PREFIX}/man/man1" .elif defined(PERL_CONFIGURE) @@ -1978,8 +1998,8 @@ .endif .if exists(/sbin/sha256) SHA256?= /sbin/sha256 -.elif exists(${LOCALBASE}/sbin/sha256) -SHA256?= ${LOCALBASE}/sbin/sha256 +.elif exists(${LOCALBASE_REL}/sbin/sha256) +SHA256?= ${LOCALBASE_REL}/sbin/sha256 .else SHA256?= NO .endif @@ -1990,7 +2010,7 @@ MAKE_FLAGS?= -f MAKEFILE?= Makefile -MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}" +MAKE_ENV+= DESTDIR=${DESTDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}" .if ${OSVERSION} < 500016 PTHREAD_CFLAGS?= -D_THREAD_SAFE @@ -2084,7 +2104,7 @@ # Figure out where the local mtree file is .if !defined(MTREE_FILE) && !defined(NO_MTREE) -.if ${PREFIX} == ${X11BASE} || defined(USE_X_PREFIX) +.if ${PREFIX} == ${X11BASE_REL} || defined(USE_X_PREFIX) # User may have specified non-standard PREFIX for installing a port that # uses X .if ${X_WINDOW_SYSTEM:L} == xfree86-3 @@ -2203,7 +2223,7 @@ .endif .endif # where pkg_add records its dirty deeds. -PKG_DBDIR?= /var/db/pkg +PKG_DBDIR?= ${DESTDIR}/var/db/pkg MOTIFLIB?= -L${X11BASE}/lib -lXm -lXp @@ -2697,10 +2717,10 @@ PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX} .if defined(PERL_CONFIGURE) -CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \ - INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" +CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${DESTDIR}${PREFIX}" \ + INSTALLPRIVLIB="${DESTDIR}${PREFIX}/lib" INSTALLARCHLIB="${DESTDIR}${PREFIX}/lib" CONFIGURE_SCRIPT?= Makefile.PL -MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} +MAN3PREFIX?= ${DESTDIR}${PREFIX}/lib/perl5/${PERL_VERSION} .undef HAS_CONFIGURE .endif @@ -2716,7 +2736,7 @@ .if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax .endif -CONFIGURE_ARGS+= --prefix=${PREFIX} ${CONFIGURE_TARGET} +CONFIGURE_ARGS+= --prefix=${DESTDIR}${PREFIX} ${CONFIGURE_TARGET} CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} HAS_CONFIGURE= yes .endif @@ -2726,16 +2746,17 @@ WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ - PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} + PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \ + DESTDIR=${DESTDIR} .if defined(BATCH) SCRIPTS_ENV+= BATCH=yes .endif .if ${PREFIX} == /usr -MANPREFIX?= /usr/share +MANPREFIX?= ${DESTDIR}/usr/share .else -MANPREFIX?= ${PREFIX} +MANPREFIX?= ${DESTDIR}${PREFIX} .endif .for sect in 1 2 3 4 5 6 7 8 9 @@ -2813,9 +2834,9 @@ .if defined(_MANPAGES) .if defined(NOMANCOMPRESS) -__MANPAGES:= ${_MANPAGES:S%^${PREFIX}/%%} +__MANPAGES:= ${_MANPAGES:S%^${DESTDIR}${PREFIX}/%%} .else -__MANPAGES:= ${_MANPAGES:S%^${PREFIX}/%%:S%$%.gz%} +__MANPAGES:= ${_MANPAGES:S%^${DESTDIR}${PREFIX}/%%:S%$%.gz%} .endif .if ${MANCOMPRESSED} == "yes" @@ -2830,16 +2851,16 @@ INFO_PATH?= info .endif -DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} -EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} -DATADIR?= ${PREFIX}/share/${PORTNAME} +DOCSDIR?= ${DESTDIR}${PREFIX}/share/doc/${PORTNAME} +EXAMPLESDIR?= ${DESTDIR}${PREFIX}/share/examples/${PORTNAME} +DATADIR?= ${DESTDIR}${PREFIX}/share/${PORTNAME} -PLIST_SUB+= DOCSDIR="${DOCSDIR:S,^${PREFIX}/,,}" \ - EXAMPLESDIR="${EXAMPLESDIR:S,^${PREFIX}/,,}" \ - DATADIR="${DATADIR:S,^${PREFIX}/,,}" +PLIST_SUB+= DOCSDIR="${DOCSDIR:S,^${DESTDIR}${PREFIX}/,,}" \ + EXAMPLESDIR="${EXAMPLESDIR:S,^${DESTDIR}${PREFIX}/,,}" \ + DATADIR="${DATADIR:S,^${DESTDIR}${PREFIX}/,,}" -DESKTOPDIR?= ${PREFIX}/share/applications -_DESKTOPDIR_REL= ${DESKTOPDIR:S,^${PREFIX}/,,}/ +DESKTOPDIR?= ${DESTDIR}${PREFIX}/share/applications +_DESKTOPDIR_REL= ${DESKTOPDIR:S,^${DESTDIR}${PREFIX}/,,}/ .if ${_DESKTOPDIR_REL} == ${DESKTOPDIR}/ # DESKTOPDIR is not beneath PREFIX @@ -2848,6 +2869,8 @@ # 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/=/%%!/} @@ -2999,7 +3022,7 @@ @cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ - FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ + FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} DESTDIR=${DESTDIR} PREFIX=${PREFIX} \ DEPENDS="${DEPENDS}" BUILD_DEPENDS="${BUILD_DEPENDS}" \ RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \ CONFLICTS="${CONFLICTS}" \ @@ -3461,9 +3484,11 @@ # Check conflicts +### FIXME: conflict checking in DESTDIR is temporarly ignored for testing + .if !target(check-conflicts) check-conflicts: -.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS) +.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS) && !defined(DESTDIR) @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \ conflicts_with=; \ for entry in $${found}; do \ @@ -3602,6 +3627,8 @@ # Utility targets follow +### FIXME: pkg_info in DESTDIR + .if !target(check-already-installed) check-already-installed: .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) @@ -3649,12 +3676,12 @@ .if !target(install-mtree) install-mtree: - @${MKDIR} ${PREFIX} + @${MKDIR} ${DESTDIR}${PREFIX} @if [ `${ID} -u` != 0 ]; then \ - if [ -w ${PREFIX}/ ]; then \ + if [ -w ${DESTDIR}${PREFIX}/ ]; then \ ${ECHO_MSG} "Warning: not superuser, you may get some errors during installation."; \ else \ - ${ECHO_MSG} "Error: ${PREFIX}/ not writable."; \ + ${ECHO_MSG} "Error: ${DESTDIR}${PREFIX}/ not writable."; \ ${FALSE}; \ fi; \ fi @@ -3665,9 +3692,9 @@ ${ECHO_CMD} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \ exit 1; \ else \ - ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/ >/dev/null; \ + ${MTREE_CMD} ${MTREE_ARGS} ${DESTDIR}${PREFIX}/ >/dev/null; \ if [ ${MTREE_FILE} = "/etc/mtree/BSD.local.dist" ]; then \ - cd ${PREFIX}/share/nls; \ + cd ${DESTDIR}${PREFIX}/share/nls; \ ${LN} -shf C POSIX; \ ${LN} -shf C en_US.US-ASCII; \ fi; \ @@ -3728,6 +3755,8 @@ .if !target(security-check) .if !defined(OLD_SECURITY_CHECK) +### FIXME: in the displayed checksum DESTDIR should be displayed if set + security-check: # Scan PLIST for: # 1. setugid files @@ -4057,6 +4086,8 @@ # # Special target to remove installation +### FIXME: deinstall from DESTDIR + .if !target(deinstall) deinstall: .if ${UID} != 0 && !defined(INSTALL_AS_USER) @@ -5169,10 +5200,10 @@ # Process GNU INFO files at package install/deinstall time .if defined(INFO) .for i in ${INFO} - install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir + install-info --quiet ${DESTDIR}${PREFIX}/${INFO_PATH}/$i.info ${DESTDIR}${PREFIX}/${INFO_PATH}/dir @${ECHO_CMD} "@unexec install-info --quiet --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \ >> ${TMPPLIST} - @${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST} + @${LS} ${DESTDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${DESTDIR}${PREFIX}/::g >> ${TMPPLIST} @${ECHO_CMD} "@exec install-info --quiet %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \ >> ${TMPPLIST} @if [ "`${DIRNAME} $i`" != "." ]; then \ @@ -5181,7 +5212,7 @@ .endfor .if (${PREFIX} != "/usr") @${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST} -.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE}) +.if (${PREFIX} != ${LOCALBASE_REL} && ${PREFIX} != ${X11BASE_REL} && ${PREFIX} != ${LINUXBASE_REL}) @${ECHO_CMD} "@unexec rmdir %D/info 2> /dev/null || true" >> ${TMPPLIST} .endif .endif @@ -5192,7 +5223,7 @@ # deinstall-time .if !target(add-plist-post) add-plist-post: -.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr") +.if (${PREFIX} != ${LOCALBASE_REL} && ${PREFIX} != ${X11BASE_REL} && ${PREFIX} != ${LINUXBASE_REL} && ${PREFIX} != "/usr") @${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST} .else @${DO_NADA} @@ -5216,12 +5247,12 @@ @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} .if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 )) @for i in ${USE_RC_SUBR}; do \ - ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}; \ + ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}${PREFIX}/etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done .else @for i in ${USE_RC_SUBR}; do \ - ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}.sh; \ + ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}${PREFIX}/etc/rc.d/$${i%.sh}.sh; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \ done .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.subdir.mk#2 (text+ko) ==== @@ -48,10 +48,10 @@ .if !defined(NOPRECIOUSMAKEVARS) .if !defined(ARCH) -ARCH!= /usr/bin/uname -p +ARCH!= ${DESTDIR}/usr/bin/uname -p .endif .if !defined(OSREL) -OSREL!= /usr/bin/uname -r | sed -e 's/[-(].*//' +OSREL!= ${DESTDIR}/usr/bin/uname -r | sed -e 's/[-(].*//' .endif .if !defined(OSVERSION) .if exists(/sbin/sysctl) @@ -61,23 +61,23 @@ .endif .endif .if !defined(PORTOBJFORMAT) -PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout +PORTOBJFORMAT!= test -x ${DESTDIR}/usr/bin/objformat && ${DESTDIR}/usr/bin/objformat || echo aout .endif .endif -ID?= /usr/bin/id +ID?= ${DESTDIR}/usr/bin/id UID!= ${ID} -u -LOCALBASE?= ${DESTDIR}/usr/local +LOCALBASE?= ${DESTDIR}${LOCALBASE_REL} .if exists(${LOCALBASE}/sbin/pkg_info) PKG_INFO?= ${LOCALBASE}/sbin/pkg_info .else -PKG_INFO?= /usr/sbin/pkg_info +PKG_INFO?= ${DESTDIR}/usr/sbin/pkg_info .endif -SED?= /usr/bin/sed +SED?= ${DESTDIR}/usr/bin/sed PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //' .if !defined(OPSYS) -OPSYS!= /usr/bin/uname -s +OPSYS!= ${DESTDIR}/usr/bin/uname -s .endif ECHO_MSG?= echo ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.python.mk#2 (text+ko) ==== @@ -403,7 +403,7 @@ @${ECHO} "Legal values are: 2.7 (default), 2.8, 2.9, 3.2" @${FALSE} .endif -ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR} +ZOPEBASEDIR?= ${DESTDIR}${PREFIX}/${SZOPEBASEDIR} ZOPEPRODUCTDIR?= Products .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.ruby.mk#2 (text+ko) ==== @@ -113,7 +113,7 @@ RUBY_VER?= ${RUBY_DEFAULT_VER} .if defined(RUBY) -.if !exists(${RUBY}) +.if !exists(${DESTDIR}${RUBY}) BROKEN= You set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable. .endif @@ -122,7 +122,7 @@ BROKEN= You set the variable RUBY to "${RUBY}", but it failed to include rbconfig. Please specify a properly installed ruby executable. .endif -_RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e +_RUBY_CONFIG= ${DESTDIR}${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e RUBY_VERSION!= ${_RUBY_CONFIG} 'puts VERSION' RUBY_SUFFIX?= # empty
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606211257.k5LCvQMi082045>