Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37839839
en ru br
Репозитории ALT
S:0.6.2-alt1
5.1: 0.4-alt1
4.1: 0.4-alt1
4.0: 0.2-alt1
3.0: 0.1-alt0.5
www.altlinux.org/Changes

Группа :: Разработка/Tcl
Пакет: rpm-build-tcl

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064107325767220014525gustar00rootroot0000000000000052 comment=7be93942734ec5e25c73e1ead45119d4e5de0d5c
.gear-rules000064400000000000000000000000521073257672200131330ustar00rootroot00000000000000tar: . name=rpm-build-tcl-@version@ base=
.rpmwrap000064400000000000000000000001371073257672200125610ustar00rootroot00000000000000%_topdir %_macropath/.../
%_sourcedir %_topdir/sources
%_specdir %_topdir/../
README.layout000064400000000000000000000026551073257672200132730ustar00rootroot00000000000000 -*- mode: text; coding: koi8-r -*-

Начиная с версии 8.4.0-alt1, произошли следующие изменения:

* libtcl (и libtk) располагаются в /usr/lib, для облегчения сборки
сторонних программ, линкующихся с libtcl (libtk); им
присвоен soname, там же размещены библиотеки stub'ов и скрипт
с конфигурацией tclConfig.sh; все остальное (tcl_library) находится
в /usr/share/tcl/tcl8.4; аналогично для tk;

* начальный список поиска расширений (tcl_pkgPath) равен
/usr/share/tcl, таким образом, все расширения содержатся
ниже этой директории, за исключением shared objects, которые
помещаются в /usr/lib/tcl; при этом, как правило, сборщик
должен учесть такое расположение so в соответствующем pkgIndex;

* пакет tcl-devel содержит теперь макрофайл tea.m4, который нужен
для сборки tea-совместимых расширений;

* пакеты tcl-devel и tk-devel содержат дополнительно приватные
заголовочные файлы, что позволяет собирать большинство расширений
без необходимости иметь полные исходные тексты tcl и tk,
их расположение отражено в *Сonfig.sh и tea.m4;

* сборка custom tcl shells, в изобилии встречающихся в расширениях,
подавляется, по крайней мере, в тех случаях, где тот же функционал
может быть получен посредством package require в обычном tclsh.
Прошу заметить, что любое расширение, имеющееся в дистрибутивах
Alt, не исключая и Tk, может быть загружено таким образом, наличие
в соответствующем пакете wish - лишь дань традиции.
README.rpm000064400000000000000000000011451073257672200125450ustar00rootroot00000000000000 -*- mode: text; coding: koi8-r -*-

С появлением пакета rpm-build-tcl произошли следующие изменения:

- в список допустимых значений тэгов Autoreq, AutoProv, AutoReqProv
добавлены tcl/notcl, значение по умолчанию включает tcl;

- определены макросы:
+ %set_tcl_req_method <value>
где <value> может быть одним из: normal, strict
значение по умолчанию: normal

+ %add_tcl_lib_path() <value>
добавляет <value> в список путей, где будет производиться
поиск provides;
значение по умолчанию: /usr/share/tcl

+ %add_tcl_req_skip() <value>
добавляет <value> в список подавляемых зависимостей
rpm-build-tcl.spec000064400000000000000000000041531073257672200144210ustar00rootroot00000000000000Name: rpm-build-tcl
Version: 0.4
Release: alt1

Summary: RPM helpers to use with Tcl scripts
License: GPL
Group: Development/Tcl
BuildArch: noarch

Source0: %name-%version.tar

PreReq: rpm-build >= 4.0.4-alt44
Requires: /etc/rpm/macros.d
Conflicts: tcl-devel < 0:8.4.7-alt2

%description
%name is set of scripts and rpm macros to assist in tcl modules
build process

%prep
%setup -c

