Fix ANGLE commit ID, fix exports for shader API

This commit is contained in:
Martchus 2016-12-03 23:05:09 +01:00
parent b2c33b6411
commit 2e957a76b3
7 changed files with 380 additions and 65 deletions

View File

@ -1,58 +1,338 @@
From 7b0e3346df5a0c8a6b5dd2215a4ecbb659082f5a Mon Sep 17 00:00:00 2001
From 19579a11cdc6fc9714ebbfa969e77c0a2d1de8f9 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 23:07:03 +0200
Subject: [PATCH 05/10] Export shader API via libGLESv2.dll
Required by Qt WebKit
---
src/compiler/translator/ShaderLang.cpp | 11 +++++++++++
src/compiler/translator/ShaderVars.cpp | 11 +++++++++++
2 files changed, 22 insertions(+)
include/GLSLANG/ShaderLang.h | 67 +++++++++++++++++--------------
include/GLSLANG/ShaderVars.h | 31 +++++++++-----
src/compiler/translator/blocklayout.h | 6 +--
src/compiler/translator/blocklayoutHLSL.h | 7 ++--
4 files changed, 64 insertions(+), 47 deletions(-)
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index b776ca5..15918be 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -9,6 +9,17 @@
// as defined in ShaderLang.h
diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h
index 8448d06..7aa5281 100644
--- a/include/GLSLANG/ShaderLang.h
+++ b/include/GLSLANG/ShaderLang.h
@@ -369,19 +369,19 @@ using ShHandle = void *;
// compiler operations.
// If the function succeeds, the return value is true, else false.
//
-bool ShInitialize();
+COMPILER_EXPORT bool ShInitialize();
//
// Driver should call this at shutdown.
// If the function succeeds, the return value is true, else false.
//
-bool ShFinalize();
+COMPILER_EXPORT bool ShFinalize();
+// ensure this gets exported
+#ifndef COMPONENT_BUILD
+#define COMPONENT_BUILD
+#endif
+#ifdef ANGLE_TRANSLATOR_STATIC
+#undef ANGLE_TRANSLATOR_STATIC
+#endif
+#ifndef ANGLE_TRANSLATOR_IMPLEMENTATION
+#define ANGLE_TRANSLATOR_IMPLEMENTATION
//
// Initialize built-in resources with minimum expected values.
// Parameters:
// resources: The object to initialize. Will be comparable with memcmp.
//
-void ShInitBuiltInResources(ShBuiltInResources *resources);
+COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources *resources);
//
// Returns the a concatenated list of the items in ShBuiltInResources as a
@@ -389,7 +389,7 @@ void ShInitBuiltInResources(ShBuiltInResources *resources);
// This function must be updated whenever ShBuiltInResources is changed.
// Parameters:
// handle: Specifies the handle of the compiler to be used.
-const std::string &ShGetBuiltInResourcesString(const ShHandle handle);
+COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle handle);
//
// Driver calls these to create and destroy compiler objects.
@@ -404,11 +404,12 @@ const std::string &ShGetBuiltInResourcesString(const ShHandle handle);
// SH_HLSL_3_0_OUTPUT or SH_HLSL_4_1_OUTPUT. Note: Each output type may only
// be supported in some configurations.
// resources: Specifies the built-in resources.
-ShHandle ShConstructCompiler(sh::GLenum type,
- ShShaderSpec spec,
- ShShaderOutput output,
- const ShBuiltInResources *resources);
-void ShDestruct(ShHandle handle);
+COMPILER_EXPORT ShHandle ShConstructCompiler(
+ sh::GLenum type,
+ ShShaderSpec spec,
+ ShShaderOutput output,
+ const ShBuiltInResources *resources);
+COMPILER_EXPORT void ShDestruct(ShHandle handle);
//
// Compiles the given shader source.
@@ -434,36 +435,38 @@ void ShDestruct(ShHandle handle);
// SH_VARIABLES: Extracts attributes, uniforms, and varyings.
// Can be queried by calling ShGetVariableInfo().
//
-bool ShCompile(const ShHandle handle,
- const char *const shaderStrings[],
- size_t numStrings,
- ShCompileOptions compileOptions);
+COMPILER_EXPORT bool ShCompile(const ShHandle handle,
+ const char *const shaderStrings[],
+ size_t numStrings,
+ ShCompileOptions compileOptions);
// Clears the results from the previous compilation.
-void ShClearResults(const ShHandle handle);
+COMPILER_EXPORT void ShClearResults(const ShHandle handle);
// Return the version of the shader language.
-int ShGetShaderVersion(const ShHandle handle);
+COMPILER_EXPORT int ShGetShaderVersion(const ShHandle handle);
// Return the currently set language output type.
-ShShaderOutput ShGetShaderOutputType(const ShHandle handle);
+COMPILER_EXPORT ShShaderOutput ShGetShaderOutputType(
+ const ShHandle handle);
// Returns null-terminated information log for a compiled shader.
// Parameters:
// handle: Specifies the compiler
-const std::string &ShGetInfoLog(const ShHandle handle);
+COMPILER_EXPORT const std::string &ShGetInfoLog(const ShHandle handle);
// Returns null-terminated object code for a compiled shader.
// Parameters:
// handle: Specifies the compiler
-const std::string &ShGetObjectCode(const ShHandle handle);
+COMPILER_EXPORT const std::string &ShGetObjectCode(const ShHandle handle);
// Returns a (original_name, hash) map containing all the user defined
// names in the shader, including variable names, function names, struct
// names, and struct field names.
// Parameters:
// handle: Specifies the compiler
-const std::map<std::string, std::string> *ShGetNameHashingMap(const ShHandle handle);
+COMPILER_EXPORT const std::map<std::string, std::string> *ShGetNameHashingMap(
+ const ShHandle handle);
// Shader variable inspection.
// Returns a pointer to a list of variables of the designated type.
@@ -471,12 +474,12 @@ const std::map<std::string, std::string> *ShGetNameHashingMap(const ShHandle han
// Returns NULL on failure.
// Parameters:
// handle: Specifies the compiler
-const std::vector<sh::Uniform> *ShGetUniforms(const ShHandle handle);
-const std::vector<sh::Varying> *ShGetVaryings(const ShHandle handle);
-const std::vector<sh::Attribute> *ShGetAttributes(const ShHandle handle);
-const std::vector<sh::OutputVariable> *ShGetOutputVariables(const ShHandle handle);
-const std::vector<sh::InterfaceBlock> *ShGetInterfaceBlocks(const ShHandle handle);
-sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle);
+COMPILER_EXPORT const std::vector<sh::Uniform> *ShGetUniforms(const ShHandle handle);
+COMPILER_EXPORT const std::vector<sh::Varying> *ShGetVaryings(const ShHandle handle);
+COMPILER_EXPORT const std::vector<sh::Attribute> *ShGetAttributes(const ShHandle handle);
+COMPILER_EXPORT const std::vector<sh::OutputVariable> *ShGetOutputVariables(const ShHandle handle);
+COMPILER_EXPORT const std::vector<sh::InterfaceBlock> *ShGetInterfaceBlocks(const ShHandle handle);
+COMPILER_EXPORT sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle);
// Returns true if the passed in variables pack in maxVectors following
// the packing rules from the GLSL 1.017 spec, Appendix A, section 7.
@@ -485,8 +488,9 @@ sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle);
// Parameters:
// maxVectors: the available rows of registers.
// variables: an array of variables.
-bool ShCheckVariablesWithinPackingLimits(int maxVectors,
- const std::vector<sh::ShaderVariable> &variables);
+COMPILER_EXPORT bool ShCheckVariablesWithinPackingLimits(
+ int maxVectors,
+ const std::vector<sh::ShaderVariable> &variables);
// Gives the compiler-assigned register for an interface block.
// The method writes the value to the output variable "indexOut".
@@ -495,14 +499,15 @@ bool ShCheckVariablesWithinPackingLimits(int maxVectors,
// handle: Specifies the compiler
// interfaceBlockName: Specifies the interface block
// indexOut: output variable that stores the assigned register
-bool ShGetInterfaceBlockRegister(const ShHandle handle,
- const std::string &interfaceBlockName,
- unsigned int *indexOut);
+COMPILER_EXPORT bool ShGetInterfaceBlockRegister(const ShHandle handle,
+ const std::string &interfaceBlockName,
+ unsigned int *indexOut);
// Gives a map from uniform names to compiler-assigned registers in the default
// interface block. Note that the map contains also registers of samplers that
// have been extracted from structs.
-const std::map<std::string, unsigned int> *ShGetUniformRegisterMap(const ShHandle handle);
+COMPILER_EXPORT const std::map<std::string, unsigned int> *ShGetUniformRegisterMap(
+ const ShHandle handle);
// Temporary duplicate of the scoped APIs, to be removed when we roll ANGLE and fix Chromium.
// TODO(jmadill): Consolidate with these APIs once we roll ANGLE.
diff --git a/include/GLSLANG/ShaderVars.h b/include/GLSLANG/ShaderVars.h
index aa7bc08..4856273 100644
--- a/include/GLSLANG/ShaderVars.h
+++ b/include/GLSLANG/ShaderVars.h
@@ -10,6 +10,17 @@
#ifndef GLSLANG_SHADERVARS_H_
#define GLSLANG_SHADERVARS_H_
+#if !defined(ANGLE_STATIC)
+#if defined(_WIN32) || defined(_WIN64)
+#define COMPILER_EXPORT __declspec(dllexport)
+#else // defined(_WIN32) || defined(_WIN64)
+#define COMPILER_EXPORT __attribute__((visibility("default")))
+#endif
+
#include "GLSLANG/ShaderLang.h"
#include "compiler/translator/Compiler.h"
diff --git a/src/compiler/translator/ShaderVars.cpp b/src/compiler/translator/ShaderVars.cpp
index 8e217f1..a4d451c 100644
--- a/src/compiler/translator/ShaderVars.cpp
+++ b/src/compiler/translator/ShaderVars.cpp
@@ -7,6 +7,17 @@
// Methods for GL variable types (varyings, uniforms, etc)
//
+// ensure this gets exported
+#ifndef COMPONENT_BUILD
+#define COMPONENT_BUILD
+#endif
+#ifdef ANGLE_TRANSLATOR_STATIC
+#undef ANGLE_TRANSLATOR_STATIC
+#endif
+#ifndef ANGLE_TRANSLATOR_IMPLEMENTATION
+#define ANGLE_TRANSLATOR_IMPLEMENTATION
+#else
+#define COMPILER_EXPORT
+#endif
+
#include <GLSLANG/ShaderLang.h>
#include <algorithm>
#include <string>
#include <vector>
@@ -31,7 +42,7 @@ enum InterpolationType
};
#include "common/debug.h"
// Validate link & SSO consistency of interpolation qualifiers
-bool InterpolationTypesMatch(InterpolationType a, InterpolationType b);
+COMPILER_EXPORT bool InterpolationTypesMatch(InterpolationType a, InterpolationType b);
// Uniform block layout qualifier, see section 4.3.8.3 of the ESSL 3.00.4 spec
enum BlockLayoutType
@@ -45,7 +56,7 @@ enum BlockLayoutType
// Note: we must override the copy constructor and assignment operator so we can
// work around excessive GCC binary bloating:
// See https://code.google.com/p/angleproject/issues/detail?id=697
-struct ShaderVariable
+struct COMPILER_EXPORT ShaderVariable
{
ShaderVariable();
ShaderVariable(GLenum typeIn, unsigned int arraySizeIn);
@@ -94,7 +105,7 @@ struct ShaderVariable
}
};
-struct Uniform : public ShaderVariable
+struct COMPILER_EXPORT Uniform : public ShaderVariable
{
Uniform();
~Uniform();
@@ -115,7 +126,7 @@ struct Uniform : public ShaderVariable
// An interface variable is a variable which passes data between the GL data structures and the
// shader execution: either vertex shader inputs or fragment shader outputs. These variables can
// have integer locations to pass back to the GL API.
-struct InterfaceVariable : public ShaderVariable
+struct COMPILER_EXPORT InterfaceVariable : public ShaderVariable
{
InterfaceVariable();
~InterfaceVariable();
@@ -127,7 +138,7 @@ struct InterfaceVariable : public ShaderVariable
int location;
};
-struct Attribute : public InterfaceVariable
+struct COMPILER_EXPORT Attribute : public InterfaceVariable
{
Attribute();
~Attribute();
@@ -137,7 +148,7 @@ struct Attribute : public InterfaceVariable
bool operator!=(const Attribute &other) const { return !operator==(other); }
};
-struct OutputVariable : public InterfaceVariable
+struct COMPILER_EXPORT OutputVariable : public InterfaceVariable
{
OutputVariable();
~OutputVariable();
@@ -147,7 +158,7 @@ struct OutputVariable : public InterfaceVariable
bool operator!=(const OutputVariable &other) const { return !operator==(other); }
};
-struct InterfaceBlockField : public ShaderVariable
+struct COMPILER_EXPORT InterfaceBlockField : public ShaderVariable
{
InterfaceBlockField();
~InterfaceBlockField();
@@ -169,7 +180,7 @@ struct InterfaceBlockField : public ShaderVariable
bool isRowMajorLayout;
};
-struct Varying : public ShaderVariable
+struct COMPILER_EXPORT Varying : public ShaderVariable
{
Varying();
~Varying();
@@ -195,7 +206,7 @@ struct Varying : public ShaderVariable
bool isInvariant;
};
-struct InterfaceBlock
+struct COMPILER_EXPORT InterfaceBlock
{
InterfaceBlock();
~InterfaceBlock();
@@ -218,7 +229,7 @@ struct InterfaceBlock
std::vector<InterfaceBlockField> fields;
};
-struct WorkGroupSize
+struct COMPILER_EXPORT WorkGroupSize
{
void fill(int fillValue);
void setLocalSize(int localSizeX, int localSizeY, int localSizeZ);
diff --git a/src/compiler/translator/blocklayout.h b/src/compiler/translator/blocklayout.h
index 298a72c..dd5fe07 100644
--- a/src/compiler/translator/blocklayout.h
+++ b/src/compiler/translator/blocklayout.h
@@ -24,7 +24,7 @@ struct Uniform;
struct Varying;
struct InterfaceBlock;
-struct BlockMemberInfo
+struct COMPILER_EXPORT BlockMemberInfo
{
BlockMemberInfo() : offset(-1), arrayStride(-1), matrixStride(-1), isRowMajorMatrix(false) {}
@@ -46,7 +46,7 @@ struct BlockMemberInfo
bool isRowMajorMatrix;
};
-class BlockLayoutEncoder
+class COMPILER_EXPORT BlockLayoutEncoder
{
public:
BlockLayoutEncoder();
@@ -77,7 +77,7 @@ class BlockLayoutEncoder
// Block layout according to the std140 block layout
// See "Standard Uniform Block Layout" in Section 2.11.6 of the OpenGL ES 3.0 specification
-class Std140BlockEncoder : public BlockLayoutEncoder
+class COMPILER_EXPORT Std140BlockEncoder : public BlockLayoutEncoder
{
public:
Std140BlockEncoder();
diff --git a/src/compiler/translator/blocklayoutHLSL.h b/src/compiler/translator/blocklayoutHLSL.h
index 8d98847..c61cb1a 100644
--- a/src/compiler/translator/blocklayoutHLSL.h
+++ b/src/compiler/translator/blocklayoutHLSL.h
@@ -24,7 +24,7 @@ namespace sh
// The strategy should be ENCODE_LOOSE for D3D9 constant blocks, and ENCODE_PACKED
// for everything else (D3D10+ constant blocks and all attributes/varyings).
-class HLSLBlockEncoder : public BlockLayoutEncoder
+class COMPILER_EXPORT HLSLBlockEncoder : public BlockLayoutEncoder
{
public:
enum HLSLBlockEncoderStrategy
@@ -54,8 +54,9 @@ class HLSLBlockEncoder : public BlockLayoutEncoder
// This method returns the number of used registers for a ShaderVariable. It is dependent on the HLSLBlockEncoder
// class to count the number of used registers in a struct (which are individually packed according to the same rules).
-unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMatrices);
-unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType);
+COMPILER_EXPORT unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMatrices);
+COMPILER_EXPORT unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType);
+
}
#endif // COMMON_BLOCKLAYOUTHLSL_H_
--
2.10.2

