diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile index fca149358..c4876aadf 100644 --- a/devel/cmake/Makefile +++ b/devel/cmake/Makefile @@ -34,6 +34,13 @@ LDFLAGS.SunOS+= -lsocket -lnsl CONFIGURE_ARGS+= --parallel=${MAKE_JOBS:Q} .endif +.if ${OPSYS} == "NetBSD" && ${OS_VARIANT} == "Minix" +LDFLAGS+= -lbz2 -llzma + +post-extract: + ${CP} ${FILESDIR}/Minix.cmake ${WRKSRC}/Modules/Platform/ +.endif # ${OPSYS} == "NetBSD" && ${OS_VARIANT} == "Minix" + PLIST_SUBST+= CMAKE_API=${CMAKE_API} # for Source/cmDependsJavaParser.cxx diff --git a/devel/cmake/PLIST b/devel/cmake/PLIST index 16914d0e8..b7c0937c9 100644 --- a/devel/cmake/PLIST +++ b/devel/cmake/PLIST @@ -1864,6 +1864,7 @@ share/cmake-${CMAKE_API}/Modules/Platform/Linux-XL-CXX.cmake share/cmake-${CMAKE_API}/Modules/Platform/Linux-XL-Fortran.cmake share/cmake-${CMAKE_API}/Modules/Platform/Linux-como.cmake share/cmake-${CMAKE_API}/Modules/Platform/Linux.cmake +share/cmake-${CMAKE_API}/Modules/Platform/Minix.cmake share/cmake-${CMAKE_API}/Modules/Platform/MP-RAS.cmake share/cmake-${CMAKE_API}/Modules/Platform/MirBSD.cmake share/cmake-${CMAKE_API}/Modules/Platform/NetBSD.cmake diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo index 6502f89e1..dbc62ad54 100644 --- a/devel/cmake/distinfo +++ b/devel/cmake/distinfo @@ -15,3 +15,6 @@ SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = e4bdf9fc58757e87bf7e3e3e195839eede SHA1 (patch-aa) = bab24334e025b7c1bf7caa2e69d6a439cc421ea9 SHA1 (patch-ab) = d1b39bdcd654f2a4fc63463cd20de656cce3cf8f SHA1 (patch-ac) = b5cedc6a2354beaf08e06d416c150154a7dc1f05 +SHA1 (patch-zz-minix-a) = 6133d54867c5b07d696b7bc4617dbda2bac83712 +SHA1 (patch-zz-minix-b) = d5c40a3aa39c8b09b3de0cb624b5b5a3be6b5126 +SHA1 (patch-zz-minix-c) = 48d818a73be5defe7427df3b309e3b2a7859bf2e diff --git a/devel/cmake/files/Minix.cmake b/devel/cmake/files/Minix.cmake new file mode 100644 index 000000000..bc819956e --- /dev/null +++ b/devel/cmake/files/Minix.cmake @@ -0,0 +1,11 @@ +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty +SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + +INCLUDE(Platform/UnixPaths) diff --git a/devel/cmake/patches/patch-zz-minix-a b/devel/cmake/patches/patch-zz-minix-a new file mode 100644 index 000000000..2f2b03742 --- /dev/null +++ b/devel/cmake/patches/patch-zz-minix-a @@ -0,0 +1,23 @@ +--- Source/kwsys/SystemInformation.cxx.orig Sun Oct 16 18:22:55 2016 ++++ Source/kwsys/SystemInformation.cxx Sun Oct 16 18:26:11 2016 +@@ -79,7 +79,7 @@ + # undef _WIN32 + #endif + +-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) ++#if defined(__OpenBSD__) || defined(__minix) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + # include + # include + # include +@@ -3814,7 +3814,11 @@ + // install ours + struct sigaction sa; + sa.sa_sigaction=(SigAction)StacktraceSignalHandler; ++#if defined(__minix) ++ sa.sa_flags=SA_RESETHAND; ++#else + sa.sa_flags=SA_SIGINFO|SA_RESETHAND; ++#endif /* defined(__minix) */ + # ifdef SA_RESTART + sa.sa_flags|=SA_RESTART; + # endif diff --git a/devel/cmake/patches/patch-zz-minix-b b/devel/cmake/patches/patch-zz-minix-b new file mode 100644 index 000000000..362ffd0bc --- /dev/null +++ b/devel/cmake/patches/patch-zz-minix-b @@ -0,0 +1,13 @@ +$NetBSD$ + +--- Source/kwsys/ProcessUNIX.c.orig Wed Nov 3 19:58:30 2010 ++++ Source/kwsys/ProcessUNIX.c +@@ -111,7 +111,7 @@ static inline void kwsysProcess_usleep(unsigned int ms + #endif + + /* Some platforms do not have siginfo on their signal handlers. */ +-#if defined(SA_SIGINFO) && !defined(__BEOS__) ++#if defined(SA_SIGINFO) && !defined(__BEOS__) && !defined(__minix) + # define KWSYSPE_USE_SIGINFO 1 + #endif + diff --git a/devel/cmake/patches/patch-zz-minix-c b/devel/cmake/patches/patch-zz-minix-c new file mode 100644 index 000000000..b46bb0aef --- /dev/null +++ b/devel/cmake/patches/patch-zz-minix-c @@ -0,0 +1,25 @@ +--- Source/kwsys/ProcessUNIX.c.orig Sun Oct 16 18:31:44 2016 ++++ Source/kwsys/ProcessUNIX.c Sun Oct 16 18:38:28 2016 +@@ -3034,10 +3034,10 @@ + /* Re-Install our handler. Repeat call until it is not interrupted. */ + { + struct sigaction newSigAction; +- struct sigaction &oldSigAction; ++ struct sigaction *oldSigAction; + memset(&newSigAction, 0, sizeof(struct sigaction)); +- newSigChldAction.sa_handler = kwsysProcessesSignalHandler; +- newSigChldAction.sa_flags = SA_NOCLDSTOP; ++ newSigAction.sa_handler = kwsysProcessesSignalHandler; ++ newSigAction.sa_flags = SA_NOCLDSTOP; + sigemptyset(&newSigAction.sa_mask); + switch(signum) + { +@@ -3048,7 +3048,7 @@ + case SIGTERM: + sigaddset(&newSigAction.sa_mask, SIGINT); + oldSigAction = &kwsysProcessesOldSigTermAction; break; +- default: return 0; ++ default: return; + } + while((sigaction(signum, &newSigAction, + oldSigAction) < 0) &&