ports/184845: security/sectok: Support CC/CFLAGS properly
KATO Tsuguru
tkato432 at yahoo.com
Mon Dec 16 18:10:12 UTC 2013
>Number: 184845
>Category: ports
>Synopsis: security/sectok: Support CC/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:12 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CC/CFLAGS properly
Remove file:
files/patch-Makefile
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/security/sectok/Makefile security/sectok/Makefile
--- /usr/ports/security/sectok/Makefile 2013-11-06 22:02:41.000000000 +0900
+++ security/sectok/Makefile 2013-12-17 00:00:00.000000000 +0900
@@ -3,23 +3,35 @@
PORTNAME= sectok
PORTVERSION= 20030825
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.citi.umich.edu/projects/smartcard/
-DISTNAME= sectok-${PORTVERSION}
EXTRACT_SUFX= .tgz
MAINTAINER= ports at FreeBSD.org
COMMENT= ISO 7816 Smartcard Utility
-LIB_DEPENDS= sectok.3:${PORTSDIR}/security/libsectok
+LIB_DEPENDS= libsectok.so:${PORTSDIR}/security/libsectok
USE_OPENSSL= yes
-
USE_LDCONFIG= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-MAN1= sectok.1
-PLIST_FILES= bin/sectok
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+PLIST_FILES= bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ '/^INCLUDES=/s|$$| $${CPPFLAGS}| ; \
+ /^LIBS=/s|$$| $${LDFLAGS}| ; \
+ s|^CC=|CC?=| ; \
+ s|^CFLAGS=|CFLAGS?=|' ${WRKSRC}/Makefile
+
+do-install:
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin)
+ (cd ${WRKSRC} && ${INSTALL_MAN} ${PORTNAME}.1 \
+ ${STAGEDIR}${MANPREFIX}/man/man1)
-NO_STAGE= yes
.include <bsd.port.mk>
diff -urN /usr/ports/security/sectok/files/patch-Makefile security/sectok/files/patch-Makefile
--- /usr/ports/security/sectok/files/patch-Makefile 2013-11-06 22:02:41.000000000 +0900
+++ security/sectok/files/patch-Makefile 1970-01-01 09:00:00.000000000 +0900
@@ -1,41 +0,0 @@
---- Makefile.orig Thu Jan 3 21:16:01 2002
-+++ Makefile Mon Sep 29 01:00:21 2003
-@@ -1,13 +1,19 @@
- # Standard installation:
--INCLUDES=
--LIBS= -lsectok -lcrypto
-+#INCLUDES=
-+#LIBS= -lsectok -lcrypto
-+
-+# FreeBSD
-+#PREFIX?= ${PREFIX}
-+#LOCALBASE?= ${LOCALBASE}
-+INCLUDES= -I$(LOCALBASE)/include
-+LIBS= -L$(LOCALBASE)/lib -lsectok -lcrypto
-
- # For building locally (libsectok not installed)
- #INCLUDES= -I../libsectok
- #LIBS= ../libsectok/libsectok.a -lcrypto
-
- # If crypto is included with openssl you might need this
--#INCLUDES= -I/usr/include/openssl
-+INCLUDES+= -I${OPENSSLINC}
-
- # You shouldn't have to change anything below this line
-
-@@ -17,7 +23,6 @@
- CC= gcc
- CFLAGS= -g -Wall
- INSTALL= install
--PREFIX= /usr/local
- RELEASE= sectok-`date "+%Y%m%d"`
-
- all : $(TARGETS)
-@@ -30,6 +35,7 @@
-
- install :
- $(INSTALL) $(TARGETS) $(PREFIX)/bin
-+ $(INSTALL) sectok.1 $(PREFIX)/man/man1
-
- release :
- rm -rf $(RELEASE)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list