--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/01_minimum/tcl.txz/old/tcl-20161016/PlamoBuild.tcl-8.5.10 2016-10-16 10:07:44.000000000 +0900 @@ -1,15 +1,17 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz" +pkgbase=tcl +vers=8.5.10 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P2 +src=tcl$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--enable-threads" +DOCS="changes ChangeLog.2000 ChangeLog.1999 ChangeLog.2002 + ChangeLog.2003 ChangeLog.2005 README ChangeLog ChangeLog.2001 + license.terms ChangeLog.2004" ###################################################################### fscheck() { @@ -233,8 +235,28 @@ esac done done + cd $B + if [ $arch == x86_64 ] ; then + cp -p unix/configure{,.orig} + cat <<- "EOF" | patch unix/configure + 18772c18772 + < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' + --- + > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' + 18894,18895c18894,18895 + < 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}" + 18897c18897 + < 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 [ -f Makefile ] ; then make clean fi @@ -250,7 +272,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 @@ -267,11 +289,14 @@ 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.5 $P/usr/bin/tclsh + mv $P/usr/bin/{tclsh8.5,tclsh} $C + mv $C/{tclsh8.5,tclsh} $P/usr/bin touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -296,8 +321,15 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P usr/$libdir/tcl8.5 + tar rvpf $pkg.tar -C $P usr/$libdir/{libtcl8.5.so,tclConfig.sh,libtclstub8.5.a} + tar rvpf $pkg.tar -C $P usr/$libdir/tcl8 + 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 read -p "Do you want to keep work files? [y/N] " ans