Sync with Rawhide.
This commit is contained in:
parent
ecda2a7e08
commit
103add5414
|
@ -0,0 +1,48 @@
|
||||||
|
Index: ccache.1
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvsroot/ccache/ccache.1,v
|
||||||
|
retrieving revision 1.26
|
||||||
|
diff -u -r1.26 ccache.1
|
||||||
|
--- ccache.1 24 Nov 2005 21:10:08 -0000 1.26
|
||||||
|
+++ ccache.1 21 Jul 2007 21:03:32 -0000
|
||||||
|
@@ -330,7 +330,7 @@
|
||||||
|
.IP o
|
||||||
|
Use the same \fBCCACHE_DIR\fP environment variable setting
|
||||||
|
.IP o
|
||||||
|
-Set the \fBCCACHE_NOLINK\fP environment variable
|
||||||
|
+Unset the \fBCCACHE_HARDLINK\fP environment variable
|
||||||
|
.IP o
|
||||||
|
Make sure everyone sets the CCACHE_UMASK environment variable
|
||||||
|
to 002, this ensures that cached files are accessible to everyone in
|
||||||
|
Index: ccache.yo
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvsroot/ccache/ccache.yo,v
|
||||||
|
retrieving revision 1.27
|
||||||
|
diff -u -r1.27 ccache.yo
|
||||||
|
--- ccache.yo 24 Nov 2005 21:54:09 -0000 1.27
|
||||||
|
+++ ccache.yo 21 Jul 2007 21:03:32 -0000
|
||||||
|
@@ -289,7 +289,7 @@
|
||||||
|
|
||||||
|
itemize(
|
||||||
|
it() Use the same bf(CCACHE_DIR) environment variable setting
|
||||||
|
- it() Set the bf(CCACHE_NOLINK) environment variable
|
||||||
|
+ it() Unset the bf(CCACHE_HARDLINK) environment variable
|
||||||
|
it() Make sure everyone sets the CCACHE_UMASK environment variable
|
||||||
|
to 002, this ensures that cached files are accessible to everyone in
|
||||||
|
the group.
|
||||||
|
Index: web/ccache-man.html
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvsroot/ccache/web/ccache-man.html,v
|
||||||
|
retrieving revision 1.25
|
||||||
|
diff -u -r1.25 ccache-man.html
|
||||||
|
--- web/ccache-man.html 13 Sep 2004 10:38:17 -0000 1.25
|
||||||
|
+++ web/ccache-man.html 21 Jul 2007 21:03:32 -0000
|
||||||
|
@@ -256,7 +256,7 @@
|
||||||
|
following conditions need to be met:
|
||||||
|
<p><ul>
|
||||||
|
<li > Use the same <strong>CCACHE_DIR</strong> environment variable setting
|
||||||
|
- <li > Set the <strong>CCACHE_NOLINK</strong> environment variable
|
||||||
|
+ <li > Unset the <strong>CCACHE_HARDLINK</strong> environment variable
|
||||||
|
<li > Make sure everyone sets the CCACHE_UMASK environment variable
|
||||||
|
to 002, this ensures that cached files are accessible to everyone in
|
||||||
|
the group.
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
|
||||||
|
# environment variable in their personal profile.
|
||||||
|
|
||||||
|
if ( "$path" !~ *@LIBDIR@/ccache* ) then
|
||||||
|
set path = ( @LIBDIR@/ccache $path )
|
||||||
|
endif
|
||||||
|
|
||||||
|
# If @CACHEDIR@ is writable, use a shared cache there. Users who don't
|
||||||
|
# want that even if they have that write permission can set the CCACHE_DIR
|
||||||
|
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
||||||
|
|
||||||
|
if ( ! $?CCACHE_DIR && -d @CACHEDIR@ && -w @CACHEDIR@ ) then
|
||||||
|
setenv CCACHE_DIR /var/cache/ccache
|
||||||
|
setenv CCACHE_UMASK 002
|
||||||
|
unsetenv CCACHE_HARDLINK
|
||||||
|
endif
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
|
||||||
|
# environment variable in their personal profile.
|
||||||
|
|
||||||
|
if ! echo "$PATH" | grep -qw @LIBDIR@/ccache ; then
|
||||||
|
PATH="@LIBDIR@/ccache:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If @CACHEDIR@ is writable, use a shared cache there. Users who don't
|
||||||
|
# want that even if they have that write permission can set the CCACHE_DIR
|
||||||
|
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
||||||
|
|
||||||
|
if [ -z "$CCACHE_DIR" -a -d @CACHEDIR@ -a -w @CACHEDIR@ ] ; then
|
||||||
|
export CCACHE_DIR=/var/cache/ccache
|
||||||
|
export CCACHE_UMASK=002
|
||||||
|
unset CCACHE_HARDLINK
|
||||||
|
fi
|
58
ccache.spec
58
ccache.spec
|
@ -1,19 +1,26 @@
|
||||||
%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7
|
%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7 avr-gcc avr-c++ avr-g++ arm-gp2x-linux-gcc arm-gp2x-linux-c++ arm-gp2x-linux-g++
|
||||||
%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel
|
%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel, avr-gcc, avr-gcc-c++, arm-gp2x-linux-gcc, arm-gp2x-linux-gcc-c++
|
||||||
|
|
||||||
|
%define abs2rel() perl -MFile::Spec -e 'print File::Spec->abs2rel(@ARGV)' %1 %2
|
||||||
|
%{expand: %%define relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache)}
|
||||||
|
|
||||||
Name: ccache
|
Name: ccache
|
||||||
Version: 2.4
|
Version: 2.4
|
||||||
Release: 8%{?dist}
|
Release: 10%{?dist}
|
||||||
Summary: C/C++ compiler cache
|
Summary: C/C++ compiler cache
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
License: GPL
|
License: GPLv2+
|
||||||
URL: http://ccache.samba.org/
|
URL: http://ccache.samba.org/
|
||||||
Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz
|
Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz
|
||||||
|
Source1: %{name}.sh.in
|
||||||
|
Source2: %{name}.csh.in
|
||||||
Patch0: %{name}-html-links.patch
|
Patch0: %{name}-html-links.patch
|
||||||
Patch1: %{name}-2.4-coverage-231462.patch
|
Patch1: %{name}-2.4-coverage-231462.patch
|
||||||
|
Patch2: %{name}-2.4-hardlink-doc.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
BuildRequires: perl(File::Spec)
|
||||||
Requires(triggerin): coreutils
|
Requires(triggerin): coreutils
|
||||||
Requires(triggerpostun): coreutils
|
Requires(triggerpostun): coreutils
|
||||||
|
|
||||||
|
@ -28,21 +35,16 @@ a 5 to 10 times speedup in common compilations.
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p0
|
%patch0 -p0
|
||||||
%patch1 -p0
|
%patch1 -p0
|
||||||
|
%patch2 -p0
|
||||||
|
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
||||||
|
%{SOURCE1} > %{name}.sh
|
||||||
|
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
||||||
|
%{SOURCE2} > %{name}.csh
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
%{__make} %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cat <<EOF > %{name}.sh
|
|
||||||
if ! echo "\$PATH" | grep -q %{_libdir}/ccache ; then
|
|
||||||
PATH="%{_libdir}/ccache:\$PATH"
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
cat <<EOF > %{name}.csh
|
|
||||||
if ( "\$path" !~ *%{_libdir}/ccache* ) then
|
|
||||||
set path = ( %{_libdir}/ccache \$path )
|
|
||||||
endif
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -53,22 +55,28 @@ install -pm 644 %{name}.sh %{name}.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_libdir}/ccache
|
install -dm 755 $RPM_BUILD_ROOT%{_libdir}/ccache
|
||||||
for name in %{compilers} ; do
|
for name in %{compilers} ; do
|
||||||
for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do
|
for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do
|
||||||
ln -s %{_bindir}/ccache $RPM_BUILD_ROOT%{_libdir}/ccache/$c
|
ln -s %{relccache} $RPM_BUILD_ROOT%{_libdir}/ccache/$c
|
||||||
echo "%ghost %{_libdir}/ccache/$c" >> %{name}-%{version}.compilers
|
echo "%ghost %{_libdir}/ccache/$c" >> %{name}-%{version}.compilers
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
install -dm 770 $RPM_BUILD_ROOT%{_var}/cache/ccache
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -fr $RPM_BUILD_ROOT
|
rm -fr $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
%pre
|
||||||
|
getent group ccache >/dev/null || groupadd -r ccache || :
|
||||||
|
|
||||||
|
|
||||||
%triggerin -- %{pkgs}
|
%triggerin -- %{pkgs}
|
||||||
for name in %{compilers} ; do
|
for name in %{compilers} ; do
|
||||||
for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do
|
for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do
|
||||||
[ ! -x %{_bindir}/$c ] || ln -sf %{_bindir}/ccache %{_libdir}/ccache/$c
|
[ ! -x %{_bindir}/$c ] || ln -sf %{relccache} %{_libdir}/ccache/$c
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
:
|
||||||
|
|
||||||
%triggerpostun -- %{pkgs}
|
%triggerpostun -- %{pkgs}
|
||||||
for name in %{compilers} ; do
|
for name in %{compilers} ; do
|
||||||
|
@ -76,18 +84,32 @@ for name in %{compilers} ; do
|
||||||
[ -x %{_bindir}/$c ] || rm -f %{_libdir}/ccache/$c
|
[ -x %{_bindir}/$c ] || rm -f %{_libdir}/ccache/$c
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
:
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}-%{version}.compilers
|
%files -f %{name}-%{version}.compilers
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING README web/*.html
|
%doc COPYING README web/*.html
|
||||||
%config %{_sysconfdir}/profile.d/%{name}.*sh
|
%config(noreplace) %{_sysconfdir}/profile.d/%{name}.*sh
|
||||||
%{_bindir}/ccache
|
%{_bindir}/ccache
|
||||||
%dir %{_libdir}/ccache/
|
%dir %{_libdir}/ccache/
|
||||||
|
%attr(2770,root,ccache) %dir %{_var}/cache/ccache/
|
||||||
%{_mandir}/man1/ccache.1*
|
%{_mandir}/man1/ccache.1*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Aug 19 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-10
|
||||||
|
- License: GPLv2+
|
||||||
|
- Make compiler symlinks relative.
|
||||||
|
- Make profile.d scripts noreplace.
|
||||||
|
|
||||||
|
* Mon Jul 30 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-9
|
||||||
|
- Use shared cache dir for users in the ccache group by default
|
||||||
|
(#247760, based on Andy Shevchenko's work).
|
||||||
|
- Fix outdated hardlink info in cache sharing docs.
|
||||||
|
- Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++).
|
||||||
|
- Make triggers always exit with a zero exit status.
|
||||||
|
|
||||||
* Thu Mar 15 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-8
|
* Thu Mar 15 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-8
|
||||||
- Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage
|
- Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage
|
||||||
(upstream CVS and Matt Fago, #231462).
|
(upstream CVS and Matt Fago, #231462).
|
||||||
|
|
Loading…
Reference in New Issue