ports/184840: security/libsectok: Support CFLAGS properly

KATO Tsuguru tkato432 at yahoo.com
Mon Dec 16 18:10:10 UTC 2013


>Number:         184840
>Category:       ports
>Synopsis:       security/libsectok: Support CFLAGS properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:10 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CFLAGS properly

Remove file:
files/patch-Makefile

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/security/libsectok/Makefile security/libsectok/Makefile
--- /usr/ports/security/libsectok/Makefile	2013-11-06 22:02:39.000000000 +0900
+++ security/libsectok/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -3,30 +3,39 @@
 
 PORTNAME=	libsectok
 PORTVERSION=	20030619
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	http://www.citi.umich.edu/projects/smartcard/
-DISTNAME=	libsectok-${PORTVERSION}
 
 MAINTAINER=	ports at 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 -urN /usr/ports/security/libsectok/files/patch-Makefile security/libsectok/files/patch-Makefile
--- /usr/ports/security/libsectok/files/patch-Makefile	2013-11-06 22:02:39.000000000 +0900
+++ security/libsectok/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -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 \
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list