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: Mon, 18 Jan 2021 16:50:41 +0100	[thread overview]
Message-ID: <20210118155041.3CbcfrZJmDWScxi6Wqgb9KWPPAtlE0kaiTVzx3sMW_c@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: 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]+\))'

  parent reply	other threads:[~2021-01-18 15:50 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 ` ScrelliCopter [this message]
2021-01-18 15:57 ` 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 ` [PR PATCH] [Updated] " ScrelliCopter
2021-01-28 21:01 ` [PR REVIEW] " 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=20210118155041.3CbcfrZJmDWScxi6Wqgb9KWPPAtlE0kaiTVzx3sMW_c@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).