View File

@ -1,4 +1,4 @@
From a870a46b2058f7c966533edd726269a6ddd6ce5a Mon Sep 17 00:00:00 2001
From b62e8044a6c8b3bcb076641cbd9fae0ee0e7aa31 Mon Sep 17 00:00:00 2001
From: Jose Santiago <jsantiago@haivision.com>
Date: Thu, 3 Nov 2016 09:38:19 -0500
Subject: [PATCH 06/10] Make GLintptr and GLsizeiptr match those from Qt 5

View File

@ -1,4 +1,4 @@
From 09d3f7afd742870db9e177f43b8962043bd972ff Mon Sep 17 00:00:00 2001
From 815ed9402c0da91ee607bc61414c77d350f4a009 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 6 Nov 2016 17:57:18 +0100
Subject: [PATCH 07/10] Remove copy_scripts target

View File

@ -1,4 +1,4 @@
From d4a2be49fbffa30f026ae9cbadfda2f882fc9ad9 Mon Sep 17 00:00:00 2001
From 78917f02abc3501bb4ae0cdad82c22dfb2fbbad5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 6 Nov 2016 18:46:15 +0100
Subject: [PATCH 08/10] Fix generation of commit_id.h

View File

@ -1,4 +1,4 @@
From 4c6bc08c7b66806b4284275a25d5ffa3aa72c666 Mon Sep 17 00:00:00 2001
From c4b523154d5fce693fe9c163f505fcea8d897547 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Dec 2016 23:55:03 +0100
Subject: [PATCH 09/10] Ensure dependencies of samples are found

