Skip to content

Commit

Permalink
Use built-in ${VERSION_*} variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Doekin committed Oct 20, 2024
1 parent d6604fb commit 7372b07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packages/z/zbar/port/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@
#undef X_DISPLAY_MISSING

/* Program major version (before the '.') as a number */
#undef ZBAR_VERSION_MAJOR
#define ZBAR_VERSION_MAJOR ${VERSION_MAJOR}

/* Program minor version (after '.') as a number */
#undef ZBAR_VERSION_MINOR
#define ZBAR_VERSION_MINOR ${VERSION_MINOR}

/* Program patch version (after the second '.') as a number */
#undef ZBAR_VERSION_PATCH
#define ZBAR_VERSION_PATCH ${VERSION_ALTER}

/* Define to 1 if necessary to make fseeko visible. */
#undef _LARGEFILE_SOURCE
Expand Down
9 changes: 0 additions & 9 deletions packages/z/zbar/port/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,8 @@ option_end()
if has_config("vers") then
set_version(get_config("vers"))

set_configvar("VERSION", get_config("vers"))
set_configvar("PACKAGE_VERSION", get_config("vers"))
set_configvar("PACKAGE_STRING", "zbar " .. get_config("vers"))

local vers = get_config("vers"):split("%.")
major_ver = vers[1] or ""
minor_ver = vers[2] or ""
patch_ver = vers[3] or ""
set_configvar("ZBAR_VERSION_MAJOR", major_ver, {quote = false})
set_configvar("ZBAR_VERSION_MINOR", minor_ver, {quote = false})
set_configvar("ZBAR_VERSION_PATCH", patch_ver, {quote = false})
end

option("LIB_VERSION")
Expand Down

0 comments on commit 7372b07

Please sign in to comment.