Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on IUP/CD/IM/etc (old).
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/iup-old.e>
#           or at <http://angg.twu.net/e/iup-old.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




    (find-es "davinci")
    (find-es "iup")
    (find-es "scintilla")
    Note: I'm trying to split my notes about the DaVinci project into
    several e-script files (iup.e, davinci.e, scintilla.e, ...) - but
    at the moment there are lots of duplications and lots of
    garbage...




# «.tecmake»			(to "tecmake")
# «.tec_uname.zsh»		(to "tec_uname.zsh")
# «.tec_uname.outvars»		(to "tec_uname.outvars")
# «.tec_uname.outvars.iupluas»	(to "tec_uname.outvars.iupluas")
# «.iup-2.6»			(to "iup-2.6")
# «.iup-binaries»		(to "iup-binaries")
# «.libiuplua51.so»		(to "libiuplua51.so")
# «.luacmd»			(to "luacmd")
# «.openmotif»			(to "openmotif")
# «.iup-event-loop»		(to "iup-event-loop")
# «.iuppplot»			(to "iuppplot")
# «.compiling-iup3-broken-1»	(to "compiling-iup3-broken-1")
# «.compiling-iup3-broken-2»	(to "compiling-iup3-broken-2")
# «.iup3_patch1.h»		(to "iup3_patch1.h")
# «.gtk+2.0-deb-src»		(to "gtk+2.0-deb-src")
# «.gnome-pkg-tools-deb-src»	(to "gnome-pkg-tools-deb-src")
# «.libgnomeui-deb-src»		(to "libgnomeui-deb-src")
# «.GtkStatusIcon-disable»	(to "GtkStatusIcon-disable")
# «.iupcontrols»		(to "iupcontrols")
# «.cd-source»			(to "cd-source")
# «.im-source»			(to "im-source")
# «.iupluas»			(to "iupluas")





#####
#
# tecmake
# 2007jun25
#
#####

# «tecmake»  (to ".tecmake")
# (find-tecmakedocfile "")
# http://www.tecgraf.puc-rio.br/tecmake/
# http://www.tecgraf.puc-rio.br/tecmake/wb_tree.html
# http://www.tecgraf.puc-rio.br/tecmake/en/main.html
# http://www.tecgraf.puc-rio.br/tecmake/en/history.html
# http://www.tecgraf.puc-rio.br/tecmake/en/reference.html
# http://www.tecgraf.puc-rio.br/tecmake/en/guide.html
# http://www.tecgraf.puc-rio.br/tecmake/en/tips.html
# http://www.tecgraf.puc-rio.br/tecmake/en/samples.html
# http://www.tecgraf.puc-rio.br/tecmake/en/download_tips.html
# http://www.tecgraf.puc-rio.br/tecmake/download/tecmake.tar.gz
# (find-angg ".emacs" "auto-mode-alist-tecmake")
#*
rm -Rfv ~/usrc/tecmake/
mkdir   ~/usrc/tecmake/
tar  -C ~/usrc/tecmake/ -xvzf \
  $S/http/www.tecgraf.puc-rio.br/tecmake/download/tecmake.tar.gz
