pkgsrc/security/seccure/patches/patch-aa
agc 003b6d32c2 rework the link stage in the Makefile to specify -lgcrypt after all the
object files, in an attempt to fix undefined references to all libgcrypt
functions in Linux bulk build
2017-05-31 23:31:13 +00:00

50 lines
1.9 KiB
Text

$NetBSD: patch-aa,v 1.3 2017/05/31 23:31:13 agc Exp $
--- Makefile.orig 2009-04-09 12:42:50.000000000 +0000
+++ Makefile
@@ -1,6 +1,9 @@
CFLAGS = -O2 -Wall # -D NOBEEP
-default: binaries # doc
+BINDIR=${DESTDIR}${PREFIX}/bin
+MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}
+
+default all build: binaries # doc
binaries: seccure-key seccure-encrypt seccure-decrypt seccure-sign \
seccure-verify seccure-signcrypt seccure-veridec seccure-dh
@@ -8,15 +11,13 @@
doc: seccure.1 seccure.1.html
install: default
- install -m0755 seccure-key $(DESTDIR)/usr/bin
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-encrypt
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-decrypt
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-sign
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-verify
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-signcrypt
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-veridec
- ln -f $(DESTDIR)/usr/bin/seccure-key $(DESTDIR)/usr/bin/seccure-dh
- install -m0644 seccure.1 $(DESTDIR)/usr/share/man/man1
+ ${BSD_INSTALL_PROGRAM} seccure-key ${BINDIR}
+ for f in encrypt decrypt sign verify signcrypt veridec dh; do \
+ rm -f ${BINDIR}/seccure-$$f; \
+ ln ${BINDIR}/seccure-key ${BINDIR}/seccure-$$f; \
+ ls -l ${BINDIR}/seccure-$$f; \
+ done
+ ${BSD_INSTALL_MAN} seccure.1 ${MANDIR}/man1
clean:
rm -f *.o *~ seccure-key seccure-encrypt seccure-decrypt seccure-sign \
@@ -28,9 +29,8 @@
seccure-key: seccure.o numtheory.o ecc.o serialize.o protocol.o curves.o aes256ctr.o
- $(CC) $(CFLAGS) -o seccure-key -lgcrypt seccure.o numtheory.o ecc.o \
- curves.o serialize.o protocol.o aes256ctr.o
- strip seccure-key
+ $(CC) $(LDFLAGS) $(CFLAGS) -o seccure-key seccure.o numtheory.o ecc.o \
+ curves.o serialize.o protocol.o aes256ctr.o -lgcrypt
seccure-encrypt: seccure-key
ln -f seccure-key seccure-encrypt