View | Details | Raw Unified | Return to bug 100555 | Differences between
and this patch

Collapse All | Expand All

(-)../Mk/bsd.apache.mk (-1 / +1 lines)
Lines 175-181 Link Here
175
				--${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \
175
				--${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \
176
				--${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}"
176
				--${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}"
177
.if ${USE_APACHE:Mcommon2*} != ""
177
.if ${USE_APACHE:Mcommon2*} != ""
178
CONFIGURE_ARGS+=	--${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec"
178
CONFIGURE_ARGS+=	--${SUEXEC_CONFARGS}-bin="${DESTDIR}${PREFIX}/sbin/suexec"
179
.endif
179
.endif
180
180
181
.   if defined(WITH_SUEXEC_UMASK)
181
.   if defined(WITH_SUEXEC_UMASK)
(-)../Mk/bsd.emacs.mk (-2 / +2 lines)
Lines 236-243 Link Here
236
236
237
# find where emacsen is installed
237
# find where emacsen is installed
238
# look for it in PREEFIX first and fall back to LOCALBASE then
238
# look for it in PREEFIX first and fall back to LOCALBASE then
239
.if exists(${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER})
239
.if exists(${DESTDIR}${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER})
240
EMACS_BASE?=			${PREFIX}
240
EMACS_BASE?=			${DESTDIR}${PREFIX}
241
.else
241
.else
242
EMACS_BASE?=			${LOCALBASE}
242
EMACS_BASE?=			${LOCALBASE}
243
.endif
243
.endif
(-)../Mk/bsd.gnome.mk (-7 / +7 lines)
Lines 106-118 Link Here
106
GNOME_HTML_DIR?=	${PREFIX}/share/doc
106
GNOME_HTML_DIR?=	${PREFIX}/share/doc
107
GCONF_CONFIG_OPTIONS?=	merged
107
GCONF_CONFIG_OPTIONS?=	merged
108
GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults
108
GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults
109
GCONF_CONFIG_SOURCE?=xml:${GCONF_CONFIG_OPTIONS}:${PREFIX}/${GCONF_CONFIG_DIRECTORY}
109
GCONF_CONFIG_SOURCE?=xml:${GCONF_CONFIG_OPTIONS}:${DESTDIR}${PREFIX}/${GCONF_CONFIG_DIRECTORY}
110
GNOME_LOCALSTATEDIR?=	${PREFIX}/share/gnome
110
GNOME_LOCALSTATEDIR?=	${PREFIX}/share/gnome
111
gnomeprefix_CONFIGURE_ENV=GTKDOC="false"
111
gnomeprefix_CONFIGURE_ENV=GTKDOC="false"
112
gnomeprefix_CONFIGURE_ARGS=--localstatedir=${GNOME_LOCALSTATEDIR} \
112
gnomeprefix_CONFIGURE_ARGS=--localstatedir=${DESTDIR}${GNOME_LOCALSTATEDIR} \
113
			   --datadir=${PREFIX}/share/gnome \
113
			   --datadir=${DESTDIR}${PREFIX}/share/gnome \
114
			   --with-html-dir=${GNOME_HTML_DIR} \
114
			   --with-html-dir=${DESTDIR}${GNOME_HTML_DIR} \
115
			   --with-help-dir=${PREFIX}/share/gnome/help \
115
			   --with-help-dir=${DESTDIR}${PREFIX}/share/gnome/help \
116
			   --disable-gtk-doc \
116
			   --disable-gtk-doc \
117
			   --with-gconf-source=${GCONF_CONFIG_SOURCE}
117
			   --with-gconf-source=${GCONF_CONFIG_SOURCE}
118
gnomeprefix_USE_GNOME_IMPL=gnomehier
118
gnomeprefix_USE_GNOME_IMPL=gnomehier
Lines 725-734 Link Here
725
725
726
gnome-pre-su-install:
726
gnome-pre-su-install:
727
.if defined(_USE_GNOME) && ${_USE_GNOME:Mgnomeprefix}!="" && !defined(NO_MTREE)
727
.if defined(_USE_GNOME) && ${_USE_GNOME:Mgnomeprefix}!="" && !defined(NO_MTREE)
728
	@${MTREE_CMD} ${MTREE_ARGS:S/${MTREE_FILE}/${GNOME_MTREE_FILE}/} ${PREFIX}/ >/dev/null
728
	@${MTREE_CMD} ${MTREE_ARGS:S/${MTREE_FILE}/${GNOME_MTREE_FILE}/} ${DESTDIR}${PREFIX}/ >/dev/null
729
.endif
729
.endif
730
.if defined(GCONF_SCHEMAS)
730
.if defined(GCONF_SCHEMAS)
731
	@${MKDIR} ${PREFIX}/etc/gconf/gconf.xml.defaults/
731
	@${MKDIR} ${DESTDIR}${PREFIX}/etc/gconf/gconf.xml.defaults/
732
.else
732
.else
733
	@${DO_NADA}
733
	@${DO_NADA}
734
.endif
734
.endif
(-)../Mk/bsd.mail.mk (-2 / +2 lines)
Lines 51-59 Link Here
51
.endif
51
.endif
52
52
53
.if defined(QMAIL_SLAVEPORT)
53
.if defined(QMAIL_SLAVEPORT)
54
QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:L}
54
QMAIL_DEPENDS=	${DESTDIR}${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:L}
55
.else
55
.else
56
QMAIL_DEPENDS=	${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
56
QMAIL_DEPENDS=	${DESTDIR}${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
57
.endif
57
.endif
58
58
59
.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN)
59
.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN)
(-)../Mk/bsd.openssl.mk (-4 / +4 lines)
Lines 59-68 Link Here
59
.endif
59
.endif
60
60
61
.if defined(WITH_OPENSSL_BASE)
61
.if defined(WITH_OPENSSL_BASE)
62
OPENSSLBASE=		/usr
62
OPENSSLBASE=		${DESTDIR}/usr
63
OPENSSLDIR=		/etc/ssl
63
OPENSSLDIR=		${DESTDIR}/etc/ssl
64
64
65
.if !exists(/usr/lib/libcrypto.so)
65
.if !exists(${DESTDIR}/usr/lib/libcrypto.so)
66
check-depends::
66
check-depends::
67
	@${ECHO_CMD} "Dependency error: this port requires the OpenSSL library, which is part of"
67
	@${ECHO_CMD} "Dependency error: this port requires the OpenSSL library, which is part of"
68
	@${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
68
	@${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
Lines 98-104 Link Here
98
.endif
98
.endif
99
MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
99
MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
100
.endif
100
.endif
101
OPENSSLRPATH=		/usr/lib:${LOCALBASE}/lib
101
OPENSSLRPATH=		${DESTDIR}$/usr/lib:${LOCALBASE}/lib
102
102
103
.else
103
.else
104
104
(-)../Mk/bsd.port.mk (-120 / +386 lines)
Lines 472-478 Link Here
472
#				  If this is set to a list of files, these files will be
472
#				  If this is set to a list of files, these files will be
473
#				  automatically added to ${SUB_FILES}, some %%VAR%%'s will
473
#				  automatically added to ${SUB_FILES}, some %%VAR%%'s will
474
#				  automatically be expanded, they will be installed in
474
#				  automatically be expanded, they will be installed in
475
#				  ${PREFIX}/etc/rc.d and added to the packing list.
475
#				  ${DESTDIR}${PREFIX}/etc/rc.d and added to the packing list.
476
# USE_RCORDER	- List of rc.d startup scripts to be called early in the boot
476
# USE_RCORDER	- List of rc.d startup scripts to be called early in the boot
477
#				  process. This acts exactly like USE_RC_SUBR except that
477
#				  process. This acts exactly like USE_RC_SUBR except that
478
#				  scripts are installed in /etc/rc.d.
478
#				  scripts are installed in /etc/rc.d.
Lines 492-506 Link Here
492
# Various directory definitions and variables to control them.
492
# Various directory definitions and variables to control them.
493
# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR.
493
# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR.
494
#
494
#
495
# DESTDIR		- The path to the environment we are installing to.  Define
496
#				  this if you want to install packages into a jail
497
#				  or into an another FreeBSD environment mounted
498
#				  elsewhere than /.  ${PREFIX} is relative to
499
#				  ${DESTDIR}.  E.g. setting DESTDIR=/bla PREFIX=/opt will
500
#				  result packages installed under /bla/opt and registered
501
#				  under /bla/var/db/pkg.
502
#				  Default: not set (means /)
503
#
495
# X11BASE		- Where X11 ports install things.
504
# X11BASE		- Where X11 ports install things.
505
#				  Default: ${DESTDIR}/usr/X11R6
506
# X11BASE_REL		- Same as X11BASE, but relative to DESTDIR
496
#				  Default: /usr/X11R6
507
#				  Default: /usr/X11R6
497
# LOCALBASE		- Where non-X11 ports install things.
508
# LOCALBASE		- Where non-X11 ports install things.
509
#				  Default: ${DESTDIR}/usr/local
510
# LOCALBASE_REL		- Same as LOCALBASE, but relative to DESTDIR
498
#				  Default: /usr/local
511
#				  Default: /usr/local
499
# LINUXBASE		- Where Linux ports install things.
512
# LINUXBASE		- Where Linux ports install things.
513
#				  Default: ${DESTDIR}/compat/linux
514
# LINUXBASE_REL		- Same as LINUXBASE, but relative to DESTDIR
500
#				  Default: /compat/linux
515
#				  Default: /compat/linux
501
# PREFIX		- Where *this* port installs its files.
516
# PREFIX		- Where *this* port installs its files.
502
#				  Default: ${X11BASE} if USE_X_PREFIX is set, ${LINUXBASE} if
517
#				  Default: ${X11BASE_REL} if USE_X_PREFIX is set,
503
#				  USE_LINUX_PREFIX is set, otherwise ${LOCALBASE}
518
#				   ${LINUXBASE_REL} if  USE_LINUX_PREFIX is set,
519
#				   otherwise ${LOCALBASE_REL}
504
# MASTERDIR		- Where the port finds patches, package files, etc.  Define
520
# MASTERDIR		- Where the port finds patches, package files, etc.  Define
505
#				  this is you have two or more ports that share most of the
521
#				  this is you have two or more ports that share most of the
506
#				  files.
522
#				  files.
Lines 567-573 Link Here
567
#				  installs its own manpage links so they will show up
583
#				  installs its own manpage links so they will show up
568
#				  correctly in ${PLIST}.)
584
#				  correctly in ${PLIST}.)
569
# MANPREFIX		- The directory prefix for ${MAN<sect>} and ${MLINKS}.
585
# MANPREFIX		- The directory prefix for ${MAN<sect>} and ${MLINKS}.
570
#				  Default: ${PREFIX}
586
#				  Default: ${DESTDIR}${PREFIX}
571
# MAN<sect>PREFIX
587
# MAN<sect>PREFIX
572
#				- If manual pages of some sections install in different
588
#				- If manual pages of some sections install in different
573
#				  locations than others, use these.
589
#				  locations than others, use these.
Lines 854-860 Link Here
854
#				  rest of PLIST, so ${PLIST_SUB} substitutions also
870
#				  rest of PLIST, so ${PLIST_SUB} substitutions also
855
#				  apply here.  It is recommended that you use
871
#				  apply here.  It is recommended that you use
856
#				  %%PREFIX%% for ${PREFIX}, %%LOCALBASE%% for
872
#				  %%PREFIX%% for ${PREFIX}, %%LOCALBASE%% for
857
#				  ${LOCALBASE} and %%X11BASE%% for ${X11BASE}.
873
#				  ${LOCALBASE_REL} and %%X11BASE%% for ${X11BASE_REL}.
858
#				  Default: %%PREFIX%%/lib
874
#				  Default: %%PREFIX%%/lib
859
# USE_LDCONFIG  - If set to "yes", it replaces the old variable INSTALLS_SHLIB.
875
# USE_LDCONFIG  - If set to "yes", it replaces the old variable INSTALLS_SHLIB.
860
# 				  Otherwise, it can be set to a list of directories to be added to
876
# 				  Otherwise, it can be set to a list of directories to be added to
Lines 868-881 Link Here
868
# 				  Note: that should only be used on 64-bit architectures.
884
# 				  Note: that should only be used on 64-bit architectures.
869
#
885
#
870
# DOCSDIR		- Name of the directory to install the packages docs in.
886
# DOCSDIR		- Name of the directory to install the packages docs in.
871
#				  Default: ${PREFIX}/share/doc/${PORTNAME}
887
#				  Default: ${DESTDIR}${PREFIX}/share/doc/${PORTNAME}
872
# EXAMPLESDIR	- Name of the directory to install the packages examples in.
888
# EXAMPLESDIR	- Name of the directory to install the packages examples in.
873
#				  Default: ${PREFIX}/share/examples/${PORTNAME}
889
#				  Default: ${DESTDIR}${PREFIX}/share/examples/${PORTNAME}
874
# DATADIR		- Name of the directory to install the packages shared data in.
890
# DATADIR		- Name of the directory to install the packages shared data in.
875
#				  Default: ${PREFIX}/share/${PORTNAME}
891
#				  Default: ${DESTDIR}${PREFIX}/share/${PORTNAME}
876
#
892
#
877
# DESKTOPDIR	- Name of the directory to install ${DESKTOP_ENTRIES} in.
893
# DESKTOPDIR	- Name of the directory to install ${DESKTOP_ENTRIES} in.
878
#				  Default: ${PREFIX}/share/applications
894
#				  Default: ${DESTDIR}${PREFIX}/share/applications
879
# DESKTOP_ENTRIES
895
# DESKTOP_ENTRIES
880
#				- List of desktop entry files to generate and install in
896
#				- List of desktop entry files to generate and install in
881
#				  ${DESKTOPDIR}. The format is
897
#				  ${DESKTOPDIR}. The format is
Lines 944-952 Link Here
944
#				  it attempts to apply them.
960
#				  it attempts to apply them.
945
# PKG_DBDIR		- Where package installation is recorded; this directory
961
# PKG_DBDIR		- Where package installation is recorded; this directory
946
#				  must not contain anything else.
962
#				  must not contain anything else.
947
#				  Default: /var/db/pkg
963
#				  Default: ${DESTDIR}/var/db/pkg
948
# PORT_DBDIR	- Where port configuration options are recorded.
964
# PORT_DBDIR	- Where port configuration options are recorded.
949
#				  Default: /var/db/ports
965
#				  Default: ${DESTDIR}/var/db/ports
950
# NO_PKG_REGISTER
966
# NO_PKG_REGISTER
951
#				- Don't register a port installation as a package.
967
#				- Don't register a port installation as a package.
952
# FORCE_PKG_REGISTER
968
# FORCE_PKG_REGISTER
Lines 1022-1027 Link Here
1022
CHGRP?=		/usr/bin/chgrp
1038
CHGRP?=		/usr/bin/chgrp
1023
CHMOD?=		/bin/chmod
1039
CHMOD?=		/bin/chmod
1024
CHOWN?=		/usr/sbin/chown
1040
CHOWN?=		/usr/sbin/chown
1041
CHROOT?=	/usr/sbin/chroot
1025
COMM?=		/usr/bin/comm
1042
COMM?=		/usr/bin/comm
1026
CP?=		/bin/cp
1043
CP?=		/bin/cp
1027
CPIO?=		/usr/bin/cpio
1044
CPIO?=		/usr/bin/cpio
Lines 1094-1099 Link Here
1094
# Kludge for pre-3.0 systems
1111
# Kludge for pre-3.0 systems
1095
MACHINE_ARCH?=	i386
1112
MACHINE_ARCH?=	i386
1096
1113
1114
# Check the compatibility layer for amd64/ia64
1115
1116
.if ${ARCH} == "amd64" || ${ARCH} =="ia64"
1117
.if exists(/usr/lib32)
1118
HAVE_COMPAT_IA32_LIBS?=  YES
1119
.endif
1120
.if !defined(HAVE_COMPAT_IA32_KERN)
1121
HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -a compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi
1122
.endif
1123
.endif
1124
1125
.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386"
1126
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
1127
.if !defined(HAVE_COMPAT_IA32_KERN)
1128
IGNORE= you need a kernel with compiled-in IA32 compatibility to use this port.
1129
.elif !defined(HAVE_COMPAT_IA32_LIBS)
1130
IGNORE= you need the 32-bit libraries installed under /usr/lib32 to use this port.
1131
.endif
1132
.else
1133
IGNORE= you have to use i386 (or compatible) platform to use this port.
1134
.endif
1135
.endif
1136
1137
1097
# Get the operating system type
1138
# Get the operating system type
1098
.if !defined(OPSYS)
1139
.if !defined(OPSYS)
1099
OPSYS!=	${UNAME} -s
1140
OPSYS!=	${UNAME} -s
Lines 1106-1113 Link Here
1106
1147
1107
# Get __FreeBSD_version
1148
# Get __FreeBSD_version
1108
.if !defined(OSVERSION)
1149
.if !defined(OSVERSION)
1150
.if exists(${DESTDIR}/usr/include/sys/param.h)
1151
OSVERSION!=	${AWK} '/^\#define __FreeBSD_version/ {print $$3}' < ${DESTDIR}/usr/include/sys/param.h
1152
.elif exists(${DESTDIR}/usr/src/sys/sys/param.h)
1153
OSVERSION!=	${AWK} '/^\#define __FreeBSD_version/ {print $$3}' < ${DESTDIR}/usr/src/sys/sys/param.h
1154
.else
1109
OSVERSION!=	${SYSCTL} -n kern.osreldate
1155
OSVERSION!=	${SYSCTL} -n kern.osreldate
1110
.endif
1156
.endif
1157
.endif
1111
1158
1112
# Get the object format.
1159
# Get the object format.
1113
.if !defined(PORTOBJFORMAT)
1160
.if !defined(PORTOBJFORMAT)
Lines 1177-1183 Link Here
1177
.endif
1224
.endif
1178
1225
1179
# where 'make config' records user configuration options
1226
# where 'make config' records user configuration options
1180
PORT_DBDIR?=	/var/db/ports
1227
PORT_DBDIR?=	${DESTDIR}/var/db/ports
1181
1228
1182
LDCONFIG_DIR=	libdata/ldconfig
1229
LDCONFIG_DIR=	libdata/ldconfig
1183
LDCONFIG32_DIR=	libdata/ldconfig32
1230
LDCONFIG32_DIR=	libdata/ldconfig32
Lines 1264-1272 Link Here
1264
# tree we are and thus can't go relative.  They can, of course, be overridden
1311
# tree we are and thus can't go relative.  They can, of course, be overridden
1265
# by individual Makefiles or local system make configuration.
1312
# by individual Makefiles or local system make configuration.
1266
PORTSDIR?=		/usr/ports
1313
PORTSDIR?=		/usr/ports
1267
LOCALBASE?=		${DESTDIR}/usr/local
1314
LOCALBASE?=		/usr/local
1268
X11BASE?=		${DESTDIR}/usr/X11R6
1315
X11BASE?=		/usr/X11R6
1269
LINUXBASE?=		${DESTDIR}/compat/linux
1316
LINUXBASE?=		/compat/linux
1317
LOCALBASE_REL:=		${LOCALBASE}
1318
X11BASE_REL:=		${X11BASE}
1319
LINUXBASE_REL:=		${LINUXBASE}
1320
LOCALBASE:=		${DESTDIR}${LOCALBASE_REL}
1321
X11BASE:=		${DESTDIR}${X11BASE_REL}
1322
LINUXBASE:=		${DESTDIR}${LINUXBASE_REL}
1270
DISTDIR?=		${PORTSDIR}/distfiles
1323
DISTDIR?=		${PORTSDIR}/distfiles
1271
_DISTDIR?=		${DISTDIR}/${DIST_SUBDIR}
1324
_DISTDIR?=		${DISTDIR}/${DIST_SUBDIR}
1272
INDEXDIR?=		${PORTSDIR}
1325
INDEXDIR?=		${PORTSDIR}
Lines 1311-1332 Link Here
1311
USE_XLIB=		yes
1364
USE_XLIB=		yes
1312
.endif
1365
.endif
1313
.if defined(USE_X_PREFIX)
1366
.if defined(USE_X_PREFIX)
1314
PREFIX?=		${X11BASE}
1367
PREFIX?=		${X11BASE_REL}
1315
.elif defined(USE_LINUX_PREFIX)
1368
.elif defined(USE_LINUX_PREFIX)
1316
PREFIX?=		${LINUXBASE}
1369
PREFIX?=		${LINUXBASE_REL}
1317
NO_MTREE=		yes
1370
NO_MTREE=		yes
1318
.else
1371
.else
1319
PREFIX?=		${LOCALBASE}
1372
PREFIX?=		${LOCALBASE_REL}
1320
.endif
1373
.endif
1321
1374
1322
.if defined(USE_LINUX_PREFIX)
1375
.if defined(USE_LINUX_PREFIX)
1323
LDCONFIG_CMD?=			${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE}
1376
.if !defined(DESTDIR)
1377
LDCONFIG_CMD?=			${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL}
1378
.else
1379
LDCONFIG_CMD?=			${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL}
1380
.endif
1324
LDCONFIG_PLIST_EXEC_CMD?=	${LDCONFIG_CMD}
1381
LDCONFIG_PLIST_EXEC_CMD?=	${LDCONFIG_CMD}
1325
LDCONFIG_PLIST_UNEXEC_CMD?=	${LDCONFIG_CMD}
1382
LDCONFIG_PLIST_UNEXEC_CMD?=	${LDCONFIG_CMD}
1326
.else
1383
.else
1327
LDCONFIG_CMD?=				${LDCONFIG} -m ${LDCONFIG_RUNLIST}
1384
.if !defined(DESTDIR)
1385
LDCONFIG_CMD?=			${LDCONFIG} -m ${LDCONFIG_RUNLIST}
1328
LDCONFIG_PLIST_EXEC_CMD?=	${LDCONFIG} -m ${LDCONFIG_PLIST}
1386
LDCONFIG_PLIST_EXEC_CMD?=	${LDCONFIG} -m ${LDCONFIG_PLIST}
1329
LDCONFIG_PLIST_UNEXEC_CMD?=	${LDCONFIG} -R
1387
LDCONFIG_PLIST_UNEXEC_CMD?=	${LDCONFIG} -R
1388
.else
1389
LDCONFIG_CMD?=			${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST}
1390
LDCONFIG_PLIST_EXEC_CMD?=	${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST}
1391
LDCONFIG_PLIST_UNEXEC_CMD?=	${CHROOT} ${DESTDIR} ${LDCONFIG} -R
1392
.endif
1393
.endif
1394
1395
# These do some path checks if DESTDIR is set correctly.
1396
# You can force skipping these test by defining IGNORE_PATH_CHECKS
1397
.if !defined(IGNORE_PATH_CHECKS)
1398
.if (${PREFIX:C,(^.).*,\1,} != "/")
1399
.BEGIN:
1400
	@${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'"
1401
	@${ECHO_MSG} "is invoked in the work area PREFIX points to the right place."
1402
	@${FALSE}
1403
.endif
1404
.if defined(DESTDIR)
1405
.if (${DESTDIR:C,(^.).*,\1,} != "/")
1406
.if ${DESTDIR} == "/"
1407
.BEGIN:
1408
	@${ECHO_MSG} "You can't set DESTDIR to /. Please re-run make with"
1409
	@${ECHO_MSG} "DESTDIR unset."
1410
	@${FALSE}
1411
.else
1412
.BEGIN:
1413
	@${ECHO_MSG} "DESTDIR must be defined as an absolute path so that when 'make'"
1414
	@${ECHO_MSG} "is invoked in the work area DESTDIR points to the right place."
1415
	@${FALSE}
1416
.endif
1417
.endif
1418
.if (${DESTDIR:C,^.*(/)$$,\1,} == "/")
1419
.BEGIN:
1420
	@${ECHO_MSG} "DESTDIR can't have a trailing slash. Please remove the trailing"
1421
	@${ECHO_MSG} "slash and re-run 'make'"
1422
	@${FALSE}
1423
.endif
1424
.endif
1330
.endif
1425
.endif
1331
1426
1332
PKGCOMPATDIR?=		${LOCALBASE}/lib/compat/pkg
1427
PKGCOMPATDIR?=		${LOCALBASE}/lib/compat/pkg
Lines 1381-1388 Link Here
1381
SITE_PERL?=	${LOCALBASE}/${SITE_PERL_REL}
1476
SITE_PERL?=	${LOCALBASE}/${SITE_PERL_REL}
1382
1477
1383
.if ${PERL_LEVEL} < 500600
1478
.if ${PERL_LEVEL} < 500600
1384
PERL5=		/usr/bin/perl${PERL_VERSION}
1479
PERL5=		${DESTDIR}/usr/bin/perl${PERL_VERSION}
1385
PERL=		/usr/bin/perl
1480
PERL=		${DESTDIR}/usr/bin/perl
1386
.else
1481
.else
1387
PERL5=		${LOCALBASE}/bin/perl${PERL_VERSION}
1482
PERL5=		${LOCALBASE}/bin/perl${PERL_VERSION}
1388
PERL=		${LOCALBASE}/bin/perl
1483
PERL=		${LOCALBASE}/bin/perl
Lines 1496-1503 Link Here
1496
BUILD_WRKSRC?=	${WRKSRC}
1591
BUILD_WRKSRC?=	${WRKSRC}
1497
INSTALL_WRKSRC?=${WRKSRC}
1592
INSTALL_WRKSRC?=${WRKSRC}
1498
1593
1499
PLIST_SUB+=	OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
1594
PLIST_SUB+=	OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL}
1500
SUB_LIST+=	PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}	\
1595
SUB_LIST+=	PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL}	\
1501
			DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR}
1596
			DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR}
