--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/01_minimum/tcl.txz/tcl/PlamoBuild.tcl-8.6.6 2017-07-01 01:52:25.000000000 +0900 @@ -1,18 +1,20 @@ #!/bin/sh ###################################################################### -url="" +url="http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" verify= digest= commitid= -pkgbase= -vers= +pkgbase=tcl +vers=8.6.6 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P2 +src=$pkgbase$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--enable-threads" +DOCS="ChangeLog.2004 ChangeLog.2002 ChangeLog.2005 ChangeLog.2008 + ChangeLog.1999 changes ChangeLog license.terms ChangeLog.2007 + ChangeLog.2003 README ChangeLog.2000 ChangeLog.2001" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -36,8 +38,28 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + if [ $arch == x86_64 ] ; then + cp -p unix/configure{,.orig} + cat <<- "EOF" | patch unix/configure + 18923c18923 + < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' + --- + > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' + 19053,19054c19053,19054 + < elif test "$prefix/lib" != "$libdir"; then + < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" + --- + > elif test "$prefix/lib64" != "$libdir"; then + > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" + 19056c19056 + < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" + --- + > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" + EOF + fi for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} + cd ${B[$i]}/unix if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -47,7 +69,7 @@ fi if [ $opt_build -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} + cd ${B[$i]}/unix if [ -f Makefile ] ; then make fi @@ -59,21 +81,35 @@ if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} + cd ${B[$i]}/unix if [ -f Makefile ] ; then - make install DESTDIR=$P + make install DESTDIR=$P install-private-headers fi done + ln -s tclsh8.6 $P/usr/bin/tclsh + mv $P/usr/bin/{tclsh8.6,sqlite3_analyzer,tclsh} $C + mv $C/{tclsh8.6,sqlite3_analyzer,tclsh} $P/usr/bin touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + for i in `find $P/usr/$libdir -mindepth 2 -name *.so` ; do + strip_libdir ${i%/*} + touch -t `date '+%m%d0900'` ${i%/*} + done setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/$libdir -maxdepth 1 ! -name pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup