Browse Source

Alejandro Mery:

updated clip (1.1.8-2) + doc + big cleanup of it's .conf


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2343 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Alejandro Mery 21 years ago
parent
commit
5b709fca12
4 changed files with 284 additions and 100 deletions
  1. +26
    -18
      package/mnemoc/clip/clip.conf
  2. +4
    -4
      package/mnemoc/clip/clip.desc
  3. +254
    -0
      package/mnemoc/clip/four_elements_tc_defcolor.patch
  4. +0
    -78
      package/mnemoc/clip/postgresql.patch

+ 26
- 18
package/mnemoc/clip/clip.conf

@ -25,47 +25,55 @@ if [ $prefix_auto = 1 ] ; then
prefix="opt/clip"
set_confopt
fi
createdocs=0
export CLIPROOT=$root/$prefix
export BINDIR=$CLIPROOT/bin
clip_examples() {
cd $builddir/$xsrcdir
# install examples
mkdir -p $docdir/example/clip/
cp -dRf example/* $docdir/example/clip/
cp -dRvf example/* $docdir/example/clip/
# and tools
mkdir -p $docdir/example/prg/
cp -dRvf prg/* $docdir/example/prg/
# profile.d
echo "export CLIPROOT=$CLIPROOT" > $root/etc/profile.d/clip
}
clip_patch() {
local f
# they release a patch.tgz to overwrite files of last release
# for 'updating' to last stable build.
if grep -q -e "^\[D\] .* patch-$ver.tgz" $confdir/clip.desc; then
echo "Patching CLIP to $ver."
pushd ..
ln -sv ${xsrcdir##*/} clip-prg
tar -v $taropt $archdir/patch-$ver.tbz2
popd
f=$( grep -e "^\[D\] .* $1" $confdir/clip.desc | cut -d' ' -f 3 )
f=${f%.tgz}.tbz2
if [ "$f" ]; then
echo "Applying $f to CLIP."
( cd ..; \
ln -sv ${xsrcdir##*/} $2; \
tar -v $taropt $archdir/$f \
)
fi
}
# first make for clip
hook_add preconf 9 'cd clip'
makeopt="install"
# and the second for cliplibs :)
hook_add inmake 5 'cd ../cliplibs'
makeinstopt="$makeopt"
# patch
hook_add prepatch 5 'clip_patch patch- clip-prg; \
clip_patch clip-doc- clip-doc'
hook_add prepatch 5 'clip_patch'
hook_add postdoc 5 'clip_examples'
# build & install cliplibs
hook_add postmake 5 'eval $MAKE -C ../cliplibs $makeopt install'
# build & install docs
hook_add postmake 6 'eval $MAKE -C ../doc $makeopt txt html install-txt install-html'
hook_add postpatch 5 'mv cliplibs/clip-postgres/Makefile \
cliplibs/clip-postgres/Makefile.in
chmod +x cliplibs/clip-postgres/configure'
# install examples
hook_add postdoc 5 'clip_examples'

+ 4
- 4
package/mnemoc/clip/clip.desc

@ -42,9 +42,9 @@
[L] GPL
[S] Stable
[V] 1.1.7-3
[V] 1.1.8-2
[P] X -----5---9 800.000
[D] 923907069 clip-prg-1.1.7-1.tgz ftp://ftp.itk.ru/pub/clip/
[D] 2363781309 patch-1.1.7-3.tgz !ftp://ftp.itk.ru/pub/clip/patch.tgz
[D] 3948593348 clip-prg-1.1.8-1.tgz ftp://ftp.linux.ru.net/mirrors/clip/
[D] 1439826120 patch-1.1.8-2.tgz !ftp://ftp.linux.ru.net/mirrors/clip/patch.tgz
[D] 3006181689 clip-doc-src-1.1.8-1.tgz !ftp://ftp.linux.ru.net/mirrors/clip/clip-doc-src.tgz

+ 254
- 0
package/mnemoc/clip/four_elements_tc_defcolor.patch

@ -0,0 +1,254 @@
diff -uNdr clip-prg-1.1.8-1/clip/classes/tb_obj.prg clip-prg-1.1.8-1.new/clip/classes/tb_obj.prg
--- clip-prg-1.1.8-1/clip/classes/tb_obj.prg 2004-02-04 18:40:25.000000000 -0300
+++ clip-prg-1.1.8-1.new/clip/classes/tb_obj.prg 2004-02-05 17:40:37.000000000 -0300
@@ -293,49 +293,75 @@
static func __sayTable
local visLen,col,colSep,lensep,lenhsep
local strsep1,strsep2,strseph,scol,len,strings
- local i,j,k,s,ccc,headsep,strhsep1, x,y
+ local i,j,k,s,ccc,ccs,headsep,strhsep1, x,y
local heading:=.t., footing:=.t.
#ifdef DEBUG_CALL
outlog(__FILE__,__LINE__,"sayTable")
#endif
if ::winbuffer==nil; dispBegin(); endif
+ // separators: NIL don't separate
+ // "" empty separation (for cols "" act as NIL)
+ // * use those chars
+
+ // heading/footing if at least one has separator defined
visLen= len(::__colVisible)
j=0;k=0
for i=1 to visLen
col=::__colVisible[i]
headSep:=::__columns[col]:headSep
- if headSep!=NIL .and. headSep==""
+ //INFO: cleaner to honor the semantic descripted above
+ //if headSep!=NIL .and. headSep==""
+ if headSep==NIL
j++
endif
headSep:=::__columns[col]:footSep
- if headSep!=NIL .and. headSep==""
+ //if headSep!=NIL .and. headSep==""
+ if headSep==NIL
k++
endif
next
- heading := !(j==visLen)
- footing := !(k==vislen)
+ heading := iif( (j==visLen),::headSep!=NIL, .t. )
+ footing := iif( (k==vislen),::footSep!=NIL, .t. )
for i=1 to visLen
col=::__colVisible[i]
len=::__columnsLen[col]
colSep:=::__columns[col]:colSep
colsep:=iif(colSep==NIL,::colSep,colSep)
lenSep:=len(colSep)
- strsep1:=iif(lenSep>2,substr(colsep,3,1),"")
- lenSep:=iif(lenSep==3,3,1)
- strsep1:=space(len(strsep1))
- strsep2:=substr(colsep,1,2)
- strsep2:=space(len(strsep2))
+ if lenSep>2
+ strsep1:=" "
+ strsep2:=" "
+ lenSep:=3
+ else
+ strsep1:=""
+ if lenSep==0
+ strsep2:=""
+ else
+ strsep2:=" "
+ lenSep:=1
+ endif
+ endif
scol=::__whereVisible[i]
len=min(len,::nright-scol-lenSep+len(strSep2))
strings:=::__HeadStrings[col]
- ccc:=::__colors[1]
- if ::__columns[col]:defColor!=NIL
- ccc:=::__colors[::__columns[col]:defColor[1]]
- endif
+ // choose heading color
+ //INFO: the whole header must use defColor[3], including sep.
+ // but we can trick this using colorHeading
if ::__columns[col]:colorHeading!=NIL
ccc:=::__colors[::__columns[col]:colorHeading]
+ elseif ::__columns[col]:defColor!=NIL
+ ccc:=::__colors[::__columns[col]:defColor[3]]
+ else
+ ccc:=::__colors[1]
+ endif
+ // and heading separator color ;-)
+ if ::__columns[col]:defColor!=NIL
+ ccs:=::__colors[::__columns[col]:defColor[3]]
+ else
+ ccs:=::__colors[1]
endif
+ // display strings
for j=1 to len(strings )
s=padr(strings[j],len)
y := ::nTop+j-1
@@ -343,42 +369,44 @@
if ::__columns[col]:colSepH != nil
strseph:=substr(::__columns[col]:colSepH,j,1)
if ::winbuffer == nil
- dispOutAt(::nTop+j-1, scol-1,strseph,::__colors[1])
+ dispOutAt(::nTop+j-1, scol-1,strseph,ccs)
else
- winbuf_out_at(::winbuffer,::nTop+j-1, scol-1,strseph,::__colors[1])
+ winbuf_out_at(::winbuffer,::nTop+j-1, scol-1,strseph,ccs)
endif
x := scol-1 + len(strseph)
else
if ::winbuffer == nil
- dispOutAt(::nTop+j-1, scol,strsep1,::__colors[1])
+ dispOutAt(::nTop+j-1, scol,strsep1,ccs)
else
- winbuf_out_at(::winbuffer,::nTop+j-1, scol,strsep1,::__colors[1])
+ winbuf_out_at(::winbuffer,::nTop+j-1, scol,strsep1,ccs)
endif
x := scol + len(strsep1)
endif
if ::winbuffer == nil
dispOut(s,ccc)
- dispOut(iif(i<visLen,strSep2,""),::__colors[1])
+ dispOut(iif(i<visLen,strSep2,""),ccs)
else
winbuf_out_at(::winbuffer,y,x,s,ccc)
x += len(s)
- winbuf_out_at(::winbuffer,y,x,iif(i<visLen,strSep2,""),::__colors[1])
+ winbuf_out_at(::winbuffer,y,x,iif(i<visLen,strSep2,""),ccs)
x += len(iif(i<visLen,strSep2,""))
endif
if i==visLen
if ::winbuffer == nil
- dispout(space(::nRight-col()+1),::__colors[1])
+ dispout(space(::nRight-col()+1),ccs)
else
- winbuf_out_at(::winbuffer,y,x,space(::nRight-col()+1),::__colors[1])
+ winbuf_out_at(::winbuffer,y,x,space(::nRight-col()+1),ccs)
endif
endif
next
+ // heading separator
headSep:=::__columns[col]:headSep
headSep:=iif(headSep==NIL,::headSep,headSep)
lenHSep=len(headSep)
- strhsep1=right(headsep,1)
j:=len(strings)
- if heading .and. ((j>0 .and. lenHSep>0 ) .or. !empty(::headSep))
+ if heading
+ if headSep != ""
+ strhsep1=right(headsep,1)
if ::__columns[col]:colSepH != nil .and. len(::__columns[col]:colSepH)>j
strseph:=substr(::__columns[col]:colSepH,j+1,1)
if ::winbuffer == nil
@@ -401,36 +429,45 @@
winbuf_out_at(::winbuffer,y,x, replicate(strHsep1,::nright-col()+1),::__colors[1])
endif
endif
+ endif
j++
endif
::__rect[1]=::nTop+j
strings:=::__footStrings[col]
- ccc:=::__colors[1]
- if ::__columns[col]:defColor!=NIL
- ccc:=::__colors[::__columns[col]:defColor[1]]
- endif
+ // choose footing color
if ::__columns[col]:colorFooting!=NIL
ccc:=::__colors[::__columns[col]:colorFooting]
+ elseif ::__columns[col]:defColor!=NIL
+ ccc:=::__colors[::__columns[col]:defColor[4]]
+ else
+ ccc:=::__colors[1]
+ endif
+ // and footing separator color
+ if ::__columns[col]:defColor!=NIL
+ ccc:=::__colors[::__columns[col]:defColor[4]]
+ else
+ ccc:=::__colors[1]
endif
+ // display strings
for j=1 to len(strings)
s=padr(strings[j],len)
if ::winbuffer == nil
- dispOutAt(::nBottom-j+1, scol, strsep1, ::__colors[1])
+ dispOutAt(::nBottom-j+1, scol, strsep1, ccs)
dispOut(s, ccc)
- dispOut(iif(i<visLen,strSep2,"") , ::__colors[1])
+ dispOut(iif(i<visLen,strSep2,"") , ccs)
if i==visLen
- dispout(space(::nRight-col()+1),::__colors[1])
+ dispout(space(::nRight-col()+1),ccs)
endif
else
- winbuf_out_at(::winbuffer,::nBottom-j+1, scol, strsep1, ::__colors[1])
+ winbuf_out_at(::winbuffer,::nBottom-j+1, scol, strsep1, ccs)
y := ::nBottom-j+1
x := scol + len(strsep1)
winbuf_out_at(::winbuffer,y,x,s,ccc)
x += len(s)
- winbuf_out_at(::winbuffer,y,x,iif(i<visLen,strSep2,"") , ::__colors[1])
+ winbuf_out_at(::winbuffer,y,x,iif(i<visLen,strSep2,"") , ccs)
x += len(iif(i<visLen,strSep2,""))
if i==visLen
- winbuf_out_at(::winbuffer,y,x,space(::nRight-col()+1),::__colors[1])
+ winbuf_out_at(::winbuffer,y,x,space(::nRight-col()+1),ccs)
endif
endif
next
@@ -442,7 +479,8 @@
//endif
j:=len(strings)
//if ( j>0 .and. lenHSep>0 ) .or. !empty(::footSep)
- if footing .and. lenHSep>0 .and. !empty(headSep)
+ if footing .and. j>0
+ if headSep != ""
if ::winbuffer == nil
dispOutAt(::nBottom-j, scol, replicate(strHsep1,len)+iif(i<visLen,headsep,"") , ::__colors[1])
if i==vislen
@@ -457,6 +495,7 @@
winbuf_out_at(::winbuffer,y,x,replicate(strHsep1,::nright-col()+1),::__colors[1])
endif
endif
+ endif
j++
endif
::__rect[3]=::nBottom-j
@@ -483,6 +522,19 @@
::__footStrings:={}
max_hr:=0; max_hf:=0
for i=1 to len(::__columns)
+ // acording to clipper 5.3 documentation defColor has 4 elements.
+ // hack to ensure those 4 elements.
+ if ::__columns[i]:defColor!=NIL
+ a := {,,,}
+ for j=1 to len(::__columns[i]:defColor)
+ a[j] := ::__columns[i]:defColor[j]
+ next
+ do while j<=4
+ a[j++] := ::__columns[i]:defColor[1]
+ enddo
+ ::__columns[i]:defColor := a
+ endif
+
h:=::__columns[i]:heading
//hr:=iif(empty(h),0,occurs(";",h)+1)
hr:=iif(h==NIL .or. h=="",0,occurs(";",h)+1)
diff -uNdr clip-prg-1.1.8-1/clip/classes/tcol_obj.prg clip-prg-1.1.8-1.new/clip/classes/tcol_obj.prg
--- clip-prg-1.1.8-1/clip/classes/tcol_obj.prg 2004-02-04 18:40:25.000000000 -0300
+++ clip-prg-1.1.8-1.new/clip/classes/tcol_obj.prg 2004-02-04 19:27:06.000000000 -0300
@@ -15,7 +15,7 @@
obj:colorBlock:=NIL
obj:colSep:=NIL
obj:colSepH:=NIL
- obj:defColor:={1,2}
+ obj:defColor:={1,2,1,1}
obj:footing:=NIL
obj:colorFooting:=NIL
obj:footSep:=NIL

+ 0
- 78
package/mnemoc/clip/postgresql.patch

@ -1,78 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/mnemoc/clip/postgresql.patch
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./cliplibs/clip-postgres/Makefile 2004-01-19 11:36:31.000000000 -0300
+++ ./cliplibs/clip-postgres/Makefile.in 2004-01-19 12:22:53.000000000 -0300
@@ -13,19 +13,20 @@
TARGET=libclip-postgres$(DLLSUFF)
ATARGET=libclip-postgres.a
RTARGET=libclip-postgres$(DLLREALSUFF)
-PGINC = -I/usr/include/pgsql -I/usr/include/postgresql -I/usr/include/pgsql/server -I/usr/include -I/usr/local/include
+PGINC = -I@PGINCDIR@
+PGLIB = -L@PGLIBDIR@
OBJS=pg_clip.o pg.o
all: have_lib $(TARGET) $(ATARGET)
have_lib:
- test -f /usr/include/pgsql/libpq-fe.h -o -f /usr/include/postgresql/libpq-fe.h -o -f /usr/include/pgsql/server/libpq-fe.h -o -f /usr/include/libpq-fe.h -o -f /usr/local/include/libpq-fe.h
+ test -f @PGINCDIR@/libpq-fe.h
$(TARGET): $(OBJS)
- $(CLIPROOT)/bin/clip_makeslib $(TARGET) $(OBJS) -lpq -L/usr/local/lib -L/usr/local/pgsql/lib
+ $(CLIPROOT)/bin/clip_makeslib $(TARGET) $(OBJS) -lpq $(PGLIB)
$(ATARGET): $(OBJS)
- $(CLIPROOT)/bin/clip_makelib $(ATARGET) $(OBJS) -lpq -L/usr/local/lib/ -L/usr/local/pgsql/lib
+ $(CLIPROOT)/bin/clip_makelib $(ATARGET) $(OBJS) -lpq $(PGLIB)
pg_clip.o: pg_clip.c
$(CC) $(C_FLAGS) $(CLIPINCLUDE) $(PGINC) -c pg_clip.c
--- /dev/null 1969-12-31 21:00:00.000000000 -0300
+++ ./cliplibs/clip-postgres/configure 2004-01-19 12:37:45.000000000 -0300
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if [ -z "$PGINCDIR" ]; then
+ for x in /usr/include/pgsql \
+ /usr/include/pgsql/server \
+ /usr/include/postgresql \
+ /opt/postgresql/include
+ do
+ if [ -f "$x/libpq-fe.h" ]; then
+ PGINCDIR=$x
+ break
+ fi
+ done
+fi
+if [ -z "$PGLIBDIR" ]; then
+ for x in /usr/local/lib \
+ /usr/local/pgsql/lib \
+ /opt/postgresql/lib
+ do
+ if [ -f "$x/libpq.so" ]; then
+ PGLIBDIR=$x
+ break
+ fi
+ done
+fi
+
+sed -e "s,@PGINCDIR@,${PGINCDIR:-/usr/include},g" \
+ -e "s,@PGLIBDIR@,${PGLIBDIR:-/usr/lib},g" \
+ Makefile.in > Makefile

Loading…
Cancel
Save