cd      ~/usrc/tecmake/
mkdir   ~/usrc/tecmake/en/
cp -iv $S/http/www.tecgraf.puc-rio.br/tecmake/wb_tree.html .
cp -iv $S/http/www.tecgraf.puc-rio.br/tecmake/en/*.html en/

chmod 644 $(find * -type f)

# «tec_uname.zsh»  (to ".tec_uname.zsh")
lua51 -e '
  for li in io.lines() do
    li = string.gsub(li, "(export TECTOOLS_HOME)=(.*)", "%1=$HOME/usrc")
    li = string.gsub(li, "if %[(.-)%]", "if [[%1]]")
    print(li)
  end
' < tec_uname.bsh > tec_uname.zsh

# (find-tecmakefile "tec_uname.zsh")
# (find-tecmakefile "tec_uname.outvars")
cat >> tec_uname.zsh <<'%%%'
export LUA="$HOME/usrc/lua-3.2.2/lua"
export LUA5="$HOME/usrc/lua-5.0.2"
export LUA51="$HOME/usrc/lua-5.1.2"
%%%

# «tec_uname.outvars»  (to ".tec_uname.outvars")
# (find-tecmakefile "tec_uname.bsh")
# (find-tecmakefile "tec_uname.outvars")
# (find-tecmakesh0 "tkdiff tec_uname.bsh tec_uname.zsh")
#
OLDPS1=$PS1
source tec_uname.zsh
for i in HOST TECTOOLS_HOME TECMAKE_HOME TECMAKE_MAKE TEC_SYSNAME \
    TEC_SYSVERSION TEC_SYSMINOR TEC_SYSARCH TEC_SYSRELEASE TEC_UNAME \
    BUILD_64 CD IM IUP LUA LUA4 LUA5 LUA51 CDDIR; do
  j=$(eval 'echo $'$i)
  echo "export ${i}=\"${j}\""
done \
  | tee tec_uname.outvars
PS1=$OLDPS1

# «tec_uname.outvars.iupluas»  (to ".tec_uname.outvars.iupluas")
cat > tec_uname.outvars.iupluas <<'%%%'
export LUA="$HOME/usrc/iupluas/lua32"
export LUA4="$HOME/usrc/iupluas/lua40"
export LUA5="$HOME/usrc/iupluas/lua50"
export LUA51="$HOME/usrc/iupluas/lua51"
%%%

# (find-sh0 "cp -v ~/usrc/tecmake/tec_uname.outvars ~/DAVINCI/")
# (find-sh0 "cp -v ~/usrc/tecmake/tec_uname.outvars.iupluas ~/DAVINCI/")
# (find-angg "DAVINCI/tec_uname.outvars")
# (find-angg "DAVINCI/tec_uname.outvars.iupluas")

#*
# (code-c-d "tecmake" "~/usrc/tecmake/" :grep)
# (find-tecmakefile "")
# (find-tecmakefile "en/")
# (find-tecmakew3m  "en/main.html")
# (find-tecmakew3m  "en/guide.html")
# (find-tecmakew3m  "wb_tree.html")
# (find-tecmakefile "tecmake.mak")
# (find-tecmakefile "tecmake.mak" "LUA := $(LUA51)")
# (find-tecmakefile "tecmake.mak" "INCLUDES += $(LUA)/include")

# (find-lua51file "")
# (find-lua51sh0 "rm -v include")
# (find-lua51sh0 "ln -sf src include; ls -l include")
# (find-lua51sh0 "mkdir -p lib/Linux26g4/; cd lib/Linux26g4/; ln -s ../../src/liblua.a liblua5.1.a")
# (find-lua51sh0 "mkdir -p lib/Linux26g4/; cd lib/Linux26g4/; ln -s ../../src/liblua.so liblua5.1.so")
# (find-lua51file "lib/Linux26g4/")

#   «tecmake-iup3»  (to "iup3-tecmake")
# (find-tecmakegrep "grep -nH -e TEC_SYSNAME $(find *)")
# (find-tecmakew3m "en/reference.html" "TEC_SYSNAME = `uname -s`")
# (find-tecmakew3m "en/main.html" "tec_uname.bsh")
# (find-tecmakefile "")
# (find-tecmakefile "tec_uname.bsh")
# (find-tecmakefile "tec_uname.csh")
#*
cd ~/usrc/tecmake/
cat >> tecmake.mak <<'%%%'
# (find-node "(make)Automatic Variables")
%.hi:
	@echo "  $*.hi"
%%%

#*





#####
#
# iup-2.6
# 2007jun19
#
#####

# «iup-2.6»  (to ".iup-2.6")
# http://luaforge.net/frs/download.php/2393/iup2_6_rc2_Docs_html.tar.gz
# http://luaforge.net/frs/download.php/2394/iup2_6_rc2_Examples.tar.gz
# http://luaforge.net/frs/download.php/2397/iup2_6_rc2_Sources.tar.gz
#*
# (eev-bounded)
rm -Rv ~/usrc/iup/
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2393/iup2_6_rc2_Docs_html.tar.gz
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2394/iup2_6_rc2_Examples.tar.gz
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2397/iup2_6_rc2_Sources.tar.gz
cd     ~/usrc/iup/
find * | sort > .files
find * -name '*.[ch]' | sort > .files.ch
etags $(cat .files.ch)

#*
source ~/usrc/tecmake/tec_uname.outvars
source ~/usrc/tecmake/tec_uname.outvars.iupluas
cd     ~/usrc/iup/src/
make -f $TECMAKE_HOME/tecmake.mak   |& tee omt

source ~/usrc/tecmake/tec_uname.outvars
source ~/usrc/tecmake/tec_uname.outvars.iupluas
cd     ~/usrc/iup/srccontrols/
make -f $TECMAKE_HOME/tecmake.mak   |& tee omt
# (find-iupfile "srccontrols/omt")
# (find-iupfile "srccontrols/omt" "/usr/bin/ld: cannot find -lcdiup")

#*
# 2007sep23
# (find-iupfile "make_uname")
# (find-iupfile "srccontrols/")
# (find-iupfile "srccontrols/make_uname")

# (find-iupfile "srcgl/")
# (find-iupfile "srcgl/make_uname")
# (find-iupfile "srcpplot/")
# (find-iupfile "srcpplot/make_uname")
# (find-iupfile "srcim/")
# (find-iupfile "srcim/make_uname")
# (find-iupfile "srclua3/")
# (find-iupfile "srclua3/make_uname")
# (find-iupfile "srclua5/")
# (find-iupfile "srclua5/make_uname")
# (find-iupfile "srcledc/")
# (find-iupfile "srcledc/make_uname")
# (find-iupfile "srcview/")
# (find-iupfile "srcview/make_uname")

cd     ~/usrc/iup/
source ~/usrc/tecmake/tec_uname.outvars
cd     ~/usrc/iup/src/
make -f $TECMAKE_HOME/tecmake.mak   |& tee omt
cd     ~/usrc/iup/srccontrols/
make -f $TECMAKE_HOME/tecmake.mak   |& tee omt

#*

# make 2>&1 | tee om

# (find-angg ".zshrc" "path")
export PATH=$HOME/usrc/tecmake:$EDRXPATH:/sbin:/usr/sbin:
make_uname  2>&1 | tee omu

#*
# (code-c-d "iup" "~/usrc/iup/" :grep)
# (find-iupfile "")
# (find-iupw3m "html/en/guide.html")
# (find-iupfile "om")
# (find-iupfile ".files")
# (find-iupfile "src/mot/ComboBox1.c")

# (find-status   "lesstif2-dev")
# (find-vldifile "lesstif2-dev.list")
# (find-udfile   "lesstif2-dev/")

# (find-iupfile "om")
# In file included from mot/ComboBox1P.h:32,
#                  from mot/ComboBox1.c:128:
# mot/ComboBox1.h:106: error: conflicting types for 'XmComboBoxCallbackStruct'
# /usr/include/Xm/Xm.h:609: error: previous declaration of 'XmComboBoxCallbackStruct' was here
# make[2]: *** [../obj/iup/Debug/ComboBox1.o] Error 1
# make[1]: *** [iup] Error 2
# make: *** [iup] Error 2
#
# (find-iupfile "src/mot/ComboBox1.h" "XmComboBoxCallbackStruct")
# (find-fline "/usr/include/Xm/Xm.h"  "XmComboBoxCallbackStruct")

# (find-iupgrep "grep -nH -e Xm.h $(find *)")

# 2007sep03
# (find-iupfile "omu")
# (find-fline "~/usrc/tecmake/")
# (find-fline "~/usrc/tecmake/tecmake")
# (find-iupfile "")
# (find-iupfile "make_uname")
# (find-iupfile "src/")
# (find-iupfile "src/make_uname")

* (eepitch-shell)
cd ~/usrc/iup/src/
make_uname src
tecmake src

# (find-tecmakefile "")





#####
#
# IUP binaries
# 2007jul16
#
#####

# «iup-binaries»  (to ".iup-binaries")
# http://www.tecgraf.puc-rio.br/iup/
# (find-iupw3m "html/en/download.html")
# (find-iupw3m "html/en/download_tips.html")
# http://luaforge.net/frs/?group_id=89
# http://luaforge.net/frs/download.php/2433/iup2_6_rc2_Linux26_bin.tar.gz
# http://luaforge.net/frs/download.php/2423/iup2_6_rc2_Linux26_lib.tar.gz
#*
rm -Rv ~/usrc/iupbinaries/
mkdir  ~/usrc/iupbinaries/
tar -C ~/usrc/iupbinaries/ -xvzf $S/http/luaforge.net/frs/download.php/2433/iup2_6_rc2_Linux26_bin.tar.gz
tar -C ~/usrc/iupbinaries/ -xvzf $S/http/luaforge.net/frs/download.php/2423/iup2_6_rc2_Linux26_lib.tar.gz
tar -C ~/usrc/iupbinaries/ -xvzf $S/http/luaforge.net/frs/download.php/2254/cd5_0_rc2_Linux26_lib.tar.gz
tar -C ~/usrc/iupbinaries/ -xvzf $S/http/luaforge.net/frs/download.php/2034/im3_2_Linux26_lib.tar.gz
cd     ~/usrc/iupbinaries/

# Some of the ".so" from IUP/CD/IM try to link against "liblua5.1.so"...
# This block produces a liblua5.1.so.
# Do we really need this?
# (find-es "lua5" "install-5.1.2")
#
rm -Rfv ~/usrc/iupbinaries/lua-5.1.2/
mkdir   ~/usrc/iupbinaries/lua-5.1.2/
tar  -C ~/usrc/iupbinaries/ -xvzf $S/http/www.lua.org/ftp/lua-5.1.2.tar.gz
cd      ~/usrc/iupbinaries/lua-5.1.2/
make linux test |& tee oml
cd src; ld -o liblua.so -shared $(ar t liblua.a); cd ..
cd      ~/usrc/iupbinaries/
cp -v lua-5.1.2/src/liblua.so liblua5.1.so

#*
# (code-c-d "iupbinaries" "~/usrc/iupbinaries/")
# (find-iupbinariesfile "")
# (find-iupbinariessh "for i in *.a; do echo; echo $i:; ar t $i | sort; done")
# (find-iupbinariessh "for i in *.so; do echo; echo $i:; ldd $i | sort; done")
# (find-iupbinariessh "for i in *.so; do echo; echo $i:; ldd $i | grep 'not found' | sort; done")
# (find-iupbinariessh "for i in *.so; do echo; echo $i:; LD_LIBRARY_PATH=.: ldd $i | grep 'not found' | sort; done")




#####
#
# loading libiuplua51.so
# 2007jul24
#
#####

# «libiuplua51.so»  (to ".libiuplua51.so")
# See the block above for how to unpack the ".so"s.
# None of these work perfectly - the event loop of the window either
# aborts or returns control to readline. How does "wish" handle this?
# (find-es "tcl" "luatclbridge")
# (find-es "tcl" "tk8.4-deb-src")
# (find-tclbook2page (+ -126 138))
# (find-tclbook2text)
# (find-tclbook2text "event loop")
# (find-tclbook2text "event loop" "14.5 Wish")

# (find-iupfile "")
# (find-iupw3m "html/en/guide.html")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/iupbinaries/
LD_LIBRARY_PATH=.: \
    lua51
  sort = function (T) table.sort(T); return T end
  if not iup then assert(package.loadlib("libiuplua51.so", "iuplua_open"))() end
  PP(sort(keys(iup)))


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/iupbinaries/
cd ~/usrc/iup/
LD_LIBRARY_PATH=$HOME/usrc/iupbinaries: \
    lua51
  sort = function (T) table.sort(T); return T end
  if not iup then assert(package.loadlib("libiuplua51.so", "iuplua_open"))() end
  PP(sort(keys(iup)))
  dofile "html/en/sam/sample.lua"


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/iup/
LD_LIBRARY_PATH=$HOME/usrc/iupbinaries: \
  lua51 \
    -e 'assert(package.loadlib("libiuplua51.so","iuplua_open"))()' \
    html/en/sam/sample.lua


  sort = function (T) table.sort(T); return T end
  if not iup then assert(package.loadlib("libiuplua51.so", "iuplua_open"))() end
  PP(sort(keys(iup)))

dofile           "html/en/sam/sample.lua"



# (find-fline "~/LOGS/2007jul09.scuri")


# (find-iupfile "")
# (find-iupfile "srclua5/")
# (find-iupfile "srclua5/iuplua.c")
# (find-iupfile "srclua5/Makefile")
# (find-iupfile "srclua5/premake.lua")

# (find-iupfile "html/examples/elem/iupcanvas/iupcanvas.lua")



# (find-fline "~/usrc/iupbinaries/")
# (find-fline "~/usrc/iupbinaries/iuplua51")




#####
#
# binaries for CD and IM
# 2007jul22
#
#####

# http://www.tecgraf.puc-rio.br/cd/
# http://www.tecgraf.puc-rio.br/im/
# http://luaforge.net/project/showfiles.php?group_id=86
# http://luaforge.net/project/showfiles.php?group_id=88
# http://luaforge.net/frs/download.php/2254/cd5_0_rc2_Linux26_lib.tar.gz
# http://luaforge.net/frs/download.php/2034/im3_2_Linux26_lib.tar.gz





#####
#
# luacmd-1.0
# 2007jun25
#
#####

# «luacmd»  (to ".luacmd")
# http://www.tecgraf.puc-rio.br/luacmd/
# http://www.tecgraf.puc-rio.br/~scuri/luacmd/pub/luacmd10.tar.gz
#*
rm -Rv ~/usrc/luacmd-10/
mkdir  ~/usrc/luacmd-10/
tar -C ~/usrc/luacmd-10/ -xvzf \
  $S/http/www.tecgraf.puc-rio.br/~scuri/luacmd/pub/luacmd10.tar.gz
cd     ~/usrc/luacmd-10/

find * | sort > .files

# (find-luacmdfile "srclib/makefile")
# (find-luacmdfile "srclib/makefile" "INCLUDES = -I/home/i/tecgraf/lua/inc -I/home/i/tecgraf/iup/inc")

LUACMD10=$HOME/usrc/luacmd-10
LUA322=$HOME/usrc/lua-3.2.2/lua

# #*
cd     ~/usrc/luacmd-10/srclib/
make |& tee om

#*
mkdir  ~/usrc/luacmd-10/bin/
mkdir  ~/usrc/luacmd-10/inc/
cp -iv ~/usrc/lua-3.2.2/lua/include/*.h \
       ~/usrc/luacmd-10/inc/
cd     ~/usrc/luacmd-10/src/
make |& tee om

#*

# (code-c-d "luacmd"     "~/usrc/luacmd-10/" :grep)
# (code-c-d "luacmdhtml" "~/usrc/luacmd-10/html/" :grep)
# (find-luacmdfile "")
# (find-luacmdhtmlw3m "prod.html")
# (find-luacmdhtmlw3m "console.html")
# (find-luacmdhtmlw3m "notepad.html")
# (find-luacmdhtmlw3m "debug.html")
# (find-luacmdfile "srclib/")
# (find-luacmdfile "srclib/makefile")
# (find-luacmdfile "src/")
# (find-luacmdfile "src/makefile")
# (find-luacmdfile "src/om")
# (find-luacmdfile "src/dependencies")
# (find-luacmdgrep "grep -nH -e ldebug.h $(find *)")
# (find-luacmdhtmlw3m "debug.html" "ldebug.h")
# (find-luacmdfile ".files")
# (find-luacmdfile "src/luacmd.c")

# http://www.tecgraf.puc-rio.br/luacmd/debug.gif
# (find-luacmdfile "html/debug.gif")
# (find-luacmdfile "srclib/lconsole.c" "function lcListFunc()")



http://www.tecgraf.puc-rio.br/~scuri/luacmd/pub/
http://www.tecgraf.puc-rio.br/~scuri/luacmd/pub/luacmd10_Linux.tar.gz

http://www.tecgraf.puc-rio.br/~scuri/luacmd/pub/luacmd.pdf
http://www.tecgraf.puc-rio.br/~scuri/luacmd/pub/luacmd10_Linux.tar.gz




#####
#
# iup-2.3
# 2007jun25
#
#####

# http://luaforge.net/frs/download.php/496/iup2_3_sources.tar.gz
#*
rm -Rv ~/usrc/iup-2.3/
mkdir  ~/usrc/iup-2.3/
tar -C ~/usrc/iup-2.3/ -xvzf \
  $S/http/luaforge.net/frs/download.php/496/iup2_3_sources.tar.gz
cd     ~/usrc/iup-2.3/iup/

#*
# (find-iup23file "make_all")
cd     ~/usrc/iup-2.3/iup/
tcsh make_all

#*
# (code-c-d "iup23" "~/usrc/iup-2.3/iup/")
# (find-iup23file "")





#####
#
# lua-3.2.2
# 2007jun25
#
#####

# http://www.lua.org/ftp/lua-3.0.tar.gz
# http://www.lua.org/ftp/lua-3.1.tar.gz
# http://www.lua.org/ftp/lua-3.2.tar.gz
# http://www.lua.org/ftp/lua-3.2.1.tar.gz
# http://www.lua.org/ftp/lua-3.2.2.tar.gz
#*
rm -Rv ~/usrc/lua-3.2.2/
mkdir  ~/usrc/lua-3.2.2/
tar -C ~/usrc/lua-3.2.2/ -xvzf \
  $S/http/www.lua.org/ftp/lua-3.2.2.tar.gz
cd     ~/usrc/lua-3.2.2/lua/
find * | sort > .files

#*
# (code-c-d "lua322" "~/usrc/lua-3.2.2/lua/")
# (find-lua322file "")
# (find-lua322file ".files")





#####
#
# openmotif 2.2.3
# 2007jun26
#
#####

# «openmotif»  (to ".openmotif")
# http://ftp.debian.org/debian/pool/non-free/o/openmotif/
# http://ftp.debian.org/debian/pool/non-free/o/openmotif/openmotif_2.2.3-2.dsc
# http://ftp.debian.org/debian/pool/non-free/o/openmotif/openmotif_2.2.3-2.diff.gz
# http://ftp.debian.org/debian/pool/non-free/o/openmotif/openmotif_2.2.3.orig.tar.gz
#*
rm -Rv ~/usrc/openmotif/
mkdir  ~/usrc/openmotif/
cd $S/http/ftp.debian.org/debian/pool/non-free/o/openmotif/
cp -v openmotif_2.2.3* ~/usrc/openmotif/
cd     ~/usrc/openmotif/
dpkg-source -sn -x openmotif_2.2.3-2.dsc
cd     ~/usrc/openmotif/openmotif-2.2.3/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
# (code-c-d "openmotif" "~/usrc/openmotif/openmotif-2.2.3/")
# (find-openmotiffile "")

apti byacc flex x-dev xlibs-data





#####
#
# tcmd
# 2007jul04
#
#####

# (find-angg "DAVINCI/tcmd.tcl")
# (find-angg "TH/davinci.blogme")

# http://angg.twu.net/DAVINCI/tcmd.tcl
# http://angg.twu.net/DAVINCI/tcmd.tcl.html
# http://angg.twu.net/DAVINCI/tcmd-1.png
# http://www.tecgraf.puc-rio.br/luacmd/debug.gif
# http://www.tecgraf.puc-rio.br/luacmd/





#####
#
# IUP's event loop
# 2007jul30
#
#####

# «iup-event-loop»  (to ".iup-event-loop")
# (find-es "tcl" "wish-event-loop")
# (find-fline "~/LOGS/2007jul30.scuri")
# (find-iupgrep "grep -nH -e MainLoop $(find *)")
# (find-iupfile "srclua5/iuplua_api.c" "static int MainLoop(lua_State *L)")
# (find-iupfile "src/mot/motif.c" "int IupMainLoop (void)")




#####
#
# IUPPPlot
# 2007aug14
#
#####

# «iuppplot»  (to ".iuppplot")
# (find-fline "~/LOGS/2007aug14.scuri")
# (find-iupfile "")
# (find-iupfile ".files")
# (find-iupsh "grep -i pplot .files")
# (find-iupw3m  "html/en/ctrl/iup_pplot.html")
# (find-iupfile "html/examples/ctrl/iup_pplot/iupplot2_main.cpp")
# (find-iupfile "include/iup_pplot.h")
# (find-iupfile "include/iuplua_pplot.h")
# (find-iupfile "srclua5/iuplua_pplot5.def")
# (find-iupfile "srclua5/iuplua_pplot51.make")
# (find-iupfile "srclua5/pplot.c")
# (find-iupfile "srclua5/pplot.loh")
# (find-iupfile "srclua5/pplot.lua")
# (find-iupfile "srclua5/pplot_le64w.loh")
# (find-iupfile "srclua5/pplotfuncs.c")
# (find-iupfile "srcpplot/PPlot.cpp")
# (find-iupfile "srcpplot/PPlot.h")
# (find-iupfile "srcpplot/PPlotInteraction.cpp")
# (find-iupfile "srcpplot/PPlotInteraction.h")
# (find-iupfile "srcpplot/config.mak")
# (find-iupfile "srcpplot/iup_pplot.cpp")
# (find-iupfile "srcpplot/iup_pplot.def")
# (find-iupfile "srcpplot/iup_pplot.hpp")
# (find-iupfile "srcpplot/iup_pplot.make")





#####
#
# compiling IUP3 (first attempt; broken)
# 2007sep04
#
#####

# «compiling-iup3-broken-1»  (to ".compiling-iup3-broken-1")
# (find-fline "~/LOGS/2007sep04.scuri")
# http://www.tecgraf.puc-rio.br/~scuri/iup3.zip
# ^ This was a temporary url, the link should not work
#*
# rm -Rv ~/usrc/iup3/
rm -R    ~/usrc/iup3/
mkdir    ~/usrc/iup3/
unzip -d ~/usrc/iup3/ $S/http/www.tecgraf.puc-rio.br/~scuri/iup3.zip
cd       ~/usrc/iup3/

cd       ~/usrc/iup3/
export TECMAKE_MAKE=make
export TECMAKE_HOME=$HOME/usrc/tecmake
export TEC_SYSNAME=Linux
cd ~/usrc/iup3/src/
make -f $TECMAKE_HOME/tecmake.mak USE_GTK=1 dependencies |& tee omd

# make -f $TECMAKE_HOME/tecmake.mak USE_GTK=1  |& tee om

#*
# (find-tecmakefile "tecmake.mak")
# (find-tecmakefile "tecmake.mak" 1021)
# (find-tecmakefile "tecmake.mak" "DEPEND := $(TARGETNAME).dep")
# (find-iup3file "src/om")
# (find-iup3file "src/omd")
# (find-tecmakefile "tecmake.mak" "-D$(TEC_SYSNAME)=$(TEC_SYSRELEASE)")

# (find-tecmakew3m "en/reference.html" "TEC_SYSNAME = `uname -s`")
# (find-tecmakew3m "en/main.html" "tec_uname.bsh")
# (find-tecmakefile "")
# (find-tecmakefile "tec_uname.bsh")

# (find-angg ".emacs" "auto-mode-alist-tecmake")

# (code-c-d "iup3" "~/usrc/iup3/" :grep)
# (find-iup3file "")
# (find-iup3file "src/")
# (find-iup3file "src/om")
# (find-iup3file "src/config.mak")
# (find-iup3file "test/")
# (find-tecmakefile "")
# (find-tecmakegrep "grep -nH -e relink $(find *)")
# (find-tecmakegrep "grep -nH -e USE_GTK $(find *)")

/home/edrx/usrc/tecmake/tecmake.mak:1021: iupgtk.dep: No such file or directory

# (find-node "(gcc-4.1)Preprocessor Options" "`-M'")
# (find-gccnode "Preprocessor Options" "`-M'")
# (find-tecmakefile "tecmake.mak" "$(DEPEND):" "-MM")

# (find-iup3file "src/iupgtk.wdep" 2399)
# (find-iup3file "src/config.mak" 19)
# (find-iup3file "src/om" 1)

#*
# (find-tecmakefile "")
# (find-tecmakefile "tecmake")
# (find-tecmakefile "tecmake.mak")
# (find-tecmakefile "tecmake.mak" "tecmake:")
# (find-tecmakefile "tecmake.mak" "Building dependencies... (can be slow)")
# (find-tecmakefile "tecmake.mak" "print:")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
export TECMAKE_MAKE=make
export TECMAKE_HOME=$HOME/usrc/tecmake
cd ~/usrc/iup3/src/
# export PATH=$TECMAKE_HOME:$PATH
# sh $TECMAKE_HOME/tecmake    |& tee ot
# (find-tecmakefile "tecmake.mak")
# (find-tecmakefile "tecmake")

make -f $TECMAKE_HOME/tecmake.mak  |& om
# (find-tecmakefile "tecmake.mak")

w tecmake

# (find-tecmakefile "en/")
# (find-tecmakew3m  "en/main.html")
# (find-tecmakew3m  "en/guide.html")
# (find-tecmakew3m  "wb_tree.html")

# (find-tecmakefile "tecmake.mak")

<scuri> tecmake USE_GTK=Yes
<edrx> ok...
<scuri> na pasta src e na pasta test
<scuri> na pasta test chame:
<scuri> tecmake USE_GTK=Yes relink





#####
#
# compiling IUP3
# 2007sep04
#
#####

# «compiling-iup3-broken-2»  (to ".compiling-iup3-broken-2")
# (find-fline "~/LOGS/2007sep04.scuri")
# http://www.tecgraf.puc-rio.br/~scuri/iup3.zip
# ^ This was a temporary url, the link should not work
#*
# rm -Rv ~/usrc/iup3/
rm -R    ~/usrc/iup3/
mkdir    ~/usrc/iup3/
unzip -d ~/usrc/iup3/ $S/http/www.tecgraf.puc-rio.br/~scuri/iup3.zip
cd       ~/usrc/iup3/

find * -name '*.[ch]' | sort > .files.ch
etags $(cat .files.ch)

cp -v src/gtk/iupgtk_dialog.c src/gtk/iupgtk_dialog.c.orig
cp -v src/gtk/iupgtk_drv.c    src/gtk/iupgtk_drv.c.orig
cp -v src/gtk/iupgtk_drv.h    src/gtk/iupgtk_drv.h.orig

# «iup3_patch1.h»  (to ".iup3_patch1.h")
# (find-anggfile "DAVINCI/iup3_iupgtk_drv_patch1.h")
# (find-iup3file "src/gtk/iupgtk_drv.h")
# (find-iup3file "src/gtk/iupgtk_drv.h.orig")
#
cat ~/DAVINCI/iup3_iupgtk_drv_patch1.h >> src/gtk/iupgtk_drv.h

# * 2007sep13 *
# (find-iup3file "src/iup_register.c")
# (find-iup3file "test/omr")
# cd ~/usrc/iup3/
# mydiff src/iup_register.c
patch -p0 src/iup_register.c <<'%%%'
67,70c67,70
<   iupRegisterClass(iupMenuGetClass());
<   iupRegisterClass(iupItemGetClass());
<   iupRegisterClass(iupSeparatorGetClass());
<   iupRegisterClass(iupSubmenuGetClass());
---
>   // iupRegisterClass(iupMenuGetClass());
>   // iupRegisterClass(iupItemGetClass());
>   // iupRegisterClass(iupSeparatorGetClass());
>   // iupRegisterClass(iupSubmenuGetClass());
%%%

# (find-iup3file "src/iup_show.c" 142)
# undefined reference to `iupMenuPopup'
# cd ~/usrc/iup3/
# mydiff src/iup_show.c
patch -p0 src/iup_show.c <<'%%%'
142c142
<     ret = iupMenuPopup(ih, x, y);
---
>     ret = 0; // iupMenuPopup(ih, x, y); /* edrx 2007sep13 */
%%%

# (find-iup3file "src/config.mak")
# cd ~/usrc/iup3/
# mydiff src/config.mak
patch -p0 src/config.mak <<'%%%'
26a27,28
>     # (find-es "davinci")
>     SRC += gtk/status_icon_hack.c
%%%

cp ~/DAVINCI/iup3_iupgtk_status_icon_hack1.c src/gtk/status_icon_hack.c

cd ~/usrc/iup3/src/
# (find-fline "~/usrc/tecmake/")
# (find-fline "~/usrc/tecmake/tec_uname.outvars")
source         ~/usrc/tecmake/tec_uname.outvars
make -f $TECMAKE_HOME/tecmake.mak USE_GTK=Yes   |& tee om

# (find-iup3file "src/om")
# (find-anggfile "DAVINCI/iup3_iupgtk_status_icon_hack1.c")
cd ~/usrc/iup3/src/gtk/
cp ~/DAVINCI/iup3_iupgtk_status_icon_hack1.c status_icon_hack.c
gcc -c  -Wall -g -o ../../obj/iupgtk/Linux26g4/status_icon_hack.o status_icon_hack.c

# cd ~/usrc/iup3/lib/Linux26g4/
# ar t libiupgtk.a
cd ~/usrc/iup3/obj/iupgtk/Linux26g4/
# status_icon_hack.o \
ld    -o ../../../lib/Linux26g4/libiupgtk.so -shared \
  $(ar t ../../../lib/Linux26g4/libiupgtk.a); cd ..