1502
1597
1503
PLIST_REINPLACE+=	dirrmtry
1598
PLIST_REINPLACE+=	dirrmtry
Lines 1838-1847 Link Here
1838
PL_BUILD?=		Build
1933
PL_BUILD?=		Build
1839
CONFIGURE_ARGS+= \
1934
CONFIGURE_ARGS+= \
1840
	create_packlist=0 \
1935
	create_packlist=0 \
1841
	install_path=lib="${PREFIX}/${SITE_PERL_REL}" \
1936
	install_path=lib="${DESTDIR}${PREFIX}/${SITE_PERL_REL}" \
1842
	install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \
1937
	install_path=arch="${DESTDIR}${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \
1843
	install_path=script="${PREFIX}/bin" \
1938
	install_path=script="${DESTDIR}${PREFIX}/bin" \
1844
	install_path=bin="${PREFIX}/bin" \
1939
	install_path=bin="${DESTDIR}${PREFIX}/bin" \
1845
	install_path=libdoc="${MAN3PREFIX}/man/man3" \
1940
	install_path=libdoc="${MAN3PREFIX}/man/man3" \
1846
	install_path=bindoc="${MAN1PREFIX}/man/man1"
1941
	install_path=bindoc="${MAN1PREFIX}/man/man1"
1847
.elif defined(PERL_CONFIGURE)
1942
.elif defined(PERL_CONFIGURE)
Lines 1986-1992 Link Here
1986
NONEXISTENT?=	/nonexistent
2081
NONEXISTENT?=	/nonexistent
1987
2082
1988
# Miscellaneous overridable commands:
2083
# Miscellaneous overridable commands:
1989
GMAKE?=			gmake
2084
GMAKE?=			${LOCALBASE}/bin/gmake
1990
XMKMF?=			xmkmf -a
2085
XMKMF?=			xmkmf -a
1991
.if exists(/sbin/md5)
2086
.if exists(/sbin/md5)
1992
MD5?=			/sbin/md5
2087
MD5?=			/sbin/md5
Lines 1995-2002 Link Here
1995
.endif
2090
.endif
1996
.if exists(/sbin/sha256)
2091
.if exists(/sbin/sha256)
1997
SHA256?=		/sbin/sha256
2092
SHA256?=		/sbin/sha256
1998
.elif exists(${LOCALBASE}/sbin/sha256)
2093
.elif exists(${LOCALBASE_REL}/sbin/sha256)
1999
SHA256?=		${LOCALBASE}/sbin/sha256
2094
SHA256?=		${LOCALBASE_REL}/sbin/sha256
2000
.else
2095
.else
2001
SHA256?=		NO
2096
SHA256?=		NO
2002
.endif
2097
.endif
Lines 2007-2013 Link Here
2007
2102
2008
MAKE_FLAGS?=	-f
2103
MAKE_FLAGS?=	-f
2009
MAKEFILE?=		Makefile
2104
MAKEFILE?=		Makefile
2010
MAKE_ENV+=		PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}"
2105
MAKE_ENV+=		DESTDIR=${DESTDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}"
2011
2106
2012
.if ${OSVERSION} < 500016
2107
.if ${OSVERSION} < 500016
2013
PTHREAD_CFLAGS?=	-D_THREAD_SAFE
2108
PTHREAD_CFLAGS?=	-D_THREAD_SAFE
Lines 2101-2107 Link Here
2101
2196
2102
# Figure out where the local mtree file is
2197
# Figure out where the local mtree file is
2103
.if !defined(MTREE_FILE) && !defined(NO_MTREE)
2198
.if !defined(MTREE_FILE) && !defined(NO_MTREE)
2104
.if ${PREFIX} == ${X11BASE} || defined(USE_X_PREFIX)
2199
.if ${PREFIX} == ${X11BASE_REL} || defined(USE_X_PREFIX)
2105
# User may have specified non-standard PREFIX for installing a port that
2200
# User may have specified non-standard PREFIX for installing a port that
2106
# uses X
2201
# uses X
2107
.if ${X_WINDOW_SYSTEM:L} == xfree86-3
2202
.if ${X_WINDOW_SYSTEM:L} == xfree86-3
Lines 2177-2199 Link Here
2177
.if ${OSVERSION} < 491101 && ${PKGORIGIN} != "sysutils/pkg_install"
2272
.if ${OSVERSION} < 491101 && ${PKGORIGIN} != "sysutils/pkg_install"
2178
EXTRACT_DEPENDS+=	${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install
2273
EXTRACT_DEPENDS+=	${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install
2179
.endif
2274
.endif
2180
PKG_CMD?=		${LOCALBASE}/sbin/pkg_create
2275
.if !defined(DESTDIR)
2181
PKG_ADD?=		${LOCALBASE}/sbin/pkg_add
2276
PKG_CMD?=		${LOCALBASE_REL}/sbin/pkg_create
2182
PKG_DELETE?=	${LOCALBASE}/sbin/pkg_delete
2277
PKG_ADD?=		${LOCALBASE_REL}/sbin/pkg_add
2183
PKG_INFO?=		${LOCALBASE}/sbin/pkg_info
2278
PKG_DELETE?=	${LOCALBASE_REL}/sbin/pkg_delete
2184
PKG_VERSION?=		${LOCALBASE}/sbin/pkg_version
2279
PKG_INFO?=		${LOCALBASE_REL}/sbin/pkg_info
2280
PKG_VERSION?=		${LOCALBASE_REL}/sbin/pkg_version
2281
.else
2282
PKG_CMD?=		${LOCALBASE_REL}/sbin/pkg_create
2283
PKG_ADD?=		${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_add
2284
PKG_DELETE?=		${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_delete
2285
PKG_INFO?=		${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_info
2286
.endif
2185
.else
2287
.else
2288
.if !defined(DESTDIR)
2186
PKG_CMD?=		/usr/sbin/pkg_create
2289
PKG_CMD?=		/usr/sbin/pkg_create
2187
PKG_ADD?=		/usr/sbin/pkg_add
2290
PKG_ADD?=		/usr/sbin/pkg_add
2188
PKG_DELETE?=	/usr/sbin/pkg_delete
2291
PKG_DELETE?=	/usr/sbin/pkg_delete
2189
PKG_INFO?=		/usr/sbin/pkg_info
2292
PKG_INFO?=		/usr/sbin/pkg_info
2190
PKG_VERSION?=		/usr/sbin/pkg_version
2293
PKG_VERSION?=		/usr/sbin/pkg_version
2294
.else
2295
PKG_CMD?=		/usr/sbin/pkg_create
2296
PKG_ADD?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_add
2297
PKG_DELETE?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_delete
2298
PKG_INFO?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_info
2299
PKG_VERSION?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_version
2300
.endif
2191
.endif
2301
.endif
2192
2302
2193
# Does the pkg_create tool support conflict checking?
2303
# Does the pkg_create tool support conflict checking?
2194
# XXX Slow?
2304
# XXX Slow?
2195
.if !defined(PKGINSTALLVER)
2305
.if !defined(PKGINSTALLVER)
2196
PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
2306
PKGINSTALLVER!= ${CHROOT} ${DESTDIR} ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
2197
.endif
2307
.endif
2198
.if ${PKGINSTALLVER} < 20030417
2308
.if ${PKGINSTALLVER} < 20030417
2199
DISABLE_CONFLICTS=	YES
2309
DISABLE_CONFLICTS=	YES
Lines 2220-2226 Link Here
2220
.endif
2330
.endif
2221
.endif
2331
.endif
2222
# where pkg_add records its dirty deeds.
2332
# where pkg_add records its dirty deeds.
2223
PKG_DBDIR?=		/var/db/pkg
2333
PKG_DBDIR?=		${DESTDIR}/var/db/pkg
2224
2334
2225
MOTIFLIB?=	-L${X11BASE}/lib -lXm -lXp
2335
MOTIFLIB?=	-L${X11BASE}/lib -lXm -lXp
2226
2336
Lines 2714-2723 Link Here
2714
PKGLATESTFILE=		${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
2824
PKGLATESTFILE=		${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
2715
2825
2716
.if defined(PERL_CONFIGURE)
2826
.if defined(PERL_CONFIGURE)
2717
CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
2827
CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${DESTDIR}${PREFIX}" \
2718
			INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
2828
			INSTALLPRIVLIB="${DESTDIR}${PREFIX}/lib" INSTALLARCHLIB="${DESTDIR}${PREFIX}/lib"
2719
CONFIGURE_SCRIPT?=	Makefile.PL
2829
CONFIGURE_SCRIPT?=	Makefile.PL
2720
MAN3PREFIX?=		${PREFIX}/lib/perl5/${PERL_VERSION}
2830
MAN3PREFIX?=		${DESTDIR}${PREFIX}/lib/perl5/${PERL_VERSION}
2721
.undef HAS_CONFIGURE
2831
.undef HAS_CONFIGURE
2722
.endif
2832
.endif
2723
2833
Lines 2743-2758 Link Here
2743
		  WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
2853
		  WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
2744
		  SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
2854
		  SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
2745
		  PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \
2855
		  PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \
2746
		  PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
2856
		  PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
2857
		  DESTDIR=${DESTDIR}
2747
2858
2748
.if defined(BATCH)
2859
.if defined(BATCH)
2749
SCRIPTS_ENV+=	BATCH=yes
2860
SCRIPTS_ENV+=	BATCH=yes
2750
.endif
2861
.endif
2751
2862
2752
.if ${PREFIX} == /usr
2863
.if ${PREFIX} == /usr
2753
MANPREFIX?=	/usr/share
2864
MANPREFIX?=	${DESTDIR}/usr/share
2754
.else
2865
.else
2755
MANPREFIX?=	${PREFIX}
2866
MANPREFIX?=	${DESTDIR}${PREFIX}
2756
.endif
2867
.endif
2757
2868
2758
.for sect in 1 2 3 4 5 6 7 8 9
2869
.for sect in 1 2 3 4 5 6 7 8 9
Lines 2830-2838 Link Here
2830
.if defined(_MANPAGES)
2941
.if defined(_MANPAGES)
2831
2942
2832
.if defined(NOMANCOMPRESS)
2943
.if defined(NOMANCOMPRESS)
2833
__MANPAGES:=	${_MANPAGES:S%^${PREFIX}/%%}
2944
__MANPAGES:=	${_MANPAGES:S%^${DESTDIR}${PREFIX}/%%}
2834
.else
2945
.else
2835
__MANPAGES:=	${_MANPAGES:S%^${PREFIX}/%%:S%$%.gz%}
2946
__MANPAGES:=	${_MANPAGES:S%^${DESTDIR}${PREFIX}/%%:S%$%.gz%}
2836
.endif
2947
.endif
2837
2948
2838
.if ${MANCOMPRESSED} == "yes"
2949
.if ${MANCOMPRESSED} == "yes"
Lines 2847-2862 Link Here
2847
INFO_PATH?=	info
2958
INFO_PATH?=	info
2848
.endif
2959
.endif
2849
2960
2850
DOCSDIR?=	${PREFIX}/share/doc/${PORTNAME}
2961
DOCSDIR?=	${DESTDIR}${PREFIX}/share/doc/${PORTNAME}
2851
EXAMPLESDIR?=	${PREFIX}/share/examples/${PORTNAME}
2962
EXAMPLESDIR?=	${DESTDIR}${PREFIX}/share/examples/${PORTNAME}
2852
DATADIR?=	${PREFIX}/share/${PORTNAME}
2963
DATADIR?=	${DESTDIR}${PREFIX}/share/${PORTNAME}
2853
2964
2854
PLIST_SUB+=	DOCSDIR="${DOCSDIR:S,^${PREFIX}/,,}" \
2965
PLIST_SUB+=	DOCSDIR="${DOCSDIR:S,^${DESTDIR}${PREFIX}/,,}" \
2855
		EXAMPLESDIR="${EXAMPLESDIR:S,^${PREFIX}/,,}" \
2966
		EXAMPLESDIR="${EXAMPLESDIR:S,^${DESTDIR}${PREFIX}/,,}" \
2856
		DATADIR="${DATADIR:S,^${PREFIX}/,,}"
2967
		DATADIR="${DATADIR:S,^${DESTDIR}${PREFIX}/,,}"
2857
2968
2858
DESKTOPDIR?=		${PREFIX}/share/applications
2969
DESKTOPDIR?=		${DESTDIR}${PREFIX}/share/applications
2859
_DESKTOPDIR_REL=	${DESKTOPDIR:S,^${PREFIX}/,,}/
2970
_DESKTOPDIR_REL=	${DESKTOPDIR:S,^${DESTDIR}${PREFIX}/,,}/
2860
2971
2861
.if ${_DESKTOPDIR_REL} == ${DESKTOPDIR}/
2972
.if ${_DESKTOPDIR_REL} == ${DESKTOPDIR}/
2862
# DESKTOPDIR is not beneath PREFIX
2973
# DESKTOPDIR is not beneath PREFIX
Lines 3016-3022 Link Here
3016
	@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \
3127
	@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \
3017
	  DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \
3128
	  DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \
3018
	  PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
3129
	  PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
3019
	  FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \
3130
	  FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} DESTDIR=${DESTDIR} PREFIX=${PREFIX} \
3020
	  DEPENDS="${DEPENDS}" BUILD_DEPENDS="${BUILD_DEPENDS}" \
3131
	  DEPENDS="${DEPENDS}" BUILD_DEPENDS="${BUILD_DEPENDS}" \
3021
	  RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \
3132
	  RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \
3022
	  CONFLICTS="${CONFLICTS}" \
3133
	  CONFLICTS="${CONFLICTS}" \
Lines 3500-3506 Link Here
3500
	done; \
3611
	done; \
3501
	if [ -n "$${conflicts_with}" ]; then \
3612
	if [ -n "$${conflicts_with}" ]; then \
3502
		${ECHO_MSG}; \
3613
		${ECHO_MSG}; \
3503
		${ECHO_MSG} "===>  ${PKGNAME} conflicts with installed package(s): "; \
3614
		if [ -z "${DESTDIR}" ] ; then \
3615
			${ECHO_MSG} "===>  ${PKGNAME} conflicts with installed package(s): "; \
3616
		else \
3617
			${ECHO_MSG} "===>  ${PKGNAME} conflicts with installed package(s) in ${DESTDIR}: "; \
3618
		fi; \
3504
		for entry in $${conflicts_with}; do \
3619
		for entry in $${conflicts_with}; do \
3505
			${ECHO_MSG} "      $${entry}"; \
3620
			${ECHO_MSG} "      $${entry}"; \
3506
		done; \
3621
		done; \
Lines 3628-3636 Link Here
3628
.if !target(check-already-installed)
3743
.if !target(check-already-installed)
3629
check-already-installed:
3744
check-already-installed:
3630
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
3745
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
3746
.if !defined(DESTDIR)
3631
		@${ECHO_MSG} "===>  Checking if ${PKGORIGIN} already installed"
3747
		@${ECHO_MSG} "===>  Checking if ${PKGORIGIN} already installed"
3632
		@${MKDIR} ${PKG_DBDIR}
3748
.else
3633
		@already_installed=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
3749
		@${ECHO_MSG} "===>  Checking if ${PKGORIGIN} already installed in ${DESTDIR}"
3750
.endif
3751
		@${MKDIR} ${PKG_DBDIR}; \
3752
		already_installed=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
3634
		if [ -n "$${already_installed}" ]; then \
3753
		if [ -n "$${already_installed}" ]; then \
3635
				for p in $${already_installed}; do \
3754
				for p in $${already_installed}; do \
3636
						prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
3755
						prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
Lines 3642-3653 Link Here
3642
								fi; \
3761
								fi; \
3643
						fi; \
3762
						fi; \
3644
				done; \
3763
				done; \
3645
		fi; \
3764
		fi
3646
		if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \
3765
		@if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \
3647
				if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
3766
				if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
3767
					if [ -z "${DESTDIR}" ] ; then \
3648
						${ECHO_CMD} "===>   ${PKGNAME} is already installed"; \
3768
						${ECHO_CMD} "===>   ${PKGNAME} is already installed"; \
3769
					else \
3770
						${ECHO_CMD} "===>   ${PKGNAME} is already installed in ${DESTDIR}"; \
3771
					fi; \
3649
				else \
3772
				else \
3773
					if [ -z "${DESTDIR}" ] ; then \
3650
						${ECHO_CMD} "===>   An older version of ${PKGORIGIN} is already installed ($${found_package})"; \
3774
						${ECHO_CMD} "===>   An older version of ${PKGORIGIN} is already installed ($${found_package})"; \
3775
					else \
3776
						${ECHO_CMD} "===>   An older version of ${PKGORIGIN} is already installed in ${DESTDIR}  ($${found_package})"; \
3777
					fi; \
3651
				fi; \
3778
				fi; \
3652
				${ECHO_CMD} "      You may wish to \`\`make deinstall'' and install this port again"; \
3779
				${ECHO_CMD} "      You may wish to \`\`make deinstall'' and install this port again"; \
3653
				${ECHO_CMD} "      by \`\`make reinstall'' to upgrade it properly."; \
3780
				${ECHO_CMD} "      by \`\`make reinstall'' to upgrade it properly."; \
Lines 3672-3683 Link Here
3672
3799
3673
.if !target(install-mtree)
3800
.if !target(install-mtree)
3674
install-mtree:
3801
install-mtree:
3675
	@${MKDIR} ${PREFIX}
3802
	@${MKDIR} ${DESTDIR}${PREFIX}
3676
	@if [ `${ID} -u` != 0 ]; then \
3803
	@if [ `${ID} -u` != 0 ]; then \
3677
		if [ -w ${PREFIX}/ ]; then \
3804
		if [ -w ${DESTDIR}${PREFIX}/ ]; then \
3678
			${ECHO_MSG} "Warning: not superuser, you may get some errors during installation."; \
3805
			${ECHO_MSG} "Warning: not superuser, you may get some errors during installation."; \
3679
		else \
3806
		else \
3680
			${ECHO_MSG} "Error: ${PREFIX}/ not writable."; \
3807
			${ECHO_MSG} "Error: ${DESTDIR}${PREFIX}/ not writable."; \
3681
			${FALSE}; \
3808
			${FALSE}; \
3682
		fi; \
3809
		fi; \
3683
	fi
3810
	fi
Lines 3688-3696 Link Here
3688
			${ECHO_CMD} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \
3815
			${ECHO_CMD} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \
3689
			exit 1; \
3816
			exit 1; \
3690
		else \
3817
		else \
3691
			${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/ >/dev/null; \
3818
			${MTREE_CMD} ${MTREE_ARGS} ${DESTDIR}${PREFIX}/ >/dev/null; \
3692
			if [ ${MTREE_FILE} = "/etc/mtree/BSD.local.dist" ]; then \
3819
			if [ ${MTREE_FILE} = "/etc/mtree/BSD.local.dist" ]; then \
3693
				cd ${PREFIX}/share/nls; \
3820
				cd ${DESTDIR}${PREFIX}/share/nls; \
3694
				${LN} -shf C POSIX; \
3821
				${LN} -shf C POSIX; \
3695
				${LN} -shf C en_US.US-ASCII; \
3822
				${LN} -shf C en_US.US-ASCII; \
3696
			fi; \
3823
			fi; \
Lines 3707-3717 Link Here
3707
.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) || defined(INSTALLS_SHLIB)
3834
.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) || defined(INSTALLS_SHLIB)
3708
.if defined(USE_LDCONFIG)
3835
.if defined(USE_LDCONFIG)
3709
.if !defined(INSTALL_AS_USER)
3836
.if !defined(INSTALL_AS_USER)
3837
.if !defined(DESTDIR)
3710
	@${ECHO_MSG} "===>   Running ldconfig"
3838
	@${ECHO_MSG} "===>   Running ldconfig"
3711
	${LDCONFIG} -m ${USE_LDCONFIG}
3839
	${LDCONFIG} -m ${USE_LDCONFIG}
3712
.else
3840
.else
3841
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR}"
3842
	${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${USE_LDCONFIG}
3843
.endif
3844
.else
3845
.if !defined(DESTDIR)
3713
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3846
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3714
	-${LDCONFIG} -m ${USE_LDCONFIG}
3847
	-${LDCONFIG} -m ${USE_LDCONFIG}
3848
.else
3849
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR} (errors are ignored)"
3850
	${CHROOT} ${DESTDIR} -${LDCONFIG} -m ${USE_LDCONFIG}
3851
.endif
3715
.endif
3852
.endif
3716
.if ${USE_LDCONFIG:L} != "${PREFIX}/lib"
3853
.if ${USE_LDCONFIG:L} != "${PREFIX}/lib"
3717
	@${ECHO_MSG} "===>   Installing ldconfig configuration file"
3854
	@${ECHO_MSG} "===>   Installing ldconfig configuration file"
Lines 3728-3738 Link Here
3728
.endif
3865
.endif
3729
.if defined(USE_LDCONFIG32)
3866
.if defined(USE_LDCONFIG32)
3730
.if !defined(INSTALL_AS_USER)
3867
.if !defined(INSTALL_AS_USER)
3868
.if !defined(DESTDIR)
3731
	@${ECHO_MSG} "===>   Running ldconfig"
3869
	@${ECHO_MSG} "===>   Running ldconfig"
3732
	${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3870
	${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3733
.else
3871
.else
3872
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR}"
3873
	${CHROOT} ${DESTDIR} ${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3874
.endif
3875
.else
3876
.if !defined(DESTDIR)
3734
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3877
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3735
	-${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3878
	-${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3879
.else
3880
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR} (errors are ignored)"
3881
	${CHROOT} ${DESTDIR} -${LDCONFIG} -32 -m ${USE_LDCONFIG32}
3882
.endif
3736
.endif
3883
.endif
3737
	@${ECHO_MSG} "===>   Installing 32-bit ldconfig configuration file"
3884
	@${ECHO_MSG} "===>   Installing 32-bit ldconfig configuration file"
3738
.if defined(NO_LDCONFIG_MTREE)
3885
.if defined(NO_LDCONFIG_MTREE)
Lines 3748-3757 Link Here
3748
# This can be removed once, all ports have been converted to USE_LDCONFIG.
3895
# This can be removed once, all ports have been converted to USE_LDCONFIG.
3749
.if defined(INSTALLS_SHLIB)
3896
.if defined(INSTALLS_SHLIB)
3750
.if !defined(INSTALL_AS_USER)
3897
.if !defined(INSTALL_AS_USER)
3898
.if !defined(DESTDIR)
3751
	@${ECHO_MSG} "===>   Running ldconfig"
3899
	@${ECHO_MSG} "===>   Running ldconfig"
3900
.else
3901
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR}"
3902
.endif
3752
	${LDCONFIG_CMD}
3903
	${LDCONFIG_CMD}
3753
.else
3904
.else
3905
.if !defined(DESTDIR)
3754
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3906
	@${ECHO_MSG} "===>   Running ldconfig (errors are ignored)"
3907
.else
3908
	@${ECHO_MSG} "===>   Running ldconfig in ${DESTDIR} (errors are ignored)"
3909
.endif
3755
	-${LDCONFIG_CMD}
3910
	-${LDCONFIG_CMD}
3756
.endif
3911
.endif
3757
.endif
3912
.endif
Lines 3786-3792 Link Here
3786
	| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \
3941
	| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \
3787
	| ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \
3942
	| ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \
3788
	if \
3943
	if \
3789
		! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${PORTSDIR}/Tools/scripts/security-check.awk \
3944
		! ${AWK} -v audit="$${PORTS_AUDIT}" -v destdir="${DESTDIR}" -f ${PORTSDIR}/Tools/scripts/security-check.awk \
3790
		  ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.objdump ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \
3945
		  ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.objdump ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \
3791
	then \
3946
	then \
3792
		www_site=$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} www-site); \
3947
		www_site=$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} www-site); \
Lines 3853-3882 Link Here
3853
	${GREP} '^etc/rc.d/' ${TMPPLIST} > ${WRKDIR}/.PLIST.startup; \
4008
	${GREP} '^etc/rc.d/' ${TMPPLIST} > ${WRKDIR}/.PLIST.startup; \
3854
	if [ -s ${WRKDIR}/.PLIST.setuid -o -s ${WRKDIR}/.PLIST.network -o -s ${WRKDIR}/.PLIST.writable ]; then \
4009
	if [ -s ${WRKDIR}/.PLIST.setuid -o -s ${WRKDIR}/.PLIST.network -o -s ${WRKDIR}/.PLIST.writable ]; then \
3855
		if [ -n "$$PORTS_AUDIT" ]; then \
4010
		if [ -n "$$PORTS_AUDIT" ]; then \
3856
			${ECHO_MSG} "===>  SECURITY REPORT (PARANOID MODE): "; \
4011
			if [ -z "${DESTDIR}" ] ; then \
4012
				${ECHO_MSG} "===>  SECURITY REPORT (PARANOID MODE): "; \
4013
			else \
4014
				${ECHO_MSG} "===>  SECURITY REPORT FOR ${DESTDIR} (PARANOID MODE): "; \
4015
			fi; \
3857
		else \
4016
		else \
3858
			${ECHO_MSG} "===>  SECURITY REPORT: "; \
4017
			if [ -z "${DESTDIR}" ] ; then \
4018
				${ECHO_MSG} "===>  SECURITY REPORT: "; \
4019
			else \
4020
				${ECHO_MSG} "===>  SECURITY REPORT FOR ${DESTDIR}: "; \
4021
			fi; \
3859
		fi; \
4022
		fi; \
3860
		if [ -s ${WRKDIR}/.PLIST.setuid ] ; then \
4023
		if [ -s ${WRKDIR}/.PLIST.setuid ] ; then \
3861
			${ECHO_MSG} "      This port has installed the following binaries which execute with"; \
4024
			if [ -z "${DESTDIR}" ] ; then \
3862
			${ECHO_MSG} "      increased privileges."; \
4025
				${ECHO_MSG} "      This port has installed the following binaries,"; \
4026
			else \
4027
				${ECHO_MSG} "      This port has installed the following binaries into ${DESTDIR},"; \
4028
			fi; \
4029
			${ECHO_MSG} "      which execute with increased privileges."; \
3863
			${CAT} ${WRKDIR}/.PLIST.setuid; \
4030
			${CAT} ${WRKDIR}/.PLIST.setuid; \
3864
			${ECHO_MSG}; \
4031
			${ECHO_MSG}; \
3865
		fi; \
4032
		fi; \
3866
		if [ -s ${WRKDIR}/.PLIST.network ] ; then \
4033
		if [ -s ${WRKDIR}/.PLIST.network ] ; then \
3867
			${ECHO_MSG} "      This port has installed the following files which may act as network"; \
4034
			if [ -z "${DESTDIR}" ] ; then \
3868
			${ECHO_MSG} "      servers and may therefore pose a remote security risk to the system."; \
4035
				${ECHO_MSG} "      This port has installed the following files, which may act as network"; \
4036
				${ECHO_MSG} "      servers and may therefore pose a remote security risk to the system."; \
4037
			else \
4038
				${ECHO_MSG} "      This port has installed the following files into ${DESTDIR}, which may"; \
4039
				${ECHO_MSG} "      act as network servers and may therefore pose a remote security risk to"; \
4040
				${ECHO_MSG} "      the system."; \
4041
			fi; \
3869
			${CAT} ${WRKDIR}/.PLIST.network; \
4042
			${CAT} ${WRKDIR}/.PLIST.network; \
3870
			${ECHO_MSG}; \
4043
			${ECHO_MSG}; \
3871
			if [ -s ${WRKDIR}/.PLIST.startup ] ; then \
4044
			if [ -s ${WRKDIR}/.PLIST.startup ] ; then \
3872
				${ECHO_MSG} "      This port has installed the following startup scripts which may cause"; \
4045
				if [ -z "${DESTDIR}" ] ; then \
3873
				${ECHO_MSG} "      these network services to be started at boot time."; \
4046
					${ECHO_MSG} "      This port has installed the following startup scripts,"; \
4047
				else \
4048
					${ECHO_MSG} "      This port has installed the following startup scripts into ${DESTDIR},"; \
4049
				fi; \
4050
				${ECHO_MSG} "      which may cause these network services to be started at boot time."; \
3874
				${SED} s,^,${PREFIX}/, < ${WRKDIR}/.PLIST.startup; \
4051
				${SED} s,^,${PREFIX}/, < ${WRKDIR}/.PLIST.startup; \
3875
				${ECHO_MSG}; \
4052
				${ECHO_MSG}; \
3876
			fi; \
4053
			fi; \
3877
		fi; \
4054
		fi; \
3878
		if [ -s ${WRKDIR}/.PLIST.writable ] ; then \
4055
		if [ -s ${WRKDIR}/.PLIST.writable ] ; then \
3879
			${ECHO_MSG} "      This port has installed the following world-writable files/directories."; \
4056
			if [ -z "${DESTDIR}" ] ; then \
4057
				${ECHO_MSG} "      This port has installed the following world-writable files/directories."; \
4058
			else \
4059
				${ECHO_MSG} "      This port has installed the following world-writable files/directories"; \
4060
				${ECHO_MSG} "      into ${DESTDIR}."; \
4061
			fi; \
3880
			${CAT} ${WRKDIR}/.PLIST.writable; \
4062
			${CAT} ${WRKDIR}/.PLIST.writable; \
3881
			${ECHO_MSG}; \
4063
			${ECHO_MSG}; \
3882
		fi; \
4064
		fi; \
Lines 4018-4024 Link Here
4018
build-message:
4200
build-message:
4019
	@${ECHO_MSG} "===>  Building for ${PKGNAME}"
4201
	@${ECHO_MSG} "===>  Building for ${PKGNAME}"
4020
install-message:
4202
install-message:
4203
.if !defined(DESTDIR)
4021
	@${ECHO_MSG} "===>  Installing for ${PKGNAME}"
4204
	@${ECHO_MSG} "===>  Installing for ${PKGNAME}"
4205
.else
4206
	@${ECHO_MSG} "===>  Installing for ${PKGNAME} into ${DESTDIR}"
4207
.endif
4022
package-message:
4208
package-message:
4023
	@${ECHO_MSG} "===>  Building package for ${PKGNAME}"
4209
	@${ECHO_MSG} "===>  Building package for ${PKGNAME}"
4024
4210
Lines 4100-4113 Link Here
4100
		${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${.TARGET}"
4286
		${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${.TARGET}"
4101
	@${ECHO_MSG} "===>  Returning to user credentials"
4287
	@${ECHO_MSG} "===>  Returning to user credentials"
4102
.else
4288
.else
4289
.if !defined(DESTDIR)
4103
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN}"
4290
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN}"
4291
.else
4292
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN} from ${DESTDIR}"
4293
.endif
4104
	@found_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
4294
	@found_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
4105
	for p in $${found_names}; do \
4295
	for p in $${found_names}; do \
4106
			check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
4296
			check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
4107
			if [ "$${check_name}" = "${PKGBASE}" ]; then \
4297
			if [ "$${check_name}" = "${PKGBASE}" ]; then \
4108
					prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
4298
					prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
4109
					if [ "x${PREFIX}" = "x$${prfx}" ]; then \
4299
					if [ "x${PREFIX}" = "x$${prfx}" ]; then \
4110
							${ECHO_MSG} "===>   Deinstalling $${p}"; \
4300
							if [ -z "${DESTDIR}" ] ; then \
4301
									${ECHO_MSG} "===>   Deinstalling $${p}"; \
4302
							else \
4303
									${ECHO_MSG} "===>   Deinstalling $${p} from ${DESTDIR}"; \
4304
							fi; \
4111
							${PKG_DELETE} -f $${p}; \
4305
							${PKG_DELETE} -f $${p}; \
4112
					else \
4306
					else \
4113
							${ECHO_MSG} "===>   $${p} has a different PREFIX: $${prfx}, skipping"; \
4307
							${ECHO_MSG} "===>   $${p} has a different PREFIX: $${prfx}, skipping"; \
Lines 4115-4121 Link Here
4115
			fi; \
4309
			fi; \
4116
	done; \
4310
	done; \
4117
	if [ -z "$${found_names}" ]; then \
4311
	if [ -z "$${found_names}" ]; then \
4118
			${ECHO_MSG} "===>   ${PKGBASE} not installed, skipping"; \
4312
			if [ -z "${DESTDIR}" ] ; then \
4313
					${ECHO_MSG} "===>   ${PKGBASE} not installed, skipping"; \
4314
			else \
4315
					${ECHO_MSG} "===>   ${PKGBASE} not installed in ${DESTDIR}, skipping"; \
4316
			fi; \
4119
	fi
4317
	fi
4120
	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
4318
	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
4121
.endif
4319
.endif
Lines 4133-4149 Link Here
4133
		${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${.TARGET}"
4331
		${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${.TARGET}"
4134
	@${ECHO_MSG} "===>  Returning to user credentials"
4332
	@${ECHO_MSG} "===>  Returning to user credentials"
4135
.else
4333
.else
4334
.if !defined(DESTDIR)
4136
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN}"
4335
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN}"
4336
.else
4337
	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN} from ${DESTDIR}"