%install
install -p -m0644 -D tcl-macros %buildroot%_sysconfdir/rpm/macros.d/tcl
install -p -m0644 -D tcl-macros.env %buildroot%_sysconfdir/rpm/macros.d/tcl.env
install -p -m0755 -D tcl.req %buildroot%_rpmlibdir/tcl.req
install -p -m0755 -D tcl.req.files %buildroot%_rpmlibdir/tcl.req.files
install -p -m0755 tcl.prov %buildroot%_rpmlibdir/tcl.prov
install -p -m0755 tcl.prov.files %buildroot%_rpmlibdir/tcl.prov.files

%files
%doc README*
%config %_sysconfdir/rpm/macros.d/tcl
%config %_sysconfdir/rpm/macros.d/tcl.env
%_rpmlibdir/tcl.*

%changelog
* Fri Dec 21 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.4-alt1
- modified for use with tm modules, found in tcl8.5

* Tue Sep 25 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.2.1-alt2
- do not require /usr/bin/tclsh to not create circular deps

* Mon Sep 24 2007 Alexey Tourbin <at@altlinux.ru> 0.2.1-alt1
- added new files, for use with new rpm-build:
+ tcl.req.files (.prov.files) - will select tcl files for req/prov
+ /etc/rpm/macros.d/tcl.env - piece of rpm-build scriplets' preamble
+ also placed rpm-build tcl macros to /etc/rpm/macros.d/tcl
- tcl.req: enabled warning when "eval source" fails

* Thu Jul 20 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.2-alt1
- %%teapatch macro resurrected

* Wed Jul 13 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt0.5
- #6488 again

* Sat Apr 16 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt0.4
- #6488 fixed

* Sat Nov 20 2004 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt0.3
- catched 'exit' in scripts, which can abort findreq process

* Tue Nov 2 2004 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt0.2
- added conflicts to older tcl-devel

* Sat Oct 16 2004 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt0.1
- Initial release
tcl-macros000064400000000000000000000065341073257672200130660ustar00rootroot00000000000000#===============================================================================
# $Id: tcl-macros,v 1.6 2006/07/20 17:12:15 me Exp $
#===============================================================================
# tclsh binary
%__tclsh %_bindir/tclsh

# tcl directory layout
%_tcllibdir %_libdir/tcl
%_tcldatadir %_datadir/tcl

# macros from rpm/platform.in
%_tcl_lib_path ""
%_tcl_req_method normal
%_tcl_req_skip ""

%set_tcl_req_method() %global _tcl_req_method %1

%add_tcl_req_skip() %global _tcl_req_skip %_tcl_req_skip %*
%add_tcl_lib_path() %global _tcl_lib_path %_tcl_lib_path %*

# helpers
%teapatch(fvb:C:) \
%{-v:_verbose=1}%{!-v:set +x} \
set -a \
%{-f:_force=1} \
%{-b:_backup="%{-b*}"}%{!-b:_backup="..tea3"} \
%{-C:_mydir="`pwd`"; cd "%{-C*}"} \
if [ -n "$_force" -a -f aclocal.m4 ]; then \
sed -i '/^builtin(include,.\\+\\/tcl.m4)/d' aclocal.m4 \
fi \
if [ -f Makefile.in ]; then \
cat <<EOF |%__tclsh \
set fc [read [set f [open Makefile.in]] [file size Makefile.in]] \
close \\\$f \
if {[info exists env\(_backup\)] && ![string eq \\\$env\(_backup\) ""]} { \
puts -nonewline [set f [open Makefile.in\\\$env\(_backup\) w]] \\\$fc \
close \\\$f \
} \
regsub {(?x) \
(\\\npkgdatadir\\\s*=\\\s*\\\\\\$\\\(datadir\\\)/)(\\\\\\$\\\(PKG_DIR\\\)) \
} \\\$fc {\\\1tcl/\\\2} fc \
regsub {(?x) \
(\\\npkglibdir\\\s*=\\\s*\\\\\\$\\\(libdir\\\)/)\\\\\\$\\\(PKG_DIR\\\) \
} \\\$fc {\\\1tcl} fc \
regsub {(?x) \
(\\\[file\\\s+join\\\s+\\\\\\$\\\\\\$dir)\\\s+(\\\\\\$\\\(\\\S+_LIB_FILE\\\)) \
} \\\$fc {\\\1 .. .. .. %_lib tcl \\\2} fc \
regsub {(?x) \
(?: \
(\\\ninstall-lib-binaries:\\\s* \
\\\n\\\s+@mkdir\\\s+-p\\\s+\\\\\\$\\\(DESTDIR\\\)\\\\\\$\\\(pkglibdir\\\)) \
(.+\\\n\\\s+@list='\\\\\\$\\\(\\\S+_SOURCES\\\)';.+){1,1}? \
(\\\\\\$\\\(pkglibdir\\\)) \
(.+){1,1}? \
(\\\\\\$\\\(pkglibdir\\\)) \
(.+done){1,1}? \
){1,1}? \
} \\\$fc {\\\1 \\\$(DESTDIR)\\\$(pkgdatadir)\\\2\\\$(pkgdatadir)\\\4\\\$(pkgdatadir)\\\6} fc \
regsub -all {(?x) \
(?: (\\\n.+pkgIndex\.tcl\\\s+\\\\\\$\\\(DESTDIR\\\))\\\\\\$\\\(pkglibdir\\\)){1,1}? \
} \\\$fc {\\\1\\\$(pkgdatadir)} fc \
puts -nonewline [set f [open Makefile.in w]] \\\$fc \
close \\\$f \
EOF\
fi \
if [ -n "$_verbose" -a -n "$_backup" ]; then \
gendiff . "$_backup" ||: \
fi \
%{-f:unset _force} \
%{-v:unset _verbose}%{!-v:set -x} \
%{-b:unset _backup} \
%{-C:cd "${_mydir}"; unset _mydir} \
set +a \
%nil

%tea_makeinstall(n:) \
%{-n:_name="%{-n*}"}%{!-n:%{?teaname:_name="%teaname"}%{!?teaname:%{error:teaname is not set and -n wasn't given}}} \
%makeinstall libdir=%buildroot%_tcllibdir pkglibdir=%buildroot%_tcldatadir/$_name %* \
%nil

%tea_makeindex(vdlf:L:C:) \
%{-v:_verbose="-verbose"} \
%{-d:_direct="-direct"} \
%{-l:_lazy="-lazy"} \
%{-f:_files='../../../%_lib/tcl/%{-f*}'}%{!-f:_files='../../../%_lib/tcl/*.so'} \
%{-L:_load="-load %{-L*}"} \
%{-C:_dir="%{-C*}"}%{!-C:%{?teaname:_dir="%buildroot%_tcldatadir/%teaname"}%{!?teaname:%{error:teaname is not set and -C wasn't given}}} \
if ! test -d $_dir; then %__mkdir_p $_dir; fi \
echo pkg_mkIndex $_verbose $_direct $_lazy $_load -- $_dir '*.tcl' $_files %* |%__tclsh \
%{-v:unset _verbose} \
%{-d:unset _direct} \
%{-l:unset _lazy} \
%{-f:unset _files} \
%{-L:unset _load} \
unset _dir \
%nil

#===============================================================================
#local variables:
#mode: rpm-spec
#fill-column: 80
#tab-width: 2
#end:
tcl-macros.env000064400000000000000000000003371073257672200136500ustar00rootroot00000000000000%{?_tcl_lib_path:export RPM_TCL_LIB_PATH="%_tcl_lib_path"}
%{?_tcl_req_method:export RPM_TCL_REQ_METHOD="%_tcl_req_method"}
%{?_tcl_req_skip:export RPM_TCL_REQ_SKIP="%_tcl_req_skip"}
%{?__tclsh:export RPM_TCLSH="%__tclsh"}
tcl.prov000075500000000000000000000065241073257672200125730ustar00rootroot00000000000000#!/bin/sh
# -*- tcl -*- \
exec ${RPM_TCLSH:-/usr/bin/tclsh} "$0" "$@"

###############################################################################
# tcl.prov -- Finds provides in tcl index files (pkgIndex.tcl)
#
# Author: Sergey Bolshakov <sbolshakov@altlinux.ru>
# Created: Thu Oct 14 16:45:59 MSD 2004
# Modified: $Date: 2004/10/16 16:11:14 $
# Version: $Id: tcl.prov,v 1.4 2004/10/16 16:11:14 me Exp $
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, write to the Free Software
# Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
##############################################################################

namespace eval ::pkg::rpm {
if {![info exists ::env(RPM_BUILD_ROOT)]} return
variable pkgpattern [list]
variable modpattern [list]

foreach p [concat $::tcl_pkgPath \
[expr {[info exists ::env(RPM_TCL_LIB_PATH)] ?
[lsort -uniq [split [string trim $::env(RPM_TCL_LIB_PATH)]]] :
[list]}]] {
if {[file pathtype $p] eq {absolute}} {
lappend pkgpattern \
[eval file join / $::env(RPM_BUILD_ROOT) [lrange [file split $p] 1 end] *]
}
}

if {![catch {tcl::tm::path list} tmpath]} {
if {[string match $::env(RPM_BUILD_ROOT)/* $::env(RPM_TCLSH)]} {
set modpattern $tmpath
} else {
foreach p $tmpath {
lappend modpattern $::env(RPM_BUILD_ROOT)$p
}
}
}
}

proc ::pkg::rpm::filter {} {
variable modpattern
variable pkgpattern

set flist [split [string trim [read stdin] \n]]

set result [list]
foreach _ $modpattern {
foreach p [lsearch -glob -all -inline $flist $_/*] {
lappend result $p
puts "tcl\([string map {/ :: - {) = } .tm ""} [string range $p [string len $_/] end]]"
}
}

set unseen [list]
foreach _ $flist {
if {[lsearch -exact $result $_] == -1} {
lappend unseen $_
}
}

set result [list]
foreach _ $pkgpattern {
set result [concat $result [lsearch -glob -all -inline $unseen $_]]
}
lsort -uniq $result
}

proc ::pkg::rpm::__package {interp args} {
switch -exact -- [lindex $args 0] {
require {
if {[catch {eval package $args} v]} {
puts stderr "warning: $v"
} else {
return $v
}
}
provide {
catch {eval package require [lrange $args 1 end]}
eval package $args
}
default {
eval $interp invokehidden package $args
}
}
}

proc ::pkg::rpm::provides f {
set i [interp create]

$i eval {
foreach _ [package names] {
if {$_ eq "Tcl"} continue
package forget $_
}
}

$i hide package
$i alias package [namespace current]::__package $i

$i eval [list set dir [file dirname $f]]
$i eval [list source $f]
foreach n [$i eval [list package names]] {
foreach v [$i eval [list package versions $n]] {
puts "tcl\($n\) = $v"
}
}

interp delete $i
}

namespace eval ::pkg::rpm {
foreach _ [filter] {
provides $_
}
}
tcl.prov.files000075500000000000000000000002241073257672200136630ustar00rootroot00000000000000#!/bin/sh -efu

while IFS=$'\t' read -r f t; do
# tcl modules & packages
case "$f" in
*/pkgIndex.tcl|*.tm)
echo "$f"; continue ;;
esac
done
tcl.req000075500000000000000000000064711073257672200123750ustar00rootroot00000000000000#!/bin/sh
# -*- tcl -*- \
exec ${RPM_TCLSH:-/usr/bin/tclsh} "$0" "$@"

###############################################################################
# tcl.req -- Finds requires for given list of tcl scripts
#
# Author: Sergey Bolshakov <sbolshakov@altlinux.ru>
# Created: Thu Oct 14 16:45:59 MSD 2004
# Modified: $Date: 2004/11/20 15:46:00 $
# Version: $Id: tcl.req,v 1.4 2004/11/20 15:46:00 me Exp $
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, write to the Free Software
# Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
##############################################################################

namespace eval ::pkg::rpm {
variable catched [list]
variable requires [list]
}

proc ::pkg::rpm::addreq {type rest} {
variable catched
variable requires

if {[lindex $rest 0] eq "-exact"} {
set versioned {}
set rest [lrange $rest 1 end]
}

foreach {name version} $rest break

if {$name eq "Tcl"} return

lappend $type \
[expr {[info exists versioned] ?
[list $name $version] :
[list $name {}]}]
}

proc ::pkg::rpm::__package {interp args} {
switch -exact -- [lindex $args 0] {
require {
addreq requires [lrange $args 1 end]
}
provide {
if {[lindex $args 1] eq "Tcl"} {
eval package $args
}
}
default {
eval $interp invokehidden package $args
}
}
}

proc ::pkg::rpm::__catch {interp args} {
set body [lindex $args 0]
if {[llength $body] >= 3 &&
[lindex $body 0] eq "package" &&
[lindex $body 1] eq "require"} {
addreq catched [lrange $body 2 end]
} else {
eval $interp invokehidden catch $args
}
}

proc ::pkg::rpm::requires f {
if {[string eq [file tail $f] "pkgIndex.tcl"]} return

set i [interp create]

$i hide catch
$i alias catch [namespace current]::__catch $i

$i hide package
$i alias package [namespace current]::__package $i

$i eval [list proc exit args {}]
$i eval [list proc puts args {}]
$i eval [list proc unknown args {}]

if {[catch {
$i eval [list source $f]
} err]} {
# todo verbose
# puts stderr "warning: $f: $err"
}

interp delete $i
}

namespace eval ::pkg::rpm {
foreach _ [split [string trim [read stdin]]] {
requires $_
}

set catched [lsort -uniq $catched]
set requires [lsort -uniq $requires]

if {[info exists ::env(RPM_TCL_REQ_METHOD)] &&
$::env(RPM_TCL_REQ_METHOD) eq "strict"} {
set requires [lsort -uniq [concat $catched $requires]]
}

if {[info exists ::env(RPM_TCL_REQ_SKIP)] &&
[set skiplist [lsort -uniq [split [string trim $::env(RPM_TCL_REQ_SKIP)]]]] eq {}} {
unset skiplist
}

foreach _ $requires {
foreach {n v} $_ break
if {[info exists skiplist] &&
[lsearch -exact $skiplist $n] != -1} continue
if {$v eq {}} {
puts "tcl\($n\)"
} else {
puts "tcl\($n\) = $v"
}
}
}
tcl.req.files000075500000000000000000000017541073257672200134750ustar00rootroot00000000000000#!/bin/sh -efu

has_exec=
check_exec()
{
local f="$1" line1=; shift
has_exec=
if line1=$(egrep -m1 -v '^[[:space:]]*(#|$)' "$f"); then
set -- $line1
if [ $# -gt 1 ] && [ "$1" = exec ]; then
if echo "$2" |egrep -qs '\<(tclsh|wish)\>'; then
has_exec=1
fi
fi
fi
}

while IFS=$'\t' read -r f t; do
# tcl modules
case "$f" in
*.tcl)
case "$t" in
*"symbolic link to"*) ;;
*" text"*) echo "$f" ;;
*) echo "${0##*/}: $f: $t" >&2 ;;
esac
continue ;;
esac
# Current tcl.req analyzer cannot be used for scripts, because it
# essentially executes Tcl code. Processing of scripts is logically
# disabled with this single clause:
continue
# scripts
case "$t" in
# handles both "#!/usr/bin/tclsh" and "#!/usr/bin/env tclsh"
*[\ /]"tclsh script text executable"*) ;;
*[\ /]"wish script text executable"*) ;;
*"Bourne shell script text executable"*)
check_exec "$f"
[ -n "$has_exec" ] || continue ;;
*) continue ;;
esac
# maybe test -x?
echo "$f"
done
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin