diff options
author | luigoalma | 2019-02-09 02:24:54 +0000 |
---|---|---|
committer | luigoalma | 2019-02-09 02:31:59 +0000 |
commit | 8ca0661f400864b2deced7b564e64c365db5b094 (patch) | |
tree | 95c0454b3e544dfa8da84e59fc524cce3fc40b76 | |
download | aur-8ca0661f400864b2deced7b564e64c365db5b094.tar.gz |
Version 1.1.99
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | 001-build-fix.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 81 |
4 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9ee453fc4902 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = mingw-w64-vulkan-icd-loader + pkgdesc = Vulkan Installable Client Driver (ICD) Loader (mingw-w64) + pkgver = 1.1.99 + pkgrel = 1 + url = https://www.khronos.org/vulkan/ + arch = any + groups = mingw-w64-vulkan-devel + license = APACHE + makedepends = mingw-w64-cmake + makedepends = mingw-w64-vulkan-headers + makedepends = python-lxml + depends = mingw-w64-crt + options = !buildflags + options = staticlibs + options = !strip + options = !emptydirs + source = Vulkan-Loader-1.1.99.tar.gz::https://github.com/KhronosGroup/Vulkan-Loader/archive/v1.1.99.tar.gz + source = 001-build-fix.patch + sha256sums = 27fd5e52506d2b53cc9806c05cb956d9a551525f3ad830e50cf5c59e329579d0 + sha256sums = 64ef57d8551a0b33f63aa98a06c276d5e8e24d9b4ff27347baa8fcb2a39c1295 + +pkgname = mingw-w64-vulkan-icd-loader + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..84354b27e10d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +* +*/ + +!PKGBUILD +!.SRCINFO +!.gitignore +!*.patch + diff --git a/001-build-fix.patch b/001-build-fix.patch new file mode 100644 index 000000000000..4d185e5cbc31 --- /dev/null +++ b/001-build-fix.patch @@ -0,0 +1,43 @@ +--- a/loader/CMakeLists.txt 2018-05-16 14:05:33.046991100 +0300 ++++ b/loader/CMakeLists.txt 2018-05-16 14:07:39.464013100 +0300 +@@ -86,7 +86,7 @@ + set(ASM_FAILURE_MSG "${ASM_FAILURE_MSG} extensions will suffer from a corrupted stack.") + if(WIN32) + enable_language(ASM_MASM) +- if(CMAKE_ASM_MASM_COMPILER_WORKS) ++ if (MSVC AND CMAKE_ASM_MASM_COMPILER_WORKS) + if(NOT CMAKE_CL_64) + set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} /safeseh) + endif() +--- a/loader/loader.c 2018-05-16 14:03:52.750814700 +0300 ++++ b/loader/loader.c 2018-05-16 14:04:08.631642600 +0300 +@@ -613,6 +613,10 @@ + // + // *reg_data contains a string list of filenames as pointer. + // When done using the returned string list, the caller should free the pointer. ++#ifdef __MINGW32__ ++#define CM_GETIDLIST_FILTER_PRESENT 0x00000100 ++#define CM_GETIDLIST_FILTER_CLASS 0x00000200 ++#endif + VkResult loaderGetDeviceRegistryFiles(const struct loader_instance *inst, char **reg_data, PDWORD reg_data_size, LPCTSTR value_name) { + static const wchar_t *softwareComponentGUID = L"{5c4c3332-344d-483c-8739-259e934c9cc8}"; + static const wchar_t *displayGUID = L"{4d36e968-e325-11ce-bfc1-08002be10318}"; +--- a/loader/loader.rc ++++ b/loader/loader.rc +@@ -43,8 +43,6 @@ + /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + +-#include "winres.h" +- + #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_BUILDNO + + #define STRINGIZE2(s) #s +@@ -77,7 +75,6 @@ + #endif + + FILEOS 0x00000L +- FILETYPE VFT_DLL + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..da9c9ad3870b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,81 @@ +# Contributor: luigoalma <at gmail> +# Contributor: PedroHLC <root@pedrohlc.com> +# Contributor: J. Peter Mugaas <jpmugaas@suddenlink.net> +# Contributor: wirx6 <wirx654@gmail.com> +# based of https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/vulkan-icd-loader @ 837304b + +pkgname=mingw-w64-vulkan-icd-loader +_pkgname=Vulkan-Loader +pkgver=1.1.99 +pkgrel=1 +pkgdesc="Vulkan Installable Client Driver (ICD) Loader (mingw-w64)" +arch=(any) +url="https://www.khronos.org/vulkan/" +groups=("mingw-w64-vulkan-devel") +license=('APACHE') +makedepends=(mingw-w64-cmake mingw-w64-vulkan-headers python-lxml) +depends=(mingw-w64-crt) +options=(!buildflags staticlibs !strip !emptydirs) +source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/${_pkgname}/archive/v${pkgver}.tar.gz" + "001-build-fix.patch") +sha256sums=('27fd5e52506d2b53cc9806c05cb956d9a551525f3ad830e50cf5c59e329579d0' + '64ef57d8551a0b33f63aa98a06c276d5e8e24d9b4ff27347baa8fcb2a39c1295') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}/loader" + # From the PedroHLC's aur package mingw-w64-vulkan-loader + # which is based of https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-vulkan-loader/PKGBUILD + sed -i'' -E 's/#include <([^>]+)>/#include <\L\1>/g' *.h *.c + sed -i'' -E 's/target_link_libraries\(([^\)]+)\)/target_link_libraries\(\L\1\)/g' CMakeLists.txt + patch -p2 -i "${srcdir}/001-build-fix.patch" + + # Added also this because __declspec(thread) was being ultimately ignored, + # making a non-tls variable of a tls variable. + # Replaced with __thread instead, of which at least works mingw-w64-gcc with thread model of "posix". + # Links libwinpthread in this case as effect but doesn't lose the tls properties of the variable. + # Untested on gcc compiled with a thread model of "win32". + sed -i'' -E 's/#define THREAD_LOCAL_DECL __declspec\(thread\)/#define THREAD_LOCAL_DECL __thread/g' vk_loader_platform.h +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + export LDFLAGS="-static-libgcc -static" # to staticly apply libssp and libwinpthread + export CFLAGS="-Wno-unused-function" + export CXXFLAGS=$CFLAGS + export CPPFLAGS=$CFLAGS + for _arch in ${_architectures}; do + mkdir build-${_arch} && pushd build-${_arch} + ${_arch}-cmake \ + -DCMAKE_SHARED_LIBRARY_PREFIX_C="" \ + -DCMAKE_SHARED_LIBRARY_PREFIX_CXX="" \ + -DBUILD_TESTS=Off \ + -DCMAKE_BUILD_TYPE=Release \ + .. + make + popd + done +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + for _arch in ${_architectures}; do + pushd build-${_arch} + make DESTDIR="${pkgdir}" install + popd + install -Dm644 "LICENSE.txt" "${pkgdir}/usr/${_arch}/share/licenses/vulkan-loader/LICENSE" + install -d "${pkgdir}/usr/${_arch}/lib/pkgconfig" + sed -e "s/@CMAKE_INSTALL_PREFIX@/\/usr\/${_arch}/g" \ + -e "s/@CMAKE_INSTALL_LIBDIR@/lib/g" \ + -e "s/@CMAKE_PROJECT_NAME@/Vulkan-Loader/g" \ + -e "s/@VK_API_VERSION@/${pkgver}/g" \ + -e "s/-lvulkan/-lvulkan-1/g" \ + -e "s/@PRIVATE_LIBS@/-ladvapi32 -lcfgmgr32/g" \ + loader/vulkan.pc.in > "${pkgdir}/usr/${_arch}/lib/pkgconfig/vulkan.pc" + ${_arch}-strip --strip-unneeded "${pkgdir}/usr/${_arch}/bin/"*.dll + ${_arch}-strip -g "${pkgdir}/usr/${_arch}/lib/"*.a + done +} |