From owner-freebsd-java@FreeBSD.ORG Wed May 12 03:40:20 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3131916A4CF for ; Wed, 12 May 2004 03:40:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3628B43D55 for ; Wed, 12 May 2004 03:40:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i4CAeFSJ008465 for ; Wed, 12 May 2004 03:40:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4CAeF8r008464; Wed, 12 May 2004 03:40:15 -0700 (PDT) (envelope-from gnats) Date: Wed, 12 May 2004 03:40:15 -0700 (PDT) Message-Id: <200405121040.i4CAeF8r008464@freefall.freebsd.org> To: java@FreeBSD.org From: Herve Quiroz Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Herve Quiroz List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2004 10:40:20 -0000 The following reply was made to PR ports/66342; it has been noted by GNATS. From: Herve Quiroz To: freebsd-gnats-submit@FreeBSD.org, neuhauser@chello.cz Cc: Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Wed, 12 May 2004 12:33:39 +0200 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Roman, I recently tried to find a fix for this problem. I agree IGNORECMD has to be changed to something else but with your patch the following page still has problem: http://www.freshports.org/ports-ignore.php BTW, Java ports are not the only ones who use printf(1) (and '\n') so I think there should be something right in bsd.port.mk that would pretty-format things when needed. This solution (modifying bsd.port.mk) would benefit to other ports, such as audio/gnump3d, databases/msql, games/linux-q3ademo... Attached is a patch I sent to Alexey lately. It's a bit of sed(1) magic to justify output. I've got some problem with sed(1) when invoked from make(1). That's why there are two lines added in bsd.port.mk: - The first one is the "correct" regular expression but it doesn't work (that's why it is commented). - The second is some kind of cheat, replacing '\n' by '%' in the regular expression, and then filtering through tr(1) to produce 'n'. This is quite ugly if you ask me but it works. BTW, if you know how to make sed works in make, please tell me... it's not the first time I'm struck with such an issue. I only provide a patch for java/jdk14 as this is just an example to illustrate my comments. Please tell me what you think of this. Herve --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.port.mk.diff" --- bsd.port.mk.original Mon Apr 26 16:21:59 2004 +++ bsd.port.mk Mon Apr 26 16:48:13 2004 @@ -2577,7 +2577,8 @@ .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} .else -IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." +#IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&\n/g' +IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&%/g' | ${TR} "%" "\n" .endif .for target in check-sanity fetch checksum extract patch configure all build install reinstall package --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Makefile.diff" --- Makefile.original Mon Apr 26 17:06:50 2004 +++ Makefile Mon Apr 26 17:05:53 2004 @@ -137,39 +137,39 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SCSL_SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_SRCFILE}. Please place this file in\n\ -${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +Because of licensing restrictions, you must fetch the source distribution \ +manually. Please access http://www.sun.com/software/java2/download.html \ +with a web browser and follow the \"Download\" link for the \ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register, \ +but you can create an account on this page. After registration and \ +accepting the Sun Community Source License, select \"J2SESDK\" and \ +download the source file, ${SCSL_SRCFILE}. Please place this file in \ +${DISTDIR}. .endif .if !exists(${DISTDIR}/${SCSL_BINFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_BINFILE}. Please place this file in\n\ -${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +Because of licensing restrictions, you must fetch the source distribution \ +manually. Please access http://www.sun.com/software/java2/download.html \ +with a web browser and follow the \"Download\" link for the \ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register, \ +but you can create an account on this page. After registration and \ +accepting the Sun Community Source License, select \"J2SESDK\" and \ +download the source file, ${SCSL_BINFILE}. Please place this file in \ +${DISTDIR}. .endif # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -The source distribution exists on your system, but due to\n\ -licensing restrictions you still need to download the\n\ -patchset, ${PATCHSETFILE}, from\n\ -http://www.eyesbeyond.com/freebsddom/java/jdk14.html.\n\ -Please place the patchset in ${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +The source distribution exists on your system, but due to \ +licensing restrictions you still need to download the \ +patchset, ${PATCHSETFILE}, from \ +http://www.eyesbeyond.com/freebsddom/java/jdk14.html. \ +Please place the patchset in ${DISTDIR}. .endif # JDK 1.4.2 require recent version of FreeBSD due to recent libc_r updates. --rwEMma7ioTxnRzrJ--