[Lunar-commits] CVS: moonbase/zbeta/openoffice-src ooo-langs, NONE, 1.1 BUILD, 1.9, 1.10 CONFIGURE, 1.3, 1.4 DETAILS, 1.12, 1.13 PRE_BUILD, 1.4, 1.5

Steven Michalske hardkrash at lunar-linux.org
Wed Oct 13 04:28:14 UTC 2004


Update of /var/cvs/lunar/moonbase/zbeta/openoffice-src
In directory espresso.foo-projects.org:/tmp/cvs-serv20044

Modified Files:
	BUILD CONFIGURE DETAILS PRE_BUILD 
Added Files:
	ooo-langs 
Log Message:

new and improved oo-src module now builds in a third of the time, as long as you dont make the 23 localizations!

now has a lunar patch set and a lunar logo
the logo kind is lacking but its nicer that the novell one

enjoy


--- NEW FILE: ooo-langs ---
ENUS English off
FREN French off
GERM German off
SPAN Spanish off
ITAL Italian off
DTCH Dutch off
PORT Portuguese off
SWED Swedish off
POL Polish off
RUSS Russian off
DAN Danish off
GREEK Greek off
TURK Turkish off
CHINSIM ChineseSimplified off
CHINTRAD ChineseTraditional off
JAPN Japaneese off
KOREAN Korean off
CAT meow? off
CZECH Czechoslovakian off
SLOVAK Slovakian off
FINN Finnish off
ARAB Arabic off
HUNG Hungarian off
ESTONIAN Estonian off
SLOVENIAN Slovenian off

Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/zbeta/openoffice-src/BUILD,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- BUILD	28 Aug 2004 03:43:52 -0000	1.9
+++ BUILD	13 Oct 2004 04:28:12 -0000	1.10
@@ -1,27 +1,45 @@
+install_dicts ()
+{
+	# unpack the dictionaries
+	for file in $SOURCE_DIRECTORY/ooo-dicts-lunar/*
+	do
+		install -m 644 $file /usr/lib/ooo-1.1/share/dict/ooo/
+	done &&
+	# install the system dictionaries
+	install -m 444 $TMP_DICT_LIST \
+	    /usr/lib/ooo-1.1/share/dict/ooo/dictionary.lst 
+	# strip the cruft? READMES and such?
+} 
+
 (
   cd $SOURCE_DIRECTORY 				&&
 
   if module_installed j2sdk; then
     export OPTS="$OPTS --enable-java --with-jdk-home=/usr/lib/j2sdk1.4.1/"
-  fi   						
+  fi &&  						
 
   if module_installed j2sdk-beta; then
      export OPTS="$OPTS --enable-java --with-jdk-home=/usr/lib/j2sdk1.4.2/"
-  fi                                            
+  fi &&                      
+
+  # set language options in setup.in
+  sedit "/^LANGS=\"\$LANGS/d" bin/setup.in      &&
+  sedit "/^LANGS=/s/\".*\"/\"$SEL_LANGS\"/" bin/setup.in  &&
 
   ./configure	--prefix=/usr 			\
 		--sysconfdir=/etc 		\
                 --with-system-gcc 		\
                 --enable-devel    		\
                 --disable-dependency-tracking   \
+		--with-distro=LUNAR             \
                 --with-icons=gnome              \
                 --with-ccache-allowed           \
 		--with-docdir=/usr/share/OpenOffice.org \
 		--with-tag=OOO_1_1_3_fix2       \
                 --enable-gtk                    \
- 		$OPTS 				&&
-
+		$OPTS 				&&
   default_make   				&&
+  install_dicts                                 &&
 
   cp etc/autoresponse.conf /etc/openoffice 	&&
   cd desktop                               	&&

Index: CONFIGURE
===================================================================
RCS file: /var/cvs/lunar/moonbase/zbeta/openoffice-src/CONFIGURE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CONFIGURE	28 Aug 2004 03:43:52 -0000	1.3
+++ CONFIGURE	13 Oct 2004 04:28:12 -0000	1.4
@@ -1,10 +1,87 @@
-message  "${MESSAGE_COLOR}**WARNING** This module will take alot of time and resources to"  
-message  "compile, just to give you a idea you will need atleast" 
-message  "4GB worth of free space, compile time will depend on" 
-message  "your CPU and RAM on your system.  On a Athlon XP 1800+ it took a" 
-message  "good 7-8 hours to compile"
-message  ""
-message  "If you wish to compile Java into OpenOffice.org, please exit"
-message  "this install and lin j2sdk or j2sdk-beta to enable Java support."
+if [ ! "`get_module_config shown_message`" == "yes" ]; then
+    set_module_config shown_message yes
+    message  "${MESSAGE_COLOR}**WARNING** This module will take alot of time and resources to"  
+    message  "compile, just to give you a idea you will need atleast" 
+    message  "4GB worth of free space, compile time will depend on" 
+    message  "your CPU and RAM on your system.  On a Athlon XP 1800+ it used " 
+    message  "to take good 7-8 hours to compile with all the languages"
+    message  "It now takes about 3 times less time."
+    message  ""
+    message  "If you wish to compile Java into OpenOffice.org, please exit"
+    message  "this install and lin j2sdk or j2sdk-beta to enable Java support."
 
-sleep 5
+    sleep 5
+fi
+
+LGET ()
+{
+    #only works in a lunar script as get_url is defined by download.lunar
+    # and $SOURCE_CACHE is an internal lunar variable
+    get_url $1 $SOURCE_CACHE/`basename $1`
+}
+
+Select_dicts ()
+{
+    # Configure happens before normal downloading of sources.
+    for file in $SOURCE5 $SOURCE6 $SOURCE7
+    do
+    	if [ ! -e $SOURCE_CACHE/`basename $file` ]; then
+            LGET $DICT_URL/$file
+	fi
+    done
+    
+    OLD_IFS=$IFS
+    IFS=":"
+         DICTS=(`awk 'BEGIN {FS=","; OFS=":"; ORS=":"}{ print $4,$3,"off" }' \
+                      $SOURCE_CACHE/available.lst`)
+    HYPH_DICTS=(`awk 'BEGIN {FS=","; OFS=":"; ORS=":"}{ print $4,$3,"off" }' \
+                      $SOURCE_CACHE/hyphavail.lst`)
+    THES_DICTS=(`awk 'BEGIN {FS=","; OFS=":"; ORS=":"}{ print $4,$3,"off" }' \
+                      $SOURCE_CACHE/thesavail.lst`)
+
+    SEL_DICTS=` \
+    dialog --stdout --backtitle "OpenOffice dictionary selection" --single-quoted \
+           --checklist "Select spellchecker dictionaries to install" 0 60 10 \
+           ${DICTS[@]}`
+    SEL_HYPH_DICTS=` \
+    dialog --stdout --backtitle "OpenOffice dictionary selection" --single-quoted \
+           --checklist "Select hyphenation dictionaries to install" 0 60 10 \
+           ${HYPH_DICTS[@]}`
+    SEL_THES_DICTS=` \
+    dialog --stdout --backtitle "OpenOffice dictionary selection" --single-quoted  \
+           --checklist "Select thesaurus dictionaries to install" 0 60 10 \
+           ${THES_DICTS[@]}`
+
+    # Yes after the dialog stuff otherwise it breaks
+    IFS=$OLD_IFS
+}
+
+select_languages()
+{
+    AVA_LANGS=`cat $SCRIPT_DIRECTORY/ooo-langs` &&
+    SEL_LANGS=` \
+    dialog --stdout --backtitle "OpenOffice language support" --single-quoted \
+               --checklist "Select which languages you wish to have the menus in." 0 0 10 $AVA_LANGS`
+}
+
+# This dates the CONFIGURE file allowing us to force a reconfigure :-)
+if [ -z "`get_module_config CONFIGURED_DATE`" ] || [ `get_module_config CONFIGURED_DATE` -lt "2004101300" ]; then
+
+    dialog --backtitle "OpenOffice dictionary selection" \
+           --msgbox "The following menus will provide the selection for the dictionaries for the spellchecker, hyphenation rules, and thesaurus as well as provide selection of the languages used in the menus" 10 60
+
+    Select_dicts &&
+    select_languages &&
+
+    # format the dictionaries in a nice fashion.
+    SEL_DICTS=`echo $SEL_DICTS |sed -e "s/'[[:space:]]*'/;/g" -e "s/['[:space:]]*$//" -e "s/^['[:space:]]*//"`
+    SEL_HYPH_DICTS=`echo $SEL_HYPH_DICTS |sed -e "s/'[[:space:]]*'/;/g" -e "s/['[:space:]]*$//" -e "s/^['[:space:]]*//"`
+    SEL_THES_DICTS=`echo $SEL_THES_DICTS |sed -e "s/'[[:space:]]*'/;/g" -e "s/['[:space:]]*$//" -e "s/^['[:space:]]*//"`
+        
+    set_module_config CONFIGURED_DATE `date +%Y%m%d%H`
+    set_module_config SEL_DICTS      "\"$SEL_DICTS\""
+    set_module_config SEL_HYPH_DICTS "\"$SEL_HYPH_DICTS\""
+    set_module_config SEL_THES_DICTS "\"$SEL_THES_DICTS\""
+    set_module_config SEL_LANGS      "\"$SEL_LANGS\""
+
+fi

Index: DETAILS
===================================================================
RCS file: /var/cvs/lunar/moonbase/zbeta/openoffice-src/DETAILS,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- DETAILS	5 Oct 2004 09:30:24 -0000	1.12
+++ DETAILS	13 Oct 2004 04:28:12 -0000	1.13
@@ -1,18 +1,41 @@
           MODULE=openoffice-src
          VERSION=1.1.3
-          SOURCE=ooo-build-1.3.2.tar.gz
+          SOURCE=ooo-build-1.3.5.5.tar.gz
           SOURCE2=OOO_1_1_3_fix2.tar.bz2
           SOURCE3=ooo-icons-OOO_1_1-10.tar.gz
           SOURCE4=libwpd-snap-20040823.tar.gz
+	  SOURCE5=available.lst
+	  SOURCE6=hyphavail.lst
+	  SOURCE7=thesavail.lst
+	  SOURCE8=ooo-lunar-patches.tar.bz2
+	  SOURCE9=ooo-lunar-misc.patch.bz2
+	  DICT_URL="http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/"
       SOURCE_URL=http://ooo.ximian.com/packages/OOO_1_1_2/
-      SOURCE_VFY=sha1:1e3a61b694a689cb42d59375c8113a5a491d3b99
+      #SOURCE_VFY=sha1:1e3a61b694a689cb42d59375c8113a5a491d3b99
      SOURCE2_URL=http://ooo.ximian.com/packages/OOO_1_1_3/
      SOURCE2_VFY=sha1:a1d9d582c3a6321b66970cd4e8f2bd4e78410e44
      SOURCE3_URL=http://ooo.ximian.com/packages/
      SOURCE3_VFY=sha1:1e7b35e9adf8e51c90b43728f23af49685bf47c2
      SOURCE4_URL=http://ooo.ximian.com/packages/
      SOURCE4_VFY=sha1:a39cb2fcc9e76985a5563bda865b1d5b2faef7ab
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/ooo-build-1.3.2
+     SOURCE5_URL=$DICT_URL
+     SOURCE6_URL=$DICT_URL
+     SOURCE7_URL=$DICT_URL
+     SOURCE8_URL=$PATCH_URL
+     SOURCE9_URL=$PATCH_URL
+     #if [ -e $MODULE_CONFIG ] && `grep -q echo_dict_files $MODULE_CONFIG` ; then
+     if [ -e $DEPENDS_CONFIG/$MODULE ] \
+       && `grep -q echo_dict_files $DEPENDS_CONFIG/$MODULE` ; then
+         . $DEPENDS_CONFIG/$MODULE
+         SRC_CNT=10
+         for src in `echo_dict_files` 
+         do
+             eval SOURCE${SRC_CNT}=$src
+             eval SOURCE${SRC_CNT}_URL=$DICT_URL
+	     (( SRC_CNT = $SRC_CNT + 1 ))
+         done
+     fi
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/ooo-build-1.3.5.5
       MAINTAINER=nhudson at lunar-linux.org
         WEB_SITE=http://ooo.ximian.com
          ENTERED=20030805

Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/zbeta/openoffice-src/PRE_BUILD,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- PRE_BUILD	28 Aug 2004 03:43:52 -0000	1.4
+++ PRE_BUILD	13 Oct 2004 04:28:12 -0000	1.5
@@ -1,8 +1,121 @@
-( 
-  default_pre_build 		 &&
-  cd $SOURCE_DIRECTORY 		 &&
-  mkdir -p src 			 &&
+delete_function( )
+{
+# pass the name and the file that you want the function removed from
+# $1 function name
+# $2 file name
+
+    #Use awk to yank cheats since we dont have any "}" in the function
+    awk 'BEGIN{p=1} /^'"$1"'/{ p=0 } p==1{print $0} p==0 && /^[[:space:]]*}/{p=1}' $2 > $2.tmp
+    mv $2.tmp $2
+}
+
+LGET ()
+{
+    #only works in a lunar script as get_url is defined by download.lunar
+    # and $SOURCE_CACHE is an internal lunar variable
+    get_url $1 $SOURCE_CACHE/`basename $1`
+}
+
+unpack_dicts ()
+{
+    mkdir -p $SOURCE_DIRECTORY/ooo-dicts-lunar/ &&
+    for file in $DICT_FILES
+    do
+        unzip $SOURCE_CACHE/$file -d $SOURCE_DIRECTORY/ooo-dicts-lunar
+    done
+}
+
+# needs export for BUILD file
+export TMP_DICT_LIST="/tmp/lunar_ooo_Dictionary.list"
+
+download_dict_files ()
+{
+    #function locals
+    FUNC_DEPENDS_FILE="$DEPENDS_CONFIG/$MODULE"
+    TMP_FILE_LIST="/tmp/lunar_ooo_Files.list"
+
+    #clear vars
+    SEL_DICT_FILES=""
+    SEL_HYPH_DICT_FILES=""
+    SEL_THES_DICT_FILES=""
+
+    lock_file $TMP_DICT_LIST &&
+    lock_file $TMP_FILE_LIST &&
+    # clear any stale tmp files this is why we lock them :-)
+    rm -f $TMP_DICT_LIST     &&
+    rm -f $TMP_FILE_LIST     &&
+    
+    OLD_IFS=$IFS &&
+    IFS=";" &&
+    # gets the files and builds the proper config files
+    for file in $SEL_DICTS
+    do
+        tmp_file=`grep -h -m1 $file $SOURCE_CACHE/available.lst | cut -d"," -f5`
+        SEL_DICTS_FILES="$SEL_DICTS_FILES $tmp_file"
+        echo "DICT `grep -h -m1 $file  $SOURCE_CACHE/available.lst | cut -d"," -f 1,2,3 | tr "," " " `" >> $TMP_DICT_LIST
+	echo $tmp_file >> $TMP_FILE_LIST
+        if [ ! -e $SOURCE_CACHE/$tmp_file ]; then
+            LGET "$DICT_URL/$tmp_file"
+        fi
+    done &&
+    for file in $SEL_HYPH_DICTS 
+    do
+    	tmp_file=`grep -h -m1 $file $SOURCE_CACHE/hyphavail.lst | cut -d"," -f5`
+        SEL_HYPH_DICTS_FILES="$SEL_HYPH_DICTS_FILES $tmp_file"
+        echo "HYPH `grep -h -m1 $file $SOURCE_CACHE/hyphavail.lst | cut -d"," -f 1,2,3 | tr "," " " `" >> $TMP_DICT_LIST
+	echo $tmp_file >> $TMP_FILE_LIST
+        if [ ! -e $SOURCE_CACHE/$tmp_file ]; then
+            LGET "$DICT_URL/$tmp_file"
+        fi
+    done &&
+    for file in $SEL_THES_DICTS
+    do
+        tmp_file=`grep -h -m1 $file $SOURCE_CACHE/thesavail.lst | cut -d"," -f5`
+        SEL_THES_DICTS_FILES="$SEL_THES_DICTS_FILES $tmp_file"
+        echo "THES `grep -h -m1 $file $SOURCE_CACHE/thesavail.lst | cut -d"," -f 1,2,3 | tr "," " " `" >> $TMP_DICT_LIST
+	echo $tmp_file >> $TMP_FILE_LIST
+        if [ ! -e $SOURCE_CACHE/$tmp_file ]; then
+            LGET "$DICT_URL/$tmp_file"
+        fi
+    done &&
+    IFS=$OLD_IFS  &&
+   
+    #remove any duplicate entries
+    sort $TMP_FILE_LIST | uniq > $TMP_FILE_LIST.uniq &&
+    mv $TMP_FILE_LIST.uniq $TMP_FILE_LIST &&
+    unlock_file $TMP_DICT_LIST &&
+
+    DICT_FILES="" &&
+    while read FILE
+    do
+        DICT_FILES="$DICT_FILES $FILE"
+    done < $TMP_FILE_LIST &&
+
+    # We are done with the file list, but we need the DICT list for install
+    # in the BUILD file
+   # rm -f $TMP_FILE_LIST       &&
+    unlock_file $TMP_FILE_LIST &&
+
+    #Add the file listing function to the depends/config file
+    lock_file $FUNC_DEPENDS_FILE &&
+    delete_function "echo_dict_files" $FUNC_DEPENDS_FILE &&
+    echo "echo_dict_files(){" >> $FUNC_DEPENDS_FILE &&
+    echo "echo $DICT_FILES"        >> $FUNC_DEPENDS_FILE &&
+    echo "}"                  >> $FUNC_DEPENDS_FILE &&
+    unlock_file $FUNC_DEPENDS_FILE 
+}
+
+
+(
+  default_pre_build              &&
+  cd $SOURCE_DIRECTORY           &&
+  mkdir -p src                   &&
   cp $SOURCE_CACHE/$SOURCE2 src/ &&
   cp $SOURCE_CACHE/$SOURCE3 src/ &&
-  cp $SOURCE_CACHE/$SOURCE4 src/ 
+  cp $SOURCE_CACHE/$SOURCE4 src/ &&
+  unpack $SOURCE8                &&
+  patch_it $SOURCE9 0            &&
+
+  download_dict_files            &&
+  unpack_dicts
 )



More information about the Lunar-commits mailing list