#*
* (eepitch-shell)
# (find-anggfile "DAVINCI/iup3_iupgtk_status_icon_hack1.c")
# (find-iup3file "src/gtk/")
# (find-iup3file "obj/iupgtk/Linux26g4/")
# (find-iup3file "lib/Linux26g4/")
# (find-iup3file "src/om" "ranlib ../lib/Linux26g4/libiupgtk.a")

* (eepitch-shell)

#*
* (eepitch-shell)
cd       ~/usrc/iup3/src/
source ~/usrc/tecmake/tec_uname.outvars
make -f $TECMAKE_HOME/tecmake.mak USE_GTK=Yes   |& tee om

cd       ~/usrc/iup3/test/
source ~/usrc/tecmake/tec_uname.outvars
make -f $TECMAKE_HOME/tecmake.mak USE_GTK=Yes         |& tee omr
make -f $TECMAKE_HOME/tecmake.mak USE_GTK=Yes relink  |& tee omr

# (find-iup3file "test/")
# (find-iup3file "test/iuptestgtk")
cd ~/usrc/iup3/test/
../bin/Linux26g4/iuptestgtk 

# (find-iup3file "test/config.mak")
# (find-tecmakefile "tecmake.mak")
# (find-tecmakefile "tecmake.mak" "relink:")

