[csw-devel] SF.net SVN: gar:[6679] csw/mgar/gar/v2-pbuild

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sat Oct 3 10:47:27 CEST 2009


Revision: 6679
          http://gar.svn.sourceforge.net/gar/?rev=6679&view=rev
Author:   dmichelsen
Date:     2009-10-03 08:47:27 +0000 (Sat, 03 Oct 2009)

Log Message:
-----------
mGAR v2-pbuild: Merge in mGAR v2 r4932-6677

Modified Paths:
--------------
    csw/mgar/gar/v2-pbuild/bin/checkpkg
    csw/mgar/gar/v2-pbuild/bin/cswproto
    csw/mgar/gar/v2-pbuild/bin/depmaker
    csw/mgar/gar/v2-pbuild/bin/gitproxy
    csw/mgar/gar/v2-pbuild/bin/mkpackage
    csw/mgar/gar/v2-pbuild/categories/cpan/category.mk
    csw/mgar/gar/v2-pbuild/categories/x11/category.mk
    csw/mgar/gar/v2-pbuild/categories/xfce/category.mk
    csw/mgar/gar/v2-pbuild/gar.conf.mk
    csw/mgar/gar/v2-pbuild/gar.lib.mk
    csw/mgar/gar/v2-pbuild/gar.mk
    csw/mgar/gar/v2-pbuild/gar.pkg.mk

Added Paths:
-----------
    csw/mgar/gar/v2-pbuild/categories/python/
    csw/mgar/gar/v2-pbuild/categories/python/category.mk
    csw/mgar/gar/v2-pbuild/general-help

Removed Paths:
-------------
    csw/mgar/gar/v2-pbuild/categories/python/category.mk

Property Changed:
----------------
    csw/mgar/gar/v2-pbuild/


Property changes on: csw/mgar/gar/v2-pbuild
___________________________________________________________________
Added: svn:mergeinfo
   + /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-skayser:6087-6132

Modified: csw/mgar/gar/v2-pbuild/bin/checkpkg
===================================================================
--- csw/mgar/gar/v2-pbuild/bin/checkpkg	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/bin/checkpkg	2009-10-03 08:47:27 UTC (rev 6679)
@@ -1,8 +1,8 @@
 #!/bin/ksh -p
 
-# checkpkg 1.46a (diff to 1.46: modified errmsg -> warnmsg on two places)
+# checkpkg 1.50 (diff to 1.46a: check multiple package files)
 # This script examines a package that has been put together
-# for submittal to the CSW archive
+# for submittal to the CSW archive at opencsw.org
 #
 # It examines it for compliance with the packaging standards at
 # http://www.opencsw.org/standards/
@@ -29,10 +29,15 @@
 		rm -rf $EXTRACTDIR
 	fi
 	if [[ "$TMPARCHIVE" != "" ]] ; then
-		rm $TMPARCHIVE
+		[ -f "$TMPARCHIVE" ] && rm $TMPARCHIVE
 	fi
 }
 
+cleanupset(){
+    if [ "`echo $SETINF*`" != "$SETINF*" ]; then
+	rm $SETINF*
+    fi
+}
 warnmsg(){
 	print WARNING: $* >/dev/fd/2
 	if [[ "$quit_on_warn" != "" ]] ; then
@@ -45,6 +50,7 @@
 errmsg(){
 	print ERROR: $* >/dev/fd/2
 	cleanup
+	cleanupset
 	exit 1
 }
 
@@ -58,6 +64,12 @@
 	shift
 fi
 
+# a unique filename for the list of package deps and libs we see in a 'set'
+SETINF=/tmp/checkpkg.$$.`date +%Y%m%d%H%M%S`
+SETLIBS=$SETINF.libs
+SETDEPS=$SETINF.deps
+
+
 for f in "$@"
 do
 
@@ -123,7 +135,6 @@
 TMPFILE=$EXTRACTDIR/pkginfo
 
 
-
 dd if=$f skip=1 | (cd $EXTRACTDIR; cpio -ivd $pkgname/pkginfo)
 if [[ $? -ne 0 ]] ; then
 	print ERROR: could not extract $f
@@ -217,6 +228,13 @@
 		print ERROR: VERSION field not allowed to have '"-"' in it
 		exit 1
 	;;
+	*,REV=20[01][0-9].[0-9][0-9].[0-9][0-9]*)
+		:
+	;;
+	*)
+		print ERROR: no REV=YYYY.MM.DD field in VERSION
+		exit 1
+	;;
 esac
 
 case $pkgarch in
@@ -377,17 +395,19 @@
 	# man ld.so.1 for more info on this hack
 	export LD_NOAUXFLTR=1
 
-	listbinaries $EXTRACTDIR/$pkgname >$EXTRACTDIR/tmplist
+	listbinaries $EXTRACTDIR/$pkgname >$EXTRACTDIR/elflist
 	# have to do this for ldd to work. arrg.
-	if [ -s "$EXTRACTDIR/tmplist" ] ; then
-		chmod 0755 `cat $EXTRACTDIR/tmplist`
+	if [ -s "$EXTRACTDIR/elflist" ] ; then
+		chmod 0755 `cat $EXTRACTDIR/elflist`
 
-	#cat $EXTRACTDIR/tmplist| xargs ldd  2>/dev/null |fgrep  '.so' |
+	#cat $EXTRACTDIR/elflist| xargs ldd  2>/dev/null |fgrep  '.so' |
 	#              sed 's:^.*=>[^/]*::' | nawk '{print $1}' |sort -u >$EXTRACTDIR/liblist
 
-		cat $EXTRACTDIR/tmplist| xargs dump -Lv |nawk '$2=="NEEDED"{print $3}' |
+		cat $EXTRACTDIR/elflist| xargs dump -Lv |nawk '$2=="NEEDED"{print $3}' |
 			sort -u | egrep -v $EXTRACTDIR >$EXTRACTDIR/liblist
 
+			
+
 		print libraries used are:
 		cat $EXTRACTDIR/liblist
 		print "cross-referencing with depend file (May take a while)"
@@ -399,6 +419,10 @@
 #If these dont exist, it is Bad.
 touch $EXTRACTDIR/liblist $EXTRACTDIR/libpkgs
 
+# store things that look like shared objects from the package map for
+# delayed library validation.
+grep "\.so" $EXTRACTDIR/$pkgname/pkgmap >> $SETLIBS
+
 if [[ -f $EXTRACTDIR/$pkgname/install/depend ]] ; then
 	print 
 	print "Examining 'depend' file"
@@ -416,11 +440,26 @@
 	exit 1
 fi
 
+#to retain a record of all packages currently being examined from $@
+echo $pkgname >> $SETDEPS
+
 nawk '$1=="P" {print $2}'  $EXTRACTDIR/$pkgname/install/depend |
 	sort >$EXTRACTDIR/deppkgs
 for dep in `cat $EXTRACTDIR/deppkgs`
 do
-	pkginfo $dep || warnmsg  invalid package $dep specified
+    pkginfo $dep
+    if [[ $? -ne 0 ]]; then
+	#if we've already looked at the package named $dep,
+	#it'll be in the file.
+ 	awk "\$1 == \"$dep\" {print}" $SETDEPS | /usr/xpg4/bin/grep -q $dep
+ 	if [[ $? -ne 0 ]]; then #we haven't yet seen this package in our set
+	    echo "Can't validate dependence on $dep.  Storing for delayed validation."
+	    #store for validation at the end.
+	    echo "$dep $pkgname" >> $SETDEPS.missing
+	else
+	    echo "Found $dep as part of the package set being evaluated."
+	fi
+    fi
 done
 
 egrep -v 'SUNWbcp|SUNWowbcp|SUNWucb' /var/sadm/install/contents |
@@ -433,13 +472,20 @@
 	if [[ $? -eq 0 ]] ; then
 		echo $lib provided by package itself
 		continue
+	else
+	    grep "[/=]$lib[ =]" $SETLIBS
+	    if [[ $? -eq 0 ]]; then
+		echo "$lib provided by package set being evaluated."
+		continue
+	    fi
 	fi
 
 	libpkg=`grep /$lib $EXTRACTDIR/shortcatalog |
 	      sed 's/^.* \([^ ]*\)$/\1/' |sort -u`
 
 	if [[ -z "$libpkg" ]] ; then
-		warnmsg cannot find package for $lib
+		echo "$lib $pkgname" >> $SETLIBS.missing
+		print Cannot find package providing $lib.  Storing for delayed validation.
 	else
 		print $libpkg | fmt -1 >>$EXTRACTDIR/libpkgs
 	fi
@@ -458,19 +504,53 @@
 
 
 if [[ "$basedir" != "" ]] ; then
-	print 
-	print "Checking relocation ability..."
-	xargs strings <$EXTRACTDIR/tmplist | grep /opt/csw
-	if [[ $? -eq 0 ]] ; then
-		errmsg package build as relocatable, but binaries have hardcoded /opt/csw paths in them
+	print
+	if [[ -f $EXTRACTDIR/elflist ]] ; then
+		print "Checking relocation ability..."
+		xargs strings < $EXTRACTDIR/elflist| grep /opt/csw
+		if [[ $? -eq 0 ]] ; then
+			errmsg package build as relocatable, but binaries have hardcoded /opt/csw paths in them
+		else
+			print trivial check passed
+		fi
 	else
-		print trivial check passed
+		echo No relocation check done for non-binary relocatable package.
 	fi
 fi
 
+
 cleanup
 
-
 print ""
 
 done
+
+if [ -s $SETDEPS.missing ]; then
+    print "Doing late evaluations of package dependencies."
+    while read mdep; do
+	dep=`echo $mdep | nawk '{print $1}'`
+	pkg=`echo $mdep | nawk '{print $2}'`
+	/usr/xpg4/bin/grep -q $dep $SETDEPS
+	if [ $? -ne 0 ]; then
+	    errmsg "Couldn't validate $dep as a dependency in package $pkg"
+	else
+	    print "Validated $dep as a dependency for $pkg."
+	fi
+    done < $SETDEPS.missing
+fi
+
+if [ -s $SETLIBS.missing ]; then
+    print "Doing late evaluations of package library dependencies."
+    while read ldep; do
+	lib=`echo $ldep | nawk '{print $1}'`
+	pkg=`echo $ldep | nawk '{print $2}'`
+	/usr/xpg4/bin/grep -q "[/=]$lib[ =]" $SETLIBS
+	if [ $? -ne 0 ]; then
+	    errmsg "Couldn't find a package providing $lib"
+	else
+	    print "A package in the set being evaluated provides $lib"
+	fi
+    done < $SETLIBS.missing
+fi
+
+cleanupset

