summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freebsd/trinity.port.mk21
1 files changed, 12 insertions, 9 deletions
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