# (find-fline "~/usrc/tecmake/")
# (find-iup3file "src/config.mak")
# (find-iup3file "obj/iupgtk/Linux26g4/")
# (find-iup3file "src/")
# (find-iup3file "")
# (find-iup3file "test/")

#   «iup3-tecmake»  (to "tecmake-iup3")

# (code-c-d "iup3" "~/usrc/iup3/" :grep)
# (find-iup3file "")
# (find-iup3file "src/")
# (find-iup3file "src/om")

# (find-iup3file "src/om" "In function 'gtkDialogUnMapMethod':")
# (find-iup3file "src/om" "error: 'GtkStatusIcon' undeclared")
# (find-iup3file "src/gtk/iupgtk_dialog.c")
# (find-iup3file "src/gtk/iupgtk_dialog.c" "gtkDialogUnMapMethod")
# (find-iup3file "src/gtk/iupgtk_dialog.c" "GtkStatusIcon")
# http://library.gnome.org/devel/gtk/2.11/GtkStatusIcon.html

# (find-iup3grep "grep -nH -e FUNCPROTO $(find *)")
# (find-iup3file "src/gtk/iupgtk_drv.h")





#####
#
# gtk-2.10 (from the debian sources; IUP3 needs it)
# 2007sep06
#
#####

# «gtk+2.0-deb-src»  (to ".gtk+2.0-deb-src")
# http://ftp.de.debian.org/debian/pool/main/g/gtk+2.0/
# http://ftp.de.debian.org/debian/pool/main/g/gtk+2.0/gtk+2.0_2.10.13-1.dsc
# http://ftp.de.debian.org/debian/pool/main/g/gtk+2.0/gtk+2.0_2.10.13-1.diff.gz
# http://ftp.de.debian.org/debian/pool/main/g/gtk+2.0/gtk+2.0_2.10.13.orig.tar.gz
#*
rm -R  ~/bigsrc/gtk+2.0/
mkdir  ~/bigsrc/gtk+2.0/
cd $S/http/ftp.de.debian.org/debian/pool/main/g/gtk+2.0/
cp -v gtk+2.0_2.10.13* ~/bigsrc/gtk+2.0/
cd     ~/bigsrc/gtk+2.0/
dpkg-source -sn -x gtk+2.0_2.10.13-1.dsc
cd     ~/bigsrc/gtk+2.0/gtk+2.0-2.10.13/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
apti libxkbfile-dev libcairo-directfb2-dev gnome-pkg-tools chrpath \
     libdirectfb-dev libcupsys2-dev gtk-doc-tools docbook-xml

