Skip to contentSkip to conversation

package/luv: use github helper

PATCH New Fabrice Fontaine 2 participants 4 messages Sep 4, 2019 – Sep 5, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/luv: use github helper

Use github helper to retrieve archive as the current one does not contain libluv.pc.in which will break the build

Fixes:
- http://autobuild.buildroot.org/results/5ec6b5a3622c343f7e401b7da7d4a1da15be2733

---
 package/luv/luv.hash | 2 +-
 package/luv/luv.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/luv/luv.hash +1 -1
index c3a3062e1c..40a80bb0d8 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 420fc299f3b25aff55b839e9fe590982f45045b3e53ebeab2449eca7e23a106a  luv-1.30.1-0.tar.gz
+sha256 751b7d88b05f3d54a0be3ada37a1c7fda31b2ca2f00511bd1d2015db3cf93959  luv-1.30.1-0.tar.gz
 sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE.txt
package/luv/luv.mk +1 -1
index 31288ffca3..fa5832546c 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 LUV_VERSION = 1.30.1-0
-LUV_SITE = https://github.com/luvit/luv/releases/download/$(LUV_VERSION)
+LUV_SITE = $(call github,luvit,luv,$(LUV_VERSION))
 LUV_LICENSE = Apache-2.0
 LUV_LICENSE_FILES = LICENSE.txt
 LUV_DEPENDENCIES = libuv
Signature · 1 line
2.23.0.rc1
#1 lore raw

PATCH 2/2 package/luv: fix build without lua-compat53

---
 .../luv/0001-src-luv.c-include-lua.h.patch    | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/luv/0001-src-luv.c-include-lua.h.patch
package/luv/0001-src-luv.c-include-lua.h.patch new file +29 -0
new file mode 100644
index 0000000000..ab3bd4c412
@@ -0,0 +1,29 @@
+From 3f2a0da968c6f438f422264a7e3e515e89247a22 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Wed, 4 Sep 2019 21:39:40 +0200
+Subject: [PATCH] src/luv.c: include lua.h
+
+lua.h must be included before checking for LUA_VERSION_H otherwise we
+won't get the version and compat-5.3.h will always be needed
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/luvit/luv/pull/373]
+---
+ src/luv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/luv.c b/src/luv.c
+index c009d76..284dd32 100644
+--- a/src/luv.c
++++ b/src/luv.c
+@@ -15,6 +15,7 @@
+  *
+  */
+ 
++#include <lua.h>
+ #if (LUA_VERSION_NUM != 503)
+ #include "c-api/compat-5.3.h"
+ #endif
+-- 
+2.23.0.rc1
+
Signature · 1 line
2.23.0.rc1
#2 lore raw

PATCH 1/2 package/luv: use github helper

In reply to Fabrice Fontaine

Hi Fabrice,

Quoted 26 lines · Fabrice Fontaine

Use github helper to retrieve archive as the current one does not contain libluv.pc.in which will break the build

Fixes:
- http://autobuild.buildroot.org/results/5ec6b5a3622c343f7e401b7da7d4a1da15be2733

---
 package/luv/luv.hash | 2 +-
 package/luv/luv.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/luv/luv.hash +1 -1
index c3a3062e1c..40a80bb0d8 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 420fc299f3b25aff55b839e9fe590982f45045b3e53ebeab2449eca7e23a106a  luv-1.30.1-0.tar.gz
+sha256 751b7d88b05f3d54a0be3ada37a1c7fda31b2ca2f00511bd1d2015db3cf93959  luv-1.30.1-0.tar.gz
 sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE.txt
package/luv/luv.mk +0 -0
index 31288ffca3..fa5832546c 100644

package/luv/luv.mk line 11

Quoted 8 lines
package/luv/luv.mk +1 -1
@@ -5,7 +5,7 @@
 ################################################################################
 
 LUV_VERSION = 1.30.1-0
-LUV_SITE = https://github.com/luvit/luv/releases/download/$(LUV_VERSION)
+LUV_SITE = $(call github,luvit,luv,$(LUV_VERSION))
 LUV_LICENSE = Apache-2.0
 LUV_LICENSE_FILES = LICENSE.txt
 LUV_DEPENDENCIES = libuv

luv uses lua-compat-5.3, which is provided as a submodule, otherwise building luv with Lua 5.1 will fail, even when applying your follow-up patch.

The submodules are included in the tarball release, when using the github helper, they are not, unless using LIBFOO_GIT_SUBMODULES.

I would suggest, rather then fetching all submodules (libuv, lua, lua- compat-5.3, and luajit), which is time consuming, just add the upstream libluv.pc.in to the package and copy it into the build directory in a hook:

```
define LUV_INSTALL_PC_IN
	cp package/luv/libluv.pc.in $(@D)/
endef
LUV_POST_EXTRACT_HOOKS += LUV_INSTALL_PC_IN
```

Best regards
J?rg Krause

#3 lore raw

PATCH 1/2 package/luv: use github helper

Hi J?rg,

Le jeu. 5 sept. 2019 ? 09:20, J?rg Krause
<[email protected]> a ?crit :

Quoted 51 lines

Hi Fabrice,

Quoted 26 lines · Fabrice Fontaine

Use github helper to retrieve archive as the current one does not contain libluv.pc.in which will break the build

Fixes:
- http://autobuild.buildroot.org/results/5ec6b5a3622c343f7e401b7da7d4a1da15be2733

---
 package/luv/luv.hash | 2 +-
 package/luv/luv.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/luv/luv.hash +1 -1
index c3a3062e1c..40a80bb0d8 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 420fc299f3b25aff55b839e9fe590982f45045b3e53ebeab2449eca7e23a106a  luv-1.30.1-0.tar.gz
+sha256 751b7d88b05f3d54a0be3ada37a1c7fda31b2ca2f00511bd1d2015db3cf93959  luv-1.30.1-0.tar.gz
 sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE.txt
package/luv/luv.mk +0 -0
index 31288ffca3..fa5832546c 100644

package/luv/luv.mk line 11

Quoted 8 lines
package/luv/luv.mk +1 -1
@@ -5,7 +5,7 @@
 ################################################################################
 
 LUV_VERSION = 1.30.1-0
-LUV_SITE = https://github.com/luvit/luv/releases/download/$(LUV_VERSION)
+LUV_SITE = $(call github,luvit,luv,$(LUV_VERSION))
 LUV_LICENSE = Apache-2.0
 LUV_LICENSE_FILES = LICENSE.txt
 LUV_DEPENDENCIES = libuv

luv uses lua-compat-5.3, which is provided as a submodule, otherwise building luv with Lua 5.1 will fail, even when applying your follow-up patch.

The submodules are included in the tarball release, when using the github helper, they are not, unless using LIBFOO_GIT_SUBMODULES.

I would suggest, rather then fetching all submodules (libuv, lua, lua- compat-5.3, and luajit), which is time consuming, just add the upstream libluv.pc.in to the package and copy it into the build directory in a hook:

Quoted 6 lines
```
define LUV_INSTALL_PC_IN
        cp package/luv/libluv.pc.in $(@D)/
endef
LUV_POST_EXTRACT_HOOKS += LUV_INSTALL_PC_IN
```

Thanks for your review, I'll send a v2 this evening.

Quoted 5 lines

Best regards
J?rg Krause

Best Regards,

Fabrice