aboutsummaryrefslogtreecommitdiff
path: root/chinese/telnet
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2003-07-30 10:15:15 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2003-07-30 10:15:15 +0000
commit2b575f2e626f9af66ec3ef3a18d4900e898557f8 (patch)
tree009457c02d3d30a4b946517c641593187ebca34f /chinese/telnet
parentc08de746349dc18a7128bb26bfaf7716e56e4e20 (diff)
downloadports-2b575f2e626f9af66ec3ef3a18d4900e898557f8.tar.gz
ports-2b575f2e626f9af66ec3ef3a18d4900e898557f8.zip
Notes
Diffstat (limited to 'chinese/telnet')
-rw-r--r--chinese/telnet/Makefile32
1 files changed, 23 insertions, 9 deletions
diff --git a/chinese/telnet/Makefile b/chinese/telnet/Makefile
index 2c8c9b32ec29..8be755432892 100644
--- a/chinese/telnet/Makefile
+++ b/chinese/telnet/Makefile
@@ -7,6 +7,7 @@
PORTNAME= telnet
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= chinese
MASTER_SITES= # none
DISTFILES= # none
@@ -14,28 +15,41 @@ DISTFILES= # none
MAINTAINER= leeym@FreeBSD.org
COMMENT= 8bit compatible telnet client for Chinese input
-BROKEN= "Fails to patch"
-
-SRCDIR= /usr/src/usr.bin/telnet
USE_REINPLACE= yes
MAN1= zh-telnet.1
+.if exists (/usr/src/contrib/telnet/telnet)
+SRCDIR= /usr/src/contrib/telnet/telnet
+CONTRIB_TELNET= yes
+.elif exists (/usr/src/usr.bin/telnet)
+SRCDIR= /usr/src/usr.bin/telnet
+.else
+IGNORE= "You need to build this port with the source code of telnet"
+.endif
+
do-extract:
-.if exists (${SRCDIR})
@${MKDIR} ${WRKDIR}
@${CP} -R ${SRCDIR} ${WRKSRC}
- @${MKDIR} ${WRKSRC}/lib
- @${CP} -R /usr/src/lib/libtelnet ${WRKSRC}/lib
+.if defined(CONTRIB_TELNET)
+ @echo CONTRIB_TELNET
+ @${CP} -R ${SRCDIR}/../libtelnet ${SRCDIR}/../../../usr.bin/telnet/Makefile ${WRKSRC}
+ @${CP} ${SRCDIR}/../arpa/telnet.h ${SRCDIR}/../../../lib/libtelnet/Makefile ${WRKSRC}/libtelnet
.else
-IGNORE= "You need to build this port with ${SRCDIR}"
+ @${CP} -R ${SRCDIR}/../../lib/libtelnet ${WRKSRC}
.endif
pre-patch:
- @${REINPLACE_CMD} -e 's,/../..,,g' ${WRKSRC}/Makefile
+.if defined(CONTRIB_TELNET)
+ @echo CONTRIB_TELNET
+ @${REINPLACE_CMD} -e 's,/../../contrib/telnet,,g' ${WRKSRC}/Makefile ${WRKSRC}/libtelnet/Makefile
+ @${REINPLACE_CMD} -e 's,${TELNETDIR}/telnet,${TELNETDIR},g' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's,/arpa,,g' ${WRKSRC}/libtelnet/Makefile
+.endif
+ @${REINPLACE_CMD} -e 's,/../../lib,,g' ${WRKSRC}/Makefile
pre-build:
- @cd ${WRKSRC}/lib/libtelnet && ${MAKE}
+ @cd ${WRKSRC}/libtelnet && ${MAKE}
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/telnet ${PREFIX}/bin/zh-telnet