Skip to content

Commit

Permalink
Infrastructure: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Apr 8, 2015
1 parent 2f0c5a4 commit 967d10c
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 883 deletions.
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20150408:
AUTHOR: [email protected]

Add a new USES=waf to handle the waf building system, allowing to factorise
code. Plug waf into MAKE_CMD and CONFIGURE_CMD so the regular defined targets
can be reused.

Always define _MAKE_JOBS so that when bsd.port.mk will stop overwritting
_MAKE_JOBS when parallel jobs are disabled we can enforce -j1 (which is needed
to really disable parallelisation with waf

WAF_CMD has been created to allow one to override the location of the waf
script relatively to WRKSRC

CONFIGURE_TARGET is by default defined to "configure"
ALL_TARGET is by default defined to "build"
INSTALL_TARGET is by default defined to "install"

USES=waf is by default stagedir safe

20150407:
AUTHOR: [email protected]

Expand Down
2 changes: 1 addition & 1 deletion GIDs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ tvheadend:*:984:
puppetdb:*:985:
kamailio:*:986:
spark:*:987:
mediabrowser:*:989:
emby:*:989:
oozie:*:990:
ebnetd:*:999:
nogroup:*:65533:
Expand Down
1 change: 1 addition & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -7462,3 +7462,4 @@ lang/gnatdroid-armv5||2015-04-07|Has expired: Nobody cares enough to fix sigtram
sysutils/puppet27||2015-04-07|Has expired: Does not work with Ruby 2.x
www/rubygem-form_data|www/rubygem-http-form_data|2015-04-07|Has expired: Use www/rubygem-http-form_data instead (renamed by upstream)
www/typo345||2015-04-07|Has expired: Upgrade to www/typo3 or www/typo3-lts
multimedia/mediabrowser|multimedia/emby-server|2015-04-08|Project renamed
49 changes: 49 additions & 0 deletions Mk/Uses/waf.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# $FreeBSD$
#
# Provide support to use the waf building system
#
# Feature: waf
# Usage: USES=waf
#
# It implies USES=python:build automatically is no USES=python has been
# specified yet
#
# WAF_CMD can be specified in the ports if the waf script is not
# in WRKSRC/waf
# CONFIGURE_TARGET default to 'configure'
# ALL_TARGET default to 'build'
# INSTALL_TARGET= default to 'install'

.if !defined(_INCLUDE_USES_WAF_MK)
_INCLUDE_USES_WAF_MK= yes

.if !empty(waf_ARGS)
IGNORE= Incorrect 'USES+= waf:${waf_ARGS}' waf takes no arguments
.endif

.if !${USES:Mpython*}
python_ARGS= 2,build
.include "${USESDIR}/python.mk"
.endif

MAKEFILE= #
MAKE_FLAGS= #
ALL_TARGET= #
HAS_CONFIGURE= yes
WAF_CMD?= ./waf

CONFIGURE_TARGET?= configure
ALL_TARGET?= build
INSTALL_TARGET?= install

CONFIGURE_CMD= ${PYTHON_CMD} ${WAF_CMD} ${CONFIGURE_TARGET}
MAKE_CMD= ${PYTHON_CMD} ${WAF_CMD}
CONFIGURE_ARGS+= --prefix=${PREFIX} \
${_MAKE_JOBS}

DESTDIRNAME= --destdir

# Set a minimal job of 1
_MAKE_JOBS= -j${MAKE_JOBS_NUMBER}

.endif
16 changes: 2 additions & 14 deletions Mk/bsd.port.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2177,27 +2177,14 @@ MAKE_ENV+= ${INSTALL_MACROS}
SCRIPTS_ENV+= ${INSTALL_MACROS}

# Macro for copying entire directory tree with correct permissions
.if ${UID} == 0
COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
${CHOWN} -Rh ${BINOWN}:${BINGRP} $$1 && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${BINMODE} $$1/{} \;' --
COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
${CHOWN} -Rh ${SHAREOWN}:${SHAREGRP} $$1 && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${SHAREMODE} $$1/{} \;' --
.else
COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${BINMODE} $$1/{} \;' --
COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${SHAREMODE} $$1/{} \;' --
.endif

# The user can override the NO_PACKAGE by specifying this from
# the make command line
Expand Down Expand Up @@ -2671,6 +2658,7 @@ LATEST_LINK?= ${PKGBASE}
PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}

CONFIGURE_SCRIPT?= configure
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT}
CONFIGURE_TARGET?= ${ARCH}-portbld-${OPSYS:tl}${OSREL}
CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//}
CONFIGURE_LOG?= config.log
Expand Down Expand Up @@ -3408,7 +3396,7 @@ do-configure:
INSTALL_LIB="${INSTALL_LIB}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \
${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
(${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
${FALSE}; \
Expand Down
68 changes: 0 additions & 68 deletions Tools/scripts/mkptools/mkpbuild

This file was deleted.

30 changes: 0 additions & 30 deletions Tools/scripts/mkptools/mkpclean

This file was deleted.

Loading

0 comments on commit 967d10c

Please sign in to comment.