ooo-build r12209 - in trunk: . patches



Author: pmladek
Date: Thu Apr 17 22:28:05 2008
New Revision: 12209
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12209&view=rev

Log:
2008-04-17  Petr Mladek  <pmladek suse cz>

	* configure.in, Makefile.shared, patches/apply.pl.in: add the configure
	  option --with-additional-sections; It allows to apply the
	  experimental sections easily without changing the apply file;
	  useful to produce various test builds



Modified:
   trunk/ChangeLog
   trunk/Makefile.shared
   trunk/configure.in
   trunk/patches/apply.pl.in

Modified: trunk/Makefile.shared
==============================================================================
--- trunk/Makefile.shared	(original)
+++ trunk/Makefile.shared	Thu Apr 17 22:28:05 2008
@@ -25,6 +25,9 @@
 		if grep localize.sdf $(OOBUILDDIR)/sw/source/ui/app/localize.sdf > /dev/null 2>&1 ; then \
 			FLAGS="$$FLAGS --distro=Localize"; \
 		fi ; \
+		if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
+			FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
+		fi ; \
 		chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS -f -R ; \
 	fi
 	cd $(top_srcdir)/bin ; ./unpack
@@ -85,6 +88,9 @@
 	if test $(OOO_LANGS) != en-US ; then \
 		FLAGS="$$FLAGS --distro=Localize"; \
 	fi ; \
+	if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
+		FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
+	fi ; \
 	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --tag=$(CVSTAG) ;
 	$(TOOLSDIR)/bin/transform --apply $(TOOLSDIR) $(OOBUILDDIR)
 	$(TOOLSDIR)/bin/fix-deps $(OOBUILDDIR)
@@ -106,6 +112,9 @@
 	if grep localize.sdf $(OOBUILDDIR)/sw/source/ui/app/localize.sdf > /dev/null 2>&1 ; then \
 		FLAGS="$$FLAGS --distro=Localize"; \
 	fi ; \
+	if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
+		FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
+	fi ; \
 	chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS -R ;
 	rm -f $(STAMP_DIR)/patch.apply
 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Apr 17 22:28:05 2008
@@ -69,6 +69,17 @@
 			Example:  --with-poor-help-localizations="af ar ca"],
 ,)
 
+AC_ARG_WITH(additional-sections,
+[
+  --with-additional-sections
+			define list of additional sections that should be
+			enabled in the apply file; It allows to easily
+			enable experimental sets of patches that are not
+			applied by default.
+
+			Example:
+			    --with-additional-sections="EMFPlus PostgreSQL"
+],,)
 
 AC_ARG_ENABLE(dbgutil,
 [  --enable-dbgutil:       Include additional debugging utilities, such as
@@ -994,6 +1005,23 @@
 AC_MSG_RESULT([$OOO_POOR_HELP_LOCALIZATIONS])
 AC_SUBST(OOO_POOR_HELP_LOCALIZATIONS)
 
+AC_MSG_CHECKING([for additional sections])
+OOO_ADDITIONAL_SECTIONS=
+if test -n "$with_additional_sections" -a \
+	"$with_additional_sections" != "no" -a \
+	"$with_additional_sections" != "yes" ; then
+    # change the delimiter from the space to the comma
+    for section in $with_additional_sections ; do
+	if test -z "$OOO_ADDITIONAL_SECTIONS" ; then
+	    OOO_ADDITIONAL_SECTIONS="$section"
+	else
+	    OOO_ADDITIONAL_SECTIONS="$OOO_ADDITIONAL_SECTIONS,$section"
+	fi
+    done
+fi
+AC_MSG_RESULT([$OOO_ADDITIONAL_SECTIONS])
+AC_SUBST(OOO_ADDITIONAL_SECTIONS)
+
 AC_MSG_CHECKING([whether to enable Mono bindings])
 if test -n "$enable_mono" ; then
     if test "$enable_mono" != "no" ; then
@@ -1290,6 +1318,7 @@
 	tools dir:          $TOOLSDIR
 	src package dir:    $SRCDIR
 	distro:             $DISTRO
+	add sections:       ${OOO_ADDITIONAL_SECTIONS:-no}
 	widget sets:        ${widget_sets:-disabled}
 	openclipart:        ${OPENCLIPART_VER:-${OPENCLIPART_DIR:-no}}
 	mono bindings:	    $mono_enabled

Modified: trunk/patches/apply.pl.in
==============================================================================
--- trunk/patches/apply.pl.in	(original)
+++ trunk/patches/apply.pl.in	Thu Apr 17 22:28:05 2008
@@ -542,6 +542,16 @@
             if (/\s*([_\S]+)\s*:\s*(.*)/) {
 		my $key = $1;
 		my @value = (split /\s*,\s*/, $2);
+
+		# additional sections for the distro might get passed via the command line
+		# they must be applied only once; we apply them for the main distro that is
+		# listed first; it helps to preserve the same order of patches like when
+		# the section is applied by default
+		if (($key eq $forDistro) && !$additional_sections_applied ) {
+		    push @value, (split /\s*,\s*/, $additional_sections);
+		    $additional_sections_applied = 1;
+		}
+		
 		$subsets{$key} = [ value];
 		@selected_subsets = select_subset (\%subsets, $forDistro);
 		$referenced_subsets{$key} = 1;
@@ -999,6 +1009,8 @@
 $export = 0;
 $opts = "";
 @distros = ();
+$additional_sections = "";
+$additional_sections_applied = 0;
 $tag = '';
 $dry_run = 0;
 $find_unused = 0;
@@ -1033,6 +1045,8 @@
 	    $quiet = 1;
 	} elsif ($a =~ m/--distro=(.*)/) {
 	    push @distros, $1;
+	} elsif ($a =~ m/--additional-sections=(.*)/) {
+	    $additional_sections="$1";
 	} elsif ($a =~ m/--add-developer/) {
 	    $add_developer = 1;
 	    $quiet = 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]