summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcybaol2023-02-03 23:54:06 +0800
committercybaol2023-02-03 23:54:06 +0800
commitc8bf3f2542ac5d2dc6cd6285702d1939eee8070a (patch)
treefdde19472ed730b7e6dfe5b73491659ecb28b899
parent788356170c190de7425c7b540c9e39936630427f (diff)
downloadaur-c8bf3f2542ac5d2dc6cd6285702d1939eee8070a.tar.gz
3.20.02
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD48
-rw-r--r--eastl-fix-cmake-install.patch9
-rw-r--r--eastl-implement-allocator.patch92
5 files changed, 122 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ce4cdd0fadf0..d8c19326f6e7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,20 @@
pkgbase = eastl
pkgdesc = Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
- pkgver = 3.18.00
- pkgrel = 3
+ pkgver = 3.20.02
+ pkgrel = 1
url = https://github.com/electronicarts/EASTL
arch = any
license = BSD
license = custom
makedepends = cmake
makedepends = git
- source = EASTL-3.18.00.tar.gz::https://github.com/electronicarts/EASTL/archive/refs/tags/3.18.00.tar.gz
+ source = EASTL::git+https://github.com/electronicarts/EASTL.git#commit=1aa784643081404783ce6494eb2fcaba99d8f6a5
source = EABase::git+https://github.com/electronicarts/EABase.git
- source = EAAssert::git+https://github.com/electronicarts/EAAssert.git
- source = EAMain::git+https://github.com/electronicarts/EAMain.git
- source = EAStdC::git+https://github.com/electronicarts/EAStdC.git
- source = EATest::git+https://github.com/electronicarts/EATest.git
- source = EAThread::git+https://github.com/electronicarts/EAThread.git
source = eastl-fix-cmake-install.patch
- sha256sums = a3c5b970684be02e81fb16fbf92ed2584e055898704fde87c72d0331afdea12b
+ source = eastl-implement-allocator.patch
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = 148b64dcb56cb7e2e7c2f37a2329b41f41c65b718fa794c13a0400965787e9f2
+ sha256sums = 47b65685430a7af2dec6bbf0a4c52e775f1ab23891f100c2db340bc57bd7b758
+ sha256sums = cabc604045be6f901bc40c62f87e791af7a5f84b4857cfe1a149a653c8ed1166
pkgname = eastl
diff --git a/.gitignore b/.gitignore
index 0cd1c4c079c3..a12192a0a2bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ src/
pkg/
*.tar.gz
*.pkg.tar.xz
+*.pkg.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
index 866c0b87e781..8bdc6470cfae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,9 @@
pkgname=eastl
_pkgname=EASTL
-pkgver=3.18.00
-pkgrel=3
+_commit=1aa784643081404783ce6494eb2fcaba99d8f6a5
+pkgver=3.20.02
+pkgrel=1
pkgdesc="Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance."
arch=('any')
url="https://github.com/electronicarts/EASTL"
@@ -11,52 +12,41 @@ license=('BSD' 'custom')
depends=()
makedepends=("cmake" "git")
source=(
- "${_pkgname}-${pkgver}.tar.gz::https://github.com/electronicarts/EASTL/archive/refs/tags/${pkgver}.tar.gz"
+ "${_pkgname}::git+https://github.com/electronicarts/EASTL.git#commit=${_commit}"
"EABase::git+https://github.com/electronicarts/EABase.git"
- "EAAssert::git+https://github.com/electronicarts/EAAssert.git"
- "EAMain::git+https://github.com/electronicarts/EAMain.git"
- "EAStdC::git+https://github.com/electronicarts/EAStdC.git"
- "EATest::git+https://github.com/electronicarts/EATest.git"
- "EAThread::git+https://github.com/electronicarts/EAThread.git"
- "eastl-fix-cmake-install.patch")
+ "eastl-fix-cmake-install.patch"
+ "eastl-implement-allocator.patch"
+ )
-sha256sums=('a3c5b970684be02e81fb16fbf92ed2584e055898704fde87c72d0331afdea12b'
+sha256sums=('SKIP'
'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- '148b64dcb56cb7e2e7c2f37a2329b41f41c65b718fa794c13a0400965787e9f2')
+ '47b65685430a7af2dec6bbf0a4c52e775f1ab23891f100c2db340bc57bd7b758'
+ 'cabc604045be6f901bc40c62f87e791af7a5f84b4857cfe1a149a653c8ed1166')
prepare() {
- cd ${_pkgname}-${pkgver}
+ cd ${_pkgname}
cp -r ../EABase/* test/packages/EABase
- cp -r ../EAAssert/* test/packages/EAAssert
- cp -r ../EAMain/* test/packages/EAMain
- cp -r ../EAStdC/* test/packages/EAStdC
- cp -r ../EATest/* test/packages/EATest
- cp -r ../EAThread/* test/packages/EAThread
patch -p1 < ../eastl-fix-cmake-install.patch
+ patch -p1 < ../eastl-implement-allocator.patch
}
build() {
- mkdir -p "${_pkgname}-${pkgver}/build"
+ mkdir -p "${_pkgname}/build"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DEASTL_BUILD_TESTS=OFF \
-DEASTL_BUILD_BENCHMARK=OFF \
-DBUILD_SHARED_LIBS=ON \
- -B"${srcdir}/${_pkgname}-${pkgver}/build" \
- -H"${srcdir}/${_pkgname}-${pkgver}"
+ -B"${srcdir}/${_pkgname}/build" \
+ -H"${srcdir}/${_pkgname}"
- cmake --build "${srcdir}/${_pkgname}-${pkgver}/build"
+ cmake --build "${srcdir}/${_pkgname}/build"
}
package() {
- make DESTDIR="${pkgdir}" -C "${srcdir}/${_pkgname}-${pkgver}/build" install
+ make DESTDIR="${pkgdir}" -C "${srcdir}/${_pkgname}/build" install
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
- install -Dm644 "${srcdir}/${_pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
- install -Dm644 "${srcdir}/${_pkgname}-${pkgver}/3RDPARTYLICENSES.TXT" "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}/3RDPARTYLICENSES.TXT" "${pkgdir}/usr/share/licenses/${pkgname}"
}
diff --git a/eastl-fix-cmake-install.patch b/eastl-fix-cmake-install.patch
index 14d70a930d42..ed172ef71fd5 100644
--- a/eastl-fix-cmake-install.patch
+++ b/eastl-fix-cmake-install.patch
@@ -1,7 +1,7 @@
-diff -ruN EASTL-3.18.00/CMakeLists.txt EASTL-3.18.00_/CMakeLists.txt
---- EASTL-3.18.00/CMakeLists.txt 2021-10-21 07:36:23.000000000 +0800
-+++ EASTL-3.18.00_/CMakeLists.txt 2023-01-27 20:24:46.168104709 +0800
-@@ -52,3 +52,10 @@
+diff -ruN EASTL/CMakeLists.txt EASTL_/CMakeLists.txt
+--- EASTL/CMakeLists.txt 2023-02-01 22:13:16.277102675 +0800
++++ EASTL_/CMakeLists.txt 2023-02-01 22:13:24.290381488 +0800
+@@ -56,3 +56,9 @@
target_link_libraries(EASTL EABase)
@@ -10,5 +10,4 @@ diff -ruN EASTL-3.18.00/CMakeLists.txt EASTL-3.18.00_/CMakeLists.txt
+#-------------------------------------------------------------------------------------------
+install(TARGETS EASTL DESTINATION lib)
+install(DIRECTORY include/EASTL DESTINATION include)
-+install(DIRECTORY test/packages/EABase/include/Common/EABase DESTINATION include)
+
diff --git a/eastl-implement-allocator.patch b/eastl-implement-allocator.patch
new file mode 100644
index 000000000000..039c3e945818
--- /dev/null
+++ b/eastl-implement-allocator.patch
@@ -0,0 +1,92 @@
+diff -ruN EASTL-3.18.00/include/EASTL/allocator.h EASTL-3.18.00_/include/EASTL/allocator.h
+--- EASTL-3.18.00/include/EASTL/allocator.h 2023-01-30 14:49:47.133053092 +0800
++++ EASTL-3.18.00_/include/EASTL/allocator.h 2023-01-30 14:52:58.180341764 +0800
+@@ -164,18 +164,6 @@
+
+ #ifndef EASTL_USER_DEFINED_ALLOCATOR // If the user hasn't declared that he has defined a different allocator implementation elsewhere...
+
+- EA_DISABLE_ALL_VC_WARNINGS()
+- #include <new>
+- EA_RESTORE_ALL_VC_WARNINGS()
+-
+- #if !EASTL_DLL // If building a regular library and not building EASTL as a DLL...
+- // It is expected that the application define the following
+- // versions of operator new for the application. Either that or the
+- // user needs to override the implementation of the allocator class.
+- void* operator new[](size_t size, const char* pName, int flags, unsigned debugFlags, const char* file, int line);
+- void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName, int flags, unsigned debugFlags, const char* file, int line);
+- #endif
+-
+ namespace eastl
+ {
+ inline allocator::allocator(const char* EASTL_NAME(pName))
+@@ -237,46 +225,17 @@
+ #define pName EASTL_ALLOCATOR_DEFAULT_NAME
+ #endif
+
+- #if EASTL_DLL
+- return allocate(n, EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT, 0, flags);
+- #elif (EASTL_DEBUGPARAMS_LEVEL <= 0)
+- return ::new((char*)0, flags, 0, (char*)0, 0) char[n];
+- #elif (EASTL_DEBUGPARAMS_LEVEL == 1)
+- return ::new( pName, flags, 0, (char*)0, 0) char[n];
+- #else
+- return ::new( pName, flags, 0, __FILE__, __LINE__) char[n];
+- #endif
++ return malloc(n);
+ }
+
+
+ inline void* allocator::allocate(size_t n, size_t alignment, size_t offset, int flags)
+ {
+- #if EASTL_DLL
+- // We currently have no support for implementing flags when
+- // using the C runtime library operator new function. The user
+- // can use SetDefaultAllocator to override the default allocator.
+- EA_UNUSED(offset); EA_UNUSED(flags);
+-
+- size_t adjustedAlignment = (alignment > EA_PLATFORM_PTR_SIZE) ? alignment : EA_PLATFORM_PTR_SIZE;
+-
+- void* p = new char[n + adjustedAlignment + EA_PLATFORM_PTR_SIZE];
+- void* pPlusPointerSize = (void*)((uintptr_t)p + EA_PLATFORM_PTR_SIZE);
+- void* pAligned = (void*)(((uintptr_t)pPlusPointerSize + adjustedAlignment - 1) & ~(adjustedAlignment - 1));
+-
+- void** pStoredPtr = (void**)pAligned - 1;
+- EASTL_ASSERT(pStoredPtr >= p);
+- *(pStoredPtr) = p;
+-
+- EASTL_ASSERT(((size_t)pAligned & ~(alignment - 1)) == (size_t)pAligned);
+-
+- return pAligned;
+- #elif (EASTL_DEBUGPARAMS_LEVEL <= 0)
+- return ::new(alignment, offset, (char*)0, flags, 0, (char*)0, 0) char[n];
+- #elif (EASTL_DEBUGPARAMS_LEVEL == 1)
+- return ::new(alignment, offset, pName, flags, 0, (char*)0, 0) char[n];
+- #else
+- return ::new(alignment, offset, pName, flags, 0, __FILE__, __LINE__) char[n];
+- #endif
++ EASTL_ASSERT(offset % alignmnent == 0); /* We check for (offset % alignmnent == 0) instead of (offset == 0) because any block which is aligned on e.g. 64 also is aligned at an offset of 64 by definition. */
++ if (alignment <= EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT) {
++ return allocate(n, flags);
++ }
++ return aligned_alloc(alignment, n);
+
+ #undef pName // See above for the definition of this.
+ }
+@@ -284,15 +243,7 @@
+
+ inline void allocator::deallocate(void* p, size_t)
+ {
+- #if EASTL_DLL
+- if (p != nullptr)
+- {
+- void* pOriginalAllocation = *((void**)p - 1);
+- delete[](char*)pOriginalAllocation;
+- }
+- #else
+- delete[](char*)p;
+- #endif
++ free(p);
+ }
+
+