Github messages for voidlinux
 help / color / mirror / Atom feed
From: ndgnuh <ndgnuh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] awesome: add build option jit
Date: Fri, 03 Jul 2020 17:58:45 +0200	[thread overview]
Message-ID: <20200703155845.qV9vhB5mhGxxtVoEuqg-Irnfv_uSujihLtatJxIgSMw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20443@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

There is an updated pull request by ndgnuh against master on the void-packages repository

https://github.com/ndgnuh/void-packages awesome-opt-jit
https://github.com/void-linux/void-packages/pull/20443

awesome: add build option jit
Enables users to build `awesome` with `LuaJIT`.

Change log:
- `lgi`: rename to `lua-lgi`, create alternative group `lgi`
- New package: `lua51-lgi` (dependencies for `awesome` running with `LuaJIT`)
- `./xbps-src pkg awesome -o jit`, this option is disabled by default.

Related/based on this PR: #16137 

A patch file from https://github.com/void-linux/void-packages/pull/20443.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-awesome-opt-jit-20443.patch --]
[-- Type: text/x-diff, Size: 2569 bytes --]

From c4412c1d184a780b036e7940b780e5f9b508203e Mon Sep 17 00:00:00 2001
From: hung <ndgnuh@protonmail.com>
Date: Fri, 3 Apr 2020 11:57:29 +0700
Subject: [PATCH] awesome: add build option for building with luajit

---
 srcpkgs/awesome/template | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/awesome/template b/srcpkgs/awesome/template
index d372beedbd6..a538554ad04 100644
--- a/srcpkgs/awesome/template
+++ b/srcpkgs/awesome/template
@@ -6,12 +6,12 @@ build_style=cmake
 build_helper="qemu"
 configure_args="-DSYSCONFDIR=/etc"
 conf_files="/etc/xdg/awesome/rc.lua"
-hostmakedepends="ruby-asciidoctor ImageMagick lua53-lgi lua53 pkg-config xmlto"
+hostmakedepends="ruby-asciidoctor ImageMagick pkg-config xmlto"
 makedepends="libxcb-devel pango-devel xcb-util-devel xcb-util-image-devel
  xcb-util-keysyms-devel xcb-util-wm-devel xcb-util-cursor-devel
- startup-notification-devel imlib2-devel lua53-lgi libxdg-basedir-devel
- gdk-pixbuf-devel lua53-devel dbus-devel libxkbcommon-devel xcb-util-xrm-devel"
-depends="dbus-x11 lua53-lgi>=0.7.2 pango"
+ startup-notification-devel imlib2-devel libxdg-basedir-devel
+ gdk-pixbuf-devel dbus-devel libxkbcommon-devel xcb-util-xrm-devel"
+depends="dbus-x11 pango"
 short_desc="Highly configurable, next gen framework window manager for X"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -19,9 +19,34 @@ homepage="http://awesomewm.org"
 distfiles="https://github.com/awesomeWM/awesome/releases/download/v${version}/awesome-${version}.tar.xz"
 checksum=78264d6f012350b371e339127aca485260bc0aa935eff578ba75ce1a00e11753
 
+build_options="jit"
+desc_option_jit="Use LuaJIT to build Awesome"
+
+if [ "$build_option_jit" ]; then
+	hostmakedepends+=" lua51 LuaJIT lua51-lgi"
+	makedepends+=" lua51-devel LuaJIT-devel lua51-lgi"
+	depends+=" lua51-lgi>=0.7.2"
+	configure_args+="
+		-DLUA_LIBRARY=$XBPS_CROSS_BASE/usr/lib/libluajit-5.1.so
+		-DLUA_INCLUDE_DIR=$XBPS_CROSS_BASE/usr/include/luajit-2.1"
+else
+	hostmakedepends+=" lua53 lua53-lgi"
+	makedepends+=" lua53-devel lua53-lgi"
+	depends+=" lua53-lgi>=0.7.2"
+fi
+
 pre_configure() {
 	# Russian manpages fail to build.
 	vsed -i -e "s|es fr de ru|es fr de|g" CMakeLists.txt
+
+	if [ "$build_option_jit" ]; then
+		# Use correct lua name
+		vsed -e "s|COMMAND lua\b|COMMAND ${_luaname}|" \
+			-i awesomeConfig.cmake \
+			-i tests/examples/CMakeLists.txt
+		vsed -e "s|LUA_COV_RUNNER lua\b|LUA_COV_RUNNER ${_luaname}|" \
+			-i tests/examples/CMakeLists.txt
+	fi
 }
 
 post_install() {

  parent reply	other threads:[~2020-07-03 15:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20443@inbox.vuxu.org>
2020-03-29 20:44 ` q66
2020-03-29 20:51 ` ndgnuh
2020-03-29 22:32 ` q66
2020-03-30  8:55 ` [WIP] " ndgnuh
2020-03-30 14:27 ` q66
2020-03-30 14:28 ` q66
2020-03-30 15:10 ` ndgnuh
2020-03-30 15:14 ` ndgnuh
2020-03-30 15:19 ` ndgnuh
2020-03-30 17:24 ` ndgnuh
2020-04-02 21:25 ` [PR PATCH] [Updated] " pullmoll
2020-04-03  4:58 ` [PR PATCH] [Updated] " ndgnuh
2020-04-03  6:35 ` ndgnuh
2020-07-03 14:32 ` [PR PATCH] [Updated] " ndgnuh
2020-07-03 14:34 ` ndgnuh
2020-07-03 15:58 ` ndgnuh [this message]
2020-07-03 17:03 ` [PR PATCH] [Updated] " ndgnuh
2020-07-03 17:10 ` q66
2020-07-03 17:13 ` q66
2020-07-03 17:15 ` q66
2020-07-04  1:20 ` ndgnuh
2020-07-04  1:21 ` sgn
2020-07-04  1:25 ` ndgnuh
2020-07-04  2:00 ` q66
2020-07-04  2:34 ` sgn
2020-07-05 15:47 ` ndgnuh
2020-07-05 16:48 ` [PR PATCH] [Updated] " ndgnuh
2020-07-05 16:49 ` ndgnuh
2020-08-17 13:44 ` [PR PATCH] [Closed]: " sgn

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=20200703155845.qV9vhB5mhGxxtVoEuqg-Irnfv_uSujihLtatJxIgSMw@z \
    --to=ndgnuh@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).