early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,59 @@
cmake_minimum_required (VERSION 3.9)
project (udis86)
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
set(
lib_sources
libudis86/decode.c
libudis86/itab.c
libudis86/syn-att.c
libudis86/syn-intel.c
libudis86/syn.c
libudis86/udis86.c
)
set(lib_headers
libudis86/decode.h
libudis86/itab.h
libudis86/extern.h
libudis86/syn.h
libudis86/types.h
libudis86/udint.h
)
set(cli_srcs udcli/udcli.c)
include_directories(.)
add_library(libudis86 ${lib_sources})
if(BUILD_SHARED_LIBS)
target_compile_definitions(libudis86 PRIVATE -D_USRDLL)
endif()
add_executable(udcli ${cli_srcs})
target_link_libraries(udcli libudis86)
install(
TARGETS libudis86
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_TOOLS)
install (
TARGETS udcli
RUNTIME DESTINATION tools/libudis86
)
endif()
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES ${lib_headers} DESTINATION include/libudis86)
install(FILES udis86.h DESTINATION include)
endif()

View File

@@ -0,0 +1,37 @@
diff --git a/libudis86/udis86.c b/libudis86/udis86.c
index e039c4e..8459012 100644
--- a/libudis86/udis86.c
+++ b/libudis86/udis86.c
@@ -34,6 +34,10 @@
# endif
#endif /* !__UD_STANDALONE__ */
+#if defined(__APPLE__)
+# include <string.h>
+#endif
+
static void ud_inp_init(struct ud *u);
/* =============================================================================
diff --git a/udcli/udcli.c b/udcli/udcli.c
index 9b044ca..ad1e4ab 100644
--- a/udcli/udcli.c
+++ b/udcli/udcli.c
@@ -27,13 +27,11 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#ifdef _MSC_VER
-#include "..\udis86.h"
-#define PACKAGE_STRING "udis86 pre-1.8"
-#else
#include <udis86.h>
-#include <config.h>
-#endif
+#define PACKAGE_STRING "udis86 pre-1.8"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif /* HAVE_CONFIG_H */
#if defined(__APPLE__)
# define FMT64 "ll"

View File

@@ -0,0 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO vmt/udis86
REF 56ff6c87c11de0ffa725b14339004820556e343d
SHA512 7a98333f9310f5f0466294bd980f03f9269c118a7557832015c59a7b6349a0eeab5642e0e6598d0be76d71f5d2d566d8b8af0ec75c26bdcff45646d60ff18e3a
HEAD_REF master
PATCHES fix-macbuild.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_find_acquire_program(PYTHON2)
vcpkg_execute_required_process(
COMMAND "${PYTHON2}" "${SOURCE_PATH}/scripts/ud_itab.py" "${SOURCE_PATH}/docs/x86/optable.xml" "${SOURCE_PATH}/libudis86/"
WORKING_DIRECTORY "${SOURCE_PATH}"
LOGNAME python-${TARGET_TRIPLET}-generate-sources
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
-DDISABLE_INSTALL_TOOLS=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

13
externals/vcpkg/ports/libudis86/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,13 @@
{
"name": "libudis86",
"version-string": "2018-01-28-56ff6c87",
"port-version": 2,
"description": "Disassembler Library for x86 and x86-64",
"homepage": "https://github.com/vmt/udis86",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}