Browse Source

gcc:
- add %%posttrans for gcc,gcc-cpp,gcc-c++,gcc-gfortran
to fix missing symlinks
- add Obsoletes: fastjar to libgcj



git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5365 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 12 years ago
parent
commit
695b786714
1 changed files with 27 additions and 1 deletions
  1. 27 1
      g/gcc/gcc-vl.spec

+ 27 - 1
g/gcc/gcc-vl.spec

@@ -1,7 +1,7 @@
 %global gcc_version 4.6.2
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 1%{?_dist_release}
+%global gcc_release 2%{?_dist_release}
 %global _unpackaged_files_terminate_build 0
 %global multilib_64_archs sparc64 ppc64 s390x x86_64
 # %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@@ -612,6 +612,7 @@ BuildRequires: libXt-devel
 Obsoletes: gcc-libgcj
 Obsoletes: libgcj34
 Obsoletes: libgcj4
+Obsoletes: fastjar
 Provides: libgcj4
 Autoreq: true
 
@@ -1747,6 +1748,16 @@ if [ $1 = 0 -a -f %{_infodir}/gcc.info.gz ]; then
     --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
 fi
 
+%posttrans
+if [ ! -x %{_bindir}/cc ]; then
+  ln -sf gcc %{_bindir}/cc
+fi
+
+%posttrans c++
+if [ ! -x %{_bindir}/c++ ]; then
+  ln -sf g++ %{_bindir}/c++
+fi
+
 %post cpp
 if [ -f %{_infodir}/cpp.info.gz ]; then
   /sbin/install-info \
@@ -1759,6 +1770,11 @@ if [ $1 = 0 -a -f %{_infodir}/cpp.info.gz ]; then
     --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
 fi
 
+%posttrans cpp
+if [ ! -x /lib/cpp ]; then
+  ln -sf ../%{_bindir}/cpp /lib/cpp
+fi
+
 %post gfortran
 if [ -f %{_infodir}/gfortran.info.gz ]; then
   /sbin/install-info \
@@ -1771,6 +1787,11 @@ if [ $1 = 0 -a -f %{_infodir}/gfortran.info.gz ]; then
     --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
 fi
 
+%posttrans gfortran
+if [ ! -x %{_bindir}/f95 ]; then
+  ln -sf gfortran %{_bindir}/f95
+fi
+
 %post java
 if [ -f %{_infodir}/gcj.info.gz ]; then
 /sbin/install-info \
@@ -2662,6 +2683,11 @@ fi
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
 
 %changelog
+* Sat Jan 07 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.6.2-2
+- add %%posttrans for gcc,gcc-cpp,gcc-c++,gcc-gfortran
+  to fix missing symlinks
+- add Obsoletes: fastjar to libgcj
+
 * Fri Dec 02 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.6.2-1
 - update to 4.6.2
 - remove alternatives