Modified: csw/mgar/gar/v2-pbuild/bin/cswproto
===================================================================
--- csw/mgar/gar/v2-pbuild/bin/cswproto	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/bin/cswproto	2009-10-03 08:47:27 UTC (rev 6679)
@@ -112,6 +112,8 @@
     open F, $common || die "Couldn't open $common";
     while (<F>) {
         chomp; next if /^\s*$/ or /^#/;
+	s/\+/\\+/g;
+	s/\-/\\-/g;
         my @c = split( m!/! );
         my @pc = map { join( '/', @c[0..$_] ) } 1..$#c;
         $alldirs{$_} = 1 foreach (@pc);

Modified: csw/mgar/gar/v2-pbuild/bin/depmaker
===================================================================
--- csw/mgar/gar/v2-pbuild/bin/depmaker	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/bin/depmaker	2009-10-03 08:47:27 UTC (rev 6679)
@@ -27,12 +27,14 @@
 my $do_script = 1;
 my $be_quiet  = 0;
 my (@nodep, $rootdir);
+my $text_files = 0;
 GetOptions(
     'script!'   => \$do_script,
     'quiet|q'   => \$be_quiet,
     'root=s'    => \$rootdir,
     'nodep=s'   => \@nodep,
     'help|h'    => \&usage,
+    'text|t'    => \$text_files,
     'version|V' => sub {
         print STDERR "$self v$VERSION\n";
         exit 2;
@@ -43,7 +45,7 @@
 my $nodep = join "|", @nodep;
 
 sub usage {
-    print STDERR "Usage: $self [--no/script] [--nodep <pkg>] [--root <path>] < path_list > depend\n";
+    print STDERR "Usage: $self [--text] [--no/script] [--nodep <pkg>] [--root <path>] < path_list > depend\n";
     exit 1;
 }
 
@@ -111,6 +113,9 @@
             $depfiles{$lib}++ if $lib;
         }
     }
+    elsif ($text_files and $ftype =~ /text/) {
+        $depfiles{$filesrc}++;
+    }
 }
 exit 0 unless scalar keys %depfiles;
 

Modified: csw/mgar/gar/v2-pbuild/bin/gitproxy
===================================================================
--- csw/mgar/gar/v2-pbuild/bin/gitproxy	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/bin/gitproxy	2009-10-03 08:47:27 UTC (rev 6679)
@@ -5,7 +5,7 @@
     REMHOST=$1
     REMPORT=$2
 
-    set - $(echo "${http_proxy}" | sed 's/http//i' | tr -d '/' | tr ':' ' ')
+    set - $(echo "${http_proxy}" | gsed 's/http//i' | tr -d '/' | tr ':' ' ')
     PROXYHOST=$1
     PROXYPORT=$2
 

Modified: csw/mgar/gar/v2-pbuild/bin/mkpackage
===================================================================
--- csw/mgar/gar/v2-pbuild/bin/mkpackage	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/bin/mkpackage	2009-10-03 08:47:27 UTC (rev 6679)
@@ -1,4 +1,4 @@
-#!/bin/env perl -w
+#!/opt/csw/bin/perl -w
 #
 # $Id$
 #

Modified: csw/mgar/gar/v2-pbuild/categories/cpan/category.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/categories/cpan/category.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/categories/cpan/category.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -62,7 +62,7 @@
 INSTALL_ENV   += PERL5LIB=$(PERL5LIB)
 
 # Configure a target using Makefile.PL
-PERL_CONFIGURE_ARGS ?= INSTALLDIRS=vendor
+PERL_CONFIGURE_ARGS ?= INSTALLDIRS=vendor $(EXTRA_PERL_CONFIGURE_ARGS)
 configure-%/Makefile.PL:
 	@echo " ==> Running Makefile.PL in $*"
 	@( cd $* ; \
@@ -70,7 +70,7 @@
 	        $(CONFIGURE_ARGS) $(PERL_CONFIGURE_ARGS) )
 	@$(MAKECOOKIE)
 
-PERLBUILD_CONFIGURE_ARGS ?= installdirs=vendor
+PERLBUILD_CONFIGURE_ARGS ?= installdirs=vendor $(EXTRA_PERLBUILD_CONFIGURE_ARGS)
 configure-%/Build.PL:
 	@echo " ==> Running Build.PL in $*"
 	@( cd $* ; \

Deleted: csw/mgar/gar/v2-pbuild/categories/python/category.mk
===================================================================
--- csw/mgar/gar/v2/categories/python/category.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/categories/python/category.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -1,21 +0,0 @@
-# Add a dependency to CSWpython
-_EXTRA_GAR_PKGS += CSWpython
-
-# Exclude egg-info files (only needed for easy_install)
-_MERGE_EXCLUDE_CATEGORY += .*\.egg-info.*
-
-# Activate cswpycompile support to exclude .pyc and .pyo files from 
-# the package and compile them on installation. File exclusion is 
-# handled by gar.mk and cswclassutils integration by gar.pkg.mk
-PYCOMPILE = 1
-
-# Haven't seen a python module with a configure phase so far
-CONFIGURE_SCRIPTS ?=
-
-# gar.lib.mk contains implicit targets for setup.py
-BUILD_SCRIPTS ?= $(WORKSRC)/setup.py
-INSTALL_SCRIPTS ?= $(WORKSRC)/setup.py
-INSTALL_ARGS ?= --root=$(DESTDIR) --prefix=$(prefix)
-TEST_SCRIPTS ?= $(WORKSRC)/setup.py
-
-include gar/gar.mk

Copied: csw/mgar/gar/v2-pbuild/categories/python/category.mk (from rev 6678, csw/mgar/gar/v2/categories/python/category.mk)
===================================================================
--- csw/mgar/gar/v2-pbuild/categories/python/category.mk	                        (rev 0)
+++ csw/mgar/gar/v2-pbuild/categories/python/category.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -0,0 +1,21 @@
+# Add a dependency to CSWpython
+_EXTRA_GAR_PKGS += CSWpython
+
+# Exclude egg-info files (only needed for easy_install)
+_MERGE_EXCLUDE_CATEGORY += .*\.egg-info.*
+
+# Activate cswpycompile support to exclude .pyc and .pyo files from 
+# the package and compile them on installation. File exclusion is 
+# handled by gar.mk and cswclassutils integration by gar.pkg.mk
+PYCOMPILE = 1
+
+# Haven't seen a python module with a configure phase so far
+CONFIGURE_SCRIPTS ?=
+
+# gar.lib.mk contains implicit targets for setup.py
+BUILD_SCRIPTS ?= $(WORKSRC)/setup.py
+INSTALL_SCRIPTS ?= $(WORKSRC)/setup.py
+INSTALL_ARGS ?= --root=$(DESTDIR) --prefix=$(prefix)
+TEST_SCRIPTS ?= $(WORKSRC)/setup.py
+
+include gar/gar.mk

Modified: csw/mgar/gar/v2-pbuild/categories/x11/category.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/categories/x11/category.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/categories/x11/category.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -1,5 +1,6 @@
 # X11
 X11_PROTO_MASTER_SITE = http://xorg.freedesktop.org/releases/individual/proto/
+X11_LIB_MASTER_SITE = http://xorg.freedesktop.org/releases/individual/lib/
 XCB_MASTER_SITES = http://xcb.freedesktop.org/dist/
 
 # C and C++ compiler flags

Modified: csw/mgar/gar/v2-pbuild/categories/xfce/category.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/categories/xfce/category.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/categories/xfce/category.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -1,6 +1,6 @@
 # XFCE
 XFCE_ROOT       = http://www.us.xfce.org
-XFCE_VERSION   ?= 4.4.1
+XFCE_VERSION   ?= 4.6.1
 XFCE_MIRROR     = $(XFCE_ROOT)/archive/xfce-$(XFCE_VERSION)/src/
 
 MASTER_SITES   ?= $(XFCE_MIRROR)
@@ -8,8 +8,6 @@
 PKGDIST        ?= $(GARNAME)-$(GARVERSION).tar.bz2
 DISTFILES      += $(PKGDIST)
 
-include gar/gar.mk
-
 # Compiler options
 # Compiler options
 CFLAGS   += -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION
@@ -18,13 +16,22 @@
 LDFLAGS  += -L/opt/csw/lib -R/opt/csw/lib
 
 # pkg-config options
-PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig
+EXTRA_PKG_CONFIG_PATH += /opt/csw/X11/lib/pkgconfig
 
 # Configure common options
 CONFIGURE_ARGS  = $(DIRPATHS)
-# CONFIGURE_ARGS += --prefix=/opt/csw
 CONFIGURE_ARGS += --disable-debug
 CONFIGURE_ARGS += --enable-final
 CONFIGURE_ARGS += --enable-xinerama
 CONFIGURE_ARGS += --enable-dbus
-# CONFIGURE_ARGS += --mandir=/opt/csw/share/man
+
+MSGFMT= /opt/csw/bin/gmsgfmt
+MSGMERGE= /opt/csw/bin/gmsgmerge
+XGETTEXT = /opt/csw/bin/gxgettext
+GETTEXT = /opt/csw/bin/ggettext
+export MSGMERGE
+export MSGFMT
+export XGETTEXT
+export GETTEXT
+
+include gar/gar.mk

Modified: csw/mgar/gar/v2-pbuild/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.conf.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/gar.conf.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -45,6 +45,8 @@
 MANIFEST_FILE ?= manifest
 LOGDIR ?= log
 
+ELISP_DIRS ?= $(datadir)/emacs/site-lisp $(EXTRA_ELISP_DIRS)
+
 GIT_PROXY_SCRIPT ?= $(abspath $(GARBIN))/gitproxy
 GIT_DEFAULT_TRACK = +refs/heads/master:refs/remotes/origin/master
 
@@ -400,9 +402,11 @@
 # REQUESTED_ISAS contains all ISAs that should be built
 # NEEDED_ISAS contains all ISAs that must be build for this architecture to make the package
 # BUILD_ISAS contains all ISAs that can be built on the current kernel
+# It is guaranteed that all BUILD_ISAS come first in NEEDED_ISAS
 # Set 'BUILD64 = 1' to build 64 bit versions automatically
 REQUESTED_ISAS ?= $(strip $(foreach A,$(GARCHLIST),$(ISA_DEFAULT_$A) $(if $(BUILD64),$(ISA_DEFAULT64_$A)) $(EXTRA_BUILD_ISAS_$A)) $(EXTRA_BUILD_ISAS))
-NEEDED_ISAS ?= $(filter $(ISALIST_$(ISA_DEFAULT64_$(GARCH))),$(REQUESTED_ISAS))
+NEEDED_ISAS ?= $(strip $(filter     $(ISALIST_$(KERNELISA)),$(filter $(ISALIST_$(ISA_DEFAULT64_$(GARCH))),$(REQUESTED_ISAS))) \
+                       $(filter-out $(ISALIST_$(KERNELISA)),$(filter $(ISALIST_$(ISA_DEFAULT64_$(GARCH))),$(REQUESTED_ISAS))))
 BUILD_ISAS ?= $(filter $(ISALIST_$(KERNELISA)),$(NEEDED_ISAS))
 
 # Subdirectories for specialized binaries and libraries
@@ -519,7 +523,7 @@
 OPTFLAGS ?= $(strip $($(GARCOMPILER)_CC_FLAGS) $(_CATEGORY_OPTFLAGS) $(EXTRA_OPTFLAGS))
 
 GCC3_LD_OPTIONS = -R$(GCC3_CC_HOME)/lib $(EXTRA_GCC3_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS)
-GCC4_LD_OPTIONS = -R$(GCC4_CC_HOME)/lib $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS)
+GCC4_LD_OPTIONS = -R$(abspath $(GCC4_CC_HOME)/lib/$(MM_LIBDIR)) $(EXTRA_GCC4_LD_OPTIONS) $(EXTRA_GCC_LD_OPTIONS)
 SOS11_LD_OPTIONS = $(EXTRA_SOS11_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS)
 SOS12_LD_OPTIONS = $(EXTRA_SOS12_LD_OPTIONS) $(EXTRA_SOS_LD_OPTIONS)
 
