ports/58301: kdeartwork3 port fails to properly detect xscreensaver(-gnome)

Dimitry Andric dimitry at andric.com
Mon Oct 20 20:50:27 UTC 2003


>Number:         58301
>Category:       ports
>Synopsis:       kdeartwork3 port fails to properly detect xscreensaver(-gnome)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 20 13:50:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dimitry Andric
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD tensor.xs4all.nl 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Fri Oct 17 13:39:52 CEST 2003 root at vfbsd5.dim:/usr/obj/usr/src/sys/TENSOR i386
>Description:
The Makefile for the kdeartwork-3.1.4 port detects if xscreensaver or
xscreensaver-gnome is installed, and if so, it builds extra support
for it.

However, the Makefile uses another detection than the configure
script in the kdeartwork work directory, and thus the port doesn't
actually build any support for xscreensaver.

This leads to problems when packaging or uninstalling the port, since
the package listing contains all the xscreensaver-specific files, but
those are never installed with the port.
>How-To-Repeat:
- Install either xscreensaver or xscreensaver-gnome port.
- Install kdeartwork3 port.
- Try packaging kdeartwork3 port, which will fail with errors like:

  ===>  Building package for kdeartwork-3.1.4
  Creating package /usr/ports/packages/All/kdeartwork-3.1.4.tbz
  Registering depends: kdebase-3.1.4 kdelibs-3.1.4 XFree86-fontScalable-4.3.0 arts-1.1.4,1 qt-3.2.1 Xft-2.1.2 cups-base-1.1.19.0 XFree86-fontEncodings-4.3.0 fam-2.6.9_3 gettext-0.12.1 Mesa-3.4.2_2 XFree86-libraries-4.3.0_6 imake-4.3.0_1 libmng-1.0.5_1 fontconfig-2.2.90_3 expat-1.95.6_1 lcms-1.09,1 libart_lgpl2-2.3.16 libaudiofile-0.2.4 libxslt-1.0.33 tiff-3.6.0 libxml2-2.5.11 libiconv-1.9.1_3 openldap-client-2.1.22 pcre-4.4 perl-5.8.0_8 pkgconfig-0.15.0 png-1.2.5_2 python-2.3.2 freetype2-2.1.5_1 samba-libsmbclient-3.0.0 jpeg-6b_1.
  Creating bzip'd tar ball in '/usr/ports/packages/All/kdeartwork-3.1.4.tbz'
  tar: bin/kxsconfig: Cannot stat: No such file or directory
  tar: bin/kxsrun: Cannot stat: No such file or directory
  tar: share/applnk/System/ScreenSavers/anemone.desktop: Cannot stat: No such file or directory
  tar: share/applnk/System/ScreenSavers/ant.desktop: Cannot stat: No such file or directory
  tar: share/applnk/System/ScreenSavers/apollonian.desktop: Cannot stat: No such file or directory
  tar: share/applnk/System/ScreenSavers/atlantis.desktop: Cannot stat: No such file or directory
  ...more similar errors omitted...
  tar: Error exit delayed from previous errors
  pkg_create: make_dist: tar command failed with code 512
  *** Error code 1
- Result is that the package is never created.
>Fix:
I'm not sure there is a clean way to fix this, since the Makefile
only checks for either the xscreensaver or (for the GNOME version) the
screensaver-properties-capplet executable, but the configure script
needs to check for the xscreensaver-hacks directory, where the actual
savers/hacks are installed.

The configure script seems to be extracted from a tar file, so it
isn't easily patchable, and indeed the detection itself seems to
assume that the hacks are always installed in a lib/xscreensaver
subdirectory somewhere:

configure script, near line 24843:
  echo "$as_me:$LINENO: checking for lib/xscreensaver/flame" >&5
  echo $ECHO_N "checking for lib/xscreensaver/flame... $ECHO_C" >&6

The fastest way to get this working for me was to copypaste the whole
section that searches for lib/xscreensaver, and replace all instances
of that with xscreensaver-hacks.

Also, the next search is for a flame.xml file, which fails in the same
way because this is installed under subdir share/xscreensaver/config,
but the script only looks under lib/xscreensaver/config and
lib/X11/xscreensaver/config.  Again, I copypasted and replaced some
stuff in the relevant section to make this work.

A possible patch for the configure script follows. Of course this is a
hack, and it should really be fixed in the configure.in and/or other
automake source scripts.  However, since the configure script comes
out of a tar file, I presume there is some special handling needed...

--- configure.orig	Mon Sep 22 22:23:40 2003
+++ configure	Mon Oct 20 22:12:58 2003
@@ -24860,6 +24860,52 @@
 
    fi
 
+   echo "$as_me:$LINENO: checking for xscreensaver-hacks/flame" >&5
+echo $ECHO_N "checking for xscreensaver-hacks/flame... $ECHO_C" >&6
+   if test -n "$XSCREENSAVER"; then
+        kde_cv_path="$XSCREENSAVER";
+   else
+        kde_cache=`echo xscreensaver-hacks/flame | sed 'y%./+-%__p_%'`
+
+        if eval "test \"\${kde_cv_path_$kde_cache+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        kde_cv_path="NONE"
+	dirs=" $xscreensaver_prefixes "
+	kde_save_IFS=$IFS
+	IFS=':'
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+        done
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/xscreensaver-hacks/flame"; then
+	    if test -n ""
+	    then
+              evalstr="$dir/xscreensaver-hacks/flame  2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/xscreensaver-hacks/flame"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/xscreensaver-hacks/flame"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
       echo "$as_me:$LINENO: result: not found" >&5
 echo "${ECHO_T}not found" >&6
@@ -24915,8 +24961,27 @@
   done
 done
 
-        if test "$XSCREENSAVER_CONFIG" != NO; then
-	     XSCREENSAVER_CONFIG="$XSCREENSAVER_CONFIG/lib/X11/xscreensaver/config"
+        if test "$XSCREENSAVER_CONFIG" = NO; then
+
+XSCREENSAVER_CONFIG=NO
+for i in  $xscreensaver_prefixes ;
+do
+  for j in share/xscreensaver/config/flame.xml;
+  do
+    echo "configure: 24971: $i/$j" >&5
+    if test -r "$i/$j"; then
+      echo "taking that" >&5
+      XSCREENSAVER_CONFIG=$i
+      break 2
+    fi
+  done
+done
+
+           if test "$XSCREENSAVER_CONFIG" != NO; then
+              XSCREENSAVER_CONFIG="$XSCREENSAVER_CONFIG/share/xscreensaver/config"
+           fi
+        else
+           XSCREENSAVER_CONFIG="$XSCREENSAVER_CONFIG/lib/X11/xscreensaver/config"
         fi
      else
 	XSCREENSAVER_CONFIG="$XSCREENSAVER_CONFIG/lib/xscreensaver/config"

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list