View File

@ -1,4 +1,4 @@
From fafa411904d7f8814298c5b82d107a7aeccf5ed7 Mon Sep 17 00:00:00 2001
From ae4406a714e49c7884e0e19825af3b33aa6f6910 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Dec 2016 23:58:32 +0100
Subject: [PATCH 10/10] Win32_system_utils.cpp: Make implicit cast explicit

View File

@ -7,19 +7,31 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
pkgname=(mingw-w64-angleproject{,-samples})
# Patches are managed under https://github.com/Martchus/angle/tree/mingw-w64
_latest_git=
pkgver=2.1.r6381.9f09037
if [[ $_latest_git ]]; then
pkgname=(mingw-w64-angleproject{,-samples}-git)
pkgdesc='ANGLE project (mingw-w64, git version)'
_angle_commit=
_header_commit=
else
pkgname=(mingw-w64-angleproject{,-samples})
pkgdesc='ANGLE project (mingw-w64)'
_angle_commit="#commit=${pkgver##*.}"
_header_commit='#commit=7a8f394'
fi
pkgrel=1
pkgdesc='ANGLE project (mingw-w64)'
arch=('any')
url='https://chromium.googlesource.com/angle/angle/+/master/README.md'
license=('BSD')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc' 'git' 'gyp-git' 'depot-tools-git' 'python' 'python2')
options=('!strip' '!buildflags' 'staticlibs')
source=('angleproject::git+https://chromium.googlesource.com/angle/anglecommit=f097e23'
'additional-mingw-header::git+https://github.com/Martchus/additional-mingw-header.git'
'additional-mingw-header::git+https://github.com/Martchus/additional-mingw-header.git#commit=7a8f394'
source=("angleproject::git+https://chromium.googlesource.com/angle/angle$_angle_commit"
"additional-mingw-header::git+https://github.com/Martchus/additional-mingw-header.git$_header_commit"
'0001-Provide-workaround-for-building-static-libs.patch'
'0002-Provide-Windows-XP-support.patch'
'0003-Fix-dynamic-libraries.patch'
@ -31,25 +43,26 @@ source=('angleproject::git+https://chromium.googlesource.com/angle/anglecommit=f
'0009-Ensure-dependencies-of-samples-are-found.patch'
'0010-Win32_system_utils.cpp-Make-implicit-cast-explicit.patch')
sha256sums=('SKIP'
'SKIP'
'SKIP'
'59bc63ccf6d46db725bac5e259941677586315553cb545c51c2fb339e7c586c6'
'595d5f807b69947d55d4b6285b5dc687cc16d15b6a8c56ec79f496001bbd1f2e'
'2c5de1623d3ee2a8818063edaea287d1d684785a3443b4f7a2db482c45c59194'
'd2ed2cf0518fc09b472b17db857d979189b660135347b4c19be8e7352c032ed4'
'a214c2bb6a1472843227b27cf6963113e4e42e5051dfa4ba9dbdfd353da887b5'
'34e363820e24df349b5798526bd7040aaf5224086310d92901b71b2e5285cd96'
'8098e5f6999ffb15761a4bea668e14fbe9af9af94c2ec504fd6b6421198a938a'
'9a17c871dfcef1bde47d54a12ba1d3ad88c2349d3bede4b12fa9c9453f0a1129'
'106e5607986669bba430d1b021e180f27c595d31d3ba239cad26583f423eccd2'
'2b195f1238b433fb68564f9c53adfc0d715cc4908c4ab0b9dd5977c88b763620')
'd017726a8953ef409dc614f87b2b99d91725c3d9f1c6bc7d4043301cfb1ce032'
'8e17fd1b3bfa95c1f8f82a05b3697dfbd26a9c87ba5c3f8e3b5c8dfdccddbaa2'
'26add1c1ce33db65a102d63926d429e4cc3c61e505a622ef0e1faa0ed1867c40'
'5239b6bcd38a282adc38a45a7e420752b6f79310553fba19b9a5ae8b70eec31f'
'd665d266cb4d9b00f70d97df6859b455476beed4af5566a5fc0b4d75ddaaf5cc'
'cab5b50139148c882a409ddb38df80019648151beb4735e115e92f2fc5677326')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
#pkgver() {
# cd "$srcdir/angleproject"
# grep -E "^#define ANGLE_M..OR_VERSION [0-9]+$" src/common/version.h | sed 's/#define ANGLE_M..OR_VERSION //' | tr '\n' '.'
# printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
#}
if [[ $_latest_git ]]; then
pkgver() {
cd "$srcdir/angleproject"
grep -E "^#define ANGLE_M..OR_VERSION [0-9]+$" src/common/version.h | sed 's/#define ANGLE_M..OR_VERSION //' | tr '\n' '.'
printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
fi
prepare() {
cd "${srcdir}/angleproject"
@ -137,6 +150,10 @@ build() {
package_mingw-w64-angleproject() {
depends=('mingw-w64-crt')
if [[ $_latest_git ]]; then
provides=('mingw-w64-angleproject')
conflicts=('mingw-w64-angleproject')
fi
for _arch in ${_architectures}; do
mkdir -p "${pkgdir}/usr/${_arch}/"{bin,lib,include}
@ -149,6 +166,9 @@ package_mingw-w64-angleproject() {
install \
lib/libEGL.so \
"${pkgdir}/usr/${_arch}/bin/libEGL.dll"
install \
lib/libangle_util.so \
"${pkgdir}/usr/${_arch}/bin/libangle_util.dll"
install \
libGLESv2.dll.a \
libEGL.dll.a \
@ -170,8 +190,15 @@ package_mingw-w64-angleproject() {
}
package_mingw-w64-angleproject-samples() {
pkgdesc='ANGLE project samples (mingw-w64)'
depends=('mingw-w64-angleproject')
if [[ $_latest_git ]]; then
pkgdesc='ANGLE project samples (mingw-w64, git version)'
depends=('mingw-w64-angleproject-git')
provides=('mingw-w64-angleproject-samples')
conflicts=('mingw-w64-angleproject-samples')
else
pkgdesc='ANGLE project samples (mingw-w64)'
depends=('mingw-w64-angleproject')
fi
for _arch in ${_architectures}; do
mkdir -p "${pkgdir}/usr/${_arch}/"{bin,share/angleproject}
@ -189,3 +216,11 @@ package_mingw-w64-angleproject-samples() {
done
}
if [[ $_latest_git ]]; then
package_mingw-w64-angleproject-git() {
package_mingw-w64-angleproject
}
package_mingw-w64-angleproject-samples-git() {
package_mingw-w64-angleproject-samples
}
fi