pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

coreclr-git: Makefile cleanup, fix build with clang



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Wed Feb 24 19:51:24 2016 +0100
Changeset:	bca05600e305000497f676dafda4cd02bddb2227

Modified Files:
	coreclr-git/Makefile

Log Message:
coreclr-git: Makefile cleanup, fix build with clang

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bca05600e305000497f676dafda4cd02bddb2227

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 coreclr-git/Makefile | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diffs:
diff --git a/coreclr-git/Makefile b/coreclr-git/Makefile
index 61df43d..f135fd0 100644
--- a/coreclr-git/Makefile
+++ b/coreclr-git/Makefile
@@ -12,18 +12,20 @@ HOMEPAGE=	https://github.com/dotnet/coreclr
 COMMENT=	The .NET Core runtime and the base library
 LICENSE=	mit
 
-# We need to set CMake this way to get defined CMAKE_ARGS
-USE_CMAKE=	yes
-USE_LANGUAGES=	c c++
-
-USE_TOOLS+=	bash
-REPLACE_BASH+=	build.sh
-
 DEPENDS+=	${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
 
+# We need to set CMake this way to get defined CMAKE_ARGS
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	bash pax
+USE_CMAKE=	yes
 CMAKE_ARGS+=	-DCORECLR_SET_RPATH:BOOL=OFF
 
+REPLACE_BASH+=	build.sh src/pal/tests/palsuite/runpaltests.sh
+
 CORECLR_PREFIX=	${PREFIX}/CoreCLR
+# XXX 32-bit? Please set ONLY_FOR_PLATFORM and adjust these
+CORECLR_OBJDIR=		${WRKSRC}/bin/obj/${OPSYS}.x64.Debug
+CORECLR_PRODUCTDIR=	${WRKSRC}/bin/Product/${OPSYS}.x64.Debug
 
 # Handle subprefix
 LDFLAGS+=	${COMPILER_RPATH_FLAG}${CORECLR_PREFIX:Q}
@@ -33,25 +35,30 @@ LDFLAGS+=	${COMPILER_RPATH_FLAG}${CORECLR_PREFIX:Q}/bin
 BUILDLINK_PASSTHRU_DIRS+=	${CORECLR_PREFIX:Q}
 BUILDLINK_PASSTHRU_RPATHDIRS+=	${CORECLR_PREFIX:Q}
 
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+_WRAP_EXTRA_ARGS.CXX+=	-Wno-unused-function -Wno-self-assign
+CWRAPPERS_APPEND.cxx+=	-Wno-unused-function -Wno-self-assign
+.endif
+
 do-configure:
 	${RUN} ${ECHO} Skip configure and call CMake via build.sh
 
 do-build:
 	${RUN} cd ${WRKSRC} && \
-	${PKGSRC_SETENV} ${CONFIGURE_ENV} PYTHON=${PYTHONBIN:Q} \
+	${PKGSRC_SETENV} ${MAKE_ENV} PYTHON=${PYTHONBIN:Q} \
 		./build.sh skipmscorlib cmakeargs ${CMAKE_ARGS:Q}
 
 # Currently there is no unix-like install target.
 # Put all produced files under subprefix.
 do-install:
-	${RUN} mkdir -p ${DESTDIR}${PREFIX}/CoreCLR
-	${RUN} ${CP} -r ${WRKSRC}/bin/Product/${OPSYS}.x64.Debug/* \
-		${DESTDIR}${CORECLR_PREFIX}
+	${INSTALL_DATA_DIR} ${DESTDIR}${CORECLR_PREFIX:Q}
+	cd ${CORECLR_PRODUCTDIR} && ${PAX} -rw . ${DESTDIR}${CORECLR_PREFIX:Q}
 
 do-test:
 	${RUN} cd ${WRKSRC} && \
-	${SETENV} ${TEST_ENV} ${BASH} src/pal/tests/palsuite/runpaltests.sh \
-		${WRKSRC}/bin/obj/${OPSYS}.x64.Debug ${WRKSRC}/paltestout
+	${SETENV} ${TEST_ENV} src/pal/tests/palsuite/runpaltests.sh \
+		${CORECLR_OBJDIR} ${WRKSRC}/paltestout
 
 .include "../../textproc/icu/buildlink3.mk"
 .include "../../wip/llvm-git/buildlink3.mk"


Home | Main Index | Thread Index | Old Index