From 30f1b15f8be867b2afda62565606e286b6b1a2a1 Mon Sep 17 00:00:00 2001 From: Markham Date: Sun, 15 Nov 2015 13:56:48 +0100 Subject: [PATCH] add target luacurl --- archive-patches/lua-curl-Makefile.diff | 18 ++++++++++++++++++ make/archives.mk | 3 +++ make/libraries.mk | 19 +++++++++++++++++++ make/versions.mk | 6 ++++++ 4 files changed, 46 insertions(+) create mode 100644 archive-patches/lua-curl-Makefile.diff diff --git a/archive-patches/lua-curl-Makefile.diff b/archive-patches/lua-curl-Makefile.diff new file mode 100644 index 0000000..826556d --- /dev/null +++ b/archive-patches/lua-curl-Makefile.diff @@ -0,0 +1,18 @@ +--- a/Makefile.org 2014-12-06 09:32:55.969612292 +0100 ++++ b/Makefile 2014-12-06 11:05:57.432208910 +0100 +@@ -10,13 +10,13 @@ + LUA_IMPL ?= lua + CC ?= $(MAC_ENV) gcc + +-LUA_VERSION = $(shell $(PKG_CONFIG) --print-provides --silence-errors $(LUA_IMPL)) ++#LUA_VERSION = $(shell $(PKG_CONFIG) --print-provides --silence-errors $(LUA_IMPL)) + ifeq ($(LUA_VERSION),) + LUA_CMOD ?= /usr/lib/lua/5.1 + LUA_LMOD ?= /usr/share/lua/5.1 + LIBDIR ?= /usr/lib + LUA_INC ?= /usr/include +-CURL_LIBS = -L/usr/lib -lcurl ++CURL_LIBS ?= -L/usr/lib -lcurl + else + LUA_CMOD ?= $(shell $(PKG_CONFIG) --variable INSTALL_CMOD $(LUA_IMPL)) + LUA_LMOD ?= $(shell $(PKG_CONFIG) --variable INSTALL_LMOD $(LUA_IMPL)) diff --git a/make/archives.mk b/make/archives.mk index eda8b73..bb31b65 100755 --- a/make/archives.mk +++ b/make/archives.mk @@ -171,6 +171,9 @@ $(ARCHIVE)/lua-5.2.3.tar.gz: $(ARCHIVE)/luaposix-31.tar.gz: $(WGET) http://www.fhloston-paradise.de/luaposix-31.tar.gz +$(ARCHIVE)/Lua-cURL$(LUACURL_VER).tar.xz: + $(WGET) https://slknet.de/bs-micha-download/Lua-cURL$(LUACURL_VER).tar.xz + $(ARCHIVE)/slingshot-v6.tar.gz: $(WGET) http://www.fhloston-paradise.de/slingshot-v6.tar.gz diff --git a/make/libraries.mk b/make/libraries.mk index 1345337..03bf32b 100755 --- a/make/libraries.mk +++ b/make/libraries.mk @@ -605,6 +605,25 @@ $(D)/libflac: $(ARCHIVE)/flac-1.3.0.tar.gz | $(TARGETPREFIX) $(REMOVE)/flac-1.3.0 touch $@ +$(D)/luacurl: $(D)/libcurl $(ARCHIVE)/Lua-cURL$(LUACURL_VER).tar.xz | $(TARGETPREFIX) + $(UNTAR)/Lua-cURL$(LUACURL_VER).tar.xz + set -e; cd $(BUILD_TMP)/Lua-cURL$(LUACURL_VER); \ + $(PATCH)/lua-curl-Makefile.diff; \ + $(BUILDENV) \ + CC=$(CROSS_DIR)/bin/$(TARGET)-gcc \ + LUA_CMOD=/lib/lua/$(LUA_ABIVER) \ + LUA_LMOD=/share/lua/$(LUA_ABIVER) \ + LIBDIR=$(TARGETPREFIX)/lib \ + LUA_INC=$(TARGETPREFIX)/include \ + CURL_LIBS="-L$(TARGETPREFIX)/lib -lcurl" \ + $(MAKE); \ + LUA_CMOD=/lib/lua/$(LUA_ABIVER) \ + LUA_LMOD=/share/lua/$(LUA_ABIVER) \ + $(MAKE) DESTDIR=$(TARGETPREFIX) + $(TARGET)-strip $(TARGETPREFIX)/lib/lua/$(LUA_ABIVER)/lcurl.so + $(REMOVE)/Lua-cURL$(LUACURL_VER) + touch $@ + $(D)/luaposix: $(HOSTPREFIX)/bin/lua-5.2.3 $(D)/lua $(ARCHIVE)/luaposix-31.tar.gz $(ARCHIVE)/slingshot-v6.tar.gz | $(TARGETPREFIX) $(UNTAR)/luaposix-31.tar.gz tar -C $(BUILD_TMP)/luaposix-31/slingshot --strip=1 -xf $(ARCHIVE)/slingshot-v6.tar.gz diff --git a/make/versions.mk b/make/versions.mk index edb7eaf..2a2f9a9 100644 --- a/make/versions.mk +++ b/make/versions.mk @@ -15,6 +15,12 @@ LIBUPNP_VER = 1.6.19 # including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://. LIBRTMP_VER = 2.4_p20131018 +# lua: easily embeddable scripting language +LUA_ABIVER = 5.2 +LUA_VER=$(LUA_ABIVER).3 + +LUACURL_VER=v3 + # pkg-config; a helper tool used when compiling applications and libraries to insert the correct compiler options PKGCONFIG_VER=0.28 -- 2.39.5