# HG changeset patch # User Louis Opter # Date 1326659775 -3600 # Node ID 0c55f24c6b3d914d588bbd099206b56360f99186 # Parent 7b377e31fea359f64d4260380fea39854e9d7bc4 Add a series of patch related to the build systme diff -r 7b377e31fea3 -r 0c55f24c6b3d maintainers_add_the_linux_kbuilddir_finder.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maintainers_add_the_linux_kbuilddir_finder.patch Sun Jan 15 21:36:15 2012 +0100 @@ -0,0 +1,88 @@ +# HG changeset patch +# Parent 6682d6e4330ef0429c41af6dcbe0362ff15d9841 +maintainers: add a CMake finder for the Linux build tree and only build the e1000 sample if it is found + +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,12 +29,17 @@ + + FIND_PACKAGE(LATEX) + FIND_PACKAGE(CodeWorker REQUIRED) ++FIND_PACKAGE(LinuxKBuildDir) + + INCLUDE(AddFileDependencies) + INCLUDE(FileCopy) + INCLUDE(RathaxesCopyLatexClasses) + INCLUDE(UseRathaxes) + ++IF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) ++ MESSAGE(STATUS "No valid Linux build tree found, kernel modules will not be built") ++ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) ++ + # Global definitions ########################################################### + + ENABLE_TESTING() +diff --git a/maintainers/CMakeScripts/FindLinuxKBuildDir.cmake b/maintainers/CMakeScripts/FindLinuxKBuildDir.cmake +new file mode 100644 +--- /dev/null ++++ b/maintainers/CMakeScripts/FindLinuxKBuildDir.cmake +@@ -0,0 +1,41 @@ ++# Check if the kernel build directory exists ++# ++# This finder will seek for the usual /lib/modules/`uname -r`/build/ ++# directory. Obviously, this is Linux specific. ++# ++# You can specify an alternate build directory by using the environment ++# variable LINUX_KBUILD_DIR. ++# ++# This is necessary to build Linux kernel modules! ++# ++# Usage: FIND_PACKAGE(LinuxKBuildDir [REQUIRED]) ++# ++# This will set the variable LINUX_KBUILD_DIR with the path to the KBuild ++# directory, if it is found. ++ ++IF (NOT LINUX_KBUILD_DIR) ++ IF ($ENV{LINUX_KBUILD_DIR}) ++ SET(KDIR $ENV{LINUX_KBUILD_DIR}) ++ ELSE ($ENV{LINUX_KBUILD_DIR}) ++ SET(KDIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build/") ++ ENDIF ($ENV{LINUX_KBUILD_DIR}) ++ ++ IF (IS_DIRECTORY "${KDIR}") ++ FIND_FILE(LINUX_KBUILD_DIR_MAKEFILE "Makefile" ++ PATHS "${KDIR}" ++ # Restrict the search to this directory only: ++ NO_DEFAULT_PATH ++ NO_CMAKE_ENVIRONMENT_PATH ++ NO_CMAKE_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ NO_CMAKE_SYSTEM_PATH) ++ # Check if it looks legit: ++ IF (LINUX_KBUILD_DIR_MAKEFILE) ++ SET(LINUX_KBUILD_DIR "${KDIR}" CACHE PATH "Path to the Linux KBuild directory (usually /lib/modules/`uname -r`/build/)") ++ ENDIF (LINUX_KBUILD_DIR_MAKEFILE) ++ ENDIF (IS_DIRECTORY "${KDIR}") ++ENDIF (NOT LINUX_KBUILD_DIR) ++ ++INCLUDE(FindPackageHandleStandardArgs) ++ ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(LinuxKBuildDir DEFAULT_MSG LINUX_KBUILD_DIR) +diff --git a/rathaxes/samples/e1000/CMakeLists.txt b/rathaxes/samples/e1000/CMakeLists.txt +--- a/rathaxes/samples/e1000/CMakeLists.txt ++++ b/rathaxes/samples/e1000/CMakeLists.txt +@@ -2,10 +2,6 @@ + RTI log.rti lkm.rti pci.rti socket.rti ethernet.rti e1000.rti + BLT log.blt lkm.blt pci.blt socket.blt ethernet.blt e1000.blt) + +-# We can't name lkm since it's already used as the target name to generate the +-# source (with ADD_RATHAXES_SOURCES). +- +-# does not work atm +-IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") +- ADD_RATHAXES_LKM(e1000 e1000_src) +-ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") ++IF (LINUX_KBUILD_DIR) ++ ADD_RATHAXES_LKM(e1000 e1000_src) ++ENDIF (LINUX_KBUILD_DIR) diff -r 7b377e31fea3 -r 0c55f24c6b3d maintainers_raise_codeworker_dl_timeout.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maintainers_raise_codeworker_dl_timeout.patch Sun Jan 15 21:36:15 2012 +0100 @@ -0,0 +1,16 @@ +# HG changeset patch +# Parent 9605d78aad53acc0b593bfbfecfe572be5de37f5 +maintainers: raise the timeout for the CodeWorker download to 20 seconds + +diff --git a/maintainers/CMakeScripts/FindCodeWorker.cmake b/maintainers/CMakeScripts/FindCodeWorker.cmake +--- a/maintainers/CMakeScripts/FindCodeWorker.cmake ++++ b/maintainers/CMakeScripts/FindCodeWorker.cmake +@@ -39,7 +39,7 @@ + "http://rathaxes.googlecode.com/files/${CODEWORKER_BINARY_NAME}" + ${CODEWORKER_BINARY_PATH} + STATUS CODEWORKER_DL_STATUS +- TIMEOUT 10) ++ TIMEOUT 20) + + LIST(GET CODEWORKER_DL_STATUS 0 CODEWORKER_DL_RETURN) + LIST(GET CODEWORKER_DL_STATUS 1 CODEWORKER_DL_MESSAGE) diff -r 7b377e31fea3 -r 0c55f24c6b3d maintainers_warn_about_ia32_libs_on_linux_x86_64.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maintainers_warn_about_ia32_libs_on_linux_x86_64.patch Sun Jan 15 21:36:15 2012 +0100 @@ -0,0 +1,17 @@ +# HG changeset patch +# Parent 7d3f56a00874caf642896543ce43fe2bc59e8ef4 +maintainers: display a warning on Linux x86_64 about ia32-libs in the CodeWorker finder + +diff --git a/maintainers/CMakeScripts/FindCodeWorker.cmake b/maintainers/CMakeScripts/FindCodeWorker.cmake +--- a/maintainers/CMakeScripts/FindCodeWorker.cmake ++++ b/maintainers/CMakeScripts/FindCodeWorker.cmake +@@ -49,6 +49,9 @@ + SET(CODEWORKER_BINARY_PATH ${CODEWORKER_BINARY_PATH} CACHE FILEPATH "Path to the downloaded pre-built CodeWorker binary" FORCE) + IF (UNIX) + EXECUTE_PROCESS(COMMAND "chmod" "+x" "${CODEWORKER_BINARY_PATH}") ++ IF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ MESSAGE(STATUS "CodeWorker needs the 32bit compatability libraries (ia32-libs), make sure you have them!") ++ ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + ENDIF (UNIX) + ELSE (${CODEWORKER_DL_RETURN} EQUAL 0) + SET(CODEWORKER_BINARY_PATH "") diff -r 7b377e31fea3 -r 0c55f24c6b3d rathaxes_remove_the_system_argument_in_hello_world.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rathaxes_remove_the_system_argument_in_hello_world.patch Sun Jan 15 21:36:15 2012 +0100 @@ -0,0 +1,19 @@ +# HG changeset patch +# Parent 8d4d86ab5a700580938519f251a7351b3a82c0a0 +rathaxes: simply generate the hello world sample for the current system + +diff --git a/rathaxes/samples/helloworld/CMakeLists.txt b/rathaxes/samples/helloworld/CMakeLists.txt +--- a/rathaxes/samples/helloworld/CMakeLists.txt ++++ b/rathaxes/samples/helloworld/CMakeLists.txt +@@ -1,9 +1,8 @@ + ADD_RATHAXES_SOURCES(hello hello.rtx + RTI types.rti main.rti log.rti +- BLT types.blt log.blt main.blt +- SYSTEM linux) ++ BLT types.blt log.blt main.blt) + +-ADD_RATHAXES_EXECUTABLE(Test_Rathaxes_Samples_Helloworld hello linux) ++ADD_RATHAXES_EXECUTABLE(Test_Rathaxes_Samples_Helloworld hello) + + ADD_TEST(Rathaxes_Samples_Helloworld Test_Rathaxes_Samples_Helloworld "Success") + SET_TESTS_PROPERTIES(Rathaxes_Samples_Helloworld PROPERTIES PASS_REGULAR_EXPRESSION diff -r 7b377e31fea3 -r 0c55f24c6b3d rathaxes_simplify_windows_lkm_cmakelists_txt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rathaxes_simplify_windows_lkm_cmakelists_txt.patch Sun Jan 15 21:36:15 2012 +0100 @@ -0,0 +1,19 @@ +# HG changeset patch +# Parent 820ac8370b7ad9128154dbeb250c37dcec6fc87a +rathaxes: simply use IF (WIN32) instead of a MATCHES and remove an unrelated comment in the Windows LKM sample CMakeLists.txt + +diff --git a/rathaxes/samples/windows_minimal_lkm/CMakeLists.txt b/rathaxes/samples/windows_minimal_lkm/CMakeLists.txt +--- a/rathaxes/samples/windows_minimal_lkm/CMakeLists.txt ++++ b/rathaxes/samples/windows_minimal_lkm/CMakeLists.txt +@@ -2,8 +2,6 @@ + RTI log.rti lkm.rti + BLT log.blt lkm.blt) + +-# We can't name lkm since it's already used as the target name to generate the +-# source (with ADD_RATHAXES_SOURCES). +-IF (${CMAKE_SYSTEM_NAME} MATCHES "Windows") +- ADD_RATHAXES_LKM(minimal_lkm minimal_lkm_src) +-ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Windows") ++IF (WIN32) ++ ADD_RATHAXES_LKM(minimal_lkm minimal_lkm_src) ++ENDIF (WIN32) diff -r 7b377e31fea3 -r 0c55f24c6b3d series --- a/series Fri Jan 13 13:54:37 2012 +0100 +++ b/series Sun Jan 15 21:36:15 2012 +0100 @@ -1,1 +1,6 @@ +maintainers_raise_codeworker_dl_timeout.patch +maintainers_warn_about_ia32_libs_on_linux_x86_64.patch +maintainers_add_the_linux_kbuilddir_finder.patch +rathaxes_remove_the_system_argument_in_hello_world.patch +rathaxes_simplify_windows_lkm_cmakelists_txt.patch maintainers_update_the_binaries_installed_with_make_install.patch