1 #!/usr/bin/bash
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
8 # with the License.
9 #
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
14 #
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2016 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=libxslt
31 VER=1.1.29
32 PKG=library/libxslt
33 SUMMARY="The XSLT library"
34 DESC="$SUMMARY"
35
36 DEPENDS_IPS="library/libxml2 library/zlib system/library system/library/math"
37
38 CFLAGS32="$CFLAGS32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
39 CFLAGS64="$CFLAGS64 -D_LARGEFILE_SOURCE"
40 LDFLAGS="-lpthread"
41
42 CONFIGURE_OPTS="--disable-static --with-pic --with-threads --without-crypto"
43 CONFIGURE_OPTS_32="$CONFIGURE_OPTS_32 --with-python=/usr/bin/$ISAPART/python2.7"
44 CONFIGURE_OPTS_64="$CONFIGURE_OPTS_64 --with-python=/usr/bin/$ISAPART64/python2.7"
45
46 NO_PARALLEL_MAKE="true"
47
48 backup_man() {
49 logmsg "making a backup of xsltproc.1"
50 logcmd cp $TMPDIR/$BUILDDIR/doc/xsltproc.1 $TMPDIR/$BUILDDIR/backup.1
51 }
52 save_function configure64 configure64_orig
53 configure64() {
54 configure64_orig
55 logmsg "restoring backup of xsltproc.1"
56 logcmd cp $TMPDIR/$BUILDDIR/backup.1 $TMPDIR/$BUILDDIR/doc/xsltproc.1
57 logcmd touch $TMPDIR/$BUILDDIR/doc/xsltproc.1
58 }
59
60 save_function make_prog64 make_prog64_orig
61 save_function make_prog32 make_prog32_orig
62 make_prog64() {
63 logcmd perl -pi -e 's#(\$CC.*\$compiler_flags)#$1 -nostdlib#g;' libtool || \
64 logerr "libtool patch failed"
65 make_prog64_orig
66 }
67 make_prog32() {
68 logcmd perl -pi -e 's#(\$CC.*\$compiler_flags)#$1 -nostdlib#g;' libtool || \
69 logerr "libtool patch failed"
70 make_prog32_orig
71 }
72
73 init
74 download_source $PROG $PROG $VER
75 patch_source
76 backup_man
77 prep_build
78 build
79 make_isa_stub
80 make_package
81 clean_up