View | Details | Raw Unified | Return to bug 152877
Collapse All | Expand All

(-)Mk/bsd.port.mk (-11 / +54 lines)
Lines 961-966 Link Here
961
#				  that are explicitly marked MAKE_JOBS_UNSAFE.  User settable.
961
#				  that are explicitly marked MAKE_JOBS_UNSAFE.  User settable.
962
# MAKE_JOBS_NUMBER
962
# MAKE_JOBS_NUMBER
963
#				- Override the number of make jobs to be used.  User settable.
963
#				- Override the number of make jobs to be used.  User settable.
964
# WITH_PORT_LOCKING
965
#				- Acquire a "lock" when doing fetch, extract, patch, etc.
966
#				  This will prevent multiple ports trying to make the same
967
#				  dependency and tripping over each other.
964
#
968
#
965
# For install:
969
# For install:
966
#
970
#
Lines 2367-2372 Link Here
2367
2371
2368
TAR?=	/usr/bin/tar
2372
TAR?=	/usr/bin/tar
2369
2373
2374
.if defined(WITH_PORT_LOCKING) && !defined(WITHOUT_PORT_LOCKING)
2375
LOCKF_CMD?=	lockf -k -s ./Makefile
2376
.endif
2377
2370
# EXTRACT_SUFX is defined in .pre.mk section
2378
# EXTRACT_SUFX is defined in .pre.mk section
2371
.if defined(USE_ZIP)
2379
.if defined(USE_ZIP)
2372
EXTRACT_CMD?=		${UNZIP_CMD}
2380
EXTRACT_CMD?=		${UNZIP_CMD}
Lines 4398-4426 Link Here
4398
.else
4406
.else
4399
_CHROOT_SEQ=
4407
_CHROOT_SEQ=
4400
.endif
4408
.endif
4401
_SANITY_SEQ=	${_CHROOT_SEQ} pre-everything check-makefile \
4409
_FETCH_DEP=		check-sanity
4410
_EXTRACT_DEP=		fetch
4411
_PATCH_DEP=		extract
4412
_CONFIGURE_DEP=		patch
4413
_BUILD_DEP=		configure
4414
_INSTALL_DEP=		build
4415
_PACKAGE_DEP=		install
4416
_SANITY_SEQ=		${_CHROOT_SEQ} pre-everything check-makefile \
4402
				check-categories check-makevars check-desktop-entries \
4417
				check-categories check-makevars check-desktop-entries \
4403
				check-depends identify-install-conflicts check-deprecated \
4418
				check-depends identify-install-conflicts check-deprecated \
4404
				check-vulnerable check-license buildanyway-message \
4419
				check-vulnerable check-license buildanyway-message \
4405
				options-message
4420
				options-message
4406
_FETCH_DEP=		check-sanity
4421
.if defined(WITH_PORT_LOCKING) && !defined(WITHOUT_PORT_LOCKING) && !defined(_HAVE_PORT_LOCK_${PKGCATEGORY}_${PORTDIRNAME})
4422
_FETCH_SEQ=		lock-fetch
4423
_EXTRACT_SEQ=		lock-extract
4424
_PATCH_SEQ=		lock-patch
4425
_CONFIGURE_SEQ=		lock-configure
4426
_BUILD_SEQ=		lock-build
4427
_INSTALL_SEQ=		lock-install
4428
_PACKAGE_SEQ=		lock-package
4429
.else
4407
_FETCH_SEQ=		fetch-depends pre-fetch pre-fetch-script \
4430
_FETCH_SEQ=		fetch-depends pre-fetch pre-fetch-script \
4408
				do-fetch post-fetch post-fetch-script
4431
				do-fetch post-fetch post-fetch-script
4409
_EXTRACT_DEP=	fetch
4410
_EXTRACT_SEQ=	check-build-conflicts extract-message checksum extract-depends \
4432
_EXTRACT_SEQ=	check-build-conflicts extract-message checksum extract-depends \
4411
				pre-extract pre-extract-script do-extract \
4433
				pre-extract pre-extract-script do-extract \
4412
				post-extract post-extract-script
4434
				post-extract post-extract-script
4413
_PATCH_DEP=		extract
4414
_PATCH_SEQ=		ask-license patch-message patch-depends patch-dos2unix pre-patch \
4435
_PATCH_SEQ=		ask-license patch-message patch-depends patch-dos2unix pre-patch \
4415
				pre-patch-script do-patch post-patch post-patch-script
4436
				pre-patch-script do-patch post-patch post-patch-script
4416
_CONFIGURE_DEP=	patch
4417
_CONFIGURE_SEQ=	build-depends lib-depends configure-message \
4437
_CONFIGURE_SEQ=	build-depends lib-depends configure-message \
4418
				pre-configure pre-configure-script \
4438
				pre-configure pre-configure-script \
4419
				run-autotools do-configure post-configure post-configure-script
4439
				run-autotools do-configure post-configure post-configure-script
4420
_BUILD_DEP=		configure
4421
_BUILD_SEQ=		build-message pre-build pre-build-script do-build \
4440
_BUILD_SEQ=		build-message pre-build pre-build-script do-build \
4422
				post-build post-build-script
4441
				post-build post-build-script
4423
_INSTALL_DEP=	build
4424
_INSTALL_SEQ=	install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \
4442
_INSTALL_SEQ=	install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \
4425
				pre-install-script generate-plist check-already-installed
4443
				pre-install-script generate-plist check-already-installed
4426
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
4444
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
Lines 4430-4438 Link Here
4430
				add-plist-docs add-plist-examples add-plist-data \
4448
				add-plist-docs add-plist-examples add-plist-data \
4431
				add-plist-post install-rc-script compress-man \
4449
				add-plist-post install-rc-script compress-man \
4432
				install-ldconfig-file fake-pkg security-check
4450
				install-ldconfig-file fake-pkg security-check
4433
_PACKAGE_DEP=	install
4434
_PACKAGE_SEQ=	package-message pre-package pre-package-script \
4451
_PACKAGE_SEQ=	package-message pre-package pre-package-script \
4435
				do-package post-package-script
4452
				do-package post-package-script
4453
.endif
4454
4455
.if defined(WITH_PORT_LOCKING) && !defined(WITHOUT_PORT_LOCKING)
4456
.for target in fetch extract patch configure build install package
4457
.if !target(lock-${target})
4458
lock-${target}:
4459
	@${ECHO_MSG} "===>  Doing \"make ${target}\" under a lock for ${PKGNAME}"
4460
	@cd ${.CURDIR} && ${LOCKF_CMD} ${MAKE} -D_HAVE_PORT_LOCK_${PKGCATEGORY}_${PORTDIRNAME} ${__softMAKEFLAGS} ${target}
4461
.endif
4462
.endfor
4463
.endif
4436
4464
4437
.if !target(post-chroot)
4465
.if !target(post-chroot)
4438
post-chroot:
4466
post-chroot:
Lines 5105-5114 Link Here
5105
		if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
5133
		if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
5106
			subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
5134
			subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
5107
			if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
5135
			if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
5108
				${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
5136
				if [ X"${WITH_PORT_LOCKING}" = "X" -o X"${WITHOUT_PORT_LOCKING}" != "X" ]; then \
5109
				${PKG_ADD} $${subpkgfile}; \
5137
					${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
5138
					${PKG_ADD} $${subpkgfile}; \
5139
				else \
5140
					${ECHO_MSG} "===>   Installing existing package (under a lock) $${subpkgfile}"; \
5141
					(cd $$dir; ${LOCKF_CMD} ${PKG_ADD} $${subpkgfile}) ; \
5142
				fi; \
5110
			else \
5143
			else \
5111
			  (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
5144
				(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
5112
			fi; \
5145
			fi; \
5113
		else \
5146
		else \
5114
			(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
5147
			(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
Lines 5207-5212 Link Here
5207
			else \
5240
			else \
5208
				${_INSTALL_DEPENDS} \
5241
				${_INSTALL_DEPENDS} \
5209
			fi; \
5242
			fi; \
5243
		else \
5244
			if [ -d "$$dir" -a X"${WITH_PORT_LOCKING}" != "X" -a X"${WITHOUT_PORT_LOCKING}" = "X" ]; then \
5245
				${ECHO_MSG} "===>    Testing for lock on $$prog in $$dir"; \
5246
				(cd $$dir; ${LOCKF_CMD} ${ECHO_MSG} "     => No lock on $$prog. Continuing..") ; \
5247
			fi; \
5210
		fi; \
5248
		fi; \
5211
	done
5249
	done
5212
.endif
5250
.endif
Lines 5252-5257 Link Here
5252
					${FALSE}; \
5290
					${FALSE}; \
5253
				fi; \
5291
				fi; \
5254
			fi; \
5292
			fi; \
5293
		else \
5294
			if [ -d "$$dir" -a X"${WITH_PORT_LOCKING}" != "X" -a X"${WITHOUT_PORT_LOCKING" = "X" ]; then \
5295
				${ECHO_MSG} "===>    Testing for lock on $$lib in $$dir"; \
5296
				(cd $$dir; ${LOCKF_CMD} ${ECHO_MSG} "     => No lock on $$lib. Continuing..") ; \
5297
			fi; \
5255
		fi; \
5298
		fi; \
5256
	done
5299
	done
5257
.endif
5300
.endif

Return to bug 152877