diff --git a/.gitignore b/.gitignore index 335ec95..ebd3cb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*.tar.gz +/vkroots-e554d4c.tar.gz diff --git a/sources b/sources index f8c2716..eee3509 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vkroots-ee76e62.tar.gz) = 71ee33568d09e69929bcbfc666119dc365ed3f2e072099f4d19148075259611f14c09049f7011eab45fcd1d96867fb4d4d8c798dbbd5c93690962493b7f01bce +SHA512 (vkroots-e554d4c.tar.gz) = fb4d14d030e825d92a4d96e87ffd7febd858a5516fadfa68d4c3907dff5c652d0f284e453ae1877df4ecffc8a59e65c7d933034519c0f59da920c29daeb3cba0 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..43b264a 100644 --- a/vkroots.spec +++ b/vkroots.spec @@ -1,20 +1,17 @@ %global debug_package %{nil} -%global commit ee76e620798612c52fb8dcc32a1058a0a3538930 +%global commit e554d4c184805523d6db3642afcde85e9d83c50c %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global git_date 20260507 +%global git_date 20230313 Name: vkroots Version: 0^%{git_date}git%{shortcommit} -Release: %autorelease +Release: 1%{?dist} 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 @@ -57,4 +50,8 @@ cd gen %changelog -%autochangelog +* 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