[-- Attachment #1: Type: text/plain, Size: 693 bytes --] There is a new pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 1885 bytes --] From 4bddccf558266d676af2ddef8894e0bd25969890 Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/template | 41 +++++++++++++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..3a749275d0a --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,41 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +hostmakedepends="git" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" +_commit=44918162588e56512ddac6264b08ca6ba4e67468 + +do_fetch() { + git clone "${homepage}.git" "${pkgname}-${version}" + cd "${pkgname}-${version}" + git reset --hard "${_commit}" +} + +do_configure() { + make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds + # so remove it + sed -i 's/-m64//' scripts/genie.lua + ;; + esac + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_build() { + make ${makejobs} CC="${CC}" -C build/gmake.linux clean all +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 698 bytes --] There is an updated pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 2059 bytes --] From f098b20442821e94cf18e7a39af5a31b26b387ee Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/template | 48 ++++++++++++++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..a051fd61520 --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,48 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +hostmakedepends="git" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" +_commit=44918162588e56512ddac6264b08ca6ba4e67468 + +do_fetch() { + git clone "${homepage}.git" "${pkgname}-${version}" + cd "${pkgname}-${version}" + git reset --hard "${_commit}" +} + +do_configure() { + case "$XBPS_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds + # so remove it + sed -i 's/-m64 //' build/gmake.linux/genie.make + ;; + esac + make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # same as before but fixes cross-builds + sed -i 's/-m64//' scripts/genie.lua + ;; + esac + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_build() { + make ${makejobs} CC="${CC}" -C build/gmake.linux all +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 206 bytes --] New comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#issuecomment-760190039 Comment: Spoke too soon... native 32 bit builds should be fixed now.
[-- Attachment #1: Type: text/plain, Size: 212 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559055430 Comment: grep for `githash` to see how to fetch a commit from a github repo
[-- Attachment #1: Type: text/plain, Size: 698 bytes --] There is an updated pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 2061 bytes --] From 5fa78fc402f6f4687f85c213367ee3ff9da5f1c8 Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/template | 48 ++++++++++++++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..f2c3b53a3e7 --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,48 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +_githash=44918162588e56512ddac6264b08ca6ba4e67468 +hostmakedepends="git" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" + +do_fetch() { + git clone "${homepage}.git" "${pkgname}-${version}" + cd "${pkgname}-${version}" + git reset --hard "${_githash}" +} + +do_configure() { + case "$XBPS_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds + # so remove it + sed -i 's/-m64 //' build/gmake.linux/genie.make + ;; + esac + make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # same as before but fixes cross-builds + sed -i 's/-m64//' scripts/genie.lua + ;; + esac + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_build() { + make ${makejobs} CC="${CC}" -C build/gmake.linux all +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 940 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559081023 Comment: @Piraty I changed the convention to match what you were referring to, or did you also mean replacing the usage of Git with just getting the commit directly from GitHub? The reason I'm using Git is because [these](https://github.com/bkaradzic/GENie/blob/44918162588e56512ddac6264b08ca6ba4e67468/scripts/release.lua#L18) [lines](https://github.com/bkaradzic/GENie/blob/44918162588e56512ddac6264b08ca6ba4e67468/scripts/release.lua#L21) use `git` to glean information about the version, which fails without an actual Git repository. I could try patching these lines myself because they're just getting strings that I already know about in the template, and then the hostmakedepends=git could be omitted entirely in favour of just fetching the commit directly. Which would be preferred?
[-- Attachment #1: Type: text/plain, Size: 602 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559519102 Comment: 1. a small hint about git requirement would have made it more obvious 2. you can write `version.h` (as defined [here](https://github.com/bkaradzic/GENie/blob/44918162588e56512ddac6264b08ca6ba4e67468/scripts/release.lua#L18-L27)) on your own with the information available in the template, as well as maybe even skip running that release script entirely and mimic what does in `pre_configure()`. or just patch out the lines calling `git`, whatever you like
[-- Attachment #1: Type: text/plain, Size: 251 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559520107 Comment: please `distfiles="https://github.com/bkaradzic/GENie/archive/${_githash}.tar.gz"` instead of `git clone`
[-- Attachment #1: Type: text/plain, Size: 698 bytes --] There is an updated pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 3481 bytes --] From a02c10e9e0ffd4d07eb7b78593f91735d3259cab Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/patches/no-git.diff | 23 ++++++++++++++ srcpkgs/genie/template | 51 +++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 3 files changed, 76 insertions(+) create mode 100644 srcpkgs/genie/patches/no-git.diff create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/patches/no-git.diff b/srcpkgs/genie/patches/no-git.diff new file mode 100644 index 00000000000..05f8237da0d --- /dev/null +++ b/srcpkgs/genie/patches/no-git.diff @@ -0,0 +1,23 @@ +diff --git a/scripts/release.lua b/scripts/release.lua +index d1173d5..85798f7 100644 +--- a/scripts/release.lua ++++ b/scripts/release.lua +@@ -15,12 +15,12 @@ function dorelease() + + print("Updating version number...") + +- local f = io.popen("git rev-list --count HEAD") +- local rev = string.match(f:read("*a"), ".*%S") +- f:close() +- f = io.popen("git log --format=format:%H -1") +- local sha1 = f:read("*a") +- f:close() ++ -- local f = io.popen("git rev-list --count HEAD") ++ -- #local rev = string.match(f:read("*a"), ".*%S") ++ -- f:close() ++ -- f = io.popen("git log --format=format:%H -1") ++ -- local sha1 = f:read("*a") ++ -- f:close() + io.output("src/host/version.h") + io.write("#define VERSION " ..rev .. "\n") + io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n") diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..9506524de07 --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,51 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +_githash=44918162588e56512ddac6264b08ca6ba4e67468 +wrksrc="GENie-${_githash}" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" +distfiles="https://github.com/bkaradzic/GENie/archive/${_githash}.tar.gz" +checksum=6dfc98dfeae0600c5c12a98156b2238effee5c1e2e09e8107477d9e5cfc7278d +patch_args="-Np1" + +pre_configure() { + # update version number from template instead of using git + sed -i -E "s|\" ?\.\. ?rev ?\.\. ?\"|${version}|" scripts/release.lua + sed -i -E "s|\" ?\.\. ?sha1 ?\.\. ?\"|${_githash}|" scripts/release.lua +} + +do_configure() { + case "$XBPS_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds + # so remove it + sed -i 's/-m64 //' build/gmake.linux/genie.make + ;; + esac + make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # same as before but fixes cross-builds + sed -i 's/-m64//' scripts/genie.lua + ;; + esac + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_build() { + make ${makejobs} CC="${CC}" -C build/gmake.linux all +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 394 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559662958 Comment: I did mention it in my PR comment, it should be more obvious now from the template (the git requirement is gone anyway). Rewriting the whole script would be absurd when the issue can be fixed with patches & sed, so I've just opted for that.
[-- Attachment #1: Type: text/plain, Size: 158 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r559663063 Comment: Done.
[-- Attachment #1: Type: text/plain, Size: 178 bytes --] New comment by Chocimier on void-packages repository https://github.com/void-linux/void-packages/pull/27915#issuecomment-762393091 Comment: Could you ask them to tag releases?
[-- Attachment #1: Type: text/plain, Size: 246 bytes --] New comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#issuecomment-762641903 Comment: Upstream is unlikely to want to use release tags while the (unmodified) build scripts require Git.
[-- Attachment #1: Type: text/plain, Size: 276 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r565340612 Comment: suggestion: write `version.h` directly from the template and simply drop its handling in `release.lua`, might make it less fragile
[-- Attachment #1: Type: text/plain, Size: 698 bytes --] There is an updated pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 3754 bytes --] From fa8a2e912dc7c8e076632a0dbf7b3dd9770dfe96 Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/patches/no-git.diff | 35 ++++++++++++++++++++++ srcpkgs/genie/template | 50 +++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 3 files changed, 87 insertions(+) create mode 100644 srcpkgs/genie/patches/no-git.diff create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/patches/no-git.diff b/srcpkgs/genie/patches/no-git.diff new file mode 100644 index 00000000000..91f3d174ab7 --- /dev/null +++ b/srcpkgs/genie/patches/no-git.diff @@ -0,0 +1,35 @@ +diff --git a/scripts/release.lua b/scripts/release.lua +index d1173d5..a9d11d7 100644 +--- a/scripts/release.lua ++++ b/scripts/release.lua +@@ -13,18 +13,18 @@ function dorelease() + end + + +- print("Updating version number...") +- +- local f = io.popen("git rev-list --count HEAD") +- local rev = string.match(f:read("*a"), ".*%S") +- f:close() +- f = io.popen("git log --format=format:%H -1") +- local sha1 = f:read("*a") +- f:close() +- io.output("src/host/version.h") +- io.write("#define VERSION " ..rev .. "\n") +- io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n") +- io.close() ++ --print("Updating version number...") ++ ++ --local f = io.popen("git rev-list --count HEAD") ++ --local rev = string.match(f:read("*a"), ".*%S") ++ --f:close() ++ --f = io.popen("git log --format=format:%H -1") ++ --local sha1 = f:read("*a") ++ --f:close() ++ --io.output("src/host/version.h") ++ --io.write("#define VERSION " ..rev .. "\n") ++ --io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n") ++ --io.close() + + + print("Updating embedded scripts...") diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..139604af0db --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,50 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +_githash=44918162588e56512ddac6264b08ca6ba4e67468 +wrksrc="GENie-${_githash}" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" +distfiles="https://github.com/bkaradzic/GENie/archive/${_githash}.tar.gz" +checksum=6dfc98dfeae0600c5c12a98156b2238effee5c1e2e09e8107477d9e5cfc7278d +patch_args="-Np1" + +do_configure() { + case "$XBPS_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds + # so remove it + vsed 's/-m64 //' -i build/gmake.linux/genie.make + ;; + esac + make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) # no changes needed + ;; + *) # same as before but fixes cross-builds + vsed 's/-m64//' -i scripts/genie.lua + ;; + esac + + # generate version.h without using Git + echo "#define VERSION ${version}" > src/host/version.h + echo "#define VERSION_STR \"version ${version} (commit ${_githash})\"" >> src/host/version.h + + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_build() { + make ${makejobs} CC="${CC}" -C build/gmake.linux all +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 195 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r565839033 Comment: Reasonable suggestion @Piraty, it is done.
[-- Attachment #1: Type: text/plain, Size: 177 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r566106961 Comment: combine with previous vsed call
[-- Attachment #1: Type: text/plain, Size: 281 bytes --] New review comment by Piraty on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r566103281 Comment: 1. that should be fine to remove unconditionally. also, that'd make a useful build-fix to send upstream 2. move that to `post_patch()`
[-- Attachment #1: Type: text/plain, Size: 698 bytes --] There is an updated pull request by ScrelliCopter against master on the void-packages repository https://github.com/ScrelliCopter/void-packages genie https://github.com/void-linux/void-packages/pull/27915 New package: genie-1141 https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports. A patch file from https://github.com/void-linux/void-packages/pull/27915.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-genie-27915.patch --] [-- Type: text/x-diff, Size: 3677 bytes --] From 9852b56caacde28492d2c9d0dab11e8f49fae06c Mon Sep 17 00:00:00 2001 From: a dinosaur <nick@a-dinosaur.com> Date: Thu, 14 Jan 2021 18:31:52 +1100 Subject: [PATCH] New package: genie-1141 --- srcpkgs/genie/patches/no-git.diff | 35 +++++++++++++++++++++++++++ srcpkgs/genie/template | 39 +++++++++++++++++++++++++++++++ srcpkgs/genie/update | 2 ++ 3 files changed, 76 insertions(+) create mode 100644 srcpkgs/genie/patches/no-git.diff create mode 100644 srcpkgs/genie/template create mode 100644 srcpkgs/genie/update diff --git a/srcpkgs/genie/patches/no-git.diff b/srcpkgs/genie/patches/no-git.diff new file mode 100644 index 00000000000..91f3d174ab7 --- /dev/null +++ b/srcpkgs/genie/patches/no-git.diff @@ -0,0 +1,35 @@ +diff --git a/scripts/release.lua b/scripts/release.lua +index d1173d5..a9d11d7 100644 +--- a/scripts/release.lua ++++ b/scripts/release.lua +@@ -13,18 +13,18 @@ function dorelease() + end + + +- print("Updating version number...") +- +- local f = io.popen("git rev-list --count HEAD") +- local rev = string.match(f:read("*a"), ".*%S") +- f:close() +- f = io.popen("git log --format=format:%H -1") +- local sha1 = f:read("*a") +- f:close() +- io.output("src/host/version.h") +- io.write("#define VERSION " ..rev .. "\n") +- io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n") +- io.close() ++ --print("Updating version number...") ++ ++ --local f = io.popen("git rev-list --count HEAD") ++ --local rev = string.match(f:read("*a"), ".*%S") ++ --f:close() ++ --f = io.popen("git log --format=format:%H -1") ++ --local sha1 = f:read("*a") ++ --f:close() ++ --io.output("src/host/version.h") ++ --io.write("#define VERSION " ..rev .. "\n") ++ --io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n") ++ --io.close() + + + print("Updating embedded scripts...") diff --git a/srcpkgs/genie/template b/srcpkgs/genie/template new file mode 100644 index 00000000000..b04236a135e --- /dev/null +++ b/srcpkgs/genie/template @@ -0,0 +1,39 @@ +# Template file for 'genie' +pkgname=genie +version=1141 +revision=1 +_githash=44918162588e56512ddac6264b08ca6ba4e67468 +wrksrc="GENie-${_githash}" +build_style="gnu-makefile" +make_build_args="-C build/gmake.linux" +short_desc="Project generator tool using Lua" +maintainer="a dinosaur <nick@a-dinosaur.com>" +license="BSD-3-Clause" +homepage="https://github.com/bkaradzic/GENie" +distfiles="https://github.com/bkaradzic/GENie/archive/${_githash}.tar.gz" +checksum=6dfc98dfeae0600c5c12a98156b2238effee5c1e2e09e8107477d9e5cfc7278d +patch_args="-Np1" + +post_patch() { + # Unnecessary '-m64' only valid for x86_64, ppc64. Breaks 32-bit & ARM builds + # so remove it + vsed 's/-m64//' -i build/gmake.linux/genie.make scripts/genie.lua +} + +do_configure() { + # A copy of GENie is built on the host to run the release script + # and ensure embeds & generated Makefiles are up to date + make ${makejobs} CC="${CC_host:-$CC}" CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" + # Generate version.h without using Git + echo "#define VERSION ${version}" > src/host/version.h + echo "#define VERSION_STR \"version ${version} (commit ${_githash})\"" >> src/host/version.h + ./bin/linux/genie release + make ${makejobs} -C build/gmake.linux clean +} + +do_install() { + vbin bin/linux/genie + vdoc README.md + vdoc docs/scripting-reference.md + vlicense LICENSE +} diff --git a/srcpkgs/genie/update b/srcpkgs/genie/update new file mode 100644 index 00000000000..ba03e847bd7 --- /dev/null +++ b/srcpkgs/genie/update @@ -0,0 +1,2 @@ +site="https://github.com/bkaradzic/GENie" +pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'
[-- Attachment #1: Type: text/plain, Size: 288 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r566404232 Comment: Upstream may be receptive to a patch that only applies that on Windows, otherwise I'm not sure why it's there. Anyway, changes applied.
[-- Attachment #1: Type: text/plain, Size: 159 bytes --] New review comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#discussion_r566404310 Comment: Ditto.
[-- Attachment #1: Type: text/plain, Size: 659 bytes --] New comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#issuecomment-769397319 Comment: @Piraty > Afte i looked into genie's build system, I also require you to put comments on the parts where you build for the host and why I added a small explanation to the start of `do_configure` that should make the intention clear. > and ideally guard that by testing `$CROSS_BUILD` I put `CC="${CC_host:-$CC}"` in the make that runs on the host and switched to the `gnu-makefile` build_style to handle the actual build. Tested & seems to work for both native & cross builds. Should that handle every case?
[-- Attachment #1: Type: text/plain, Size: 665 bytes --] New comment by ScrelliCopter on void-packages repository https://github.com/void-linux/void-packages/pull/27915#issuecomment-769397319 Comment: @Piraty > Afte i looked into genie's build system, I also require you to put comments on the parts where you build for the host and why I added a small explanation to the start of `do_configure` that should make the intention clear. > and ideally guard that by testing `$CROSS_BUILD` I put `CC="${CC_host:-$CC}"` in the make that runs on the host and switched to the `gnu-makefile` build_style to handle the actual build. Tested & seems to work for both native & cross builds. Should that handle every case?
[-- Attachment #1: Type: text/plain, Size: 532 bytes --] There's a closed pull request on the void-packages repository New package: genie-1141 https://github.com/void-linux/void-packages/pull/27915 Description: https://github.com/bkaradzic/GENie Please excuse the Git, it's required by the pre-build configure scripts to set the version reported by `--version`. Upstream has an irritating way of designating the current stable release so something like this has to be done anyway. I did my best to make sure the package builds & cross-compiles on every architecture xbps-src supports.