@@ -542,9 +546,10 @@
 #
 
 # Gnome
+GNOME_PROJ  ?= $(GARNAME)
 GNOME_ROOT   = http://ftp.gnome.org/pub/GNOME/sources
 GNOME_SUBV   = $(shell echo $(GARVERSION) | awk -F. '{print $$1"."$$2}')
-GNOME_MIRROR = $(GNOME_ROOT)/$(GARNAME)/$(GNOME_SUBV)/
+GNOME_MIRROR = $(GNOME_ROOT)/$(GNOME_PROJ)/$(GNOME_SUBV)/
 
 # SourceForge
 SF_PROJ     ?= $(GARNAME)

Modified: csw/mgar/gar/v2-pbuild/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.lib.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/gar.lib.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -68,7 +68,7 @@
 # to update the code.
 # we possibly proxy the git:// references depending on GIT_USE_PROXY
 git-http//%:
-	@$git clone --bare http://$* $(PARTIALDIR)/$(call GITPROJ,$*)
+	@git clone --bare http://$* $(PARTIALDIR)/$(call GITPROJ,$*)
 	@( cd $(PARTIALDIR)/$(call GITPROJ,$*); \
 		git remote add origin http://$*; \
 		git config remote.origin.fetch $(if $(GIT_REFS_$(call GITPROJ,$*)),$(GIT_REFS_$(call GITPROJ,$*)),$(GIT_DEFAULT_TRACK)); )
@@ -583,17 +583,17 @@
 # just run make install and hope for the best.
 install-%/Makefile:
 	@echo " ==> Running make install in $*"
-	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
+	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_VARS),$(TTT)="$(INSTALL_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
 	@$(MAKECOOKIE)
 
 install-%/makefile:
 	@echo " ==> Running make install in $*"
-	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
+	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_VARS),$(TTT)="$(INSTALL_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
 	@$(MAKECOOKIE)
 
 install-%/GNUmakefile:
 	@echo " ==> Running make install in $*"
-	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
+	@$(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_VARS),$(TTT)="$(INSTALL_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $* $(INSTALL_ARGS) install
 	@$(MAKECOOKIE)
 
 # Ruby makefiles
@@ -732,6 +732,19 @@
 	gfind $(DESTDIR) -type f -iname *.[1-8] -size +2 -print | \
 		gxargs -r gzip --force
 
+compile-elisp:
+	@(for d in $(ELISP_DIRS); do \
+		echo " ===> Compiling .el files in $$d"; \
+		cd $(PKGROOT)/$$d; \
+		for f in `find . -name "*el"`; do \
+			bf=`basename $$f`; \
+			bd=`dirname $$f`; \
+			cd $$bd; \
+			emacs -L $(PKGROOT)/$$d -L $(PKGROOT)/$$d/$$bd $(EXTRA_EMACS_ARGS) -batch -f batch-byte-compile "$$bf"; \
+			cd $(PKGROOT)/$$d; \
+		done; \
+	done)
+
 include $(addprefix $(GARDIR)/,$(EXTRA_LIBS))
 
 # Mmm, yesssss.  cookies my preciousssss!  Mmm, yes downloads it

Modified: csw/mgar/gar/v2-pbuild/gar.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/gar.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -515,7 +515,10 @@
 	@$(call _pmod,Reset install state)
 	@rm -rf $(INSTALLISADIR) $(COOKIEDIR)/install-work
 	@rm -f $(foreach C,pre-install-modulated install-modulated post-install-modulated,$(COOKIEDIR)/$C)
+	@rm -f $(COOKIEDIR)/pre-install-$(MODULATION) $(COOKIEDIR)/post-install-$(MODULATION)
 	@rm -f $(COOKIEDIR)/strip
+	@rm -f $(foreach S,$(INSTALL_TARGETS),$(COOKIEDIR)/$S)
+	@rm -f $(COOKIEROOTDIR)/global/install-$(MODULATION)
 
 # merge in all isas to the package directory after installation
 
