Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel games grimoire by Andra?? Levstik (09009cc8c234c2b3660293cba00aa05877c8a0d4)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andra?? Levstik <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel games grimoire by Andra?? Levstik (09009cc8c234c2b3660293cba00aa05877c8a0d4)
  • Date: Wed, 19 Jul 2006 04:42:31 -0500

GIT changes to devel games grimoire by Andra?? Levstik <ruskie AT mages.ath.cx>:

FUNCTIONS | 206
+++++++++++++++++++++-----------------------------------------
1 files changed, 73 insertions(+), 133 deletions(-)

New commits:
commit 09009cc8c234c2b3660293cba00aa05877c8a0d4
Author: Andra?? Levstik <ruskie AT mages.ath.cx>
Commit: Andra?? Levstik <ruskie AT mages.ath.cx>

Playing with branches in cogito(my own way not the branch-add way)

diff --git a/FUNCTIONS b/FUNCTIONS
index 979ce68..e3206db 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -2,21 +2,12 @@
. $GRIMOIRE/libgcc

#---------------------------------------------------------------------
-## @return 0 if glibc was compiled with NPTL
-## @return 1 otherwise
-##
-## Detects if the current glibc includes NPTL support.
-##
+## Replaces sorcerys default_pre_build with a custom version using
+## the invoke_gcc function from libgcc
#---------------------------------------------------------------------
-function glibc_is_nptl ()
-{
- if /lib/libc.so.6 | grep -q NPTL; then
- return 0
- fi
- if /lib/libc.so.6 | grep -q "Native POSIX Threads Library"; then
- return 0
- fi
- return 1
+function default_pre_build () {
+ invoke_gcc &&
+ real_default_pre_build
}

#---------------------------------------------------------------------
@@ -31,48 +22,6 @@ function update_desktop_database ()
}

#---------------------------------------------------------------------
-## this function installs the *.desktop, start* files and qingy links
-## this function is intended to be used by spells for windowmanagers
-#---------------------------------------------------------------------
-function install_wmfiles ()
-{
- local wm_desktopfile_dir="${INSTALL_ROOT}/usr/share/xsessions"
- local wm_startwm_dir="${INSTALL_ROOT}/usr/bin"
-
- # install the start* file for the windowmanager if it's not
- # installed already
- if [ -f ${SCRIPT_DIRECTORY}/start${SPELL} ] ; then
- if ! [ -e ${wm_startwm}/start${SPELL} ] ; then
- install -m 755 ${SCRIPT_DIRECTORY}/start${SPELL} \
- ${wm_startwm_dir}
- fi
- fi
-
- # making sure the destination directory exists
- if ! [ -d ${wm_desktopfile_dir} ] ; then
- mkdir ${wm_desktopfile_dir}
- fi &&
-
- # install the windowmanagers desktop file
- if [ -f ${SCRIPT_DIRECTORY}/${SPELL}.desktop ] ; then
- if ! [ -e ${wm_desktopfile_dir}/${SPELL}.desktop ]; then
- install -m 755 ${SCRIPT_DIRECTORY}/${SPELL}.desktop \
- ${wm_desktopfile_dir}
- fi
- fi
-
- if ( spell_ok qingy ); then
- if [ -x ${wm_startwm_dir}/start${SPELL} ] ; then
- if [ ! -d ${INSTALL_ROOT}/etc/qingy/xsessions ]; then
- install -d -m 755 ${INSTALL_ROOT}/etc/qingy/xsessions
- fi &&
- ln -s ${wm_startwm_dir}/start${SPELL} \
- ${INSTALL_ROOT}/etc/qingy/xsessions/${SPELL}
- fi
- fi
-}
-
-#---------------------------------------------------------------------
## Sets the current script to run only one make job
#---------------------------------------------------------------------

@@ -92,72 +41,6 @@ function make_normal ()
}

