Github messages for voidlinux
 help / color / mirror / Atom feed
From: ScrelliCopter <ScrelliCopter@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: genie-1141
Date: Thu, 28 Jan 2021 21:59:01 +0100	[thread overview]
Message-ID: <20210128205901.Hc-xVNYFVZ2JDB3e3z5VB8wTjhBpNXAkJjWDqX0qggk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27915@inbox.vuxu.org>

[-- 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]+\))'

  parent reply	other threads:[~2021-01-28 20:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  8:56 [PR PATCH] " ScrelliCopter
2021-01-14 13:13 ` [PR PATCH] [Updated] " ScrelliCopter
2021-01-14 13:15 ` ScrelliCopter
2021-01-17  0:23 ` [PR REVIEW] " Piraty
2021-01-17  5:18 ` [PR PATCH] [Updated] " ScrelliCopter
2021-01-17  5:32 ` [PR REVIEW] " ScrelliCopter
2021-01-18 12:03 ` Piraty
2021-01-18 12:05 ` Piraty
2021-01-18 15:50 ` [PR PATCH] [Updated] " ScrelliCopter
2021-01-18 15:57 ` [PR REVIEW] " ScrelliCopter
2021-01-18 15:57 ` ScrelliCopter
2021-01-18 17:48 ` Chocimier
2021-01-19  6:55 ` ScrelliCopter
2021-01-27 14:14 ` [PR REVIEW] " Piraty
2021-01-28  5:57 ` [PR PATCH] [Updated] " ScrelliCopter
2021-01-28  5:59 ` [PR REVIEW] " ScrelliCopter
2021-01-28 14:13 ` Piraty
2021-01-28 14:13 ` Piraty
2021-01-28 20:59 ` ScrelliCopter [this message]
2021-01-28 21:01 ` ScrelliCopter
2021-01-28 21:02 ` ScrelliCopter
2021-01-28 21:10 ` ScrelliCopter
2021-01-28 21:11 ` ScrelliCopter
2021-04-26  3:45 ` [PR PATCH] [Closed]: " ScrelliCopter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210128205901.Hc-xVNYFVZ2JDB3e3z5VB8wTjhBpNXAkJjWDqX0qggk@z \
    --to=screllicopter@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).