@@ -544,9 +547,9 @@
 MERGE_SCRIPTS_isa-$(ISA_DEFAULT) ?= copy-all $(EXTRA_MERGE_SCRIPTS_$(ISA_DEFAULT)) $(EXTRA_MERGE_SCRIPTS)
 else
 ISAEXEC_DIRS ?= $(if $(NO_ISAEXEC),,$(bindir) $(sbindir) $(libexecdir))
-MERGE_DIRS_isa-$(ISA_DEFAULT) ?=
+MERGE_DIRS_isa-$(ISA_DEFAULT) ?= $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA_DEFAULT))
 MERGE_DIRS_isa-$(ISA) ?= $(bindir) $(sbindir) $(libexecdir) $(libdir) $(EXTRA_MERGE_DIRS) $(EXTRA_MERGE_DIRS_isa-$(ISA))
-MERGE_SCRIPTS_isa-$(ISA_DEFAULT) ?= copy-relocate $(EXTRA_MERGE_SCRIPTS_isa-$(ISA)) $(EXTRA_MERGE_SCRIPTS)
+MERGE_SCRIPTS_isa-$(ISA_DEFAULT) ?= copy-relocate $(EXTRA_MERGE_SCRIPTS_isa-$(ISA_DEFAULT)) $(EXTRA_MERGE_SCRIPTS)
 MERGE_SCRIPTS_isa-$(ISA) ?= copy-relocated-only $(EXTRA_MERGE_SCRIPTS_isa-$(ISA)) $(EXTRA_MERGE_SCRIPTS)
 endif
 
@@ -560,7 +563,7 @@
 		)
 ISAEXEC_FILES ?= $(if $(_ISAEXEC_FILES),$(patsubst $(PKGROOT)%,%,		\
 	$(shell for F in $(_ISAEXEC_FILES); do		\
-		if test -f "$$F"; then echo $$F; fi;	\
+		if test -f "$$F" -a \! -h "$$F"; then echo $$F; fi;	\
 	done)),)
 
 ifneq ($(ISAEXEC_FILES),)
@@ -581,11 +584,18 @@
 # This can be defined in category.mk
 MERGE_EXCLUDE_CATEGORY ?= $(_MERGE_EXCLUDE_CATEGORY)
 
+# Support for cswpycompile, skip pre-compiled python files (.pyc, .pyo)
+# during the merge phase.
+_PYCOMPILE_FILES = /opt/csw/lib/python/site-packages/.*\.py
+MERGE_EXCLUDE_PYCOMPILE ?= $(if $(PYCOMPILE), $(addsuffix c,$(_PYCOMPILE_FILES)) $(addsuffix o,$(_PYCOMPILE_FILES)))
+
 MERGE_EXCLUDE_INFODIR ?= $(sharedstatedir)/info/dir
 MERGE_EXCLUDE_LIBTOOL ?= $(libdir)/.*\.la
 MERGE_EXCLUDE_BACKUPFILES ?= .*\~
 MERGE_EXCLUDE_STATICLIBS ?= $(libdir)/.*\.a
-MERGE_EXCLUDE_DEFAULT ?= $(MERGE_EXCLUDE_CATEGORY) $(MERGE_EXCLUDE_INFODIR) $(MERGE_EXCLUDE_LIBTOOL) $(MERGE_EXCLUDE_BACKUPFILES) $(MERGE_EXCLUDE_STATICLIBS)
+# Exclude all other .pc-files apart from the default 32- and 64 bit versions
+MERGE_EXCLUDE_EXTRA_ISA_PKGCONFIG ?= $(if $(filter-out $(ISA_DEFAULT) $(ISA_DEFAULT64),$(ISA)),$(libdir)/.*\.pc)
+MERGE_EXCLUDE_DEFAULT ?= $(MERGE_EXCLUDE_CATEGORY) $(MERGE_EXCLUDE_INFODIR) $(MERGE_EXCLUDE_LIBTOOL) $(MERGE_EXCLUDE_BACKUPFILES) $(MERGE_EXCLUDE_STATICLIBS) $(MERGE_EXCLUDE_EXTRA_ISA_PKGCONFIG) $(MERGE_EXCLUDE_PYCOMPILE)
 
 # Exclude these files
 ifeq ($(origin MERGE_EXCLUDE_FILES_$(MODULATION)), undefined)
@@ -599,7 +609,7 @@
 # Exclude by replacing files with the empty string
 _INC_EXT_RULE = $(foreach F,$(_MERGE_EXCLUDE_FILES),-s ',^\.$F$$,,')
 # Replace files by itself terminating on first match
-_INC_EXT_RULE += $(foreach F,$(_MERGE_INCLUDE_FILES),-s ",^\(\.$F\)\$,\1,")
+_INC_EXT_RULE += $(foreach F,$(_MERGE_INCLUDE_FILES),-s ",^\(\.$F\)$$,\1,")
 
 # These are used during merge phase to determine the base installation directory
 MERGEBASE_$(bindir)     ?= $(bindir_install)
@@ -619,7 +629,7 @@
 # has not, so we use this one for appending.
 
 
