diff --git a/.packit.yaml b/.packit.yaml index c7cfc1d..882dc81 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,11 +1,15 @@ +upstream_package_name: xmake upstream_project_url: https://github.com/xmake-io/xmake -upstream_tag_template: v{version} + +downstream_package_name: xmake + +specfile_path: xmake.spec jobs: - job: pull_from_upstream trigger: release dist_git_branches: - - fedora-rawhide + - fedora-all - job: koji_build trigger: commit diff --git a/0001-system-include.patch b/0001-system-include.patch index a67644d..2d89037 100644 --- a/0001-system-include.patch +++ b/0001-system-include.patch @@ -11,3 +11,16 @@ index 9901f58f6..ef523c2d9 100644 /* ////////////////////////////////////////////////////////////////////////////////////// * implementation +diff --git a/core/src/xmake/semver/prefix.h b/core/src/xmake/semver/prefix.h +index 2112d73f1..9077b49ca 100644 +--- a/core/src/xmake/semver/prefix.h ++++ b/core/src/xmake/semver/prefix.h +@@ -25,7 +25,7 @@ + * includes + */ + #include "../prefix.h" +-#include "semver.h" ++#include "sv/semver.h" + + /* ////////////////////////////////////////////////////////////////////////////////////// + * extern diff --git a/7213.patch b/7213.patch deleted file mode 100644 index 42c7f8e..0000000 --- a/7213.patch +++ /dev/null @@ -1,344 +0,0 @@ -From 5a41cf81382a49f1a88b613f2e6b10b8ce7223c7 Mon Sep 17 00:00:00 2001 -From: ruki -Date: Mon, 12 Jan 2026 22:41:16 +0800 -Subject: [PATCH 1/4] fix installdir of imporfiles - ---- - .../action/install/cmake_importfiles.lua | 31 ++++++++++--------- - .../action/install/pkgconfig_importfiles.lua | 3 +- - 2 files changed, 19 insertions(+), 15 deletions(-) - -diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua -index 6b876922564..0b1195c68ab 100644 ---- a/xmake/modules/target/action/install/cmake_importfiles.lua -+++ b/xmake/modules/target/action/install/cmake_importfiles.lua -@@ -22,12 +22,12 @@ - import("core.project.project") - - -- get the lib file of the target --function _get_libfile(target, installdir) -+function _get_libfile(target, libdir) - local libfile = path.filename(target:targetfile()) - if target:is_plat("windows") then - libfile = libfile:gsub("%.dll$", ".lib") - elseif target:is_plat("mingw") then -- if os.isfile(path.join(installdir, "lib", libfile:gsub("%.dll$", ".dll.a"))) then -+ if os.isfile(path.join(libdir, libfile:gsub("%.dll$", ".dll.a"))) then - libfile = libfile:gsub("%.dll$", ".dll.a") - else - libfile = libfile:gsub("%.dll$", ".lib") -@@ -37,7 +37,7 @@ function _get_libfile(target, installdir) - end - - -- get the builtin variables --function _get_builtinvars(target, installdir, libdir) -+function _get_builtinvars(target, libdir) - local target_ptrbytes - if target:is_plat("cross") then - target_ptrbytes = target:check_sizeof("void*") -@@ -47,7 +47,7 @@ function _get_builtinvars(target, installdir, libdir) - return {LIBDIR = libdir, - TARGETNAME = target:name(), - PROJECTNAME = project.name() or target:name(), -- TARGETFILENAME = target:targetfile() and _get_libfile(target, installdir), -+ TARGETFILENAME = target:targetfile() and _get_libfile(target, libdir), - TARGETKIND = target:is_headeronly() and "INTERFACE" or (target:is_shared() and "SHARED" or "STATIC"), - PACKAGE_VERSION = target:get("version") or "1.0.0", - TARGET_PTRBYTES = target_ptrbytes} -@@ -55,18 +55,19 @@ end - - -- install cmake config file - function _install_cmake_configfile(target, installdir, filename, opt) -+ opt = opt or {} - - -- get import file path -- local libdir = opt and opt.libdir or "lib" -+ local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) -- local importfile_dst = path.join(installdir, libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) -+ local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) - - -- trace - vprint("generating %s ..", importfile_dst) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, installdir, libdir) -+ local builtinvars = _get_builtinvars(target, libdir) - - -- copy and replace builtin variables - local content = io.readfile(importfile_src) -@@ -83,15 +84,16 @@ end - - -- append target to cmake config file - function _append_cmake_configfile(target, installdir, filename, opt) -+ opt = opt or {} - - -- get import file path -- local libdir = opt and opt.libdir or "lib" -+ local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) -- local importfile_dst = path.join(installdir, libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) -+ local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, installdir, libdir) -+ local builtinvars = _get_builtinvars(target, libdir) - - -- generate the file if not exist / file is outdated - if target:is_headeronly() or not os.isfile(importfile_dst) or os.mtime(importfile_dst) < os.mtime(target:targetfile()) then -@@ -119,18 +121,19 @@ end - - -- install cmake target file - function _install_cmake_targetfile(target, installdir, filename, opt) -+ opt = opt or {} - - -- get import file path -- local libdir = opt and opt.libdir or "lib" -+ local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) -- local importfile_dst = path.join(installdir, libdir, "cmake", projectname, (filename:gsub("xxx", target:name()))) -+ local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", target:name()))) - - -- trace - vprint("generating %s ..", importfile_dst) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, installdir, libdir) -+ local builtinvars = _get_builtinvars(target, libdir) - - -- copy and replace builtin variables - local content = io.readfile(importfile_src) -@@ -142,7 +145,7 @@ function _install_cmake_targetfile(target, installdir, filename, opt) - end) - local libfile = path.filename(target:targetfile()) - local postfix = is_mode("debug") and "DEBUG" or "RELEASE" -- if target:is_shared() and (_get_libfile(target, installdir) ~= libfile) then -+ if target:is_shared() and (_get_libfile(target, libdir) ~= libfile) then - -- On DLL platforms, the import library is named differently from the target file - content = content:gsub("# IMPORTED_IMPLIB_" .. postfix, "IMPORTED_IMPLIB_" .. postfix) - content = content:gsub( -diff --git a/xmake/modules/target/action/install/pkgconfig_importfiles.lua b/xmake/modules/target/action/install/pkgconfig_importfiles.lua -index b96833071e7..cdeb42831bb 100644 ---- a/xmake/modules/target/action/install/pkgconfig_importfiles.lua -+++ b/xmake/modules/target/action/install/pkgconfig_importfiles.lua -@@ -30,7 +30,8 @@ function main(target, opt) - end - - -- get pkgconfig/.pc file -- local pcfile = path.join(installdir, opt and opt.libdir or "lib", "pkgconfig", opt.filename or (target:basename() .. ".pc")) -+ local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ local pcfile = path.join(libdir, "pkgconfig", opt.filename or (target:basename() .. ".pc")) - - -- get includedirs - local includedirs = opt.includedirs - -From 168fe49abe77fbf2a1c1ba865bf22d4d8cdd371d Mon Sep 17 00:00:00 2001 -From: ruki -Date: Mon, 12 Jan 2026 22:43:39 +0800 -Subject: [PATCH 2/4] fix libdir - ---- - .../target/action/install/cmake_importfiles.lua | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua -index 0b1195c68ab..ae2155ec7cf 100644 ---- a/xmake/modules/target/action/install/cmake_importfiles.lua -+++ b/xmake/modules/target/action/install/cmake_importfiles.lua -@@ -37,14 +37,20 @@ function _get_libfile(target, libdir) - end - - -- get the builtin variables --function _get_builtinvars(target, libdir) -+function _get_builtinvars(target, installdir, libdir) - local target_ptrbytes - if target:is_plat("cross") then - target_ptrbytes = target:check_sizeof("void*") - else - target_ptrbytes = target:is_arch64() and "8" or "4" - end -- return {LIBDIR = libdir, -+ local libsubdir -+ if libdir:startswith(installdir) then -+ libsubdir = path.relative(libdir, installdir) -+ else -+ raise("target(%s): libdir(%s) is not in installdir(%s)", target:name(), libdir, installdir) -+ end -+ return {LIBDIR = libsubdir, - TARGETNAME = target:name(), - PROJECTNAME = project.name() or target:name(), - TARGETFILENAME = target:targetfile() and _get_libfile(target, libdir), -@@ -67,7 +73,7 @@ function _install_cmake_configfile(target, installdir, filename, opt) - vprint("generating %s ..", importfile_dst) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, libdir) -+ local builtinvars = _get_builtinvars(target, installdir, libdir) - - -- copy and replace builtin variables - local content = io.readfile(importfile_src) -@@ -93,7 +99,7 @@ function _append_cmake_configfile(target, installdir, filename, opt) - local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, libdir) -+ local builtinvars = _get_builtinvars(target, installdir, libdir) - - -- generate the file if not exist / file is outdated - if target:is_headeronly() or not os.isfile(importfile_dst) or os.mtime(importfile_dst) < os.mtime(target:targetfile()) then -@@ -133,7 +139,7 @@ function _install_cmake_targetfile(target, installdir, filename, opt) - vprint("generating %s ..", importfile_dst) - - -- get the builtin variables -- local builtinvars = _get_builtinvars(target, libdir) -+ local builtinvars = _get_builtinvars(target, installdir, libdir) - - -- copy and replace builtin variables - local content = io.readfile(importfile_src) - -From 3ffd904326d6a06f8f63a92bc1d2334a8d8441fd Mon Sep 17 00:00:00 2001 -From: ruki -Date: Mon, 12 Jan 2026 22:54:07 +0800 -Subject: [PATCH 3/4] improve cmake installdir - ---- - .../target/action/install/cmake_importfiles.lua | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua -index ae2155ec7cf..b4efecb0862 100644 ---- a/xmake/modules/target/action/install/cmake_importfiles.lua -+++ b/xmake/modules/target/action/install/cmake_importfiles.lua -@@ -21,6 +21,12 @@ - -- imports - import("core.project.project") - -+-- get install libdir -+function _get_install_libdir(target, installdir, opt) -+ opt = opt or {} -+ return opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+end -+ - -- get the lib file of the target - function _get_libfile(target, libdir) - local libfile = path.filename(target:targetfile()) -@@ -61,10 +67,9 @@ end - - -- install cmake config file - function _install_cmake_configfile(target, installdir, filename, opt) -- opt = opt or {} - - -- get import file path -- local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ local libdir = _get_install_libdir(target, installdir, opt) - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) - local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) -@@ -90,10 +95,9 @@ end - - -- append target to cmake config file - function _append_cmake_configfile(target, installdir, filename, opt) -- opt = opt or {} - - -- get import file path -- local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ local libdir = _get_install_libdir(target, installdir, opt) - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) - local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", projectname))) -@@ -127,10 +131,9 @@ end - - -- install cmake target file - function _install_cmake_targetfile(target, installdir, filename, opt) -- opt = opt or {} - - -- get import file path -- local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ local libdir = _get_install_libdir(target, installdir, opt) - local projectname = project.name() or target:name() - local importfile_src = path.join(os.programdir(), "scripts", "cmake_importfiles", filename) - local importfile_dst = path.join(libdir, "cmake", projectname, (filename:gsub("xxx", target:name()))) - -From 6c20d1006e21b8fe6ac33f65f8600152b81830b1 Mon Sep 17 00:00:00 2001 -From: ruki -Date: Mon, 12 Jan 2026 22:55:01 +0800 -Subject: [PATCH 4/4] improve installdir - ---- - .../target/action/install/cmake_importfiles.lua | 13 +++++++------ - .../target/action/install/pkgconfig_importfiles.lua | 5 ++++- - 2 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua -index b4efecb0862..c9c45455466 100644 ---- a/xmake/modules/target/action/install/cmake_importfiles.lua -+++ b/xmake/modules/target/action/install/cmake_importfiles.lua -@@ -24,11 +24,11 @@ import("core.project.project") - -- get install libdir - function _get_install_libdir(target, installdir, opt) - opt = opt or {} -- return opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ return path.normalize(opt.libdir and path.join(installdir, opt.libdir) or target:libdir()) - end - - -- get the lib file of the target --function _get_libfile(target, libdir) -+function _get_libfilename(target, libdir) - local libfile = path.filename(target:targetfile()) - if target:is_plat("windows") then - libfile = libfile:gsub("%.dll$", ".lib") -@@ -59,7 +59,7 @@ function _get_builtinvars(target, installdir, libdir) - return {LIBDIR = libsubdir, - TARGETNAME = target:name(), - PROJECTNAME = project.name() or target:name(), -- TARGETFILENAME = target:targetfile() and _get_libfile(target, libdir), -+ TARGETFILENAME = target:targetfile() and _get_libfilename(target, libdir), - TARGETKIND = target:is_headeronly() and "INTERFACE" or (target:is_shared() and "SHARED" or "STATIC"), - PACKAGE_VERSION = target:get("version") or "1.0.0", - TARGET_PTRBYTES = target_ptrbytes} -@@ -152,14 +152,14 @@ function _install_cmake_targetfile(target, installdir, filename, opt) - local value = builtinvars[variable] - return type(value) == "function" and value() or value - end) -- local libfile = path.filename(target:targetfile()) -+ local libfilename = path.filename(target:targetfile()) - local postfix = is_mode("debug") and "DEBUG" or "RELEASE" -- if target:is_shared() and (_get_libfile(target, libdir) ~= libfile) then -+ if target:is_shared() and (_get_libfilename(target, libdir) ~= libfilename) then - -- On DLL platforms, the import library is named differently from the target file - content = content:gsub("# IMPORTED_IMPLIB_" .. postfix, "IMPORTED_IMPLIB_" .. postfix) - content = content:gsub( - "IMPORTED_LOCATION_" .. postfix .. " \"%${_IMPORT_PREFIX}/lib/.-\"", -- "IMPORTED_LOCATION_" .. postfix .. " \"${_IMPORT_PREFIX}/bin/" .. libfile .. "\"" -+ "IMPORTED_LOCATION_" .. postfix .. " \"${_IMPORT_PREFIX}/bin/" .. libfilename .. "\"" - ) - end - io.writefile(importfile_dst, content) -@@ -180,6 +180,7 @@ function main(target, opt) - end - - -- do install -+ installdir = path.normalize(installdir) - _append_cmake_configfile(target, installdir, "xxxConfig.cmake", opt) - _install_cmake_configfile(target, installdir, "xxxConfigVersion.cmake", opt) - _install_cmake_targetfile(target, installdir, "xxxTargets.cmake", opt) -diff --git a/xmake/modules/target/action/install/pkgconfig_importfiles.lua b/xmake/modules/target/action/install/pkgconfig_importfiles.lua -index cdeb42831bb..9a9b8ee8107 100644 ---- a/xmake/modules/target/action/install/pkgconfig_importfiles.lua -+++ b/xmake/modules/target/action/install/pkgconfig_importfiles.lua -@@ -30,8 +30,11 @@ function main(target, opt) - end - - -- get pkgconfig/.pc file -- local libdir = opt.libdir and path.join(installdir, opt.libdir) or target:libdir() -+ local libdir = path.unix(path.normalize(opt.libdir and path.join(installdir, opt.libdir) or target:libdir())) - local pcfile = path.join(libdir, "pkgconfig", opt.filename or (target:basename() .. ".pc")) -+ if not libdir:startswith(installdir) then -+ raise("target(%s): libdir(%s) is not in installdir(%s)", target:name(), libdir, installdir) -+ end - - -- get includedirs - local includedirs = opt.includedirs diff --git a/README.packit b/README.packit index eb5cf90..4afa99b 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 1.16.0.post1.dev2+ged481c62d. +The file was generated using packit 0.94.0.post1.dev2+g7ce7e679. diff --git a/sources b/sources index 58b76e0..7e8e70d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xmake-3.0.9.tar.gz) = 6cfe09b7c946e75bf844339fcf172a275caf3ec5b1aefd651b6c191aacea7c6a9b58d9a2b95f94df723368488cd7d616fc5b936156c66162e9926bdb62b08f76 +SHA512 (xmake-2.8.9.tar.gz) = 4eb4a8e607c9edb79409d805645669acbd2d676c572135b1a14356ed6b68b3501fdc120fcdcc69792a1389f0b1d643c1ed46ad705d172c26356f9975891e23a8 diff --git a/xmake.spec b/xmake.spec index 5d3585e..d8ba380 100644 --- a/xmake.spec +++ b/xmake.spec @@ -1,9 +1,8 @@ %bcond_with luajit Name: xmake -Version: 3.0.9 +Version: 2.8.9 -%global __requires_exclude_from ^%{_datadir}/%{name}/scripts/.+\\.ps1$ %global forgeurl https://github.com/xmake-io/xmake %forgemeta @@ -15,8 +14,9 @@ License: Apache-2.0 URL: https://xmake.io Source: %forgesource -Patch0: 0001-system-include.patch -Patch1: 0001-add-relwithdebinfo-build-mode.patch +Patch0: 0001-pkgconfig-fix-check.patch +Patch1: 0001-system-include.patch +Patch2: 0001-add-relwithdebinfo-build-mode.patch BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(readline) @@ -27,7 +27,7 @@ BuildRequires: pkgconfig(libsv) %if %{with luajit} BuildRequires: pkgconfig(luajit) %else -BuildRequires: pkgconfig(lua) >= 5.5 +BuildRequires: pkgconfig(lua) >= 5.4 %endif BuildRequires: bash