From e190d6805f1437cb7be40764378690f340ced136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 9 Jul 2015 19:19:01 +0200 Subject: FreeBSD: Add option for build in source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- freebsd/trinity.port.mk | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'freebsd') diff --git a/freebsd/trinity.port.mk b/freebsd/trinity.port.mk index f88171f38..5893857d9 100644 --- a/freebsd/trinity.port.mk +++ b/freebsd/trinity.port.mk @@ -48,6 +48,7 @@ USES+= gmake PATCH_STRIP= -p1 +TDE_BUILD_SUBDIR=.build # Set to empty for build-in-source # Build Flags TDE_FLAGS=-I${LOCALBASE}/include @@ -74,8 +75,9 @@ TDE_BUILD_ENV=\ TDE_CMAKE_CONFIGURE=\ export ${TDE_BUILD_ENV}; \ export CMAKE_PREFIX_PATH="${LOCALBASE}"; \ - cd ${WRKSRC} && mkdir .build && cd .build && \ - cmake .. \ + [ -z "${TDE_BUILD_SUBDIR}" ] || mkdir ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ + cd ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ + cmake ${WRKSRC} \ -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \ -DCMAKE_C_FLAGS="${TDE_FLAGS}" \ -DCMAKE_CXX_FLAGS="${TDE_FLAGS}" \ @@ -91,7 +93,8 @@ TDE_CMAKE_CONFIGURE=\ TDE_AUTOTOOLS_CONFIGURE=\ export ${TDE_BUILD_ENV}; \ - cd ${WRKSRC} && mkdir .build && cd .build && \ + [ -z "${TDE_BUILD_SUBDIR}" ] || mkdir ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ + cd ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ ${WRKSRC}/configure \ --prefix=${TDE_PREFIX} \ --exec-prefix=${TDE_PREFIX} \ @@ -131,20 +134,20 @@ tde-pathfix: ### Custom build targets for CMAKE tde-cmake-prepare: - rm -rf "${WRKSRC}/.build" + [ -z "${TDE_BUILD_SUBDIR}" ] || rm -rf "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-cmake-build: ${TDE_BUILD_ENV} \ - ${MAKE_CMD} -C "${WRKSRC}/.build" + ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-cmake-install: ${TDE_BUILD_ENV} \ DESTDIR=${STAGEDIR} \ - ${MAKE_CMD} -C "${WRKSRC}/.build" install + ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" install ### Custom build targets for AUTOTOOLS tde-autotools-prepare: - rm -rf "${WRKSRC}/.build" + [ -z "${TDE_BUILD_SUBDIR}" ] || rm -rf "${WRKSRC}/${TDE_BUILD_SUBDIR}" cp -f "/usr/local/share/aclocal/libtool.m4" "${WRKSRC}/admin/libtool.m4.in" cp -f "/usr/local/share/libtool/build-aux/ltmain.sh" "${WRKSRC}/admin/ltmain.sh" gsed -i "${WRKSRC}/admin/acinclude.m4.in" -e "s|/usr/include/tqt|${LOCALBASE}/include/tqt|g" @@ -152,9 +155,9 @@ tde-autotools-prepare: tde-autotools-build: ${TDE_BUILD_ENV} \ - ${MAKE_CMD} -C "${WRKSRC}/.build" + ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-autotools-install: ${TDE_BUILD_ENV} \ DESTDIR=${STAGEDIR} \ - ${MAKE_CMD} -C "${WRKSRC}/.build" install + ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" install -- cgit v1.2.1