pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
corefx-git: Prototype support for cmakeargs
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Mar 4 01:59:05 2016 +0100
Changeset: bae4a6c895dcad59be5e6c3d5fe9ae7d953e4c8c
Modified Files:
corefx-git/Makefile
corefx-git/distinfo
Added Files:
corefx-git/patches/patch-build.sh
corefx-git/patches/patch-src_Native_configure.cmake
corefx-git/patches/patch-src_Native_gen-buildsys-clang.sh
Log Message:
corefx-git: Prototype support for cmakeargs
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bae4a6c895dcad59be5e6c3d5fe9ae7d953e4c8c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
corefx-git/Makefile | 2 +-
corefx-git/distinfo | 3 +
corefx-git/patches/patch-build.sh | 155 +++++++++++++++++++++
.../patches/patch-src_Native_configure.cmake | 12 ++
.../patches/patch-src_Native_gen-buildsys-clang.sh | 37 +++++
5 files changed, 208 insertions(+), 1 deletion(-)
diffs:
diff --git a/corefx-git/Makefile b/corefx-git/Makefile
index 4772c28..d5dc40a 100644
--- a/corefx-git/Makefile
+++ b/corefx-git/Makefile
@@ -24,7 +24,7 @@ do-configure:
do-build:
${RUN} cd ${WRKSRC} && \
- ${PKGSRC_SETENV} ${CONFIGURE_ENV} CMAKE_ARGS_EXTRA=${CMAKE_ARGS:Q} ./build.sh native verbose
+ ${PKGSRC_SETENV} ${MAKE_ENV} ./build.sh native verbose cmakeargs ${CMAKE_ARGS:Q}
.include "../../www/curl/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
diff --git a/corefx-git/distinfo b/corefx-git/distinfo
index 8f2f05f..941d1e4 100644
--- a/corefx-git/distinfo
+++ b/corefx-git/distinfo
@@ -1,5 +1,8 @@
$NetBSD$
+SHA1 (patch-build.sh) = fb2f19bc7fece61f2a227a1670737df9dc7b21ab
SHA1 (patch-run-test.sh) = a50960196fadc4e6d7b6c6f7bbf968b46ff284b4
+SHA1 (patch-src_Native_configure.cmake) = 2f9be9b5319a386bffe326cbfb0afd3c4a15b975
+SHA1 (patch-src_Native_gen-buildsys-clang.sh) = 8ea05b26ee7c25e60bb24252ec2a07714504c344
SHA1 (patch-src_System.IO.FileSystem.DriveInfo_tests_System.IO.FileSystem.DriveInfo.Tests.csproj) = 2566a3cb4e92de519569461cae2a2b9b6b6554da
SHA1 (patch-src_System.Net.Http_tests_FunctionalTests_System.Net.Http.Functional.Tests.csproj) = b49b15fc11b7c5373d237ebea524dbeab77ac653
SHA1 (patch-src_System.Net.NameResolution_tests_FunctionalTests_System.Net.NameResolution.Functional.Tests.csproj) = 20073552527d651b49ca54f12f38ee1d8e34e518
diff --git a/corefx-git/patches/patch-build.sh b/corefx-git/patches/patch-build.sh
new file mode 100644
index 0000000..ca67360
--- /dev/null
+++ b/corefx-git/patches/patch-build.sh
@@ -0,0 +1,155 @@
+$NetBSD$
+
+--- build.sh.orig 2016-03-02 23:13:05.000000000 +0000
++++ build.sh
+@@ -2,7 +2,7 @@
+
+ usage()
+ {
+- echo "Usage: $0 [managed] [native] [BuildArch] [BuildType] [clean] [verbose] [clangx.y] [platform] [cross]"
++ echo "Usage: $0 [managed] [native] [BuildArch] [BuildType] [clean] [verbose] [clangx.y] [platform] [cross] [cmakeargs]"
+ echo "managed - optional argument to build the managed code"
+ echo "native - optional argument to build the native code"
+ echo "The following arguments affect native builds only:"
+@@ -14,6 +14,7 @@ usage()
+ echo "platform can be: FreeBSD, Linux, NetBSD, OSX, Windows"
+ echo "cross - optional argument to signify cross compilation,"
+ echo " - will use ROOTFS_DIR environment variable if set."
++ echo "cmakeargs - user-settable additional arguments passed to CMake."
+ exit 1
+ }
+
+@@ -122,8 +123,8 @@ build_native_corefx()
+ cd "$__IntermediatesDir"
+
+ # Regenerate the CMake solution
+- echo "Invoking cmake with arguments: \"$__nativeroot\" $__CMakeArgs"
+- "$__nativeroot/gen-buildsys-clang.sh" "$__nativeroot" $__ClangMajorVersion $__ClangMinorVersion $__BuildArch $__CMakeArgs
++ echo "Invoking cmake with arguments: \"$__nativeroot\" $__CMakeArgs $__cmakeextraargs"
++ "$__nativeroot/gen-buildsys-clang.sh" "$__nativeroot" $__ClangMajorVersion $__ClangMinorVersion $__BuildArch $__CMakeArgs "$__cmakeextraargs"
+
+ # Check that the makefiles were created.
+
+@@ -247,6 +248,7 @@ esac
+ __BuildOS=$__HostOS
+ __BuildType=Debug
+ __CMakeArgs=DEBUG
++__cmakeextraargs=""
+
+ BUILDERRORLEVEL=0
+
+@@ -258,20 +260,26 @@ __VerboseBuild=false
+ __ClangMajorVersion=3
+ __ClangMinorVersion=5
+
+-for i in "$@"
+- do
+- lowerI="$(echo $i | awk '{print tolower($0)}')"
+- case $lowerI in
++while :; do
++ if [ $# -le 0 ]; then
++ break
++ fi
++
++ lowerI="$(echo $1 | awk '{print tolower($0)}')"
++ case $lowerI in
+ -?|-h|--help)
+ usage
+ exit 1
+ ;;
++
+ managed)
+ __buildmanaged=true
+ ;;
++
+ native)
+ __buildnative=true
+ ;;
++
+ x86)
+ __BuildArch=x86
+ ;;
+@@ -291,32 +299,40 @@ for i in "$@"
+ debug)
+ __BuildType=Debug
+ ;;
++
+ release)
+ __BuildType=Release
+ __CMakeArgs=RELEASE
+ ;;
++
+ clean)
+ __CleanBuild=1
+ ;;
++
+ verbose)
+ __VerboseBuild=1
+ ;;
++
+ clang3.5)
+ __ClangMajorVersion=3
+ __ClangMinorVersion=5
+ ;;
++
+ clang3.6)
+ __ClangMajorVersion=3
+ __ClangMinorVersion=6
+ ;;
++
+ clang3.7)
+ __ClangMajorVersion=3
+ __ClangMinorVersion=7
+ ;;
++
+ freebsd)
+ __BuildOS=FreeBSD
+ __TestNugetRuntimeId=osx.10.10-x64
+ ;;
++
+ linux)
+ __BuildOS=Linux
+ # If the Host OS is also Linux, then use the RID of the host.
+@@ -325,24 +341,41 @@ for i in "$@"
+ __TestNugetRuntimeId=ubuntu.14.04-x64
+ fi
+ ;;
++
+ netbsd)
+ __BuildOS=NetBSD
+ __TestNugetRuntimeId=osx.10.10-x64
+ ;;
++
+ osx)
+ __BuildOS=OSX
+ __TestNugetRuntimeId=osx.10.10-x64
+ ;;
++
+ windows)
+ __BuildOS=Windows_NT
+ __TestNugetRuntimeId=win7-x64
+ ;;
++
+ cross)
+ __CrossBuild=1
+ ;;
++
++ cmakeargs)
++ if [ -n "$2" ]; then
++ __cmakeargs="$2"
++ shift
++ else
++ echo "ERROR: 'cmakeargs' requires a non-empty option argument"
++ exit 1
++ fi
++ ;;
++
+ *)
+- __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i"
++ __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
+ esac
++
++ shift
+ done
+
+ # If neither managed nor native are passed as arguments, default to building both
diff --git a/corefx-git/patches/patch-src_Native_configure.cmake b/corefx-git/patches/patch-src_Native_configure.cmake
new file mode 100644
index 0000000..3b53774
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_configure.cmake
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/Native/configure.cmake.orig 2016-03-01 04:32:05.000000000 +0000
++++ src/Native/configure.cmake
+@@ -16,7 +16,6 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL FreeB
+ include_directories(SYSTEM /usr/local/include)
+ elseif (CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+ set(PAL_UNIX_NAME \"NETBSD\")
+- include_directories(SYSTEM /usr/pkg/include)
+ else ()
+ message(FATAL_ERROR "Unknown platform. Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
+ endif ()
diff --git a/corefx-git/patches/patch-src_Native_gen-buildsys-clang.sh b/corefx-git/patches/patch-src_Native_gen-buildsys-clang.sh
new file mode 100644
index 0000000..b48b048
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_gen-buildsys-clang.sh
@@ -0,0 +1,37 @@
+$NetBSD$
+
+--- src/Native/gen-buildsys-clang.sh.orig 2016-03-02 23:13:05.000000000 +0000
++++ src/Native/gen-buildsys-clang.sh
+@@ -3,14 +3,15 @@
+ # This file invokes cmake and generates the build system for Clang.
+ #
+
+-if [ $# -lt 4 -o $# -gt 5 ]
++if [ $# -lt 4 -o $# -gt 6 ]
+ then
+ echo "Usage..."
+- echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> <Architecture> [build flavor]"
++ echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> <Architecture> [build flavor] [cmakeargs]"
+ echo "Specify the path to the top level CMake file - <corefx>/src/Native"
+ echo "Specify the clang version to use, split into major and minor version"
+ echo "Specify the target architecture."
+ echo "Optionally specify the build configuration (flavor.) Defaults to DEBUG."
++ echo "Optionally pass additional arguments to CMake call."
+ exit 1
+ fi
+
+@@ -63,4 +64,13 @@ if [[ -n "$CROSSCOMPILE" ]]; then
+ cmake_extra_defines="$cmake_extra_defines -DCMAKE_TOOLCHAIN_FILE=$project_root/cross/$build_arch/toolchain.cmake"
+ fi
+
+-cmake $cmake_extra_defines $1
++__UnprocessedCMakeArgs=""
++if [ -z "$6" ]; then
++ echo "No CMake extra Args specified"
++else
++ __UnprocessedCMakeArgs="$6"
++fi
++
++cmake $cmake_extra_defines \
++ $__UnprocessedCMakeArgs
++ $1
Home |
Main Index |
Thread Index |
Old Index