early-access version 2853
This commit is contained in:
52
externals/vcpkg/ports/libdisasm/CMakeLists.txt
vendored
Executable file
52
externals/vcpkg/ports/libdisasm/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,52 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
project(libdisasm C)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
set(SRCS
|
||||
libdisasm/ia32_implicit.c
|
||||
libdisasm/ia32_implicit.h
|
||||
libdisasm/ia32_insn.c
|
||||
libdisasm/ia32_insn.h
|
||||
libdisasm/ia32_invariant.c
|
||||
libdisasm/ia32_invariant.h
|
||||
libdisasm/ia32_modrm.c
|
||||
libdisasm/ia32_modrm.h
|
||||
libdisasm/ia32_opcode_tables.c
|
||||
libdisasm/ia32_opcode_tables.h
|
||||
libdisasm/ia32_operand.c
|
||||
libdisasm/ia32_operand.h
|
||||
libdisasm/ia32_reg.c
|
||||
libdisasm/ia32_reg.h
|
||||
libdisasm/ia32_settings.c
|
||||
libdisasm/ia32_settings.h
|
||||
libdisasm/libdis.h
|
||||
libdisasm/qword.h
|
||||
libdisasm/x86_disasm.c
|
||||
libdisasm/x86_format.c
|
||||
libdisasm/x86_imm.c
|
||||
libdisasm/x86_imm.h
|
||||
libdisasm/x86_insn.c
|
||||
libdisasm/x86_misc.c
|
||||
libdisasm/x86_operand_list.c
|
||||
libdisasm/x86_operand_list.h
|
||||
)
|
||||
|
||||
include_directories(libdisasm)
|
||||
|
||||
add_library(libdisasm ${SRCS})
|
||||
|
||||
if (MSVC)
|
||||
target_compile_definitions(libdisasm PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS libdisasm
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES libdisasm/libdis.h DESTINATION include)
|
||||
endif()
|
||||
23
externals/vcpkg/ports/libdisasm/portfile.cmake
vendored
Executable file
23
externals/vcpkg/ports/libdisasm/portfile.cmake
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO bastard/libdisasm
|
||||
REF 0.23
|
||||
FILENAME "libdisasm-0.23.tar.gz"
|
||||
SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7
|
||||
PATCHES sizeofvoid.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
27
externals/vcpkg/ports/libdisasm/sizeofvoid.patch
vendored
Executable file
27
externals/vcpkg/ports/libdisasm/sizeofvoid.patch
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
--- a/libdisasm/x86_disasm.c
|
||||
+++ b/libdisasm/x86_disasm.c
|
||||
@@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len,
|
||||
|
||||
if ( offset >= buf_len ) {
|
||||
/* another caller screwup ;) */
|
||||
- x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset);
|
||||
+ x86_report_error(report_disasm_bounds, (void*)(long)(buf_rva+offset));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,13 +53,13 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len,
|
||||
|
||||
/* check and see if we had an invalid instruction */
|
||||
if (! size ) {
|
||||
- x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset );
|
||||
+ x86_report_error(report_invalid_insn, (void*)(long)(buf_rva+offset));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check if we overran the end of the buffer */
|
||||
if ( size > len ) {
|
||||
- x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset );
|
||||
+ x86_report_error( report_insn_bounds, (void*)(long)(buf_rva + offset));
|
||||
MAKE_INVALID( insn, bytes );
|
||||
return 0;
|
||||
}
|
||||
13
externals/vcpkg/ports/libdisasm/vcpkg.json
vendored
Executable file
13
externals/vcpkg/ports/libdisasm/vcpkg.json
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "libdisasm",
|
||||
"version-string": "0.23",
|
||||
"port-version": 9,
|
||||
"description": "x86 Disassembler Library.",
|
||||
"homepage": "https://sourceforge.net/projects/bastard",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user