Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master binary grimoire by Julien ROZO (e0d1cf3af7ae0661cb56fb580bafc41e46380bfd)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Julien ROZO <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master binary grimoire by Julien ROZO (e0d1cf3af7ae0661cb56fb580bafc41e46380bfd)
  • Date: Mon, 24 Nov 2008 17:33:04 -0600

GIT changes to master binary grimoire by Julien ROZO <julien AT rozo.org>:

ChangeLog | 5
bin-editors/openoffice3-bin-lang/BUILD | 1
bin-editors/openoffice3-bin-lang/CONFIGURE | 35 ++++++
bin-editors/openoffice3-bin-lang/DETAILS | 15 ++
bin-editors/openoffice3-bin-lang/HISTORY | 4
bin-editors/openoffice3-bin-lang/INSTALL | 7 +
bin-editors/openoffice3-bin-lang/PRE_BUILD | 26 +++++
bin-editors/openoffice3-bin/FINAL | 1
bin-editors/openoffice3-bin/HISTORY | 3
config_query_multi.function | 147
+++++++++++++++++++++++++++++
10 files changed, 244 insertions(+)

New commits:
commit e0d1cf3af7ae0661cb56fb580bafc41e46380bfd
Author: Julien ROZO <julien AT rozo.org>
Commit: Julien ROZO <julien AT rozo.org>

openoffice3-bin: added FINAL to suggest to add languagepacks

commit 39a6b969c8b470637411c83640c24c7e4704d3b2
Author: Julien ROZO <julien AT rozo.org>
Commit: Julien ROZO <julien AT rozo.org>

openoffice3-bin-lang: new spell, languagepacks for openoffice3-bin
Actually, only three packs are really available for the moment : French,
Netherlands and Vietnamese

based on kde4-l10n spell for the language selection

commit f90eeeb195509c53cc45692e4c72a800136edda5
Author: Julien ROZO <julien AT rozo.org>
Commit: Julien ROZO <julien AT rozo.org>

added config_query_multi.function from test grimoire

diff --git a/ChangeLog b/ChangeLog
index 4590dba..b193b0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-24 Julien "_kaze_" ROZO <julien AT rozo.org>
+ * config_query_multi.function: added from test grimoire
+ * bin-editors/openoffice3-bin-lang: new spell, languagepacks for
+ openoffice3-bin
+
2008-11-10 Julien "_kaze_" ROZO <julien AT rozo.org>
* bin-games/openarena-bin: moved spell from z-rejected