4338
.endif
4137
	@deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
4339
	@deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
4138
	if [ -n "$${deinstall_names}" ]; then \
4340
	if [ -n "$${deinstall_names}" ]; then \
4139
		for d in $${deinstall_names}; do \
4341
		for d in $${deinstall_names}; do \
4140
			${ECHO_MSG} "===>   Deinstalling $${d}"; \
4342
			if [ -z "${DESTDIR}" ] ; then \
4343
				${ECHO_MSG} "===>   Deinstalling $${d}"; \
4344
			else \
4345
				${ECHO_MSG} "===>   Deinstalling $${d} from ${DESTDIR}"; \
4346
			fi; \
4141
			${PKG_DELETE} -f $${d}; \
4347
			${PKG_DELETE} -f $${d}; \
4142
		done; \
4348
		done; \
4143
	else \
4349
	else \
4144
		${ECHO_MSG} "===>   ${PKGORIGIN} not installed, skipping"; \
4350
		if [ -z "${DESTDIR}" ] ; then \
4145
	fi
4351
			${ECHO_MSG} "===>   ${PKGORIGIN} not installed, skipping"; \
4146
	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
4352
		else \
4353
			${ECHO_MSG} "===>   ${PKGORIGIN} not installed in ${DESTDIR}, skipping"; \
