19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Load support functions
28 . ../../lib/functions.sh
29
30 PROG=gawk
31 VER=4.1.1
32 VERHUMAN=$VER
33 PKG=text/gawk
34 SUMMARY="gawk - GNU implementation of awk"
35 DESC="$SUMMARY"
36
37 BUILDARCH=32
38 CONFIGURE_OPTS_32="$CONFIGURE_OPTS_32 --bindir=/usr/bin"
39
40 # as of 4.1, gawk now supports arbitrary precision numbers.
41 # build in MPFR/GMP support rather than dynamically linking it.
42 save_function configure32 configure32_orig
43 configure32() {
44 configure32_orig
45
46 logmsg "Patching Makefile to make mpfr/gmp static"
47 pushd $TMPDIR/$BUILDDIR > /dev/null
48 logcmd gsed -i -e 's#-lmpfr -lgmp#/opt/gcc-4.8.1/lib/libmpfr.a /opt/gcc-4.8.1/lib/libgmp.a#' Makefile
49 popd > /dev/null
50 }
51
52 gnu_cleanup() {
53 logmsg "Cleaning up install root"
54 logcmd mkdir -p $DESTDIR/usr/gnu/bin
55 logcmd mkdir -p $DESTDIR/usr/gnu/share/man/man1
56 logcmd ln -s ../../bin/gawk $DESTDIR/usr/gnu/bin/awk
57 logcmd ln -s ../../../../share/man/man1/gawk.1 $DESTDIR/usr/gnu/share/man/man1/awk.1
58 logcmd rm -f $DESTDIR/usr/bin/awk || logerr "--- Unable to clean up $DESTDIR/usr/bin"
59 logcmd rm -rf $DESTDIR/usr/libexec || logerr "--- unable to clean up libexec dir"
60 }
61 init
62 download_source $PROG $PROG $VER
63 patch_source
64 prep_build
65 build
66 gnu_cleanup
67 make_isa_stub
68 make_package
|
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Load support functions
28 . ../../lib/functions.sh
29
30 PROG=gawk
31 VER=4.1.1
32 VERHUMAN=$VER
33 PKG=text/gawk
34 SUMMARY="gawk - GNU implementation of awk"
35 DESC="$SUMMARY"
36
37 BUILDARCH=32
38 CONFIGURE_OPTS_32="$CONFIGURE_OPTS_32 --bindir=/usr/bin"
39 # Use old gcc4 standards level for this.
40 CFLAGS="$CFLAGS -std=gnu89"
41
42 # as of 4.1, gawk now supports arbitrary precision numbers.
43 # build in MPFR/GMP support rather than dynamically linking it.
44 save_function configure32 configure32_orig
45 configure32() {
46 configure32_orig
47
48 logmsg "Patching Makefile to make mpfr/gmp static"
49 pushd $TMPDIR/$BUILDDIR > /dev/null
50 logcmd gsed -i -e 's#-lmpfr -lgmp#/opt/gcc-5.1.0/lib/libmpfr.a /opt/gcc-5.1.0/lib/libgmp.a#' Makefile
51 popd > /dev/null
52 }
53
54 gnu_cleanup() {
55 logmsg "Cleaning up install root"
56 logcmd mkdir -p $DESTDIR/usr/gnu/bin
57 logcmd mkdir -p $DESTDIR/usr/gnu/share/man/man1
58 logcmd ln -s ../../bin/gawk $DESTDIR/usr/gnu/bin/awk
59 logcmd ln -s ../../../../share/man/man1/gawk.1 $DESTDIR/usr/gnu/share/man/man1/awk.1
60 logcmd rm -f $DESTDIR/usr/bin/awk || logerr "--- Unable to clean up $DESTDIR/usr/bin"
61 logcmd rm -rf $DESTDIR/usr/libexec || logerr "--- unable to clean up libexec dir"
62 }
63 init
64 download_source $PROG $PROG $VER
65 patch_source
66 prep_build
67 build
68 gnu_cleanup
69 make_isa_stub
70 make_package
|