summaryrefslogtreecommitdiff
path: root/dev-lua/lua-openssl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lua/lua-openssl
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lua/lua-openssl')
-rw-r--r--dev-lua/lua-openssl/Manifest5
-rw-r--r--dev-lua/lua-openssl/files/lua-openssl-0.4.1-Makefile.patch86
-rw-r--r--dev-lua/lua-openssl/lua-openssl-0.4.1-r1.ebuild46
-rw-r--r--dev-lua/lua-openssl/metadata.xml19
4 files changed, 156 insertions, 0 deletions
diff --git a/dev-lua/lua-openssl/Manifest b/dev-lua/lua-openssl/Manifest
new file mode 100644
index 000000000000..ec54b53f7a98
--- /dev/null
+++ b/dev-lua/lua-openssl/Manifest
@@ -0,0 +1,5 @@
+AUX lua-openssl-0.4.1-Makefile.patch 3494 SHA256 1754055d485e4e830b7ca6f16028b0865284f26636318b01f4f6dbb60784f490 SHA512 bc5b4c2dfd95b82bcdef0e0f5467af9249365db73b39ee416795140be95a89c0cc968507d62f9b9424f3a492429a49153bed5f7706a2a878430e6af41be38505 WHIRLPOOL 66202c18110970a2bec88852a67e083df6d4dbb89a7c238d1bde6dfe7785f0042e777a3b4e460fdffea8d1889bdf822795b697a3e70833664700bd83d1fc6ba7
+DIST lua-openssl-0.4.1.tar.gz 363525 SHA256 cce51e33b07b6450854d2e57e129b5f369b749a780d58c44719c834f198ee340 SHA512 c6deda86f77f9d6de1863611db9eb82506ea9789ec0425cb40cdb7d142d53aa633d53e1446b7eeb464636261385822d9cedc841bd35163931cc3758e7c3a308d WHIRLPOOL cbb5367bc7b716bcde731340339e7dafc3b4c5a542e1cf30e4fcf1d6c720e4f49676afe33f77860ab1da0a55b6dde434d0c312ae42c96765512494c6e8bbeb49
+EBUILD lua-openssl-0.4.1-r1.ebuild 1109 SHA256 ea45d639eb0773717cf0dfcb4ddfc74a0e25c6cddbc75848f055d9b380c29097 SHA512 501e5d001021d0cf8ace8ba668f6e7b4880a0cb932573e6444ab0dba959c5116b51e700f48cfc08d3219821878a87b61720596ca2de99a387bc3fc8c9470a5dd WHIRLPOOL 86427ae99c093d7a04b55d7a06b88f97b4fdd782c2e30e3f67515fe2a416f6ec1eaf8e5fc85c3d9a709cebac6d727df83a46323c2ceeb112ec629a5fc68da381
+MISC ChangeLog 1262 SHA256 44402462dd4d2bd2eba04d4842bc83a10867def5ba5b2c2beb0f183bab99fafe SHA512 67b2fa93be3d4088b129401c0c759c8d696c10533d00680fc826504c3c6c72547cba806db310b07df1df8109ae0f1fb52783b121b3bd800a3a3b947e271cb4d7 WHIRLPOOL acacc653ed8853770385ff0338f7c481be0a32b0989ea1fd982e4465ab7da75502c2abc8c372950f661d5ea9327dee75ec469c039033cdacfe35a3bdec029507
+MISC metadata.xml 558 SHA256 d37f45245a7645a2d52ea6aa4c42a01af4b7e4c13d2fc2ff6c0af93eb3827b2f SHA512 8dbd27a8cdf6934b54e855c9de53be207c826b1e75a9d58db129e77460519dbe1bb63bb8217a997c380458468dcac6f74b129800e1161aca5f49654dd59f975a WHIRLPOOL c5b3b406fd0cbbec01d61b2d4eb44389d95f020459590550dce7110f3a8596c8d0205d793db3260956ece1ed6937470bd40e4067a34c1126f8e27aa5f6128a3a
diff --git a/dev-lua/lua-openssl/files/lua-openssl-0.4.1-Makefile.patch b/dev-lua/lua-openssl/files/lua-openssl-0.4.1-Makefile.patch
new file mode 100644
index 000000000000..bf5374ee90cd
--- /dev/null
+++ b/dev-lua/lua-openssl/files/lua-openssl-0.4.1-Makefile.patch
@@ -0,0 +1,86 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+
+Fix Makefile to respect system CFLAGS, LDFLAGS, and CC provided by environment.
+Allow to specify pkg-config command using variable, to be friendly with
+cross-compiling etc.
+
+diff --git a/Makefile b/Makefile
+index 195ef6b..375fb65 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,9 +2,10 @@ T=openssl
+
+ PREFIX ?=/usr/local
+ LIB_OPTION ?= -shared
++PKG_CONFIG ?= pkg-config
+
+ #Lua auto detect
+-LUA_VERSION ?= $(shell pkg-config luajit --print-provides)
++LUA_VERSION ?= $(shell $(PKG_CONFIG) luajit --print-provides)
+ ifeq ($(LUA_VERSION),) ############ Not use luajit
+ LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+ LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUAV)
+@@ -12,8 +13,8 @@ LUA_LIBS ?= -L$(PREFIX)/lib
+ LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)
+ else
+ LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-LUA_CFLAGS ?= $(shell pkg-config luajit --cflags)
+-LUA_LIBS ?= $(shell pkg-config luajit --libs)
++LUA_CFLAGS ?= $(shell $(PKG_CONFIG) luajit --cflags)
++LUA_LIBS ?= $(shell $(PKG_CONFIG) luajit --libs)
+ LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)
+ endif
+
+@@ -22,30 +23,30 @@ SYS := $(shell gcc -dumpmachine)
+
+ ifneq (, $(findstring linux, $(SYS)))
+ # Do linux things
+-LDFLAGS = -fPIC -lrt -ldl
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++LDFLAGS += -fPIC -lrt -ldl
++OPENSSL_LIBS ?= $(shell $(PKG_CONFIG) openssl --libs)
++OPENSSL_CFLAGS ?= $(shell $(PKG_CONFIG) openssl --cflags)
++CFLAGS += -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+ endif
+ ifneq (, $(findstring apple, $(SYS)))
+ # Do darwin things
+-LDFLAGS = -fPIC -lrt -ldl
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++LDFLAGS += -fPIC -lrt -ldl
++OPENSSL_LIBS ?= $(shell $(PKG_CONFIG) openssl --libs)
++OPENSSL_CFLAGS ?= $(shell $(PKG_CONFIG) openssl --cflags)
++CFLAGS += -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+ endif
+ ifneq (, $(findstring mingw, $(SYS)))
+ # Do mingw things
+ V = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)")
+-LDFLAGS = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll
++LDFLAGS += -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll
+ LUA_CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/
+-CFLAGS = $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++CFLAGS += $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+ endif
+ ifneq (, $(findstring cygwin, $(SYS)))
+ # Do cygwin things
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++OPENSSL_LIBS ?= $(shell $(PKG_CONFIG) openssl --libs)
++OPENSSL_CFLAGS ?= $(shell $(PKG_CONFIG) openssl --cflags)
++CFLAGS += -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+ endif
+ #custome config
+ ifeq (.config, $(wildcard .config))
+@@ -61,7 +62,7 @@ WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnest
+ WARN = -Wall -Wno-unused-value
+ WARN_MIN =
+ CFLAGS += $(WARN_MIN) -DPTHREADS
+-CC= gcc -g $(CFLAGS) -Ideps
++CC ?= gcc -g $(CFLAGS) -Ideps
+
+
+ OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \
diff --git a/dev-lua/lua-openssl/lua-openssl-0.4.1-r1.ebuild b/dev-lua/lua-openssl/lua-openssl-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..2c0ad960fe58
--- /dev/null
+++ b/dev-lua/lua-openssl/lua-openssl-0.4.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="OpenSSL binding for Lua"
+HOMEPAGE="https://github.com/zhaozg/lua-openssl"
+SRC_URI="https://github.com/zhaozg/lua-openssl/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT openssl PHP-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl luajit"
+
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( >=dev-lang/lua-5.1:0 )
+ !libressl? ( dev-libs/openssl:0=[-bindist] )
+ libressl? ( dev-libs/libressl:0= )
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+ use luajit && LUAV=luajit || LUAV=lua
+}
+
+src_compile() {
+ local pkgconfig=$(tc-getPKG_CONFIG)
+ emake \
+ CC="$(tc-getCC) \$(CFLAGS) -Ideps" \
+ PKG_CONFIG="$pkgconfig" \
+ LUA_CFLAGS="$($pkgconfig --cflags $LUAV)" \
+ LUA_LIBS="$($pkgconfig --libs $LUAV)" \
+ LUA_LIBDIR="$($pkgconfig --variable INSTALL_CMOD $LUAV)"
+}
+
+src_install() {
+ emake \
+ LUA_LIBDIR="${D}$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $LUAV)" \
+ install
+ einstalldocs
+}
diff --git a/dev-lua/lua-openssl/metadata.xml b/dev-lua/lua-openssl/metadata.xml
new file mode 100644
index 000000000000..8d55d018568a
--- /dev/null
+++ b/dev-lua/lua-openssl/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jakub@jirutka.cz</email>
+ <name>Jakub Jirutka</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of
+ <pkg>dev-lang/lua</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">zhaozg/lua-openssl</remote-id>
+ </upstream>
+</pkgmetadata>