From b83dbf1d1d800b566000336bed6f7e8448f423c2 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Wed, 25 Dec 2013 11:34:50 +0000 Subject: [PATCH] - Respect CFLAGS - Support staging PR: ports/184840 Submitted by: KATO Tsuguru --- security/libsectok/Makefile | 37 +++++++++++++++---------- security/libsectok/files/patch-Makefile | 16 ----------- 2 files changed, 23 insertions(+), 30 deletions(-) delete mode 100644 security/libsectok/files/patch-Makefile diff --git a/security/libsectok/Makefile b/security/libsectok/Makefile index 39bded03dbc9..6dfabb1fee76 100644 --- a/security/libsectok/Makefile +++ b/security/libsectok/Makefile @@ -6,27 +6,36 @@ PORTVERSION= 20030619 PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.citi.umich.edu/projects/smartcard/ -DISTNAME= libsectok-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= ISO 7816 Smartcard API Library +USE_OPENSSL= yes USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -USE_OPENSSL= YES -MAKE_ARGS= CC=${CC} -MAN3= sectok.3 +PLIST_FILES= include/sectok.h lib/libsectok.a lib/libsectok.so \ + lib/libsectok.so.3 man/man3/sectok.3.gz + +post-patch: + @${REINPLACE_CMD} -e \ + '/^VERSION/s|3.1|3| ; \ + s|^CFLAGS=|CFLAGS+=| ; \ + s|-g |$${CPPFLAGS} | ; \ + s|^LDFLAGS=|LDFLAGS+=| ; \ + s|-x .* -shared|-shared| ; \ + s|^CC=|CC?=| ; \ + /^LD/s|ld|$$(CC)| ; \ + s|-fpic|-fPIC|' ${WRKSRC}/Makefile -NO_STAGE= yes do-install: - ${INSTALL_DATA} ${WRKSRC}/sectok.h ${PREFIX}/include - ${INSTALL_DATA} ${WRKSRC}/libsectok.a ${PREFIX}/lib - ${INSTALL_PROGRAM} ${WRKSRC}/libsectok.so.3 ${PREFIX}/lib - ${LN} -s ${PREFIX}/lib/libsectok.so.3 ${PREFIX}/lib/libsectok.so - ${INSTALL_MAN} ${WRKSRC}/sectok.3 ${PREFIX}/man/man3 - -PLIST_FILES= include/sectok.h lib/libsectok.a \ - lib/libsectok.so lib/libsectok.so.3 + (cd ${WRKSRC} && ${INSTALL_DATA} sectok.h \ + ${STAGEDIR}${PREFIX}/include) + (cd ${WRKSRC} && ${INSTALL_DATA} libsectok.a \ + ${STAGEDIR}${PREFIX}/lib) + (cd ${WRKSRC} && ${INSTALL_LIB} libsectok.so.3 \ + ${STAGEDIR}${PREFIX}/lib) + ${LN} -s libsectok.so.3 ${STAGEDIR}${PREFIX}/lib/libsectok.so + (cd ${WRKSRC} && ${INSTALL_MAN} sectok.3 \ + ${STAGEDIR}${MANPREFIX}/man/man3) .include diff --git a/security/libsectok/files/patch-Makefile b/security/libsectok/files/patch-Makefile deleted file mode 100644 index 2ebf51522a2c..000000000000 --- a/security/libsectok/files/patch-Makefile +++ /dev/null @@ -1,16 +0,0 @@ ---- Makefile.orig Thu Jun 19 22:02:19 2003 -+++ Makefile Fri Jan 14 12:58:03 2005 -@@ -1,10 +1,10 @@ --VERSION= 3.1 -+VERSION= 3 - TARGETS= libsectok.a libsectok.so.$(VERSION) --PREFIX= /usr/local -+PREFIX?= /usr/local - - # You might have to add -I/usr/include/openssl to CFLAGS - CFLAGS= -g -Wall -DDL_READERS --LDFLAGS= -x -Bshareable -Bforcearchive -shared -+LDFLAGS= -shared -x --whole-archive - - # You may have to add getopt.c to SRC if your getopt doesn't have optreset - SRC= atr.c cmdtab.c cyberflex.c ifdwrapper.c input.c r1r2.c \