ports/55005: [PATCH]fix patch error in ports/chinese/telnet
Kang Liu
lazykang at hotmail.com
Tue Jul 29 08:40:11 UTC 2003
>Number: 55005
>Category: ports
>Synopsis: fix patch error in ports/chinese/telnet
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 29 01:40:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Kang Liu
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
Beijing University of Technology
>Environment:
System: FreeBSD testipfw.bjpu.edu.cn 5.1-CURRENT FreeBSD 5.1-CURRENT #5: Mon
Jul 28 12:27:31 CST 2003 root at testipfw.bjpu.edu.cn:/usr/obj/usr/src/sys/IPFW
i386
>Description:
ports/chinese/telnet is marked as broken(Fails to patch) now.
It is because the path of telnet's sourcecode is different in 5.1-current
and 4.x-stable
The old ports is made for 4.x-stable, so it can not be compiled on
5.1-current.
>How-To-Repeat:
just run make in ports/chinese/telnet
>Fix:
I've test this patch on both 5.1-current and 4.8-stable
--- Makefile.orig Tue Jul 29 16:15:37 2003
+++ Makefile Tue Jul 29 16:15:40 2003
@@ -7,6 +7,7 @@
PORTNAME= telnet
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= chinese
MASTER_SITES= # none
DISTFILES= # none
@@ -14,31 +15,54 @@
MAINTAINER= leeym at FreeBSD.org
COMMENT= 8bit compatible telnet client for Chinese input
-BROKEN= "Fails to patch"
-
-SRCDIR= /usr/src/usr.bin/telnet
+SRCDIR= /usr/src/contrib/telnet/telnet
USE_REINPLACE= yes
MAN1= zh-telnet.1
+.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 500000
+SRCDIR=/usr/src/usr.bin/telnet
+.endif
+
do-extract:
.if exists (${SRCDIR})
@${MKDIR} ${WRKDIR}
@${CP} -R ${SRCDIR} ${WRKSRC}
+.if ${OSVERSION} < 500000
@${MKDIR} ${WRKSRC}/lib
- @${CP} -R /usr/src/lib/libtelnet ${WRKSRC}/lib
+ @${CP} -R ${SRCDIR}/../../lib/libtelnet ${WRKSRC}/lib
+.else
+ @${CP} -R ${SRCDIR}/../libtelnet ${WRKSRC}
+ @${CP} ${SRCDIR}/../arpa/telnet.h ${WRKSRC}/libtelnet
+ @${CP} -R ${SRCDIR}/../../../usr.bin/telnet/Makefile ${WRKSRC}
+ @${CP} -R ${SRCDIR}/../../../lib/libtelnet/Makefile ${WRKSRC}/libtelnet
+.endif
.else
IGNORE= "You need to build this port with ${SRCDIR}"
.endif
pre-patch:
+.if ${OSVERSION} < 500000
@${REINPLACE_CMD} -e 's,/../..,,g' ${WRKSRC}/Makefile
+.else
+ @${REINPLACE_CMD} -e 's,/../../contrib/telnet,,g'
${WRKSRC}/libtelnet/Makefile
+ @${REINPLACE_CMD} -e 's,../../lib/,,g' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's,/../../contrib/telnet,,g' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's,${TELNETDIR}/telnet,${TELNETDIR},g'
${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's,/arpa,,g' ${WRKSRC}/libtelnet/Makefile
+.endif
+
pre-build:
+.if ${OSVERSION} < 500000
@cd ${WRKSRC}/lib/libtelnet && ${MAKE}
+.else
+ @cd ${WRKSRC}/libtelnet && ${MAKE}
+.endif
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/telnet ${PREFIX}/bin/zh-telnet
@${INSTALL_MAN} ${WRKSRC}/telnet.1 ${PREFIX}/man/man1/${MAN1}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list