Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Sep 1998 23:37:28 -0700
From:      Studded <Studded@dal.net>
To:        Satoshi Asami <asami@FreeBSD.ORG>
Cc:        The fine people at <FreeBSD-Ports@FreeBSD.ORG>
Subject:   Re: cvs commit: ports/net/sirc
Message-ID:  <35FF5CA8.322A8AB1@dal.net>
References:  <199809152132.OAA00463@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------F1422EC8A1A84D7E5C2F0523
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Satoshi Asami wrote:
> 
> asami       1998/09/15 14:32:00 PDT
> 
>   Modified files:

>     net/sirc/scripts     sirc-proto

>   Log:
>   Use ${PERL5} wherever appropriate.  Largely untested; hope my eyeball
>   checks haven't missed anything.

	I realize that you have a lot going on with both the elf and perl
conversions happening at once. I didn't mean for my comments about the
elf libraries to be inflammatory, but reconsidering what may have been a
bad choice at this stage in the process is better than regretting it
much later IMO.

	INRE the change you made to my port, it won't work, and also brings up
an interesting problem. The bsd.port.mk file defines PERL5 like this.

.if exists(/usr/bin/perl5)
# 3.0-current after perl5 import
PERL5=                  /usr/bin/perl5
.else
PERL5=                  ${LOCALBASE}/bin/perl${PERL_VERSION}
.if defined(USE_PERL5)
BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
RUN_DEPENDS+=   perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
.endif
.endif

The problem with this is that any port on a -Stable system that makes
use of the PERL5 variable (like you tried to do with mine) will have to
be reinstalled every time the perl version is bumped. I'd like to have a
variable similar to what I used in my port that points to the 'perl5'
link in either /usr/bin or /usr/local/bin (Ok, ${PREFIX}/bin). Something
like this would work, other solutions are possible of course. 

.if exists(/usr/bin/perl5)
# 3.0-current after perl5 import
PERL5=                  /usr/bin/perl5
SHORT_PERL5=		/usr/bin/perl5
.else
PERL5=                  ${LOCALBASE}/bin/perl${PERL_VERSION}
SHORT_PERL5=		${PREFIX}/bin/perl5
.if defined(USE_PERL5)
BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
RUN_DEPENDS+=   perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
.endif
.endif

	Meanwhile, I'd appreciate it if someone would apply the following patch
to my port. It passes portlint, etc. 

Thanks,

Doug
--------------F1422EC8A1A84D7E5C2F0523
Content-Type: text/plain; charset=us-ascii; name="sirc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sirc.diff"

diff -ur sirc-old/Makefile sirc/Makefile
--- sirc-old/Makefile	Thu May  7 14:58:53 1998
+++ sirc/Makefile	Tue Sep 15 23:20:10 1998
@@ -22,7 +22,7 @@
 
 USE_PERL5=	yes
 
-post-extract:
+pre-extract:
 .if !defined(SOCKS_SERVER)
 	@${ECHO_MSG} ''
 	@${ECHO_MSG} "SOCKS proxy support is available with this client."
@@ -33,18 +33,29 @@
 	@${ECHO_MSG} ''
 .endif
 
+post-extract:
+.if exists(/usr/bin/perl5)
+SHORT_PERL5=/usr/bin/perl5
+.else
+SHORT_PERL5=${PREFIX}/bin/perl5
+.endif
+
 pre-patch:
 	@${CP} ${SCRIPTDIR}/sirc-proto ${WRKSRC}
 
 do-patch:
 .if defined(SOCKS_SERVER)
 	@${PATCH} ${PATCH_DIST_ARGS} < ${PATCHDIR}/patch-aa
-	@${SED} 's%SOCKS_SERVER\=%SOCKS_SERVER\=${SOCKS_SERVER}%' \
-		${WRKSRC}/sirc-proto > ${WRKSRC}/sirc-socks
-	@${SED} 's%PREFIX\=%PREFIX\=${PREFIX}%' ${WRKSRC}/sirc-socks \
+	@${SED} 's:SOCKS_SERVER\=:SOCKS_SERVER\=${SOCKS_SERVER}:' \
+		${WRKSRC}/sirc-proto > ${WRKSRC}/sirc-proto.1
+	@${SED} 's:PREFIX.SED:${PREFIX}:' ${WRKSRC}/sirc-proto.1 \
+		> ${WRKSRC}/sirc-proto.2
+	@${SED} 's:PERL5.SED:${SHORT_PERL5}:' ${WRKSRC}/sirc-proto.2 \
 		> ${WRKSRC}/sirc
 .else
-	@${SED} 's%PREFIX\=%PREFIX\=${PREFIX}%' ${WRKSRC}/sirc-proto \
+	@${SED} 's:PREFIX.SED:${PREFIX}:' ${WRKSRC}/sirc-proto \
+		> ${WRKSRC}/sirc-proto.1
+	@${SED} 's:PERL5.SED:${SHORT_PERL5}:' ${WRKSRC}/sirc-proto.1 \
 		> ${WRKSRC}/sirc
 .endif
 
diff -ur sirc-old/scripts/sirc-proto sirc/scripts/sirc-proto
--- sirc-old/scripts/sirc-proto	Tue Sep 15 14:31:51 1998
+++ sirc/scripts/sirc-proto	Tue Sep 15 20:57:34 1998
@@ -1,7 +1,6 @@
 #!/bin/sh
 
-PREFIX=
-SIRCLIB=${PREFIX}/libexec/sirc ; export SIRCLIB
+SIRCLIB=PREFIX.SED/libexec/sirc ; export SIRCLIB
 
 if test -z "$SIRCSERVER" && test -z "$IRCSERVER"
 then
@@ -11,7 +10,7 @@
 
 case "$1" in
   -d) shift
-      exec ${PERL5} ${SIRCLIB}/dsirc "$@"
+      exec PERL5.SED ${SIRCLIB}/dsirc "$@"
       ;;
-  *)  eval exec ${PREFIX}/bin/ssfe $SSFE ${PERL5} ${SIRCLIB}/dsirc \"\$@\"
+  *)  eval exec PREFIX.SED/bin/ssfe $SSFE PERL5.SED ${SIRCLIB}/dsirc \"\$@\"
 esac

--------------F1422EC8A1A84D7E5C2F0523--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35FF5CA8.322A8AB1>