aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2013-12-25 19:34:50 +0800
committerpawel <pawel@FreeBSD.org>2013-12-25 19:34:50 +0800
commit64604cf3f7e8185cce1e4f3536be68871f4af2f1 (patch)
treec0e33247797680ab2563de2a38644b784eef0824 /security
parent254ba5fee41f82e26c3fdbee9527fd0588a4e381 (diff)
downloadfreebsd-ports-gnome-64604cf3f7e8185cce1e4f3536be68871f4af2f1.tar.gz
freebsd-ports-gnome-64604cf3f7e8185cce1e4f3536be68871f4af2f1.tar.zst
freebsd-ports-gnome-64604cf3f7e8185cce1e4f3536be68871f4af2f1.zip
- Respect CFLAGS
- Support staging PR: ports/184840 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'security')
-rw-r--r--security/libsectok/Makefile37
-rw-r--r--security/libsectok/files/patch-Makefile16
2 files changed, 23 insertions, 30 deletions
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
-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
+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
-PLIST_FILES= include/sectok.h lib/libsectok.a \
- lib/libsectok.so lib/libsectok.so.3
+do-install:
+ (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 <bsd.port.mk>
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 \