-_PAX_ARGS = $(_INC_EXT_RULE) $(EXTRA_PAX_ARGS)
+_PAX_ARGS = $(_INC_EXT_RULE) $(_EXTRA_PAX_ARGS) $(EXTRA_PAX_ARGS_$(MODULATION)) $(EXTRA_PAX_ARGS)
 
 define killprocandparent
 cpids() { \
@@ -641,12 +651,12 @@
 
 
 # The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge merge-do merge-license $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
+merge: checksum pre-merge merge-do merge-license $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) post-merge
 	@$(DONADA)
 
 merge-do: $(if $(PARALLELMODULATIONS),merge-parallel,merge-sequential)
 
-merge-sequential: $(foreach M,$(MODULATIONS),merge-$M)
+merge-sequential: $(addprefix merge-,$(MODULATIONS))
 
 merge-parallel: _PIDFILE=$(WORKROOTDIR)/build-global/multitail.pid
 merge-parallel: merge-watch
@@ -718,7 +728,7 @@
 remerge: reset-merge merge
 
 reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-src
-	@rm -f $(foreach M,$(MODULATIONS),$(COOKIEDIR)/merge-$M) $(COOKIEDIR)/merge
+	@rm -f $(COOKIEDIR)/pre-merge $(foreach M,$(MODULATIONS),$(COOKIEDIR)/merge-$M) $(COOKIEDIR)/merge $(COOKIEDIR)/post-merge
 	@rm -rf $(PKGROOT)
 	@$(DONADA)
 

Modified: csw/mgar/gar/v2-pbuild/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-pbuild/gar.pkg.mk	2009-10-03 08:27:25 UTC (rev 6678)
+++ csw/mgar/gar/v2-pbuild/gar.pkg.mk	2009-10-03 08:47:27 UTC (rev 6679)
@@ -127,13 +127,22 @@
 # 3. There is a svn binary, but not everything was committed properly -> UNCOMMITTED
 # 4. There is a svn binary and everything was committed -> r<revision>
 
+ifndef SPKG_PACKAGER
+  $(warning Please set SPKG_PACKAGER in your .garrc file to your name)
+  SPKG_PACKAGER = Unknown
+endif
+
+ifndef SPKG_EMAIL
+  $(warning Please set SPKG_EMAIL in your .garrc file to your email address)
+  SPKG_EMAIL = Unknown
+endif
+
+
 SPKG_DESC      ?= $(DESCRIPTION)
 SPKG_VERSION   ?= $(GARVERSION)
 SPKG_CATEGORY  ?= application
 SPKG_SOURCEURL ?= $(firstword $(MASTER_SITES))
-SPKG_PACKAGER  ?= Unknown
 SPKG_VENDOR    ?= $(SPKG_SOURCEURL) packaged for CSW by $(SPKG_PACKAGER)
-SPKG_EMAIL     ?= Unknown
 SPKG_PSTAMP    ?= $(LOGNAME)@$(shell hostname)-$(call _REVISION)-$(shell date '+%Y%m%d%H%M%S')
 SPKG_BASEDIR   ?= $(prefix)
 SPKG_CLASSES   ?= none
@@ -141,7 +150,7 @@
 
 SPKG_SPOOLROOT ?= $(DESTROOT)
 SPKG_SPOOLDIR  ?= $(SPKG_SPOOLROOT)/spool.$(GAROSREL)-$(GARCH)
-SPKG_EXPORT    ?= $(WORKDIR)
+SPKG_EXPORT    ?= $(HOME)/staging/build-$(shell date '+%d.%b.%Y')
 SPKG_PKGROOT   ?= $(PKGROOT)
 SPKG_PKGBASE   ?= $(PKGROOT)
 SPKG_WORKDIR   ?= $(CURDIR)/$(WORKDIR)
@@ -152,17 +161,24 @@
 
 # Handle cswclassutils
 # - prepend cswpreserveconf if it is not already in SPKG_CLASSES
-SPKG_CLASSES += $(if $(SAMPLECONF),$(if $(filter cswsampleconf,$(SPKG_CLASSES)),,cswsampleconf))
-SPKG_CLASSES += $(if $(PRESERVECONF),$(if $(filter cswpreserveconf,$(SPKG_CLASSES)),,cswpreserveconf))
-SPKG_CLASSES += $(if $(INITSMF),$(if $(filter cswinitsmf,$(SPKG_CLASSES)),,cswinitsmf))
+SPKG_CLASSES := $(SPKG_CLASSES) $(if $(SAMPLECONF),$(if $(filter cswcpsampleconf,$(SPKG_CLASSES)),,cswcpsampleconf))
+SPKG_CLASSES := $(SPKG_CLASSES) $(if $(PRESERVECONF),$(if $(filter cswpreserveconf,$(SPKG_CLASSES)),,cswpreserveconf))
+SPKG_CLASSES := $(SPKG_CLASSES) $(if $(INITSMF),$(if $(filter cswinitsmf,$(SPKG_CLASSES)),,cswinitsmf))
+SPKG_CLASSES := $(SPKG_CLASSES) $(if $(USERGROUP),$(if $(filter cswusergroup,$(SPKG_CLASSES)),,cswusergroup))
+SPKG_CLASSES := $(SPKG_CLASSES) $(if $(PYCOMPILE),$(if $(filter cswpycompile,$(SPKG_CLASSES)),,cswpycompile))
 # - set class for all config files