#---------------------------------------------------------------------
-## @param shellname
-## @param full path to shell
-##
-## Adds a shell to /etc/shells and optionally to qingy's sessions
-#---------------------------------------------------------------------
-function install_shell ()
-{
- local qingy_session_dir="${INSTALL_ROOT}/etc/qingy/sessions"
-
- if [ -z "$1" ] ; then
- message "${PROBLEM_COLOR}no shell name specified,
aborting${DEFAULT_COLOR}"
- return 1
- fi &&
- if [ ! -e "$2" ] ; then
- message "${PROBLEM_COLOR} $2 isn't executable, no use adding it as a
shell${DEFAULT_COLOR}"
- return 1
- fi &&
-
- #installing shell into /etc/shells
- message "installing $1 into /etc/shells"
- if ! ( grep -q "${2}" ${INSTALL_ROOT}/etc/shells ) ; then
- echo "$2" >> ${INSTALL_ROOT}/etc/shells
- fi || return 1
-
- #installing shell into qingy's session dir if it's installed
- if ( spell_ok qingy ) && ! [ -f ${qingy_session_dir}/$1 ] ; then
- message "installing $1 into $qingy_session_dir"
- echo "$2" > ${qingy_session_dir}/$1 &&
- chmod 0755 ${qingy_session_dir}/$1
- fi
-}
-
-#---------------------------------------------------------------------
-## @param shellname
-## @param full path to shell
-##
-## Removes a shell from /etc/shells and optionally from qingy's sessions
-#---------------------------------------------------------------------
-function remove_shell ()
-{
- local qingy_session_dir="${INSTALL_ROOT}/etc/qingy/sessions"
-
- if [ -z "$1" ] ; then
- message "${PROBLEM_COLOR}no shell name specified,
aborting${DEFAULT_COLOR}"
- return 1
- fi &&
- if [ -z "$2" ] ; then
- message "${PROBLEM_COLOR}no shell path specified,
aborting${DEFAULT_COLOR}"
- return 1
- fi &&
-
- #removing shell from /etc/shells
- if [ -f /etc/shells ] ; then
- cat /etc/shells|grep -v "$2" > /etc/shells.tmp &&
- mv /etc/shells.tmp /etc/shells
- fi
-
- # and optionally from qingy's session dir
- if [ -f ${qingy_session_dir}/$1 ] ; then
- message "removing $1 from $qingy_session_dir"
- rm -f ${qingy_session_dir}/$1
- fi
-}
-
-
-#---------------------------------------------------------------------
## replacement for config_query_string to work around a short timeout
## when entering long strings (hostnames, organisation names)
#---------------------------------------------------------------------
@@ -251,12 +134,18 @@ #---
function games_make_proper_binary() {
if ( grep -q "usr/games/" $IW_LOG )
then
- cat $IW_LOG | cut -f 3 | sort | grep "usr/games/" | xargs -n 1 chmod 0750
- cat $IW_LOG | cut -f 3 | sort | grep "usr/games/" | xargs -n 1 chown
root.games
+ grimoire_parse_iw $IW_LOG | grimoire_exists | sort | grep "usr/games/" |
xargs -n 1 chmod -f 0750
+ grimoire_parse_iw $IW_LOG | grimoire_exists | sort | grep "usr/games/" |
xargs -n 1 chown -f root.games
+elif declare -f prepare_stage_root &> /dev/null && [[ $STAGED_INSTALL != off
]]
+then
+ cd TRANSL
+ find | grep "usr/games" | xargs -n 1 chmod -f 0750
+ find | grep "usr/games" | xargs -n 1 chown -f root.games
+ cd ../
else
- message "${QUERY_COLOR}If you see this message and you're not \n \
+message "${QUERY_COLOR}If you see this message and you're not \n \
installing a data spell then report this at the following url: \n \
-http://bugs.sourcemage.org/enter_bug.cgi?product=Codex&bug_status=NEW&version=games%20grimoire&component=games%20grimoire&rep_platform=Other&op_sys=other&priority=P2&bug_severity=minor&assigned_to=games%40sourcemage.org&cc=&bug_file_loc=http%3A%2F%2F&short_desc=%24SPELL%20not%20installing%20binaries%20properly&comment=&dependson=&blocked=9312&maketemplate=Remember%20values%20as%20bookmarkable%20template&form_name=enter_bug
\
+http://bugs.sourcemage.org/enter_bug.cgi?product=Codex&bug_status=NEW&version=games%20grimoire&component=games%20grimoire&rep_platform=Other&op_sys=other&priority=P2&bug_severity=minor&assigned_to=games%40sourcemage.org&cc=&bug_file_loc=http%3A%2F%2F&short_desc=${SPELL}%20not%20installing%20binaries%20properly&comment=&dependson=&blocked=9312&maketemplate=Remember%20values%20as%20bookmarkable%20template&form_name=enter_bug
\
${DEFAULT_COLOR}"
fi
}
@@ -284,10 +173,62 @@ function default_pre_install() {
real_default_pre_install &&
games_create_base_dirs
}
+
+#---
+## @Synopsis a parse_iw clone function
+#---
+
+function grimoire_parse_iw() {
+ local INPUT=$1
+
+ # it is EXTREMELY IMPORTANT that this variable contains an actual
+ # tab character and not some number of spaces. Otherwise BAD THINGS
+ # will happen.
+ local TAB=" "
+ OMIT_IN="${TAB}rename\|${TAB}symlink\|${TAB}unlink"
+
+ grep -v "$OMIT_IN" $INPUT | cut -f3 | grep "^/"
+ cat $INPUT | cut -f4 | grep "^/"
+}
+
+#---
+## @Synopsis an exists clone function
+#---
+function grimoire_exists() {
+ while read ITEM; do [ -e "$ITEM" ] && echo "$ITEM"; done;
+}
+
+#---
+## @Synopsis verify_file function until it's in stable sorcery
+#---
+declare -f verify_file &>/dev/null ||
+function verify_file() {
+ local SVAR="SOURCE${FILENUM}"
+ local AVAR="SOURCE${FILENUM}_HASH"
+ unpack_hash ${!SVAR} ${!AVAR}
+}
+
+
+#---
+## disable_pic
+## A function to smartly disable -DPIC and -fPIC flags
+## has one optional parameter: force which forces disable
+#---
+disable_pic() {
+ if [[ "${SMGL_COMPAT_ARCHS[1]}" != "x86_64" ]] &&
+ [[ "${SMGL_COMPAT_ARCHS[1]}" != "alpha" ]] ||
+ [[ "$1" == "force" ]]
+ then
+ CFLAGS=${CFLAGS/-fPIC} &&
+ CFLAGS=${CFLAGS/-DPIC} &&
+ CXXFLAGS=${CXXFLAGS/-fPIC} &&
+ CXXFLAGS=${CXXFLAGS/-DPIC}
+ fi
+}
+
#
## Function to check if we're using xorg-modular libs or not
#
-
function check_if_xorg_modular_libs()
{
if [[ "$(get_spell_provider ${1:-$SPELL} X11-LIBS)" == "xorg-server"
]] ||
@@ -304,10 +245,9 @@ #

function check_if_xorg_modular_server()
{
- if [[ "$(get_spell_provider ${1:-$SPELL} X11-LIBS)" == "xorg-server"
]]
- then
- return 0
- fi
- return 1
+ if [[ "$(get_spell_provider ${1:-$SPELL} X11-SERVER)" ==
"xorg-server" ]]
+ then
+ return 0
+ fi
+ return 1
}
-



  • [SM-Commit] GIT changes to devel games grimoire by Andra?? Levstik (09009cc8c234c2b3660293cba00aa05877c8a0d4), Andra?? Levstik, 07/19/2006

Archive powered by MHonArc 2.6.24.

Top of Page