initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
From 30a2ecc7939449f235282eb6de42e367fc5b1867 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Thu, 14 Jan 2016 22:13:15 +0100
|
||||
Subject: [PATCH] Fix FBXConverter: use proper 64-bit constant
|
||||
|
||||
Use proper 64-bit constant for CONVERT_FBX_TIME(time) conversion, fixes:
|
||||
|
||||
code/FBXConverter.cpp:2025: error: integer constant is too large for 'long' type
|
||||
code/FBXConverter.cpp:2026: error: integer constant is too large for 'long' type
|
||||
code/FBXConverter.cpp:2794: error: integer constant is too large for 'long' type
|
||||
code/FBXConverter.cpp:2868: error: integer constant is too large for 'long' type
|
||||
code/FBXConverter.cpp:2878: error: integer constant is too large for 'long' type
|
||||
code/FBXConverter.cpp:2888: error: integer constant is too large for 'long' type
|
||||
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
[Rebased on 5.0.1]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
code/FBX/FBXConverter.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/code/FBX/FBXConverter.cpp b/code/FBXConverter.cpp
|
||||
index e0c6b9c..b1e9a71 100644
|
||||
--- a/code/FBX/FBXConverter.cpp
|
||||
+++ b/code/FBX/FBXConverter.cpp
|
||||
@@ -67,7 +67,7 @@ namespace FBX {
|
||||
|
||||
#define MAGIC_NODE_TAG "_$AssimpFbx$"
|
||||
|
||||
-#define CONVERT_FBX_TIME(time) static_cast<double>(time) / 46186158000L
|
||||
+#define CONVERT_FBX_TIME(time) static_cast<double>(time) / 46186158000LL
|
||||
|
||||
// XXX vc9's debugger won't step into anonymous namespaces
|
||||
//namespace {
|
||||
--
|
||||
2.1.4
|
||||
|
||||
+1638
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,243 @@
|
||||
From bb3db0ebaffc6b76de256e597ec1d1e4d2a6663f Mon Sep 17 00:00:00 2001
|
||||
From: kimkulling <kim.kulling@googlemail.com>
|
||||
Date: Mon, 9 Mar 2020 10:51:26 +0100
|
||||
Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2954: upgrade
|
||||
to latest greatest.
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/assimp/assimp/commit/bb3db0ebaffc6b76de256e597ec1d1e4d2a6663f]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
contrib/zip/CMakeLists.txt | 8 ++----
|
||||
contrib/zip/README.md | 51 +++++++++++++++++++++++++++++++--
|
||||
contrib/zip/src/zip.c | 17 ++++++++++-
|
||||
contrib/zip/src/zip.h | 13 ++++++++-
|
||||
contrib/zip/test/CMakeLists.txt | 5 ----
|
||||
contrib/zip/test/test.c | 4 ++-
|
||||
6 files changed, 81 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/contrib/zip/CMakeLists.txt b/contrib/zip/CMakeLists.txt
|
||||
index 77916d2e14..f194649ede 100644
|
||||
--- a/contrib/zip/CMakeLists.txt
|
||||
+++ b/contrib/zip/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(zip
|
||||
LANGUAGES C
|
||||
- VERSION "0.1.15")
|
||||
+ VERSION "0.1.18")
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
option(CMAKE_DISABLE_TESTING "Disable test creation" OFF)
|
||||
@@ -16,10 +16,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
|
||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -Werror -pedantic")
|
||||
- if(ENABLE_COVERAGE)
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
|
||||
- endif()
|
||||
endif (MSVC)
|
||||
|
||||
# zip
|
||||
@@ -35,7 +31,7 @@ if (NOT CMAKE_DISABLE_TESTING)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
find_package(Sanitizers)
|
||||
- add_sanitizers(${PROJECT_NAME} ${test_out} ${test_miniz_out})
|
||||
+ add_sanitizers(${PROJECT_NAME} ${test_out})
|
||||
endif()
|
||||
|
||||
####
|
||||
diff --git a/contrib/zip/README.md b/contrib/zip/README.md
|
||||
index 14eb9a34c8..bdd0822b67 100644
|
||||
--- a/contrib/zip/README.md
|
||||
+++ b/contrib/zip/README.md
|
||||
@@ -1,10 +1,8 @@
|
||||
### A portable (OSX/Linux/Windows), simple zip library written in C
|
||||
This is done by hacking awesome [miniz](https://code.google.com/p/miniz) library and layering functions on top of the miniz v1.15 API.
|
||||
|
||||
-[](https://ci.appveyor.com/project/kuba--/zip)
|
||||
-[](https://travis-ci.org/kuba--/zip)
|
||||
+[](https://github.com/kuba--/zip/actions?query=workflow%3Abuild)
|
||||
[](https://github.com/kuba--/zip/releases)
|
||||
-[](https://codecov.io/gh/kuba--/zip)
|
||||
|
||||
|
||||
# The Idea
|
||||
@@ -213,6 +211,53 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
+### Rust (ffi)
|
||||
+```rust
|
||||
+extern crate libc;
|
||||
+use std::ffi::CString;
|
||||
+
|
||||
+#[repr(C)]
|
||||
+pub struct Zip {
|
||||
+ _private: [u8; 0],
|
||||
+}
|
||||
+
|
||||
+#[link(name = "zip")]
|
||||
+extern "C" {
|
||||
+ fn zip_open(path: *const libc::c_char, level: libc::c_int, mode: libc::c_char) -> *mut Zip;
|
||||
+ fn zip_close(zip: *mut Zip) -> libc::c_void;
|
||||
+
|
||||
+ fn zip_entry_open(zip: *mut Zip, entryname: *const libc::c_char) -> libc::c_int;
|
||||
+ fn zip_entry_close(zip: *mut Zip) -> libc::c_int;
|
||||
+ fn zip_entry_write(
|
||||
+ zip: *mut Zip,
|
||||
+ buf: *const libc::c_void,
|
||||
+ bufsize: libc::size_t,
|
||||
+ ) -> libc::c_int;
|
||||
+}
|
||||
+
|
||||
+fn main() {
|
||||
+ let path = CString::new("/tmp/test.zip").unwrap();
|
||||
+ let mode: libc::c_char = 'w' as libc::c_char;
|
||||
+
|
||||
+ let entryname = CString::new("test.txt").unwrap();
|
||||
+ let content = "test content\0";
|
||||
+
|
||||
+ unsafe {
|
||||
+ let zip: *mut Zip = zip_open(path.as_ptr(), 5, mode);
|
||||
+ {
|
||||
+ zip_entry_open(zip, entryname.as_ptr());
|
||||
+ {
|
||||
+ let buf = content.as_ptr() as *const libc::c_void;
|
||||
+ let bufsize = content.len() as libc::size_t;
|
||||
+ zip_entry_write(zip, buf, bufsize);
|
||||
+ }
|
||||
+ zip_entry_close(zip);
|
||||
+ }
|
||||
+ zip_close(zip);
|
||||
+ }
|
||||
+}
|
||||
+```
|
||||
+
|
||||
### Ruby (ffi)
|
||||
Install _ffi_ gem.
|
||||
```shell
|
||||
diff --git a/contrib/zip/src/zip.c b/contrib/zip/src/zip.c
|
||||
index 1abcfd8fd1..3b2821e6a3 100644
|
||||
--- a/contrib/zip/src/zip.c
|
||||
+++ b/contrib/zip/src/zip.c
|
||||
@@ -222,6 +222,20 @@ void zip_close(struct zip_t *zip) {
|
||||
}
|
||||
}
|
||||
|
||||
+int zip_is64(struct zip_t *zip) {
|
||||
+ if (!zip) {
|
||||
+ // zip_t handler is not initialized
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (!zip->archive.m_pState) {
|
||||
+ // zip state is not initialized
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return (int)zip->archive.m_pState->m_zip64;
|
||||
+}
|
||||
+
|
||||
int zip_entry_open(struct zip_t *zip, const char *entryname) {
|
||||
size_t entrylen = 0;
|
||||
mz_zip_archive *pzip = NULL;
|
||||
@@ -794,7 +808,8 @@ int zip_create(const char *zipname, const char *filenames[], size_t len) {
|
||||
|
||||
if (MZ_FILE_STAT(name, &file_stat) != 0) {
|
||||
// problem getting information - check errno
|
||||
- return -1;
|
||||
+ status = -1;
|
||||
+ break;
|
||||
}
|
||||
|
||||
if ((file_stat.st_mode & 0200) == 0) {
|
||||
diff --git a/contrib/zip/src/zip.h b/contrib/zip/src/zip.h
|
||||
index a48d64d6de..cd3ab5cd00 100644
|
||||
--- a/contrib/zip/src/zip.h
|
||||
+++ b/contrib/zip/src/zip.h
|
||||
@@ -21,7 +21,7 @@ extern "C" {
|
||||
|
||||
#if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_DEFINED_) && \
|
||||
!defined(__DEFINED_ssize_t) && !defined(__ssize_t_defined) && \
|
||||
- !defined(_SSIZE_T) && !defined(_SSIZE_T_)
|
||||
+ !defined(_SSIZE_T) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DECLARED)
|
||||
|
||||
// 64-bit Windows is the only mainstream platform
|
||||
// where sizeof(long) != sizeof(void*)
|
||||
@@ -37,6 +37,7 @@ typedef long ssize_t; /* byte count or error */
|
||||
#define __ssize_t_defined
|
||||
#define _SSIZE_T
|
||||
#define _SSIZE_T_
|
||||
+#define _SSIZE_T_DECLARED
|
||||
|
||||
#endif
|
||||
|
||||
@@ -90,6 +91,16 @@ extern struct zip_t *zip_open(const char *zipname, int level, char mode);
|
||||
*/
|
||||
extern void zip_close(struct zip_t *zip);
|
||||
|
||||
+/**
|
||||
+ * Determines if the archive has a zip64 end of central directory headers.
|
||||
+ *
|
||||
+ * @param zip zip archive handler.
|
||||
+ *
|
||||
+ * @return the return code - 1 (true), 0 (false), negative number (< 0) on
|
||||
+ * error.
|
||||
+ */
|
||||
+extern int zip_is64(struct zip_t *zip);
|
||||
+
|
||||
/**
|
||||
* Opens an entry by name in the zip archive.
|
||||
*
|
||||
diff --git a/contrib/zip/test/CMakeLists.txt b/contrib/zip/test/CMakeLists.txt
|
||||
index cc060b00fe..1224115858 100644
|
||||
--- a/contrib/zip/test/CMakeLists.txt
|
||||
+++ b/contrib/zip/test/CMakeLists.txt
|
||||
@@ -2,15 +2,10 @@ cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# test
|
||||
set(test_out test.out)
|
||||
-set(test_miniz_out test_miniz.out)
|
||||
|
||||
add_executable(${test_out} test.c)
|
||||
target_link_libraries(${test_out} zip)
|
||||
-add_executable(${test_miniz_out} test_miniz.c)
|
||||
-target_link_libraries(${test_miniz_out} zip)
|
||||
|
||||
add_test(NAME ${test_out} COMMAND ${test_out})
|
||||
-add_test(NAME ${test_miniz_out} COMMAND ${test_miniz_out})
|
||||
|
||||
set(test_out ${test_out} PARENT_SCOPE)
|
||||
-set(test_miniz_out ${test_miniz_out} PARENT_SCOPE)
|
||||
diff --git a/contrib/zip/test/test.c b/contrib/zip/test/test.c
|
||||
index a9b2ddab1e..9cc2248ac0 100644
|
||||
--- a/contrib/zip/test/test.c
|
||||
+++ b/contrib/zip/test/test.c
|
||||
@@ -47,7 +47,7 @@ static void test_write(void) {
|
||||
assert(CRC32DATA1 == zip_entry_crc32(zip));
|
||||
++total_entries;
|
||||
assert(0 == zip_entry_close(zip));
|
||||
-
|
||||
+ assert(0 == zip_is64(zip));
|
||||
zip_close(zip);
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ static void test_read(void) {
|
||||
size_t buftmp;
|
||||
struct zip_t *zip = zip_open(ZIPNAME, 0, 'r');
|
||||
assert(zip != NULL);
|
||||
+ assert(0 == zip_is64(zip));
|
||||
|
||||
assert(0 == zip_entry_open(zip, "test\\test-1.txt"));
|
||||
assert(strlen(TESTDATA1) == zip_entry_size(zip));
|
||||
@@ -310,6 +311,7 @@ static void test_fwrite(void) {
|
||||
assert(0 == zip_entry_open(zip, WFILE));
|
||||
assert(0 == zip_entry_fwrite(zip, WFILE));
|
||||
assert(0 == zip_entry_close(zip));
|
||||
+ assert(0 == zip_is64(zip));
|
||||
|
||||
zip_close(zip);
|
||||
remove(WFILE);
|
||||
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_ASSIMP
|
||||
bool "assimp"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_PACKAGE_LIBZLIB
|
||||
help
|
||||
Open Asset Import Library (assimp) is a portable Open Source
|
||||
library to import various well-known 3D model formats in a
|
||||
uniform manner. The most recent version also knows how to
|
||||
export 3d files and is therefore suitable as a general-purpose
|
||||
3D model converter.
|
||||
|
||||
http://www.assimp.org
|
||||
|
||||
comment "assimp needs a toolchain w/ C++, wchar"
|
||||
depends on BR2_PACKAGE_LIBZLIB
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
|
||||
|
||||
comment "assimp needs libzlib"
|
||||
depends on !BR2_PACKAGE_LIBZLIB
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc assimp-5.0.1.tar.gz
|
||||
sha256 a26ccc3dbf2f58ea99c100945a8a126fa0f9f4d7fd2b49aa8bdb8e09355864d8 LICENSE
|
||||
@@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
#
|
||||
# assimp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ASSIMP_VERSION = 5.0.1
|
||||
ASSIMP_SITE = $(call github,assimp,assimp,v$(ASSIMP_VERSION))
|
||||
ASSIMP_LICENSE = BSD-3-Clause
|
||||
ASSIMP_LICENSE_FILES = LICENSE
|
||||
ASSIMP_DEPENDENCIES = zlib
|
||||
ASSIMP_INSTALL_STAGING = YES
|
||||
|
||||
# relocation truncated to fit: R_68K_GOT16O. We also need to disable
|
||||
# optimizations to not run into "Error: value -43420 out of range"
|
||||
# assembler issues.
|
||||
ifeq ($(BR2_m68k),y)
|
||||
ASSIMP_CXXFLAGS += -mxgot -O0
|
||||
endif
|
||||
|
||||
# just like m68k coldfire, mips64 also has some limitations on the GOT
|
||||
# size for large libraries, which can be overcome by passing
|
||||
# -mxgot. Solves "relocation truncated to fit: R_MIPS_CALL16" issues.
|
||||
ifeq ($(BR2_mips64)$(BR2_mips64el),y)
|
||||
ASSIMP_CXXFLAGS += -mxgot
|
||||
endif
|
||||
|
||||
# workaround SuperH compiler failure when static linking (i.e -fPIC is
|
||||
# not passed) in gcc versions 5.x or older. The -Os optimization level
|
||||
# causes a "unable to find a register to spill in class
|
||||
# 'GENERAL_REGS'" error. -O2 works fine.
|
||||
ifeq ($(BR2_sh):$(BR2_STATIC_LIBS):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:y:)
|
||||
ASSIMP_CXXFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
||||
ASSIMP_CXXFLAGS += -O0
|
||||
endif
|
||||
|
||||
ASSIMP_CONF_OPTS += -DASSIMP_BUILD_TESTS=OFF \
|
||||
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) $(ASSIMP_CXXFLAGS)"
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user