#*
# (find-fline "~/bigsrc/gtk+2.0/")
# 
* (eepitch-shell)
cd ~/bigsrc/gtk+2.0/
# sudo dpkg -i *.deb
  sudo dpkg -i libgtk2.0-*.deb

#*
# "dpkg -i" didn't for me work (complex dependencies).
# Here's a way to remove the new debs:
# dpkg: regarding libgtk2.0-0_2.10.13-1_i386.deb containing libgtk2.0-0:
#  libgtk2.0-0 conflicts with libgnomeui-0 (<= 2.14.1-3)
#   libgnomeui-0 (version 2.14.1-2) is installed.

# (find-fline "/dvds/etch/pool/main/g/gtk+2.0/")
cd /dvds/etch/pool/main/g/gtk+2.0/
sudo dpkg -i *.deb
aptrm gtk2.0-examples libgtk-directfb-2.0-dev libgtk2.0-0-dbg
apti

#*
# (code-c-d "gtk20" "~/bigsrc/gtk+2.0/gtk+2.0-2.10.13/" :grep)
# (find-gtk20file "")
# (find-gtk20file ".files.ch")
# (find-gtk20file "gtk/gtkversion.h")

* (eepitch-shell)
cd ~/bigsrc/gtk+2.0/gtk+2.0-2.10.13/
find * -type f -name '*.[ch]' | grep -v ^debian | sort > .files.ch
etags $(cat .files.ch)






#####
#
# gnome-pkg-tools (from the debian sources; gtk+2.0 needs it)
# 2007sep10
#
#####

# «gnome-pkg-tools-deb-src»  (to ".gnome-pkg-tools-deb-src")
# http://packages.debian.org/gnome-pkg-tools
# The version in Etch is 0.10, but newer Gtks need etc etc.

# http://ftp.de.debian.org/debian/pool/main/g/gnome-pkg-tools/
# http://ftp.de.debian.org/debian/pool/main/g/gnome-pkg-tools/gnome-pkg-tools_0.12.3.dsc
# http://ftp.de.debian.org/debian/pool/main/g/gnome-pkg-tools/gnome-pkg-tools_0.12.3.orig.tar.gz
#*
rm -Rv ~/usrc/gnome-pkg-tools/
mkdir  ~/usrc/gnome-pkg-tools/
cd $S/http/ftp.de.debian.org/debian/pool/main/g/gnome-pkg-tools/
cp -v gnome-pkg-tools_0.12.3* ~/usrc/gnome-pkg-tools/
cd     ~/usrc/gnome-pkg-tools/
dpkg-source -sn -x gnome-pkg-tools_0.12.3.dsc
cd     ~/usrc/gnome-pkg-tools/gnome-pkg-tools-0.12.3/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
# (find-fline "~/usrc/gnome-pkg-tools/")
* (eepitch-shell)
cd ~/usrc/gnome-pkg-tools/
sudo dpkg -i *.deb

#*
# (code-c-d "gnomepkgtools" "~/usrc/gnome-pkg-tools/gnome-pkg-tools-0.12.3/")
# (find-gnomepkgtoolsfile "")





#####
#
# libgnomeui (from the debian sources)
# 2007sep10
#
#####

# «libgnomeui-deb-src»  (to ".libgnomeui-deb-src")
# http://ftp.de.debian.org/debian/pool/main/libg/libgnomeui/
# http://ftp.de.debian.org/debian/pool/main/libg/libgnomeui/libgnomeui_2.18.1-2.dsc
# http://ftp.de.debian.org/debian/pool/main/libg/libgnomeui/libgnomeui_2.18.1-2.diff.gz
# http://ftp.de.debian.org/debian/pool/main/libg/libgnomeui/libgnomeui_2.18.1.orig.tar.gz
#*
rm -R  ~/bigsrc/libgnomeui/
mkdir  ~/bigsrc/libgnomeui/
cd $S/http/ftp.de.debian.org/debian/pool/main/libg/libgnomeui/
cp -v libgnomeui_2.18.1* ~/bigsrc/libgnomeui/
cd     ~/bigsrc/libgnomeui/
dpkg-source -sn -x libgnomeui_2.18.1-2.dsc
cd     ~/bigsrc/libgnomeui/libgnomeui-2.18.1/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
* (eepitch-shell)
apti libgnomecanvas2-dev libbonoboui2-dev libgtk2.0-dev \
     libgnomevfs2-dev libgconf2-dev libglade2-dev libgnome2-dev \
     libgnome-keyring-dev libxml2-dev

#*
# (find-fline "~/bigsrc/libgnomeui/")
* (eepitch-shell)
cd ~/bigsrc/libgnomeui/
sudo dpkg -i *.deb

#*
# (code-c-d "libgnomeui" "~/bigsrc/libgnomeui/libgnomeui-2.18.1/")
# (find-libgnomeuifile "")




#####
#
# GtkStatusIcon (disabling all references to it in IUP3)
# 2007sep12
#
#####

# «GtkStatusIcon-disable»  (to ".GtkStatusIcon-disable")
# (find-zsh "installeddebs | sort" "libgtk2.0")
# http://packages.debian.org/libgtk2.0

# (find-angg "DAVINCI/iup3_iupgtk_drv_patch1.h")
# (find-es "iup" "GtkStatusIcon-disable")

