--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/01_minimum/tcl.txz/old/tcl-20161018/PlamoBuild.tcl-8.6.6 2016-10-18 09:13:35.000000000 +0900 @@ -1,15 +1,17 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" +pkgbase=tcl +vers=8.6.6 arch=`uname -m` build=P1 -src=$pkgbase-$vers +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" ###################################################################### 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 + 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 [ -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,16 +289,23 @@ 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 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -296,8 +325,15 @@ done convert 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 read -p "Do you want to keep work files? [y/N] " ans