Annotation of /trunk/core/argon2/argon2-20190702-r1.smage2
Parent Directory | Revision Log
Revision 32929 -
(hide annotations)
(download)
Mon Oct 7 06:43:35 2019 UTC (4 years, 7 months ago) by niro
File size: 1617 byte(s)
Mon Oct 7 06:43:35 2019 UTC (4 years, 7 months ago) by niro
File size: 1617 byte(s)
-suppress errors if symlinks already exists
1 | niro | 32927 | # $Id$ |
2 | |||
3 | PNAME="argon2" | ||
4 | PVER="20190702" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="app-crypt" | ||
8 | |||
9 | DESCRIPTION="A password-hashing function." | ||
10 | HOMEPAGE="https://github.com/P-H-C/phc-winner-argon2" | ||
11 | |||
12 | DEPEND=">= virtual/glibc" | ||
13 | |||
14 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
15 | SRCDIR="${BUILDDIR}/phc-winner-argon2-${PVER}" | ||
16 | |||
17 | msetfeature "!check" # makefile provide no check function | ||
18 | sminclude multilib mbuild | ||
19 | |||
20 | SRC_URI=( | ||
21 | https://github.com/P-H-C/phc-winner-argon2/archive/${PVER}/${SRCFILE} | ||
22 | mirror://${PNAME}/${SRCFILE} | ||
23 | ) | ||
24 | |||
25 | UP2SEPERATOR="\/" | ||
26 | UP2DATE="updatecmd https://github.com/P-H-C/phc-winner-argon2/releases | highesttarball gz" | ||
27 | |||
28 | src_prepare() | ||
29 | { | ||
30 | munpack ${SRCFILE} || die | ||
31 | |||
32 | # fix libdir | ||
33 | all-abis 'sed -i "s:^\(LIBRARY_REL =\).*:\1 $(mlibdir):"' ${SRCDIR}-$(mabi)/Makefile || die | ||
34 | niro | 32928 | |
35 | niro | 32929 | # suppress errors if symlinks already exists |
36 | niro | 32928 | all-abis 'sed -i "s:ln -s:ln -snf:g"' ${SRCDIR}-$(mabi)/Makefile || die |
37 | niro | 32927 | } |
38 | |||
39 | src_compile() | ||
40 | { | ||
41 | mmake OPTTARGET=none || die | ||
42 | } | ||
43 | |||
44 | src_install() | ||
45 | { | ||
46 | mmake OPTTARGET=none DESTDIR=${BINDIR} install || die | ||
47 | |||
48 | # create and install a custon pkgconfig file | ||
49 | cat > ${BUILDDIR}/libargon2.pc << 'EOF' | ||
50 | prefix=/usr | ||
51 | exec_prefix=${prefix} | ||
52 | libdir=${prefix}/@@MLIBDIR@@ | ||
53 | includedir=${prefix}/include | ||
54 | |||
55 | Name: libargon2 | ||
56 | Description: Development libraries for libargon2 | ||
57 | Version: @@PVER@@ | ||
58 | Libs: -L${libdir} -largon2 -lrt -ldl | ||
59 | Cflags: | ||
60 | URL: https://github.com/P-H-C/phc-winner-argon2 | ||
61 | EOF | ||
62 | |||
63 | all-abis minstalldir /usr/'$(mlibdir)'/pkgconfig || die | ||
64 | all-abis minstallfile ${BUILDDIR}/libargon2.pc /usr/'$(mlibdir)'/pkgconfig/ || die | ||
65 | all-abis sed -i -e 's:@@MLIBDIR@@:$(mlibdir):g' -e "s:@@PVER@@:${PVER}:g" ${BINDIR}/usr/'$(mlibdir)'/pkgconfig/libargon2.pc || die | ||
66 | } |