--- admin/PlamoBuild-template-20161020 2016-10-20 00:36:22.000000000 +0900 +++ plamo/04_xapps/old/gcc_libffi-20170202/PlamoBuild.gcc_libffi-4.8.5 2017-02-02 19:14:23.000000000 +0900 @@ -1,15 +1,21 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 + https://patchwork.ozlabs.org/patch/342434/mbox" +pkgbase=gcc_libffi +vers=4.8.5 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P2 +src=gcc-$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty + --enable-__cxa_atexit --enable-threads=posix --enable-shared + --enable-languages=c,c++,fortran,go --enable-gnu-unique-object + --enable-linker-build-id --enable-plugin --with-system-zlib + --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" template=20161020 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -50,9 +56,9 @@ strip_bindir() { echo "compressing in $1" if [ -d $1 ] ; then ( - shopt -s nullglob + shopt -s extglob nullglob cd $1 - for i in * ; do + for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do echo "$i" if [ -h $i ] ; then continue ; fi if [ -n "`file $i | grep "not stripped"`" ] ; then @@ -187,8 +193,11 @@ done fi if [ $opt_download -eq 1 ] ; then + alt=gcc-4.8-filename-output.patch for i in $url ; do - if [ ! -f ${i##*/} ] ; then + if [ ${i##*/} == mbox ] ; then + [ ! -f $alt ] && wget $i -O $alt + elif [ ! -f ${i##*/} ] ; then wget $i ; j=${i%.*} for sig in asc sig{,n} {sha{256,1},md5}{,sum} ; do if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi @@ -235,6 +244,8 @@ esac done done + cd $B + patch -Np0 -i $W/gcc-4.8-filename-output.patch for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -246,7 +257,10 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --libexecdir=/usr/$libdir \ + --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ + --host=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` fi done fi @@ -271,9 +285,12 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + install -d $P/usr/$libdir + ( cd $arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi`/libffi + ./libtool --mode=install install libffi.la $P/usr/$libdir ) fi done + rm $P/usr/$libdir/libffi.{so,la,a} touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -311,9 +328,9 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) 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/share/man/man1 | tail -n+2` + tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | 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