aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2010-01-20 13:34:22 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2010-01-20 13:34:22 +0000
commitc50f2342246e9f1f86e3f00508148db2deedafe2 (patch)
treee54c57666be2ce9b4d7b31e23a5f9aa861eb60d4 /comms
parenta70278f93c57b615f5ef7f65e285b37610198e5f (diff)
downloadports-c50f2342246e9f1f86e3f00508148db2deedafe2.tar.gz
ports-c50f2342246e9f1f86e3f00508148db2deedafe2.zip
- Catch up with recent <utmp.h> replacement by <utmpx.h>
- Provide correct FreeBSD version; default #ifdef-based routine is not robust enough to handle all cases correctly - Expand another comment while here
Notes
Notes: svn path=/head/; revision=248212
Diffstat (limited to 'comms')
-rw-r--r--comms/kermit/Makefile21
1 files changed, 17 insertions, 4 deletions
diff --git a/comms/kermit/Makefile b/comms/kermit/Makefile
index 8bd40d14161c..cb653acf998d 100644
--- a/comms/kermit/Makefile
+++ b/comms/kermit/Makefile
@@ -26,8 +26,8 @@ PORTEXAMPLES= *
MAN1= kermit.1
MAKE_ARGS= KTARGET=freebsd CC="${CC}" CC2="${CC}" \
- CFLAGS="${CFLAGS} -I${OPENSSLINC} \
- -DBSD44 -DCK_NCURSES -DCK_NEWTERM \
+ CFLAGS="${CFLAGS} -I${OPENSSLINC} -DBSD44 \
+ -DCK_NCURSES -DCK_NEWTERM -DHERALD=\"\\\" ${HERALD}\\\"\" \
-DTCPSOCKET -DNOCOTFMC -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT \
-funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR -DCKHTTP \
-DCK_SSL -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_DES \
@@ -35,12 +35,25 @@ MAKE_ARGS= KTARGET=freebsd CC="${CC}" CC2="${CC}" \
LIBS="-L${OPENSSLLIB} \
-lssl -lcrypto -lncurses -lcrypt -lutil -lm"
+.include <bsd.port.pre.mk>
+
+# Derive correct version of our beloved OS; default routine is not robust
+# enough to handle all cases correctly.
+HERALD!= ${UNAME} -sr | ${CUT} -d - -f 1
+
post-patch:
-# FreeBSD has hexdump(3) in libutil, which conflicts with local macro
+# FreeBSD has hexdump(3) in libutil, which conflicts with local macro.
+# Prepend the latter with two underscores to avoid the clash.
@${REINPLACE_CMD} -E 's,([[:blank:]])(hexdump),\1__\2,' \
${WRKSRC}/ck_crp.c ${WRKSRC}/ckcdeb.h ${WRKSRC}/ckcftp.c \
${WRKSRC}/ckcnet.c ${WRKSRC}/ckctel.c ${WRKSRC}/ckuath.c \
${WRKSRC}/ckutio.c
+# Catch up with recent <utmp.h> replacement by <utmpx.h>
+.if ${OSVERSION} > 900006
+ @${REINPLACE_CMD} -e 's,ut\.ut_name,ut.ut_user,g' \
+ -e 's,sizeof(struct utmp),sizeof(ut),' \
+ -e 's,UNIXWARE,FREEBSD4,' ${WRKSRC}/ckufio.c
+.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/krbmit ${PREFIX}/bin/kermit
@@ -59,4 +72,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/ckermod.ini ${EXAMPLESDIR}/dot.mykermrc
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>