summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2012-04-14 19:46:01 +0200
committerhasufell <julian.ospald@googlemail.com>2012-04-14 19:46:01 +0200
commit2aca2914cf055f92c606b0db2c84460fae1243d2 (patch)
treeda20494e771c2c16a68b31b8489e3a0cb91f8221
parentnet-libs/http-parser: version bump (diff)
downloadsunrise-2aca2914cf055f92c606b0db2c84460fae1243d2.tar.gz
sunrise-2aca2914cf055f92c606b0db2c84460fae1243d2.tar.bz2
sunrise-2aca2914cf055f92c606b0db2c84460fae1243d2.zip
dev-lua/luacrypto: New Ebuild for bug 412015
-rw-r--r--dev-lua/luacrypto/ChangeLog11
-rw-r--r--dev-lua/luacrypto/Manifest5
-rw-r--r--dev-lua/luacrypto/files/20120413-makefile.patch71
-rw-r--r--dev-lua/luacrypto/luacrypto-0.3.0_p20120413.ebuild47
-rw-r--r--dev-lua/luacrypto/metadata.xml7
5 files changed, 141 insertions, 0 deletions
diff --git a/dev-lua/luacrypto/ChangeLog b/dev-lua/luacrypto/ChangeLog
new file mode 100644
index 000000000..36f65e47a
--- /dev/null
+++ b/dev-lua/luacrypto/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for dev-lua/luacrypto
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*luacrypto-0.3.0_p20120413 (14 Apr 2012)
+
+ 14 Apr 2012; hasufell <julian.ospald@googlemail.com>
+ +files/20120413-makefile.patch, +luacrypto-0.3.0_p20120413.ebuild,
+ +metadata.xml:
+ New Ebuild for bug 412015
+
diff --git a/dev-lua/luacrypto/Manifest b/dev-lua/luacrypto/Manifest
new file mode 100644
index 000000000..54204255a
--- /dev/null
+++ b/dev-lua/luacrypto/Manifest
@@ -0,0 +1,5 @@
+AUX 20120413-makefile.patch 2141 RMD160 b01dc2bf6029f696bdfcd1710f88d8c448d27757 SHA1 73c34ed8b30ce418bcf2e09056e2a25de8d67aca SHA256 001aa9a04719ce33392e574677ed794286eac2a6bd084ac185d83317b53bc98b
+DIST luacrypto-0.3.0_p20120413.tar.gz 50913 RMD160 f41ad6f1aa28f4295f3498f23de9a0d51223a38a SHA1 bca2c485bd39cb20d14f28fd17f1aedda7df6b82 SHA256 3a44978a437290497118de752d144155b98c223b53af726f45f4180778e89235
+EBUILD luacrypto-0.3.0_p20120413.ebuild 838 RMD160 becbdaed8e25b7bc3097baf15e594b006db2812d SHA1 aeb68bd8d6b0eeed414f975e7465610ff20ce243 SHA256 4ef9e1c9a20d354f209455871f960bcf150e1a4347dbc15172ebd49500e16c44
+MISC ChangeLog 330 RMD160 26d32ed1571a2261a93fa3da5914dd8400539653 SHA1 1102cfc93ec15c6e11e2ad17e5bf0136ed0de5c6 SHA256 4f7ca4349300d68f8acb41c39362f71fa64c01e0b0da831240caa847c7f2dc92
+MISC metadata.xml 214 RMD160 efd8175069efb91061298ff4584218b633e44678 SHA1 d372fdbfcb7fd07a4082961d3f3527be4fca1d60 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154
diff --git a/dev-lua/luacrypto/files/20120413-makefile.patch b/dev-lua/luacrypto/files/20120413-makefile.patch
new file mode 100644
index 000000000..b085bc669
--- /dev/null
+++ b/dev-lua/luacrypto/files/20120413-makefile.patch
@@ -0,0 +1,71 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Fri Apr 13 19:03:38 UTC 2012
+Subject: build system
+
+--- config
++++ config
+@@ -1,22 +1,17 @@
+-# Installation directories
+-# System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR= /usr/lib/lua/5.1
+-# Lua includes directory
+-LUA_INC= /usr/include/lua5.1
+-
+-# OS dependent
+-LIB_OPTION= -shared #for Linux
+-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
+-
+ # Lua version number (first and second digits of target version)
+ LUA_VERSION_NUM= 514
+-LIBNAME= $T.so
++LIBNAME = liblua$T.so
++
++# Lua flags
++LUA_CPPFLAGS = $(shell pkg-config --cflags lua)
+
+-OPENSSL_LIBS= -lcrypto -lssl
+-OPENSSL_INCS= -I/usr/include/openssl
++# Openssl flags
++OPENSSL_LIBS = $(shell pkg-config --libs openssl)
++OPENSSL_CPPFLAGS = $(shell pkg-config --cflags openssl)
+
+ # Compilation directives
+-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
+-INCS= -I$(LUA_INC)
+-CFLAGS= -shared $(WARN) $(OPENSSL_INCS) $(INCS)
+-CC= gcc
++CC ?= gcc
++CFLAGS += -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
++CPPFLAGS += $(OPENSSL_CPPFLAGS) $(LUA_CPPFLAGS)
++LDFLAGS += -shared -Wl,-soname,${LIBNAME}
++LIBS += $(OPENSSL_LIBS)
+--- Makefile
++++ Makefile
+@@ -4,6 +4,10 @@
+
+ include $(CONFIG)
+
++PREFIX ?= /usr/local
++LIBDIR ?= lib
++LUAINCDIR = $(shell pkg-config --variable=includedir lua)
++
+ OBJS= src/l$T.o
+ SRCS= src/l$T.h src/l$T.c
+ TESTS=tests/*.lua
+@@ -11,11 +15,13 @@
+ lib: src/$(LIBNAME)
+
+ src/$(LIBNAME): $(OBJS)
+- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) $(OPENSSL_LIBS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o src/$(LIBNAME) $(OBJS) $(LIBS)
+
+ install: src/$(LIBNAME)
+- mkdir -p $(LUA_LIBDIR)
+- cp src/$(LIBNAME) $(LUA_LIBDIR)
++ install -d ${DESTDIR}${LUAINCDIR}
++ install -m644 src/lcrypto.h ${DESTDIR}${LUAINCDIR}/lcrypto.h
++ install -d ${DESTDIR}${PREFIX}/${LIBDIR}
++ install -m755 src/$(LIBNAME) ${DESTDIR}${PREFIX}/${LIBDIR}/$(LIBNAME)
+
+ clean:
+ rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O)
diff --git a/dev-lua/luacrypto/luacrypto-0.3.0_p20120413.ebuild b/dev-lua/luacrypto/luacrypto-0.3.0_p20120413.ebuild
new file mode 100644
index 000000000..331428e13
--- /dev/null
+++ b/dev-lua/luacrypto/luacrypto-0.3.0_p20120413.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Lua Crypto Library"
+HOMEPAGE="https://github.com/LuaDist/luacrypto"
+SRC_URI="https://github.com/downloads/hasufell/tinkerbox/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-lang/lua-5.1
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/20120413-makefile.patch
+}
+
+src_install() {
+ if use doc; then
+ dodoc README
+ dohtml -r doc/*
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="/usr" \
+ LIBDIR=$(get_libdir) \
+ install
+}
+
+pkg_postinst() {
+ elog "Note that upstream names the library \"crypto.so\"."
+ elog "and not \"libluacrypto.so\"."
+}
diff --git a/dev-lua/luacrypto/metadata.xml b/dev-lua/luacrypto/metadata.xml
new file mode 100644
index 000000000..cc3fe2494
--- /dev/null
+++ b/dev-lua/luacrypto/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-wanted@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>