add yasm and cmake spec to CBE
authorxlucas
Fri, 18 Apr 2008 08:41:13 +0000
changeset 2 d4ffc2f221ee
parent 1 102c9870ef63
child 3 400da8b619bb
add yasm and cmake spec to CBE
CBEcmake.spec
CBEyasm.spec
ChangeLog
include/CBE.inc
patches/cmake-01-SunOS.cmake.diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CBEcmake.spec	Fri Apr 18 08:41:13 2008 +0000
@@ -0,0 +1,81 @@
+#
+# spec file for package CBEcmake
+#
+# Copyright 2008 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include CBE.inc
+
+Name:			CBEcmake
+Version:		2.4.8
+License:		BSD
+Distribution:		JDS CBE
+Vendor:			Sun Microsystems, Inc.
+Summary:		JDS CBE: Cross platform make system
+Source:			http://www.cmake.org/files/v2.4/cmake-%{version}.tar.gz
+URL:			http://www.cmake.org
+Patch1:			cmake-01-SunOS.cmake.diff
+BuildRoot:		%{_tmppath}/%{name}-%{version}-build
+SUNW_BaseDir:		%{_prefix}
+SUNW_Category:          JDS,CBE,application
+SUNW_Rev:		@CBE_VERSION@
+%include default-depend.inc
+Requires:		SUNWlibC
+
+%prep
+%setup -q -n cmake-%{version}
+%patch1 -p1
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+test -z "$CC" && export CC="/usr/bin/cc"
+test -z "$CXX" && export CXX="/usr/bin/CC"
+
+./configure --prefix=%{_prefix} \
+	    --bindir=%{_bindir}	\
+	    --libdir=%{_libdir}	\
+	    --mandir=%{_mandir}
+
+export CFLAGS="%optflags"
+export CXXFLAGS="%cxx_optflags"
+
+make -j$CPUS
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+
+#### Grrh terrible
+mv $RPM_BUILD_ROOT%{_prefix}/doc  $RPM_BUILD_ROOT%{_prefix}/share
+mv $RPM_BUILD_ROOT%{_prefix}%{_prefix}/share/man $RPM_BUILD_ROOT%{_prefix}/share 	
+rm -rf $RPM_BUILD_ROOT%{_prefix}%{_prefix}
+    
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/*
+%dir %attr (0755, root, sys) %{_datadir}
+%{_datadir}/cmake-*
+%{_mandir}/*
+%dir %attr (0755, root, other) %{_datadir}/doc
+%{_datadir}/doc/*
+
+%changelog
+* Fri Apr 18 2008 - <[email protected]>
+- adopt for CBE
+- bump to 2.4.8
+* Thu Nov 1 2007  - <[email protected]>
+- adopt for KBE
+* Mon Oct 22 2007 - [email protected]
+- Bump to 2.4.7
+* Mon Mar 19 2007 - [email protected]
+- Initial spec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CBEyasm.spec	Fri Apr 18 08:41:13 2008 +0000
@@ -0,0 +1,79 @@
+#
+# spec file for package CBEyasm
+#
+# Copyright 2008 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include CBE.inc
+%define _prefix /tmp
+Name:                   CBEyasm
+Version:		0.6.2
+License:		BSD, Artisitic, GNU GPL2, GNU LGPL2
+Distribution:		JDS CBE
+Vendor:			Sun Microsystems, Inc.
+Summary:		JDS CBE: Yet another assembler
+Source:                 http://www.tortall.net/projects/yasm/releases/yasm-%{version}.tar.gz
+URL:			http://www.tortall.net/projects/yasm/wiki
+BuildRoot:		%{_tmppath}/%{name}-%{version}-build
+SUNW_BaseDir:		%{_prefix}
+SUNW_Category:          JDS,CBE,application
+SUNW_Rev:		@CBE_VERSION@
+%include default-depend.inc
+
+
+%prep
+%setup -q -n yasm-%{version}
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+# the safest way is don't setup optim
+export CFLAGS=""
+export LDFLAGS=""
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --datadir=%{_datadir}	\
+            --libexecdir=%{_libexecdir} \
+            --sysconfdir=%{_sysconfdir} \
+            --enable-shared		\
+	    --disable-static
+make -j$CPUS 
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/*
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/*
+%dir %attr (0755,root,sys) %{_mandir}
+%{_mandir}/*
+%dir %attr (0755, root, bin) %{_includedir}
+%{_includedir}/*
+
+
+%changelog
+* Fri Apr 18 2008 - [email protected]
+- adopt for CBE
+* Sat Apr 05 2008 - [email protected]
+- Remove optimization flags, as they yield a broken yasm
+* Sat Nov 17 2007 - [email protected]
+- adopt for KBE
+- bump to 0.6.2
+* Mon Apr 30 2007 - [email protected]
+- Initial version
--- a/ChangeLog	Mon Apr 14 10:39:56 2008 +0000
+++ b/ChangeLog	Fri Apr 18 08:41:13 2008 +0000
@@ -1,3 +1,7 @@
+2008-04-18 Lukas (Luc) Oboril <[email protected]
+
+	add yasm and cmake to CBE
+
 2008-02-26  Laszlo (Laca) Peter  <[email protected]>
 
 	import into opensolaris.org svn repo
--- a/include/CBE.inc	Mon Apr 14 10:39:56 2008 +0000
+++ b/include/CBE.inc	Fri Apr 18 08:41:13 2008 +0000
@@ -9,3 +9,10 @@
 %else
 %define optflags           -i -xO4 -xspace -xstrconst -mr
 %endif
+
+
+%if %cc_is_gcc
+%define cxx_optflags           -O2 -Xlinker -i
+%else
+%define cxx_optflags           -i -xO3 -xspace -mr -norunpath
+%endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cmake-01-SunOS.cmake.diff	Fri Apr 18 08:41:13 2008 +0000
@@ -0,0 +1,24 @@
+--- cmake-2.4.8.orig/Modules/Platform/SunOS.cmake	2007-07-16 23:12:30.000000000 +0200
++++ cmake-2.4.8/Modules/Platform/SunOS.cmake	2007-12-12 10:41:16.903876000 +0100
+@@ -28,8 +28,8 @@
+     SET (CMAKE_C_FLAGS_INIT "")
+     SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+     SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO3 -DNDEBUG")
+-    SET (CMAKE_C_FLAGS_RELEASE_INIT "-xO2 -DNDEBUG")
+-    SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-xO2")
++    SET (CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
++    SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-xO3")
+   ENDIF(CMAKE_COMPILER_IS_GNUCC)
+   IF(CMAKE_COMPILER_IS_GNUCXX)
+     SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") 
+@@ -41,8 +41,8 @@
+     SET (CMAKE_CXX_FLAGS_INIT "")
+     SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+     SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO3 -DNDEBUG")
+-    SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-xO2 -DNDEBUG")
+-    SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-xO2")
++    SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
++    SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-xO3")
+   ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
+