1 |
commit: cd56b669fdc4cabf72261ca5764d52871f515cb1 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 1 20:26:38 2017 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 1 20:31:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd56b669 |
7 |
|
8 |
app-crypt/libscrypt: version bump |
9 |
|
10 |
Bug: 623274 |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
13 |
|
14 |
app-crypt/libscrypt/Manifest | 1 + |
15 |
.../libscrypt/files/libscrypt-1.21-build.patch | 76 ++++++++++++++++++++++ |
16 |
app-crypt/libscrypt/libscrypt-1.21.ebuild | 36 ++++++++++ |
17 |
3 files changed, 113 insertions(+) |
18 |
|
19 |
diff --git a/app-crypt/libscrypt/Manifest b/app-crypt/libscrypt/Manifest |
20 |
index d1841cd9bb3..5a1906ee98c 100644 |
21 |
--- a/app-crypt/libscrypt/Manifest |
22 |
+++ b/app-crypt/libscrypt/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST libscrypt-1.20.tar.gz 18451 SHA256 6074add2170b7d00e080fe3a58d3dec76850a4f272d488f5e8cc3c4acb6d8e21 SHA512 c7db096c740681c328d4c156372147331c0441906c1f17656a8ddd8345348091295749c4e3105bf26106f826327acac9bda97efec4ce50ac56d64f903c59e9af WHIRLPOOL 5d854936f955fbc08ec7d31e89396d3198ea58cac326ea8ceaedcc360e412cefc9e75b49a959870924cabe79ccf14453209cf450ff0256873c1de744f65706ac |
25 |
+DIST libscrypt-1.21.tar.gz 19425 SHA256 68e377e79745c10d489b759b970e52d819dbb80dd8ca61f8c975185df3f457d3 SHA512 0f894bc2f47016cdd043ea692a4e4b08891b1a961443265230d5ccb76820d40e50b0d4d63588c44c985cd24e214f07b126d30989d3ce4cd79366f3b8f16c4d34 WHIRLPOOL 7fda5f5118c981d595f9f624ae40674c29fba6ee529ec8f4861b88d9bf11321b7a1285fabd1218356b59e889ddb96c4018513441fb4cebd302639085fcc097d0 |
26 |
|
27 |
diff --git a/app-crypt/libscrypt/files/libscrypt-1.21-build.patch b/app-crypt/libscrypt/files/libscrypt-1.21-build.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..236e80730d5 |
30 |
--- /dev/null |
31 |
+++ b/app-crypt/libscrypt/files/libscrypt-1.21-build.patch |
32 |
@@ -0,0 +1,76 @@ |
33 |
+From bdfec26744122e8f52a58bc086c89b27faaf5888 Mon Sep 17 00:00:00 2001 |
34 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
35 |
+Date: Sat, 1 Jul 2017 23:06:41 +0300 |
36 |
+Subject: [PATCH 1/2] build: move non-essential flags to *_EXTRA |
37 |
+ |
38 |
+This enables downstream to selectively add/replace the optimization and |
39 |
+other non-essential flags. |
40 |
+ |
41 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
42 |
+--- |
43 |
+ Makefile | 11 ++++++----- |
44 |
+ 1 file changed, 6 insertions(+), 5 deletions(-) |
45 |
+ |
46 |
+diff --git a/Makefile b/Makefile |
47 |
+index 7022a4a..c9313cb 100644 |
48 |
+--- a/Makefile |
49 |
++++ b/Makefile |
50 |
+@@ -5,21 +5,22 @@ MAKE_DIR ?= install -d |
51 |
+ INSTALL_DATA ?= install |
52 |
+ |
53 |
+ CC?=gcc |
54 |
+-CFLAGS?=-O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC |
55 |
+-LDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version |
56 |
+-CFLAGS_EXTRA?=-Wl,-rpath=. |
57 |
++CFLAGS?=$(CFLAGS_EXTRA) -D_FORTIFY_SOURCE=2 -fPIC |
58 |
++LDFLAGS?=$(LDFLAGS_EXTRA) -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version |
59 |
++CFLAGS_EXTRA?=-Wl,-rpath=. -O2 -Wall -g -fstack-protector |
60 |
++LDFLAGS_EXTRA?=-Wl,-z,relro |
61 |
+ |
62 |
+ all: reference |
63 |
+ |
64 |
+ OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o |
65 |
+ |
66 |
+ libscrypt.so.0: $(OBJS) |
67 |
+- $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc |
68 |
++ $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc |
69 |
+ ar rcs libscrypt.a $(OBJS) |
70 |
+ |
71 |
+ reference: libscrypt.so.0 main.o crypto_scrypt-hexconvert.o |
72 |
+ ln -s -f libscrypt.so.0 libscrypt.so |
73 |
+- $(CC) -Wall -o reference main.o b64.o crypto_scrypt-hexconvert.o $(CFLAGS_EXTRA) -L. -lscrypt |
74 |
++ $(CC) -o reference main.o b64.o crypto_scrypt-hexconvert.o $(CFLAGS) $(LDFLAGS_EXTRA) -L. -lscrypt |
75 |
+ |
76 |
+ clean: |
77 |
+ rm -f *.o reference libscrypt.so* libscrypt.a endian.h |
78 |
+-- |
79 |
+2.13.0 |
80 |
+ |
81 |
+From 7899df0447e0fcad32a6cce7439eef1f1295aaeb Mon Sep 17 00:00:00 2001 |
82 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
83 |
+Date: Sat, 1 Jul 2017 23:14:29 +0300 |
84 |
+Subject: [PATCH 2/2] build: run tests with local library |
85 |
+ |
86 |
+Ensure tests can run and when run are run with current library. |
87 |
+ |
88 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
89 |
+--- |
90 |
+ Makefile | 2 +- |
91 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
92 |
+ |
93 |
+diff --git a/Makefile b/Makefile |
94 |
+index c9313cb..783c537 100644 |
95 |
+--- a/Makefile |
96 |
++++ b/Makefile |
97 |
+@@ -26,7 +26,7 @@ clean: |
98 |
+ rm -f *.o reference libscrypt.so* libscrypt.a endian.h |
99 |
+ |
100 |
+ check: all |
101 |
+- ./reference |
102 |
++ LD_LIBRARY_PATH=. ./reference |
103 |
+ |
104 |
+ devtest: |
105 |
+ splint crypto_scrypt-hexconvert.c |
106 |
+-- |
107 |
+2.13.0 |
108 |
+ |
109 |
|
110 |
diff --git a/app-crypt/libscrypt/libscrypt-1.21.ebuild b/app-crypt/libscrypt/libscrypt-1.21.ebuild |
111 |
new file mode 100644 |
112 |
index 00000000000..416adce6238 |
113 |
--- /dev/null |
114 |
+++ b/app-crypt/libscrypt/libscrypt-1.21.ebuild |
115 |
@@ -0,0 +1,36 @@ |
116 |
+# Copyright 1999-2017 Gentoo Foundation |
117 |
+# Distributed under the terms of the GNU General Public License v2 |
118 |
+ |
119 |
+EAPI=6 |
120 |
+ |
121 |
+inherit toolchain-funcs |
122 |
+ |
123 |
+DESCRIPTION="Shared library to impliment the scrypt algorithm" |
124 |
+HOMEPAGE="https://github.com/technion/libscrypt" |
125 |
+SRC_URI="https://github.com/technion/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
126 |
+ |
127 |
+LICENSE="BSD-2" |
128 |
+SLOT="0" |
129 |
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" |
130 |
+IUSE="" |
131 |
+ |
132 |
+DEPEND="" |
133 |
+RDEPEND="${DEPEND}" |
134 |
+ |
135 |
+PATCHES=( |
136 |
+ "${FILESDIR}/${P}-build.patch" |
137 |
+) |
138 |
+ |
139 |
+pkg_setup() { |
140 |
+ export LIBDIR=${PREFIX}/$(get_libdir) |
141 |
+ export CFLAGS_EXTRA="${CFLAGS}" |
142 |
+ export LDFLAGS_EXTRA="${LDFLAGS}" |
143 |
+ export PREFIX=/usr |
144 |
+ unset CFLAGS |
145 |
+ unset LDFLAGS |
146 |
+} |
147 |
+ |
148 |
+src_compile() { |
149 |
+ emake \ |
150 |
+ CC=$(tc-getCC) |
151 |
+} |