diff --git a/bin-editors/openoffice3-bin-lang/BUILD
b/bin-editors/openoffice3-bin-lang/BUILD
new file mode 100755
index 0000000..27ba77d
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/BUILD
@@ -0,0 +1 @@
+true
diff --git a/bin-editors/openoffice3-bin-lang/CONFIGURE
b/bin-editors/openoffice3-bin-lang/CONFIGURE
new file mode 100755
index 0000000..e4612ef
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/CONFIGURE
@@ -0,0 +1,35 @@
+source $GRIMOIRE/config_query_multi.function &&
+
+local CFG=$SPELL_CONFIG
+
+get_ooo3languages() {
+ local i LANGUAGE LANGUAGES &&
+ rm -f $CFG &&
+ touch $CFG &&
+
+config_query_multi OOO3_LANG "please specify the desired languages" \
+fr nl vi &&
+
+# should perhaps use SOURCE_IGNORE=unversioned instead of MD5[0]="IGNORE"
+ local i=1 &&
+ for LANGUAGE in $OOO3_LANG; do
+ if [[ $i == 1 ]]; then
+ echo SOURCE=OOo_\${VERSION}_LinuxIntel_langpack_$LANGUAGE.tar.gz
>> $CFG &&
+ echo SOURCE_URL[0]=\$SITE/$LANGUAGE/\${VERSION}/\$SOURCE
>> $CFG
+ else
+ echo
SOURCE$i=OOo_\${VERSION}_LinuxIntel_langpack_$LANGUAGE.tar.gz >> $CFG &&
+ echo SOURCE${i}_URL[0]=\$SITE/$LANGUAGE/\${VERSION}/\$SOURCE$i
>> $CFG
+ fi &&
+ echo MD5[$[$i-1]]="IGNORE" >> $CFG &&
+ i=$[$i+1]
+ done
+}
+
+if [[ -z $OOO3_LANG ]] || query "Reconfigure?" n
+then
+ get_ooo3languages
+else
+ message "${MESSAGE_COLOR}Using existing config${DEFAULT_COLOR}"
+fi &&
+
+. $CFG
diff --git a/bin-editors/openoffice3-bin-lang/DETAILS
b/bin-editors/openoffice3-bin-lang/DETAILS
new file mode 100755
index 0000000..1298d00
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/DETAILS
@@ -0,0 +1,15 @@
+# the remaining details of this spell are provided by CONFIGURE
+ SPELL=openoffice3-bin-lang
+ VERSION=3.0.0
+ OO_ARCH=i586
+ SITE=http://mirrors.isc.org/pub/openoffice/localized
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL
+source $SPELL_CONFIG
+ LICENSE[0]=LGPL
+ WEB_SITE=http://www.openoffice.org/
+ ENTERED=20081124
+ ARCHIVE="off"
+ SHORT="languagepacks for OpenOffice.org 3"
+cat << EOF
+Various languagepacks for OpenOffice.org 3
+EOF
diff --git a/bin-editors/openoffice3-bin-lang/HISTORY
b/bin-editors/openoffice3-bin-lang/HISTORY
new file mode 100644
index 0000000..3281f13
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/HISTORY
@@ -0,0 +1,4 @@
+2008-11-24 Julien "_kaze_" ROZO <julien AT rozo.org>
+ * DETAILS, BUILD, CONFIGURE, INSTALL, PRE_BUILD, HISTORY:
+ created this spell
+
diff --git a/bin-editors/openoffice3-bin-lang/INSTALL
b/bin-editors/openoffice3-bin-lang/INSTALL
new file mode 100755
index 0000000..312a9f0
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/INSTALL
@@ -0,0 +1,7 @@
+INSTALLDIR=$INSTALL_ROOT/opt &&
+mkdir -pv $INSTALLDIR/ &&
+local SS &&
+for SS in $OOO3_LANG; do
+ cd $SOURCE_DIRECTORY/OO*$SS*/RPMS &&
+ cp -Rv opt/* $INSTALLDIR
+done
diff --git a/bin-editors/openoffice3-bin-lang/PRE_BUILD
b/bin-editors/openoffice3-bin-lang/PRE_BUILD
new file mode 100755
index 0000000..34bcf8b
--- /dev/null
+++ b/bin-editors/openoffice3-bin-lang/PRE_BUILD
@@ -0,0 +1,26 @@
+. $SPELL_CONFIG &&
+
+mk_source_dir $SOURCE_DIRECTORY &&
+cd $SOURCE_DIRECTORY &&
+
+# unpack all source files
+local i SS &&
+i=1 &&
+for SS in $OOO3_LANG; do
+ if [[ $i == 1 ]];then
+ unpack_file
+ else
+ unpack_file $i
+ fi &&
+ # silently unpack RPMS for each language
+ cd OO*$SS*/RPMS &&
+ for FILE in *.${OO_ARCH}.rpm
+ do
+ FILE="${FILE%.$OO_ARCH.rpm}" &&
+ rpmunpack $FILE.${OO_ARCH}.rpm &&
+ gzip -d $FILE.cpio.gz &&
+ cpio -idm < $FILE.cpio 2> ${INSTALL_ROOT}/dev/null
+ done &&
+ cd $SOURCE_DIRECTORY &&
+ i=$[$i+1]
+done
diff --git a/bin-editors/openoffice3-bin/FINAL
b/bin-editors/openoffice3-bin/FINAL
new file mode 100755
index 0000000..df343a1
--- /dev/null
+++ b/bin-editors/openoffice3-bin/FINAL
@@ -0,0 +1 @@
+message "You can install extra languagepacks by casting openoffice3-bin-lang
spell"
diff --git a/bin-editors/openoffice3-bin/HISTORY
b/bin-editors/openoffice3-bin/HISTORY
index deeb51b..c688e67 100644
--- a/bin-editors/openoffice3-bin/HISTORY
+++ b/bin-editors/openoffice3-bin/HISTORY
@@ -1,3 +1,6 @@
+2008-11-24 Julien "_kaze_" ROZO <julien AT rozo.org>
+ * FINAL: added, suggest to add languagepacks
+
2008-10-22 Julien "_kaze_" ROZO <julien AT rozo.org>
* DETAILS: removed REJECT

