Skip to content

Commit

Permalink
Provide ccache 3.3.3 to help speed up code builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov committed Dec 22, 2016
1 parent 1a1a9d5 commit 503fb0c
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
66 changes: 66 additions & 0 deletions build/ccache/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/bash
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 Jim Klimov
# Use is subject to license terms.
#
# Load support functions
. ../../lib/functions.sh

PROG=ccache # App name
VER=3.3.3 # App version
PKG=developer/ccache # Package name (without prefix)
SUMMARY="ccache - cacher of GCC-compiled files to avoid doing the same job twice"
DESC="$SUMMARY ($VER)"

#NO_PARALLEL_MAKE=1
#BUILDARCH=32

BUILD_DEPENDS_IPS="developer/build/autoconf text/gnu-grep"
DEPENDS_IPS="system/library"

# We build backwards here on purpose so that 32bit binaries win (for install collisions).
build() {
if [[ $BUILDARCH == "64" || $BUILDARCH == "both" ]]; then
build64
fi
if [[ $BUILDARCH == "32" || $BUILDARCH == "both" ]]; then
build32
fi
}

CONFIGURE_OPTS="--sysconfdir=/etc"
CFLAGS="-D_GNU_SOURCE -D__EXTENSIONS__ --std=c99"

init
download_source $PROG $PROG $VER
patch_source
prep_build
build
make_isa_stub
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:
46 changes: 46 additions & 0 deletions build/ccache/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 Jim Klimov
# Use is subject to license terms.
#

<transform file path=usr/share/info/standards.info -> drop>
license LICENSE.txt license=GPLv3,murmurhash,papowell/jhweiss,PostgreSQL,Python,zlib

# Softlinks to simplify builds - just prepend /usr/lib/ccache to PATH
# NOTE: Since these are softlinks, a certain relative directory structure
# is expected (like rooting at /usr) when the package is installed.
# You can turn off ccache without changing runtime PATHs by exporting
# CCACHE_DISABLE=1 before a build
link target=../../bin/ccache path=usr/lib/ccache/gcc
link target=../../bin/ccache path=usr/lib/ccache/g++
link target=../../bin/ccache path=usr/lib/ccache/cc
link target=../../bin/ccache path=usr/lib/ccache/c++
link target=../../bin/ccache path=usr/lib/ccache/cpp

# A few links specifically to support gcc-4.4.4-il
link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-c++
link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-g++
link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-gcc
link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-gcc-4.4.4
1 change: 1 addition & 0 deletions build/jeos/omnios-userland.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ depend fmri=developer/build/autoconf@2.69,5.11-@PVER@ type=incorporate
depend fmri=developer/build/automake@1.15,5.11-@PVER@ type=incorporate
depend fmri=developer/build/gnu-make@4.2,5.11-@PVER@ type=incorporate
depend fmri=developer/build/libtool@2.4,5.11-@PVER@ type=incorporate
depend fmri=developer/ccache@3.3.3,5.11-@PVER@ type=incorporate
depend fmri=developer/dtrace/toolkit@0.99,5.11-@PVER@ type=incorporate
depend fmri=developer/gcc44@4.4.4,5.11-@PVER@ type=incorporate
depend fmri=developer/gcc44/libgmp-gcc44@5.0.2,5.11-@PVER@ type=incorporate
Expand Down

0 comments on commit 503fb0c

Please sign in to comment.