diff --git a/.gitignore b/.gitignore index 335ec95..92c4eec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -*.tar.gz +/vkroots-e554d4c.tar.gz +/vkroots-2ceb105.tar.gz +/vkroots-5106d8a.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..22ceca5 --- /dev/null +++ b/changelog @@ -0,0 +1,5 @@ +* Tue Jul 25 2023 Frantisek Zatloukal - 0^20230313gite554d4c-1 +- Rebase to a later snapshot + +* Fri Mar 03 2023 Onuralp SEZER - 0^20230103git2675710-1 +- Initial package vkroots diff --git a/sources b/sources index f8c2716..19c2f4c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vkroots-ee76e62.tar.gz) = 71ee33568d09e69929bcbfc666119dc365ed3f2e072099f4d19148075259611f14c09049f7011eab45fcd1d96867fb4d4d8c798dbbd5c93690962493b7f01bce +SHA512 (vkroots-5106d8a.tar.gz) = 726e65dd0bb322d537e985ba2e504c68ef1b474574f11a5b102edcb8a7b74a6d86dea132c3b11417399a00beff9163e7aad413a389cf6073ec44d5ce6175ffc5 diff --git a/vkroots-fix-funcpointer-xml-format.patch b/vkroots-fix-funcpointer-xml-format.patch deleted file mode 100644 index 98a8bf8..0000000 --- a/vkroots-fix-funcpointer-xml-format.patch +++ /dev/null @@ -1,96 +0,0 @@ ---- a/gen/vulkan_helpers.py 2026-05-07 22:00:10.000000000 +0200 -+++ b/gen/vulkan_helpers.py 2026-06-25 15:23:53.756076567 +0200 -@@ -462,38 +462,51 @@ - return None - - members = [] -- begin = None -+ proto = funcpointer.find("proto") - -- for t in funcpointer.findall("type"): -- # General form: -- # void* pUserData, -- # Parsing of the tail (anything past ) is tricky since there -- # can be other data on the next line like: const int.. -- -- const = True if begin and "const" in begin else False -- _type = t.text -- lines = t.tail.split(",\n") -- if lines[0][0] == "*": -- pointer = "*" -- name = lines[0][1:].strip() -- else: -- pointer = None -- name = lines[0].strip() -+ if proto is not None: -+ # New XML format (vulkan-headers 1.4.341+): -+ # void PFN_foo -+ # typeA* parmA -+ proto_type_elem = proto.find("type") -+ ret_type = proto_type_elem.text -+ ret_ptr = "*" if proto_type_elem.tail and "*" in proto_type_elem.tail else "" -+ _type = "typedef {}{} (VKAPI_PTR *".format(ret_type, ret_ptr) -+ name = proto.find("name").text -+ -+ for param in funcpointer.findall("param"): -+ member = VkMember.from_xml(param, False, None) -+ if member: -+ members.append(member) -+ else: -+ # Old XML format: -+ # typedef void (VKAPI_PTR *PFN_foo)( -+ # typeA* parmA, -+ begin = None -+ for t in funcpointer.findall("type"): -+ const = True if begin and "const" in begin else False -+ param_type = t.text -+ lines = t.tail.split(",\n") -+ if lines[0][0] == "*": -+ pointer = "*" -+ param_name = lines[0][1:].strip() -+ else: -+ pointer = None -+ param_name = lines[0].strip() - -- # Filter out ); if it is contained. -- name = name.partition(");")[0] -+ # Filter out ); if it is contained. -+ param_name = param_name.partition(");")[0] -+ -+ try: -+ begin = lines[1].strip() -+ except IndexError: -+ begin = None - -- # If tail encompasses multiple lines, assign the second line to begin -- # for the next line. -- try: -- begin = lines[1].strip() -- except IndexError: -- begin = None -+ members.append(VkMember(const=const, _type=param_type, pointer=pointer, name=param_name)) - -- members.append(VkMember(const=const, _type=_type, pointer=pointer, name=name)) -+ _type = funcpointer.text -+ name = funcpointer.find("name").text - -- _type = funcpointer.text -- name = funcpointer.find("name").text - if "requires" in funcpointer.attrib: - forward_decls = funcpointer.attrib.get("requires").split(",") - else: -@@ -2069,10 +2082,13 @@ - continue - - # Name is in general within a name tag else it is an optional -- # attribute on the type tag. -+ # attribute on the type tag. For the new funcpointer format, -+ # the name is nested inside .... - name_elem = t.find("name") - if name_elem is not None: - type_info["name"] = name_elem.text -+ elif t.find("proto/name") is not None: -+ type_info["name"] = t.find("proto/name").text - else: - type_info["name"] = t.attrib.get("name", None) - diff --git a/vkroots.spec b/vkroots.spec index f8843d8..d10d8d1 100644 --- a/vkroots.spec +++ b/vkroots.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} -%global commit ee76e620798612c52fb8dcc32a1058a0a3538930 +%global commit 5106d8a0df95de66cc58dc1ea37e69c99afc9540 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global git_date 20260507 +%global git_date 20240429 Name: vkroots Version: 0^%{git_date}git%{shortcommit} @@ -9,12 +9,9 @@ Release: %autorelease Summary: A stupid simple method of making Vulkan layers, at home License: LGPL-2.1-or-later AND (Apache-2.0 or MIT) URL: https://github.com/Joshua-Ashton/vkroots -BuildArch: noarch - Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz -Patch0: vkroots-fix-funcpointer-xml-format.patch -BuildRequires: meson >= 0.58.0 +BuildRequires: meson BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: vulkan-headers @@ -35,10 +32,6 @@ takes all the complexity/hastle away from you. It's so simple. %prep %autosetup -p1 -n %{name}-%{commit} -# Autogenerate the header based on the installed Vulkan Headers -cd gen -./make_vkroots -v -x /usr/share/vulkan/registry/vk.xml - %build %meson