-ifneq ($(SAMPLECONF)$(PRESERVECONF)$(INITSMF),)
+ifneq ($(SAMPLECONF)$(PRESERVECONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE),)
 _CSWCLASS_FILTER = | perl -ane '\
-		$(foreach FILE,$(SAMPLECONF),$$F[1] = "cswsampleconf" if ( $$F[2] =~ m(^$(FILE)$$) );)\
-		$(foreach FILE,$(PRESERVECONF),$$F[1] = "cswpreserveconf" if( $$F[2] =~ m(^$(FILE)$$) );)\
-		$(foreach FILE,$(INITMF),$$F[1] = "cswinitsmf" if( $$F[2] =~ m(^$(FILE)$$) );)\
+		$(foreach FILE,$(SAMPLECONF:%\.CSW=%),$$F[1] = "cswcpsampleconf" if ( $$F[2] =~ m(^$(FILE)\.CSW$$) );)\
+		$(foreach FILE,$(PRESERVECONF:%\.CSW=%),$$F[1] = "cswpreserveconf" if( $$F[2] =~ m(^$(FILE)\.CSW$$) );)\
+		$(foreach FILE,$(INITSMF),$$F[1] = "cswinitsmf" if( $$F[2] =~ m(^$(FILE)$$) );)\
+		$(foreach FILE,$(USERGROUP),$$F[1] = "cswusergroup" if( $$F[2] =~ m(^$(FILE)$$) );)\
+		$(if $(PYCOMPILE),$(foreach FILE,$(_PYCOMPILE_FILES),$$F[1] = "cswpycompile" if( $$F[2] =~ m(^$(FILE)$$) );))\
 		print join(" ", at F),"\n";'
 _EXTRA_GAR_PKGS += CSWcswclassutils
+# Make sure the configuration files always have a .CSW suffix and rename the
+# configuration files to this if necessary during merge.
+_EXTRA_PAX_ARGS += $(foreach FILE,$(SAMPLECONF:%\.CSW=%) $(PRESERVECONF:%\.CSW=%),-s ",^\.\($(FILE)\)$$,.\1\.CSW,p")
 endif
 
 PKGGET_DESTDIR ?=
@@ -211,7 +227,7 @@
 # between the prefix and the suffix.
 # usage: $(call isadirs,<prefix>,<suffix>)
 # expands to <prefix>/<isa1>/<suffix> <prefix>/<isa2>/<suffix> ...
-isadirs = $(foreach ISA,$(ISALIST),$(1)/$(ISA)/$(2))
+isadirs = $(foreach ISA,$(ISALIST),$(1)/$(subst +,\+,$(subst -,\-,$(ISA)))/$(2))
 
 # This is a helper function just like isadirs, but also contains the
 # prefix and suffix without an ISA subdirectories inserted.
@@ -441,6 +457,14 @@
 $(if $($(1)_$(2)),$($(1)_$(2)),$($(1)))
 endef
 
+# Make sure every producable package contains specific descriptions.
+# We explicitly ignore NOPACKAGE here to disallow circumventing the check.
+$(foreach P,$(SPKG_SPECS),\
+  $(foreach Q,$(filter-out $P,$(SPKG_SPECS)),\
+    $(if $(shell if test "$(SPKG_DESC_$P)" = "$(SPKG_DESC_$Q)"; then echo ERROR; fi),\
+      $(error The package descriptions for $P and $Q are identical, please make sure all package descriptions are unique by setting SPKG_DESC_<pkg> for each package) \
+)))
+
 .PRECIOUS: $(WORKDIR)/%.pkginfo
 $(WORKDIR)/%.pkginfo: $(WORKDIR)
 	$(_DBG)(echo "PKG=$*"; \
@@ -552,10 +576,15 @@
 # unpacked to global/ for packaging. E. g. 'merge' depends only on the specific
 # modulations and does not fill global/.
 package: validateplatform checksum merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package
+	@echo
+	@echo "The following packages have been built:"
+	@echo
+	@$(foreach SPEC,$(_PKG_SPECS),echo $(SPEC);echo "  $(SPKG_EXPORT)/$(shell $(call _PKG_ENV,$(SPEC)) $(GARBIN)/mkpackage -qs $(WORKDIR)/$(SPEC).gspec -D pkgfile).gz";)
+	@echo
 	@$(DONADA)
 
 # The dynamic pkginfo is only generated for dynamic gspec-files
-package-%: $(WORKDIR)/%.gspec $(if $(filter %.gspec,$(DISTFILES)),,$(WORKDIR)/%.pkginfo) $(WORKDIR)/%.prototype-$(GARCH) $(WORKDIR)/%.depend
+package-%: $(WORKDIR)/%.gspec $(if $(findstring %.gspec,$(DISTFILES)),,$(WORKDIR)/%.pkginfo) $(WORKDIR)/%.prototype-$(GARCH) $(WORKDIR)/%.depend
 	@echo " ==> Processing $*.gspec"
 	$(_DBG)( $(call _PKG_ENV,$*) mkpackage --spec $(WORKDIR)/$*.gspec \
 						 --spooldir $(SPKG_SPOOLDIR) \

Copied: csw/mgar/gar/v2-pbuild/general-help (from rev 6678, csw/mgar/gar/v2/general-help)
===================================================================
--- csw/mgar/gar/v2-pbuild/general-help	                        (rev 0)
+++ csw/mgar/gar/v2-pbuild/general-help	2009-10-03 08:47:27 UTC (rev 6679)
@@ -0,0 +1,4 @@
+Please go here for more detailed documentation:
+
+  http://sourceforge.net/apps/trac/gar/wiki/GarRepository
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list