HEADS UP: Eclipse 3.0 updated

Jeremy Faulkner gldisater at gldis.ca
Mon Jul 26 11:13:40 PDT 2004

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 at .
>> 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
<pkg not found error to stderr>
cat test.txt

pkg_info -xc 'SomePkgThatIsInstalled' > test.txt
<no output>
cat test.txt
<the pkg information>

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
-------------- next part --------------
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:="@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 @@
             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

More information about the freebsd-ports mailing list