diff --git a/package/alessandro/php/php.conf b/package/alessandro/php/php.conf index 8d57fab43..0bb1f5d8b 100644 --- a/package/alessandro/php/php.conf +++ b/package/alessandro/php/php.conf @@ -26,7 +26,7 @@ var_append extraconfopt " " "--with-zlib --with-bz2" if [ "$ROCKCFG_PKG_PHP_mysql" = 1 ] ; then if [ "$ROCKCFG_PKG_PHP_FORCESHARED" -eq 1 ]; then pkg_php_shared='=shared' - elif pkgcheck mysql X ; then + elif pkginstalled mysql; then pkg_php_shared='=shared' else pkg_php_shared='' diff --git a/package/base/sysfiles/sysfiles.conf b/package/base/sysfiles/sysfiles.conf index d9e8cab4e..7a46838eb 100644 --- a/package/base/sysfiles/sysfiles.conf +++ b/package/base/sysfiles/sysfiles.conf @@ -136,7 +136,7 @@ EOT for x in $base/package/*/*/postsysfiles.in do y=${x%/*}; y=${y##*/} - if [ -f $x ] && pkgcheck "$y" "X" + if [ -f $x ] && pkginstalled "$y" then . $x; fi done fi ; true diff --git a/package/gnome2/linc/linc.conf b/package/gnome2/linc/linc.conf index db8f9e02f..af20c7ebf 100644 --- a/package/gnome2/linc/linc.conf +++ b/package/gnome2/linc/linc.conf @@ -22,4 +22,4 @@ . $base/package/*/*/gnome-2.conf -pkgcheck openssl X && confopt="$confopt --with-openssl" +pkginstalled openssl && confopt="$confopt --with-openssl" diff --git a/package/gnome2/orbit2/orbit2.conf b/package/gnome2/orbit2/orbit2.conf index a1299f126..6c0b6f7dc 100644 --- a/package/gnome2/orbit2/orbit2.conf +++ b/package/gnome2/orbit2/orbit2.conf @@ -22,4 +22,4 @@ . $base/package/*/*/gnome-2.conf -pkgcheck openssl X && confopt="$confopt --with-openssl" +pkginstalled openssl && confopt="$confopt --with-openssl" diff --git a/package/jsaw/hdf5/hdf5.conf b/package/jsaw/hdf5/hdf5.conf index 10e93ae19..057dfdef3 100644 --- a/package/jsaw/hdf5/hdf5.conf +++ b/package/jsaw/hdf5/hdf5.conf @@ -22,7 +22,7 @@ # --- ROCK-COPYRIGHT-NOTE-END --- confopt="$confopt --enable-cxx --enable-threadsafe --enable-stream-vfd --enable-gpfs --with-pthread" -pkgcheck openssl X && confopt="$confopt --with-ssl" +pkginstalled openssl && confopt="$confopt --with-ssl" # TODO: # -config option for enable-cxx diff --git a/package/mathieu/xcdroast/xcdroast.conf b/package/mathieu/xcdroast/xcdroast.conf index c85aaa09c..4f52efab9 100644 --- a/package/mathieu/xcdroast/xcdroast.conf +++ b/package/mathieu/xcdroast/xcdroast.conf @@ -1,5 +1,5 @@ hook_add prepatch 3 "(cd src; patch -p0 < $archdir/gtk2locale.patch)" hook_add preconf 3 "tar xvfI $archdir/new_configure.tar.bz2" -pkgcheck 'gtk\+' X && var_append confopt ' ' '--enable-gtk2' +pkginstalled 'gtk+' && var_append confopt ' ' '--enable-gtk2' diff --git a/package/mnemoc/links/links.conf b/package/mnemoc/links/links.conf index c5093e5d5..b411fa7bc 100644 --- a/package/mnemoc/links/links.conf +++ b/package/mnemoc/links/links.conf @@ -22,6 +22,6 @@ # --- ROCK-COPYRIGHT-NOTE-END --- var_append confopt ' ' '--enable-javascript' -if pkgcheck directfb X || pkgcheck svgalib X || pkgcheck xfree86 X; then +if pkginstalled directfb || pkginstalled svgalib || pkginstalled xfree86; then var_append confopt ' ' '--enable-graphics' fi diff --git a/package/mnemoc/runit/parse-config b/package/mnemoc/runit/parse-config index 7070fc875..f3f0e6eca 100644 --- a/package/mnemoc/runit/parse-config +++ b/package/mnemoc/runit/parse-config @@ -59,7 +59,7 @@ fi # # add init scripts # -if pkgcheck runit X; then +if pkginstalled runit; then # runit_substitute # runit_substitute() { diff --git a/package/mnemoc/runit/runit.conf b/package/mnemoc/runit/runit.conf index 9e154bae6..08c136d10 100644 --- a/package/mnemoc/runit/runit.conf +++ b/package/mnemoc/runit/runit.conf @@ -25,7 +25,7 @@ . $base/package/mnemoc/runit/djb-config admin $sbindir hook_add postmake 6 'pkg_runit_addservices' -if ! pkgcheck daemontools X; then +if ! pkginstalled daemontools; then hook_add postmake 7 ' \ [ "$pkg_djb_commanddir" ] && add_flist $pkg_djb_commanddir; \ [ "$pkg_djb_servicedir" ] && add_flist $pkg_djb_servicedir; \ diff --git a/package/nikolaus/unison/unison.conf b/package/nikolaus/unison/unison.conf index 8e477f47c..43aadaed5 100644 --- a/package/nikolaus/unison/unison.conf +++ b/package/nikolaus/unison/unison.conf @@ -25,7 +25,7 @@ srctar=src.tar.bz2 unison_main() { - if pkgcheck 'gtk\+12' X ; then + if pkginstalled 'gtk+12'; then $MAKE $makeopt UISTYLE=gtk mv unison unison_gtk else diff --git a/package/rene/subversion/subversion.conf b/package/rene/subversion/subversion.conf index a586f1bc7..c1613958e 100644 --- a/package/rene/subversion/subversion.conf +++ b/package/rene/subversion/subversion.conf @@ -26,7 +26,7 @@ # all this is to build the apache server-side module # and to make sure no locally included APR stuff get's installed # as well as no modification to httpd.conf is done ... -if pkgcheck apache X ; then +if pkginstalled apache; then var_append extraconfopt " " "--with-apxs=/$prefix/sbin/apxs \ --with-apr=/$prefix/bin/apr-config --with-apr-util=/$prefix \ --disable-mod-activation" diff --git a/package/x11/ghostscript/ghostscript.conf b/package/x11/ghostscript/ghostscript.conf index 899456b07..bd23ccdde 100644 --- a/package/x11/ghostscript/ghostscript.conf +++ b/package/x11/ghostscript/ghostscript.conf @@ -22,7 +22,8 @@ confopt="$confopt --with-drivers=ALL --with-x" -if pkgcheck gimp-print42 X ; then +if pkginstalled gimp-print42; then echo "gimp-print found. Will use it as printer driver ..." confopt="$confopt --with-gimp-print" fi + diff --git a/scripts/functions b/scripts/functions index e3e527c2a..0028c038f 100644 --- a/scripts/functions +++ b/scripts/functions @@ -394,15 +394,18 @@ dump_env() { alias } -# Check for a package in configuration -# -pkgcheck() { - egrep -q "^$2.* ($1) " $base/config/$config/packages -} # Check if a package is already installed # +# It does check the build-list if not in the rebuild stage - and +# the really installed package data for rebuilds (and so manual builds). +# pkginstalled() { - [ -f $root/var/adm/flists/$1 ] + if [ "$stagelevel" -le 8 ] ; then + local pattern="$1"; pattern="${pattern//+/\\+}" + egrep -q "^X.* ($pattern) " $base/config/$config/packages + else + [ -f $root/var/adm/packages/$1 ] + fi } # Register a window-manager