From owner-freebsd-java@FreeBSD.ORG Mon Jul 26 18:13:40 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 68E7416A4CE; Mon, 26 Jul 2004 18:13:40 +0000 (GMT) Received: from gldis.ca (constans.gldis.ca [66.11.169.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id D52F243D4C; Mon, 26 Jul 2004 18:13:39 +0000 (GMT) (envelope-from gldisater@gldis.ca) Received: from [IPv6:::1] (localhost [127.0.0.1]) by gldis.ca (8.12.11/8.12.11) with ESMTP id i6QIRIbB073155; Mon, 26 Jul 2004 14:27:18 -0400 (EDT) (envelope-from gldisater@gldis.ca) Message-ID: <41053064.1020208@gldis.ca> Date: Mon, 26 Jul 2004 12:25:08 -0400 From: Jeremy Faulkner User-Agent: Mozilla Thunderbird 0.7 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Panagiotis Astithas References: <20040725171544.71dc613e.nork@FreeBSD.org> <41042F42.80604@gldis.ca> <4104BD5F.70608@ebs.gr> In-Reply-To: <4104BD5F.70608@ebs.gr> Content-Type: multipart/mixed; boundary="------------090308060207070400070104" X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: ports@freebsd.org cc: Norikatsu Shigemura cc: freebsd-java@freebsd.org Subject: Re: HEADS UP: Eclipse 3.0 updated X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 18:13:40 -0000 This is a multi-part message in MIME format. --------------090308060207070400070104 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Panagiotis Astithas wrote: > Jeremy Faulkner wrote: > >> Norikatsu Shigemura wrote: >> >>> Hi eclipse user and maintainer. >>> >>> I updated Eclipse 3.0 and related ports, so then some ports >>> was broken. Please fix these ports! :-) >>> >>> If you find a problem, please report to java@ and nork@. >> >> >> >> WITH_MOTIF=yes fails to detect that kdebase is not present on the >> system and will always attempt to compile it. An earlier patch I >> submitted removed the kde swt lib from the build, this patch corrects >> the pkg_info check for kdebase. >> >> The "no packages match pattern" is going to stderr not stdout and so >> will not be caught. However if there is a package installed the >> outputted information does go to stdout. > > > Regrettably I don't have a desktop machine without KDE right now, so I > can't verify this, but your analysis seems correct. However, your > proposed solution is not in accordance with your analysis. You seem to > simply reverse the logic of the null check, instead of redirecting > stderr to stdout as you implied. > I did not describe my fix, I described the problem. Here is another patch that removes the unnecessary greps. The redirection of stderr in this patch to /dev/null is only to avoid having it go to console during the compile. It doesn't really matter if you have KDE installed or not, you can test the fix by making it search for a pkg that you don't have installed. pkg_info -xc 'SomePkgThatIsNotInstalled' > test.txt cat test.txt pkg_info -xc 'SomePkgThatIsInstalled' > test.txt cat test.txt So, pkg_info returns nothing to stderr if the pkg is not installed, and returns the pkg information if the pkg is installed, thus the logic reversal in the if statement. -- Jeremy Faulkner http://www.gldis.ca --------------090308060207070400070104 Content-Type: text/plain; name="eclipse-no-grep.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eclipse-no-grep.diff" diff -ur eclipse/Makefile eclipse.mod/Makefile --- eclipse/Makefile Sun Jul 25 07:30:36 2004 +++ eclipse.mod/Makefile Sun Jul 25 20:13:23 2004 @@ -71,8 +71,8 @@ # The Motif version builds a KDE/Qt library if kdebase is around .if defined(WITH_MOTIF) -BUILD_KDE=`${PKG_INFO} -xc kdebase | ${GREP} "no packages match"` -.if empty(${BUILD_KDE}) +BUILD_KDE=`${PKG_INFO} -xc kdebase 2>/dev/null` +.if !empty(${BUILD_KDE}) PLIST_SUB+= KDE:="" .else PLIST_SUB+= KDE:="@comment *${BUILD_KDE}*" diff -ur eclipse/files/swt-motif-build.sh eclipse.mod/files/swt-motif-build.sh --- eclipse/files/swt-motif-build.sh Sun Jul 25 04:01:08 2004 +++ eclipse.mod/files/swt-motif-build.sh Sun Jul 25 20:12:25 2004 @@ -36,8 +36,8 @@ else echo "Building FreeBSD version of SWT and GNOME DLLs." gmake -f make_freebsd.mak ${1} ${2} ${3} ${4} - build_kde=`pkg_info -xc kdebase | grep "no packages match"` - if [ "$build_kde" = "" ]; then + build_kde=`pkg_info -xc kdebase 2>/dev/null` + if [ "$build_kde" != "" ]; then echo "Building FreeBSD version of KDE DLL." gmake -f make_freebsd.mak make_kde fi --------------090308060207070400070104--