# Debian stable (Etch) comes with gtk-2.8, and it's not trivial to
# replace it by gtk-2.10 (or later) without updating also dozens of
# other packages; there may be some "aptitude" trick for updating to
# gtk-2.10 in a reversible way, but I haven't found it yet...

# One file of IUP3 has 4 references to "gtk_status_icon_*" functions.
# These functions - and the associated "GtkStatusIcon*" structures and
# types - are probably the only depencies on recent Gtks in IUP3...

# (find-iup3file "src/om")
# (find-iup3file "src/om" "In function 'gtkDialogUnMapMethod':")
# (find-iup3grep "grep -nH -e gtk_status_icon $(cat .files.ch)")
# (find-iup3file "src/gtk/iupgtk_dialog.c" 825 "gtk_status_icon_new")
# (find-iup3file "src/gtk/iupgtk_dialog.c" 838 "gtk_status_icon_set_visible")
# (find-iup3file "src/gtk/iupgtk_dialog.c" 845 "gtk_status_icon_set_tooltip")
# (find-iup3file "src/gtk/iupgtk_dialog.c" 853 "gtk_status_icon_set_from_pixbuf")

# http://library.gnome.org/devel/gtk/2.11/GtkStatusIcon.html
# (find-gtk20file "gtk/gtkstatusicon.c")
# (find-gtk20file "gtk/gtkstatusicon.c" "gtk_status_icon_new")
# (find-gtk20file "gtk/gtkstatusicon.c" "gtk_status_icon_set_visible")
# (find-gtk20file "gtk/gtkstatusicon.c" "gtk_status_icon_set_tooltip")
# (find-gtk20file "gtk/gtkstatusicon.c" "gtk_status_icon_set_from_pixbuf")
# (find-gtk20file "gtk/gtkstatusicon.h")
# (find-gtk20file "gtk/gtkstatusicon.h" "gtk_status_icon_new")
# (find-gtk20file "gtk/gtkstatusicon.h" "gtk_status_icon_set_visible")
# (find-gtk20file "gtk/gtkstatusicon.h" "gtk_status_icon_set_tooltip")
# (find-gtk20file "gtk/gtkstatusicon.h" "gtk_status_icon_set_from_pixbuf")



# (find-angg "DAVINCI/iup3_iupgtk_drv_patch1.h")
# (find-es "iup" "GtkStatusIcon-disable")
# The patch to make IUP3 compile is this:

typedef struct _GtkStatusIcon {
  GObject               parent_instance;
  GtkStatusIconPrivate *priv;
} GtkStatusIcon;
GtkStatusIcon *gtk_status_icon_new (void);
void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon, GdkPixbuf *pixbuf);
void gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon, const gchar *tooltip_text);
void gtk_status_icon_set_visible (GtkStatusIcon *status_icon, gboolean visible);



# (find-iup3file "")
# (find-iup3file "test/config.mak")
# (find-iup3file "test/simpledialog.c")
# (find-iup3file "")
# (find-iup3file "")
# (find-iup3sh "nm --defined-only -C lib/Linux26g4/libiupgtk.a")




#####
#
# new controls for IUP
# 2007sep22
#
#####

# «iupcontrols»  (to ".iupcontrols")
# (find-iupfile "")
# (find-iupfile "html/en/")
# (find-iupw3m "html/en/guide.html")

# From:
# (find-iupw3m "html/en/iupcontrols.html")

The iupcontrols.h file must be included in the source code. If you
plan to use the control in Lua, you should also include
iupluacontrols.h.

The IupControlsOpen function must be called after IupOpen. To make the
controls available in Lua, use the initialization function in C,
iupcontrolslua_open, after calling iuplua_open.

Your application must be linked to the CPI control library
(iupcontrols), and with the CD library (cd and cdiup). To use its
bindings to Lua, the program must also be linked to the luacontrol
library (iupluacontrols).

When closing the application, the user must call the function
IupControlsClose() to free the resources used.

OpenGL Canvas

The drawing canvas compatible with OpenGL is called IupGLCanvas.

# (find-iupfile ".files")
# (find-iupfile "include/iupcontrols.h")
# (find-iupfile "include/iupluacontrols.h")
# (find-iupfile "srccontrols/iupcontrols.c" "IupControlsOpen")
# (find-iupgrep "grep -nH -e iupcontrols $(cat .files.ch)")
# (find-iupfile "html/examples/ctrl/")

# (find-iupfile "srccontrols/cdiuputil.c")
# (find-iupfile "srccontrols/cdiuputil.h")

I'm stuck! 8-(
I need to run the IUP examples in GDB to understand how controls are
implemented...





#####
#
# CD (source)
# 2007sep22 / 2007oct09
#
#####

# «cd-source»  (to ".cd-source")
# http://www.tecgraf.puc-rio.br/cd/
# http://www.tecgraf.puc-rio.br/cd/en/download.html
# http://luaforge.net/frs/?group_id=88
# http://luaforge.net/frs/download.php/2247/cd5_0_rc2_Docs_html.tar.gz
# http://luaforge.net/frs/download.php/2257/cd5_0_rc2_Sources.tar.gz
# http://lists.luaforge.net/pipermail/cdlib-users/
#*
rm -Rv ~/usrc/cd/
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2247/cd5_0_rc2_Docs_html.tar.gz
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2257/cd5_0_rc2_Sources.tar.gz
cd     ~/usrc/cd/

chmod 755 $(find * -type d)
chmod 644 $(find * -type f)
find * | sort > .files
find * -name '*.[ch]' | sort > .files.ch
etags $(cat .files.ch)

#*
# (find-cdfile   "src/")
# (find-cdsh  "cd src/; ls *.mak | cat")
# (find-cdfile   "src/make_uname")
# (find-cdsh "cat src/make_uname | tr ' ' '\n' | grep MF=")
# (find-cdsh "cat src/make_uname | tr ' ' '\n' | grep MF= | sort")
# (find-cdfile   "src/lua5/")
# (find-tecmakefile "tec_uname.zsh" "export LUA51=$TECTOOLS_HOME/lua5.1")
# (find-tecmakefile "tec_uname.outvars" "export LUA51=")
# (find-tecmakefile "tec_uname.outvars.iupluas" "export LUA51=")

cd ~/usrc/cd/src/
source ~/usrc/tecmake/tec_uname.outvars
source ~/usrc/tecmake/tec_uname.outvars.iupluas
make -f $TECMAKE_HOME/tecmake.mak           |& tee omt

# (find-cdfile "src/")
# (find-cdfile "src/omt")

#*
cd ~/usrc/cd/src/
source ~/usrc/tecmake/tec_uname.outvars
source ~/usrc/tecmake/tec_uname.outvars.iupluas
make -f $TECMAKE_HOME/tecmake.mak cdgdiplus |& tee omt-cdgdiplus
make -f $TECMAKE_HOME/tecmake.mak cdiup	    |& tee omt-cdiup
make -f $TECMAKE_HOME/tecmake.mak cdlua3    |& tee omt-cdlua3
make -f $TECMAKE_HOME/tecmake.mak cdlua5    |& tee omt-cdlua5
make -f $TECMAKE_HOME/tecmake.mak cdluaiup3 |& tee omt-cdluaiup3
make -f $TECMAKE_HOME/tecmake.mak cdluaiup5 |& tee omt-cdluaiup5
make -f $TECMAKE_HOME/tecmake.mak cdpdf	    |& tee omt-cdpdf
make -f $TECMAKE_HOME/tecmake.mak cdluapdf3 |& tee omt-cdluapdf3
make -f $TECMAKE_HOME/tecmake.mak cdluapdf5 |& tee omt-cdluapdf5