diff --git a/config_query_multi.function b/config_query_multi.function
new file mode 100755
index 0000000..56afd52
--- /dev/null
+++ b/config_query_multi.function
@@ -0,0 +1,147 @@
+#---------------------------------------------------------------------
+## @param return_var (must not be i, foo, temp, returnvar, stuff or default)
+## @param default choice
+## @param elements, ..
+##
+## gives the user some nice select list and puts the selected
+## item in return_var
+##
+#---------------------------------------------------------------------
+function select_list_multi()
+{
+ local i
+ local foo temp number
+ local returnvar=$1
+ local default=$2
+ local stuff=()
+
+ shift 2
+ hash_unset select_list_hash
+ # see note in select_provider
+ stuff=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w
x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
+
+ let i=0
+ for foo in "$@"; do
+ message "\t$DEFAULT_COLOR[${stuff[$i]}]
$SPELL_COLOR$foo$DEFAULT_COLOR"
+ hash_put select_list_hash "${stuff[$i]}" "$foo"
+ let i++
+ done
+
+ local msg="\n${QUERY_COLOR}You can select multiple choices by simply
entering the proper numbers and/or chars. \nSelect your choice(es)?
[$default]$DEFAULT_COLOR "
+ select_list_sub_multi "$returnvar" select_list_hash "$msg" "$default"
+ hash_unset select_list_hash
+}
+
+
+#---------------------------------------------------------------------
+## Modified to fit multi selection
+## The user should have already printed out the menu, this handles
+## getting a valid answer from the user.
+## @param name of return value
+## @param name of hash table mapping answers to results
+## @param message to print out for the query
+## @param default answer
+#---------------------------------------------------------------------
+function select_list_sub_multi() {
+ local returnvar=$1
+ local hashname=$2
+ local msgstr=$3
+ local default=$4
+
+ local __result=() j
+
+ while [[ ! $__result ]] ; do
+ message -n "$msgstr"
+ read -t $PROMPT_DELAY answer
+ [[ $answer ]] || answer=$default
+ answer=$(echo $answer | sed -e 's,\W,,g' -e 's/./& /g')
+ j=0
+ for answer_parsed in $answer
+ do
+ __result[j]="$(hash_get $hashname $answer_parsed)"
+ let j++
+ done
+ done
+ echo
+ eval $returnvar=\"${__result[@]}\"
+}
+
+
+#---------------------------------------------------------------------
+## @param config file variable, return variable
+## @param question
+## @param elements, ...
+##
+## @return 0 in all cases
+##
+## Asks user for string, with numbered possibilities listed
+## Return variable is also marked as persistent
+##
+#---------------------------------------------------------------------
+function real_config_query_multi () {
+ local ANSWER
+ local VARIABLE="$1"
+ local QUESTION="$2"
+ local answers
+ shift
+ shift
+
+ if config_get_option "$VARIABLE" ANSWER; then
+ # option already ANSWERed in config
+ for answers in $ANSWER ; do
+ (
+ for foo in "$@"; do
+ [[ "$answers" == "$foo" ]] && exit 0
+ done
+ echo "!!!! WARNING !!!!"
+ echo "!!!! stored option '$answers' in config is not in list of
provided options !!!!"
+ echo "!!!! WARNING !!!!"
+ )
+ done
+ echo -e "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT_COLOR} ->
'${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
+ else
+ # if there was an answer before, find it
+ local defaults default default_num foo
+ config_get_last_option "$VARIABLE" default
+ [[ $default ]] || default="$1"
+ for defaults in $default; do
+ let i=0
+ for foo in "$@"; do
+ if [[ "$defaults" == "$foo" ]] ; then
+ default_num="$default_num $i"
+ fi
+ let i++
+ done
+ done
+ # we have to ask user
+ message "$QUESTION"
+ select_list_multi ANSWER "${default_num}" "$@"
+ config_set_option "$VARIABLE" "$ANSWER"
+ fi
+
+ eval $VARIABLE=\"$ANSWER\"
+ return 0
+}
+
+
+#---------------------------------------------------------------------
+## @See <@function
var.lib.sorcery.modules.libmisc.html,real_config_query_list> for more details.
+## @param config file variable, return variable
+## @param question
+## @param elements, ...
+##
+## @return 0 in all cases
+##
+## Asks user for string, with numbered possibilities listed
+## Return variable is also marked as persistent
+## <pre>
+## Example:
+## config_query_list COLOR "What color ?" "red" "white" "blue"
+## echo Your color is $COLOR
+## </pre>
+##
+#---------------------------------------------------------------------
+function config_query_multi () {
+ debug "libapi" "config_query_multi - $*"
+ real_config_query_multi "$@"
+}



  • [SM-Commit] GIT changes to master binary grimoire by Julien ROZO (e0d1cf3af7ae0661cb56fb580bafc41e46380bfd), Julien ROZO, 11/24/2008

Archive powered by MHonArc 2.6.24.

Top of Page