miktex: add some missing dependencies

Fix the easy breakage. Now we need some Unix process handling support
adapted from FreeBSD code.
This commit is contained in:
Thomas Klausner 2020-01-08 11:57:33 +01:00
parent ba092a0882
commit b24a8d0c97
5 changed files with 81 additions and 1 deletions

View File

@ -10,10 +10,12 @@ HOMEPAGE= https://miktex.org/download/ctan/systems/win32/miktex/source/
COMMENT= TODO: Short description of the package
#LICENSE= # TODO: (see mk/license.mk)
USE_TOOLS+= pkg-config
USE_TOOLS+= bison pkg-config
USE_CMAKE= yes
USE_LANGUAGES= c c++
TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
BUILD_DEPENDS+= log4cxx-[0-9]*:../../devel/log4cxx
# or lzmalib?
BUILD_DEPENDS+= lzma-[0-9]*:../../archivers/lzma
@ -31,6 +33,7 @@ BUILD_DEPENDS+= lzma-[0-9]*:../../archivers/lzma
.include "../../graphics/gd/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
.include "../../graphics/graphite2/buildlink3.mk"
.include "../../fonts/harfbuzz/buildlink3.mk"
# \todo? harfbuzz-icu
.include "../../textproc/hunspell/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"

View File

@ -4,3 +4,6 @@ SHA1 (miktex-2.9.7250.tar.xz) = 556e61189c6a9ce2c5dfd7a27f150fb14c9caa73
RMD160 (miktex-2.9.7250.tar.xz) = 89f886c818b409e429b01944f08d9758abf8f16f
SHA512 (miktex-2.9.7250.tar.xz) = 151917fa2c658ce588a7d18769e4664d108e0e4087ec198b5b75b6831e4b4e90da7783e69a125873665e192323e059d26e332baeed8e8c778087b62bf783869d
Size (miktex-2.9.7250.tar.xz) = 25680464 bytes
SHA1 (patch-Libraries_MiKTeX_Core_Process_unx_unxProcess.cpp) = b58602e253026bdf1201f62cd6057bf6762e5504
SHA1 (patch-Libraries_MiKTeX_Trace_include_miktex_Trace_TraceStream.h) = f5b4ce40231298769171023ee1fffc9849da6242
SHA1 (patch-Libraries_MiKTeX_Util_include_miktex_Util_StringUtil.h) = a02817a0e9b60668c94fd46cb8b0891e80520576

View File

@ -0,0 +1,44 @@
$NetBSD$
Handle NetBSD like FreeBSD.
TODO: Still needs more porting to compile.
--- Libraries/MiKTeX/Core/Process/unx/unxProcess.cpp.orig 2019-11-16 19:20:48.000000000 +0000
+++ Libraries/MiKTeX/Core/Process/unx/unxProcess.cpp
@@ -30,14 +30,16 @@
# include <sys/proc.h>
#endif
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
# include <sys/param.h>
# include <sys/queue.h>
# include <sys/socket.h>
# include <sys/sysctl.h>
+#if defined(__FreeBSD__)
# include <sys/user.h>
-# include <kvm.h>
# include <libprocstat.h>
+#endif
+# include <kvm.h>
# include <fcntl.h>
#endif
@@ -635,7 +637,7 @@ string unxProcess::get_ProcessName()
MIKTEX_FATAL_CRT_ERROR("proc_pidpath")
}
return PathName(path).GetFileName().ToString();
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
std::string nameFromProcstat;
kvm_t *kvm = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "");
if (kvm)
@@ -755,7 +757,7 @@ ProcessInfo unxProcess::GetProcessInfo()
break;
}
processInfo.parent = pbi.pbi_ppid;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
processInfo.parent = getppid();
kvm_t *kvm = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "");

View File

@ -0,0 +1,15 @@
$NetBSD$
Fix
error: 'va_list' has not been declared
--- Libraries/MiKTeX/Trace/include/miktex/Trace/TraceStream.h.orig 2019-11-16 19:20:48.000000000 +0000
+++ Libraries/MiKTeX/Trace/include/miktex/Trace/TraceStream.h
@@ -29,6 +29,7 @@
#include <memory>
#include <string>
#include <vector>
+#include <stdarg.h>
#include "TraceCallback.h"

View File

@ -0,0 +1,15 @@
$NetBSD$
Fix
error: 'va_list' has not been declared
--- Libraries/MiKTeX/Util/include/miktex/Util/StringUtil.h.orig 2019-11-16 19:20:48.000000000 +0000
+++ Libraries/MiKTeX/Util/include/miktex/Util/StringUtil.h
@@ -25,6 +25,7 @@
#define F6BFCB48DCDA42E992057245151CA1D5
#include "config.h"
+#include <stdarg.h>
#include <cstddef>
#include <cwchar>