4354
		fi; \
4355
	fi; \
4356
	${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
4147
.endif
4357
.endif
4148
.endif
4358
.endif
4149
4359
Lines 4534-4549 Link Here
4534
		if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
4744
		if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
4535
			subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
4745
			subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
4536
			if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
4746
			if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
4537
				${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
4747
				if [ -z "${DESTDIR}" ] ; then \
4538
				${PKG_ADD} $${subpkgfile}; \
4748
					${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
4749
					${PKG_ADD} $${subpkgfile}; \
4750
				else \
4751
					${ECHO_MSG} "===>   Installing existing package $${subpkgfile} into ${DESTDIR}"; \
4752
					${PKG_ADD} -C ${DESTDIR} $${subpkgfile}; \
4753
				fi; \
4539
			else \
4754
			else \
4540
			  (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
4755
			  (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
4541
			fi; \
4756
			fi; \
4542
		else \
4757
		else \
4543
			(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
4758
			(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
4544
		fi ; \
4759
		fi; \
4545
		${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"; \
4760
		if [ -z "${DESTDIR}" ] ; then \
4546
4761
			${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"; \
4762
		else \
4763
			${ECHO_MSG} "===>   Returning to build of ${PKGNAME} for ${DESTDIR}"; \
4764
		fi;
4547
4765
4548
.for deptype in EXTRACT PATCH FETCH BUILD RUN
4766
.for deptype in EXTRACT PATCH FETCH BUILD RUN
4549
${deptype:L}-depends:
4767
${deptype:L}-depends:
Lines 4565-4571 Link Here
4565
					${ECHO_MSG} "Error: ${NONEXISTENT} exists.  Please remove it, and restart the build."; \
4783
					${ECHO_MSG} "Error: ${NONEXISTENT} exists.  Please remove it, and restart the build."; \
4566
					${FALSE}; \
4784
					${FALSE}; \
4567
				else \
4785
				else \
4568
					${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - found"; \
4786
					if [ -z "${DESTDIR}" ] ; then \
4787
						${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - found"; \
4788
					else \
4789
						${ECHO_MSG} "===>   ${PKGNAME} depends on file in ${DESTDIR}: $$prog - found"; \
4790
					fi; \
4569
					if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4791
					if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4570
						${ECHO_MSG} "       (but building it anyway)"; \
4792
						${ECHO_MSG} "       (but building it anyway)"; \
4571
						notfound=1; \
4793
						notfound=1; \
Lines 4574-4580 Link Here
4574
					fi; \
4796
					fi; \
4575
				fi; \
4797
				fi; \
4576
			else \
4798
			else \
4577
				${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - not found"; \
4799
				if [ -z "${DESTDIR}" ] ; then \
4800
					${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - not found"; \
4801
				else \
4802
					${ECHO_MSG} "===>   ${PKGNAME} depends on file in ${DESTDIR}: $$prog - not found"; \
4803
				fi; \
4578
				notfound=1; \
4804
				notfound=1; \
4579
			fi; \
4805
			fi; \
4580
		else \
4806
		else \
Lines 4584-4590 Link Here
4584
			esac; \
4810
			esac; \
4585
			if [ "$$pkg" != "" ]; then \
4811
			if [ "$$pkg" != "" ]; then \
4586
				if ${PKG_INFO} "$$prog" > /dev/null 2>&1 ; then \
4812
				if ${PKG_INFO} "$$prog" > /dev/null 2>&1 ; then \
4587
					${ECHO_MSG} "===>   ${PKGNAME} depends on package: $$prog - found"; \
4813
					if [ -z "${DESTDIR}" ] ; then \
4814
						${ECHO_MSG} "===>   ${PKGNAME} depends on package: $$prog - found"; \
4815
					else \
4816
						${ECHO_MSG} "===>   ${PKGNAME} depends on package in ${DESTDIR}: $$prog - found"; \
4817
					fi; \
4588
					if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4818
					if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4589
						${ECHO_MSG} "       (but building it anyway)"; \
4819
						${ECHO_MSG} "       (but building it anyway)"; \
4590
						notfound=1; \
4820
						notfound=1; \
Lines 4592-4598 Link Here
4592
						notfound=0; \
4822
						notfound=0; \
4593
					fi; \
4823
					fi; \
4594
				else \
4824
				else \
4595
					${ECHO_MSG} "===>   ${PKGNAME} depends on package: $$prog - not found"; \
4825
					if [ -z "${DESTDIR}" ] ; then \
4826
						${ECHO_MSG} "===>   ${PKGNAME} depends on package: $$prog - not found"; \
4827
					else \
4828
						${ECHO_MSG} "===>   ${PKGNAME} depends on package in ${DESTDIR}: $$prog - not found"; \
4829
					fi; \
4596
					notfound=1; \
4830
					notfound=1; \
4597
				fi; \
4831
				fi; \
4598
				if [ $$notfound != 0 ]; then \
4832
				if [ $$notfound != 0 ]; then \
Lines 4606-4612 Link Here
4606
					fi; \
4840
					fi; \
4607
				fi; \
4841
				fi; \
4608
			elif ${WHICH} "$$prog" > /dev/null 2>&1 ; then \
4842
			elif ${WHICH} "$$prog" > /dev/null 2>&1 ; then \
4609
				${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - found"; \
4843
				if [ -z "${PREFIX}" ] ; then \
4844
					${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - found"; \
4845
				else \
4846
					${ECHO_MSG} "===>   ${PKGNAME} depends on executable in ${DESTDIR}: $$prog - found"; \
4847
				fi; \
4610
				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4848
				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4611
					${ECHO_MSG} "       (but building it anyway)"; \
4849
					${ECHO_MSG} "       (but building it anyway)"; \
4612
					notfound=1; \
4850
					notfound=1; \
Lines 4614-4620 Link Here
4614
					notfound=0; \
4852
					notfound=0; \
4615
				fi; \
4853
				fi; \
4616
			else \
4854
			else \
4617
				${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - not found"; \
4855
				if [ -z "${DESTDIR}" ] ; then \
4856
					${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - not found"; \
4857
				else \
4858
					${ECHO_MSG} "===>   ${PKGNAME} depends on executable in ${DESTDIR}: $$prog - not found"; \
4859
				fi; \
4618
				notfound=1; \
4860
				notfound=1; \
4619
			fi; \
4861
			fi; \
4620
		fi; \
4862
		fi; \
Lines 4650-4667 Link Here
4650
		else \
4892
		else \
4651
			dir=$${dir%%:*}; \
4893
			dir=$${dir%%:*}; \
4652
		fi; \
4894
		fi; \
4653
		${ECHO_MSG} -n "===>   ${PKGNAME} depends on shared library: $$lib"; \
4895
		if [ -z "${DESTDIR}" ] ; then \
4654
		if ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
4896
			${ECHO_MSG} -n "===>   ${PKGNAME} depends on shared library: $$lib"; \
4655
			${ECHO_MSG} " - found"; \
4897
			if ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
4656
			if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4898
				${ECHO_MSG} " - found"; \
4657
				${ECHO_MSG} "       (but building it anyway)"; \
4899
				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4658
				notfound=1; \
4900
					${ECHO_MSG} "       (but building it anyway)"; \
4901
					notfound=1; \
4902
				else \
4903
					notfound=0; \
4904
				fi; \
4659
			else \
4905
			else \
4660
				notfound=0; \
4906
				${ECHO_MSG} " - not found"; \
4907
				notfound=1; \
4661
			fi; \
4908
			fi; \
4662
		else \
4909
		else \
4663
			${ECHO_MSG} " - not found"; \
4910
			${ECHO_MSG} -n "===>   ${PKGNAME} depends on shared library in ${DESTDIR}: $$lib"; \
4664
			notfound=1; \
4911
			if ${CHROOT} ${DESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
4912
				${ECHO_MSG} " - found"; \
4913
				if [ ${_DEPEND_ALWAYS} = 1 ]; then \
4914
					${ECHO_MSG} "       (but building it anyway)"; \
4915
					notfound=1; \
4916
				else \
4917
					notfound=0; \
4918
				fi; \
4919
			else \
4920
				${ECHO_MSG} " - not found"; \
4921
				notfound=1; \
4922
			fi; \
4665
		fi; \
4923
		fi; \
4666
		if [ $$notfound != 0 ]; then \
4924
		if [ $$notfound != 0 ]; then \
4667
			${ECHO_MSG} "===>    Verifying $$target for $$lib in $$dir"; \
4925
			${ECHO_MSG} "===>    Verifying $$target for $$lib in $$dir"; \
Lines 4697-4703 Link Here
4697
			(cd $$dir; ${MAKE} $$target $$depends_args) ; \
4955
			(cd $$dir; ${MAKE} $$target $$depends_args) ; \
4698
		fi \
4956
		fi \
4699
	done
4957
	done
4700
	@${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"
4958
	@if [ -z "${DESTDIR}" ] ; then \
4959
		${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"; \
4960
	else \
4961
		${ECHO_MSG} "===>   Returning to build of ${PKGNAME} for ${DESTDIR}"; \
4962
	fi
4701
.endif
4963
.endif
4702
.else
4964
.else
4703
	@${DO_NADA}
4965
	@${DO_NADA}
Lines 5196-5209 Link Here
5196
	@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \
5458
	@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \
5197
		if [ ! -e ${DOCSDIR}/${x} ]; then \
5459
		if [ ! -e ${DOCSDIR}/${x} ]; then \
5198
		${ECHO_CMD} ${DOCSDIR}/${x} | \
5460
		${ECHO_CMD} ${DOCSDIR}/${x} | \
5199
			${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \
5461
			${SED} -e 's,^${DESTDIR}${PREFIX}/,,' >> ${TMPPLIST}; \
5200
	fi;fi
5462
	fi;fi
5201
.endfor
5463
.endfor
5202
	@${FIND} -P ${PORTDOCS:S/^/${DOCSDIR}\//} ! -type d 2>/dev/null | \
5464
	@${FIND} -P ${PORTDOCS:S/^/${DOCSDIR}\//} ! -type d 2>/dev/null | \
5203
		${SED} -ne 's,^${PREFIX}/,,p' >> ${TMPPLIST}
5465
		${SED} -ne 's,^${DESTDIR}${PREFIX}/,,p' >> ${TMPPLIST}
5204
	@${FIND} -P -d ${PORTDOCS:S/^/${DOCSDIR}\//} -type d 2>/dev/null | \
5466
	@${FIND} -P -d ${PORTDOCS:S/^/${DOCSDIR}\//} -type d 2>/dev/null | \
5205
		${SED} -ne 's,^${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
5467
		${SED} -ne 's,^${DESTDIR}${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
5206
	@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST}
5468
	@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${DESTDIR}${PREFIX}/,,}" >> ${TMPPLIST}
5207
.else
5469
.else
5208
	@${DO_NADA}
5470
	@${DO_NADA}
5209
.endif
5471
.endif
Lines 5214-5223 Link Here
5214
# Process GNU INFO files at package install/deinstall time
5476
# Process GNU INFO files at package install/deinstall time
5215
.if defined(INFO)
5477
.if defined(INFO)
5216
.for i in ${INFO}
5478
.for i in ${INFO}
5217
	install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir
5479
	install-info --quiet ${DESTDIR}${PREFIX}/${INFO_PATH}/$i.info ${DESTDIR}${PREFIX}/${INFO_PATH}/dir
5218
	@${ECHO_CMD} "@unexec install-info --quiet --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
5480
	@${ECHO_CMD} "@unexec install-info --quiet --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
5219
		>> ${TMPPLIST}
5481
		>> ${TMPPLIST}
5220
	@${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
5482
	@${LS} ${DESTDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${DESTDIR}${PREFIX}/::g >> ${TMPPLIST}
5221
	@${ECHO_CMD} "@exec install-info --quiet %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
5483
	@${ECHO_CMD} "@exec install-info --quiet %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
5222
		>> ${TMPPLIST}
5484
		>> ${TMPPLIST}
5223
	@if [ "`${DIRNAME} $i`" != "." ]; then \
5485
	@if [ "`${DIRNAME} $i`" != "." ]; then \
Lines 5226-5232 Link Here
5226
.endfor
5488
.endfor
5227
.if (${PREFIX} != "/usr")
5489
.if (${PREFIX} != "/usr")
5228
	@${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}
5490
	@${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}
5229
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE})
5491
.if (${PREFIX} != ${LOCALBASE_REL} && ${PREFIX} != ${X11BASE_REL} && ${PREFIX} != ${LINUXBASE_REL})
5230
	@${ECHO_CMD} "@unexec rmdir %D/info 2> /dev/null || true" >> ${TMPPLIST}
5492
	@${ECHO_CMD} "@unexec rmdir %D/info 2> /dev/null || true" >> ${TMPPLIST}
5231
.endif
5493
.endif
5232
.endif
5494
.endif
Lines 5237-5243 Link Here
5237
# deinstall-time
5499
# deinstall-time
5238
.if !target(add-plist-post)
5500
.if !target(add-plist-post)
5239
add-plist-post:
5501
add-plist-post:
5240
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr")
5502
.if (${PREFIX} != ${LOCALBASE_REL} && ${PREFIX} != ${X11BASE_REL} && ${PREFIX} != ${LINUXBASE_REL} && ${PREFIX} != "/usr")
5241
	@${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST}
5503
	@${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST}
5242
.else
5504
.else
5243
	@${DO_NADA}
5505
	@${DO_NADA}
Lines 5261-5272 Link Here
5261
	@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
5523
	@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
5262
.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 ))
5524
.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 ))
5263
	@for i in ${USE_RC_SUBR}; do \
5525
	@for i in ${USE_RC_SUBR}; do \
5264
		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}; \
5526
		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}${PREFIX}/etc/rc.d/$${i%.sh}; \
5265
		${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
5527
		${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
5266
	done
5528
	done
5267
.else
5529
.else
5268
	@for i in ${USE_RC_SUBR}; do \
5530
	@for i in ${USE_RC_SUBR}; do \
5269
		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}.sh; \
5531
		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}${PREFIX}/etc/rc.d/$${i%.sh}.sh; \
5270
		${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \
5532
		${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \
5271
	done
5533
	done
5272
.endif
5534
.endif
Lines 5320-5328 Link Here
5320
	fi
5582
	fi
5321
	@${RM} -rf ${PKG_DBDIR}/${PKGNAME}
5583
	@${RM} -rf ${PKG_DBDIR}/${PKGNAME}
5322
.endif
5584
.endif
5323
	@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
5585
.if !exists(${PKG_DBDIR}/${PKGNAME})
5324
		${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"; \
5586
.if !defined(DESTDIR)
5325
		${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
5587
		@${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"
5588
.else
5589
		@${ECHO_MSG} "===>   Registering installation for ${PKGNAME} in ${DESTDIR}"
5590
.endif
5591
		@${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
5326
		${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
5592
		${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
5327
		${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \
5593
		${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \
5328
		${ECHO_CMD} ${COMMENT:Q} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
5594
		${ECHO_CMD} ${COMMENT:Q} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
Lines 5345-5352 Link Here
5345
					${ECHO_CMD} ${PKGNAME} >> ${PKG_DBDIR}/$$dep/+REQUIRED_BY; \
5611
					${ECHO_CMD} ${PKGNAME} >> ${PKG_DBDIR}/$$dep/+REQUIRED_BY; \
5346
				fi; \
5612
				fi; \
5347
			fi; \
5613
			fi; \
5348
		done; \
5614
		done
5349
	fi
5615
.endif
5350
.if !defined(NO_MTREE)
5616
.if !defined(NO_MTREE)
5351
	@if [ -f ${MTREE_FILE} ]; then \
5617
	@if [ -f ${MTREE_FILE} ]; then \
5352
		${CP} ${MTREE_FILE} ${PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \
5618
		${CP} ${MTREE_FILE} ${PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \
(-)../Mk/bsd.port.subdir.mk (-8 / +8 lines)
Lines 48-57 Link Here
48
48
49
.if !defined(NOPRECIOUSMAKEVARS)
49
.if !defined(NOPRECIOUSMAKEVARS)
50
.if !defined(ARCH)
50
.if !defined(ARCH)
51
ARCH!=	/usr/bin/uname -p
51
ARCH!=	${DESTDIR}/usr/bin/uname -p
52
.endif
52
.endif
53
.if !defined(OSREL)
53
.if !defined(OSREL)
54
OSREL!=	/usr/bin/uname -r | sed -e 's/[-(].*//'
54
OSREL!=	${DESTDIR}/usr/bin/uname -r | sed -e 's/[-(].*//'
55
.endif
55
.endif
56
.if !defined(OSVERSION)
56
.if !defined(OSVERSION)
57
.if exists(/sbin/sysctl)
57
.if exists(/sbin/sysctl)
Lines 61-83 Link Here
61
.endif
61
.endif
62
.endif
62
.endif
63
.if !defined(PORTOBJFORMAT)
63
.if !defined(PORTOBJFORMAT)
64
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout
64
PORTOBJFORMAT!= test -x ${DESTDIR}/usr/bin/objformat && ${DESTDIR}/usr/bin/objformat || echo aout
65
.endif
65
.endif
66
.endif
66
.endif
67
67
68
ID?=	/usr/bin/id
68
ID?=	${DESTDIR}/usr/bin/id
69
UID!=	${ID} -u
69
UID!=	${ID} -u
70
LOCALBASE?=	${DESTDIR}/usr/local
70
LOCALBASE?=	${DESTDIR}${LOCALBASE_REL}
71
.if exists(${LOCALBASE}/sbin/pkg_info)
71
.if exists(${LOCALBASE}/sbin/pkg_info)
72
PKG_INFO?=	${LOCALBASE}/sbin/pkg_info
72
PKG_INFO?=	${LOCALBASE}/sbin/pkg_info
73
.else
73
.else
74
PKG_INFO?=	/usr/sbin/pkg_info
74
PKG_INFO?=	${DESTDIR}/usr/sbin/pkg_info
75
.endif
75
.endif
76
SED?=		/usr/bin/sed
76
SED?=		${DESTDIR}/usr/bin/sed
77
PKGINSTALLVER!=	${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
77
PKGINSTALLVER!=	${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
78
78
79
.if !defined(OPSYS)
79
.if !defined(OPSYS)
80
OPSYS!=	/usr/bin/uname -s
80
OPSYS!=	${DESTDIR}/usr/bin/uname -s
81
.endif
81
.endif
82
82
83
ECHO_MSG?=	echo
83
ECHO_MSG?=	echo
(-)../Mk/bsd.python.mk (-1 / +1 lines)
Lines 404-410 Link Here
404
	@${ECHO} "Legal values are:	2.7 (default), 2.8, 2.9, 3.2"
404
	@${ECHO} "Legal values are:	2.7 (default), 2.8, 2.9, 3.2"
405
	@${FALSE}
405
	@${FALSE}
406
.endif
406
.endif
407
ZOPEBASEDIR?=			${PREFIX}/${SZOPEBASEDIR}
407
ZOPEBASEDIR?=			${DESTDIR}${PREFIX}/${SZOPEBASEDIR}
408
ZOPEPRODUCTDIR?=		Products
408
ZOPEPRODUCTDIR?=		Products
409
.endif
409
.endif
410
410
(-)../Mk/bsd.ruby.mk (-2 / +2 lines)
Lines 113-119 Link Here
113
RUBY_VER?=		${RUBY_DEFAULT_VER}
113
RUBY_VER?=		${RUBY_DEFAULT_VER}
114
114
115
.if defined(RUBY)
115
.if defined(RUBY)
116
.if !exists(${RUBY})
116
.if !exists(${DESTDIR}${RUBY})
117
IGNORE=	cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist.  Please specify an already installed ruby executable.
117
IGNORE=	cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist.  Please specify an already installed ruby executable.
118
.endif
118
.endif
119
119
Lines 122-128 Link Here
122
IGNORE=	cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig.  Please specify a properly installed ruby executable.
122
IGNORE=	cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig.  Please specify a properly installed ruby executable.
123
.endif
123
.endif
124
124
125
_RUBY_CONFIG=		${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e
125
_RUBY_CONFIG=		${DESTDIR}${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e
126
126
127
RUBY_VERSION!=		${_RUBY_CONFIG} 'puts VERSION'
127
RUBY_VERSION!=		${_RUBY_CONFIG} 'puts VERSION'
128
RUBY_SUFFIX?=		# empty
128
RUBY_SUFFIX?=		# empty
(-)../Mk/bsd.scons.mk (-1 / +1 lines)
Lines 57-63 Link Here
57
SCONS_ENV?=	CCFLAGS="${CCFLAGS}" CXXFLAGS="${CXXFLAGS}" \
57
SCONS_ENV?=	CCFLAGS="${CCFLAGS}" CXXFLAGS="${CXXFLAGS}" \
58
		LINKFLAGS="${LINKFLAGS}" PKGCONFIGDIR="${PKGCONFIGDIR}"  \
58
		LINKFLAGS="${LINKFLAGS}" PKGCONFIGDIR="${PKGCONFIGDIR}"  \
59
		CPPPATH="${CPPPATH}" LIBPATH="${LIBPATH}" PREFIX="${PREFIX}" \
59
		CPPPATH="${CPPPATH}" LIBPATH="${LIBPATH}" PREFIX="${PREFIX}" \
60
		CC="${CC}" CXX="${CXX}"
60
		DESTDIR="${DESTDIR}" CC="${CC}" CXX="${CXX}"
61
SCONS_ARGS?=
61
SCONS_ARGS?=
62
SCONS_BUILDENV?=
62
SCONS_BUILDENV?=
63
SCONS_TARGET?=
63
SCONS_TARGET?=

Return to bug 100555