#*
# It seems that it's much easier to get a full build of CD than
# to compile just the parts for some versions of Lua...
# See: (to "iupluas")





#####
#
# IM (source)
# 2007sep22
#
#####

# «im-source»  (to ".im-source")
# http://www.tecgraf.puc-rio.br/im/
# http://www.tecgraf.puc-rio.br/im/en/download.html
# http://luaforge.net/project/showfiles.php?group_id=86
# http://luaforge.net/frs/download.php/2011/im3_2_Docs_html.tar.gz
# http://luaforge.net/frs/download.php/2049/im3_2_Sources.tar.gz
#*
rm -Rv ~/usrc/im/
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2011/im3_2_Docs_html.tar.gz
tar -C ~/usrc/ -xvzf $S/http/luaforge.net/frs/download.php/2049/im3_2_Sources.tar.gz
cd     ~/usrc/im/

chmod 755 $(find * -type d)
chmod 644 $(find * -type f)
find * | sort > .files
find * -name '*.[ch]' | sort > .files.ch
etags $(cat .files.ch)

#*
# (code-c-d "im" "~/usrc/im/")
# (find-imfile "")
# (find-imfile "html/en/")





#####
#
# iupluas - a dicteory with several versions of Lua, for compiling IUP
# 2007sep25
#
#####

# «iupluas»  (to ".iupluas")
# TecMake expects to have access to several versions of Lua, and it
# expects their include files to be in luaN/include and the libs to be
# in luaN/lib/Linux26g4...

# This script is incomplete! It builds lua-3.2/4.0/5.0/5.1, but it
# still doesn't produce the "luaN/include" and "luaN/lib/Linux26g4"
# directories (they can be symlinks, I think... for the right "N"
# strings, check tec_uname.outvars).
# (find-angg "DAVINCI/tec_uname.outvars")

# Another option: "make install"s.

# http://www.lua.org/ftp/
# http://www.lua.org/ftp/lua-3.2.2.tar.gz
# http://www.lua.org/ftp/lua-4.0.1.tar.gz
# http://www.lua.org/ftp/lua-5.0.3.tar.gz
# http://www.lua.org/ftp/lua-5.1.2.tar.gz
# (find-esgrep "grep -nH -e lua-3 *.e")
#*
rm -Rv ~/usrc/iupluas/
mkdir  ~/usrc/iupluas/

#*
rm -Rv ~/usrc/iupluas/lua-3.2.2/
mkdir  ~/usrc/iupluas/lua-3.2.2/
tar -C ~/usrc/iupluas/lua-3.2.2/ -xvzf \
  $S/http/www.lua.org/ftp/lua-3.2.2.tar.gz
cd     ~/usrc/iupluas/lua-3.2.2/lua/
find *                | sort > .files
find * -name '*.[ch]' | sort > .files.ch
make |& tee om

rm -Rfv ~/usrc/iupluas/lua-4.0.1/
tar -C  ~/usrc/iupluas/ -xvzf \
  $S/http/www.lua.org/ftp/lua-4.0.1.tar.gz
cd      ~/usrc/iupluas/lua-4.0.1/
find *                | sort > .files
find * -name '*.[ch]' | sort > .files.ch
make |& tee om

rm -Rv ~/usrc/iupluas/lua-5.0.3/
tar -C ~/usrc/iupluas/ -xvzf \
  $S/http/www.lua.org/ftp/lua-5.0.3.tar.gz
cd     ~/usrc/iupluas/lua-5.0.3/
find *                | sort > .files
find * -name '*.[ch]' | sort > .files.ch
make |& tee om

rm -Rv ~/usrc/iupluas/lua-5.1.2/
tar -C ~/usrc/iupluas/ -xvzf \
  $S/http/www.lua.org/ftp/lua-5.1.2.tar.gz
cd     ~/usrc/iupluas/lua-5.1.2/
find *                | sort > .files
find * -name '*.[ch]' | sort > .files.ch
make linux |& tee om

#*
# (find-es "iup"     "tec_uname.outvars.iupluas")
# (find-angg "DAVINCI/tec_uname.outvars.iupluas")
mkdir -p ~/usrc/iupluas/
cd       ~/usrc/iupluas/
rm -Rv   lua32     lua40     lua50     lua51
mkdir -p lua32/lib lua40/lib lua50/lib lua51/lib
ln -s     ../lua-3.2.2/lua/include lua32/include
ln -s  ../../lua-3.2.2/lua/lib     lua32/lib/Linux26g4
ln -s     ../lua-4.0.1/include     lua40/include
ln -s  ../../lua-4.0.1/lib         lua40/lib/Linux26g4
ln -s     ../lua-5.0.3/include     lua50/include
ln -s  ../../lua-5.0.3/lib         lua50/lib/Linux26g4
ln -s     ../lua-5.1.2/src         lua51/include
ln -s  ../../lua-5.1.2/src         lua51/lib/Linux26g4

# (find-fline "~/usrc/iupluas/lua32/")
# (find-fline "~/usrc/iupluas/lua40/")
# (find-fline "~/usrc/iupluas/lua50/")
# (find-fline "~/usrc/iupluas/lua51/")

#*
luaN/lib/Linux26g4

ln -s 





# (code-c-d "ilua32" "~/usrc/iupluas/lua-3.2.2/lua/")
# (code-c-d "ilua40" "~/usrc/iupluas/lua-4.0.1/")
# (code-c-d "ilua50" "~/usrc/iupluas/lua-5.0.3/")
# (code-c-d "ilua51" "~/usrc/iupluas/lua-5.1.2/")
# (find-ilua32file "")
# (find-ilua32file ".files")
# (find-ilua32file "om")
# (find-ilua32sh   "find * | sort")
# lua-3.2.2/lua/include/lualib.h
# lua-3.2.2/lua/lib/liblua.a

# (find-ilua40file "")
# (find-ilua40file ".files")
# (find-ilua40file "om")
# (find-ilua40sh   "find * | sort")
# lua-4.0.1/include/lualib.h
# lua-4.0.1/lib/liblua.a

# (find-ilua50file "")
# (find-ilua50file ".files")
# (find-ilua50file "om")
# (find-ilua50sh   "find * | sort")
# lua-5.0.3/include/lualib.h
# lua-5.0.3/lib/liblua.a

# (find-ilua51file "")
# (find-ilua51file ".files")
# (find-ilua51file "om")
# (find-ilua51sh   "find * | sort")
# lua-5.1.2/src/liblua.a
# lua-5.1.2/src/lua.h

# (find-esfile "lua.e" "ld -o lib/liblua.so.3.2 -shared src/*.o")









#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: