%if "%fedora" >= "9" %{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}} %endif Name: brlcad Version: 7.12.2 Release: 1%{?dist} Summary: An extensive Constructive Solid Geometry (CSG) modeling system Group: Applications/Engineering License: LGPLv2+ and BSD and Public Domain URL: http://brlcad.org/ Source0: http://downloads.sourceforge.net/brlcad/brlcad-%{version}.tar.bz2 Patch0: brlcad-7.10.4-prefix.patch Patch1: brlcad-7.10.4-downgrade_tcltk84.patch Patch3: brlcad-7.12.0-remove_notice.patch Patch4: brlcad-7.12.2-compiler_m4.patch Patch5: brlcad-7.12.0-disable_cflags.patch Patch6: brlcad-7.12.0-rt_brlcad.patch Patch7: brlcad-7.12.0-pkgconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool >= 1.4 BuildRequires: autoconf >= 2.50 BuildRequires: automake >= 1.6.0 BuildRequires: chrpath BuildRequires: doxygen # Required for benchmark BuildRequires: bc # General Requirements BuildRequires: sysconftool BuildRequires: bison BuildRequires: boost-devel BuildRequires: flex BuildRequires: byacc #BuildRequires: emacs BuildRequires: libpng-devel BuildRequires: librx-devel BuildRequires: libtermcap-devel BuildRequires: ncurses-devel BuildRequires: pth-devel BuildRequires: SDL-devel # Tcl/Tk Requirements BuildRequires: iwidgets >= 4.0.1 BuildRequires: blt-devel >= 2.4 BuildRequires: itcl-devel BuildRequires: itk-devel BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: tkimg-devel # Java Requirements BuildRequires: java-devel >= 1.5 BuildRequires: jpackage-utils >= 1.5 # Xorg Requirements BuildRequires: libXext-devel BuildRequires: libICE-devel BuildRequires: libSM-devel BuildRequires: libX11-devel BuildRequires: libXi-devel BuildRequires: libXinerama-devel BuildRequires: libXmu-devel BuildRequires: libXt-devel BuildRequires: libXScrnSaver-devel BuildRequires: xorg-x11-proto-devel Requires: %{name}-libs = %{version}-%{release} %description BRL-CAD is a powerful cross-platform constructive solid geometry solid modeling system that includes an interactive geometry editor, ray-tracing for rendering & geometric analyses, network distributed framebuffer support, image & signal-processing tools. %package libs Summary: Libraries for %{name} Group: System Environment/Libraries %description libs The %{name}-libs package contains libraries for %{name}. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} Requires: pkgconfig %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package docs Summary: Documentation for %{name} Group: Documentation %description docs This package contains documentation files for %{name}. %prep %setup -q %patch0 -p1 -b .prefix %patch3 -p1 -b .notice %patch4 -p1 -b .includes_m4 #patch5 -p1 -b .disable_cflags %patch6 -p1 -b .rt_brlcad %patch7 -p1 -b .pkgconfig # Downgrade tcl/tk -> patch1 #sed -i.tcltk84 -e 's|MINOR_VERSION < 5|MINOR_VERSION < 4|g' configure configure.ac # try to remove rpath #sed -i -e "/${wl}--rpath ${wl}$libdir/d" configure #sed -i -e "/$rpath/d" configure #sed -i -e "/-rpath ${LIB_RUNTIME_DIR}/d" configure #sed -i -e 's|-rpath|-shared|g' configure # Some libaries/multilibs tweaks sed -i -e 's|lib/blt|%{_lib}/blt|' configure.ac %if "%fedora" >= "9" sed -i -e 's|BLT=""|BLT="-L%{_libdir}/blt2.4/ -lBLT24"|' configure.ac %else sed -i -e 's|BLT=""|BLT="-L%{tcl_sitearch}/blt2.4/ -lBLT24"|' configure.ac %endif sed -i -e 's|bc_with_x11_val/lib|bc_with_x11_val/%{_lib}|' configure.ac # autogen is needed to use datarootdir sh autogen.sh #autoconf %build %if "%fedora" >= "9" export ITCL_LIBRARY=%{tcl_sitearch}/itcl3.4/ export ITK_LIBRARY=%{tcl_sitearch}/itk3.4/ export BLT_LIBRARY=%{tcl_sitearch}/blt2.4 export BLT="-L%{tcl_sitearch}/blt2.4/ -lBLT24" %else export ITCL_LIBRARY=%{_libdir}/itcl3.3/ export ITK_LIBRARY=%{_libdir}/itk3.3/ export BLT_LIBRARY=%{_libdir}/blt2.4 export BLT="-L%{_libdir}/blt2.4/ -lBLT24" %endif export ITCL_CPPFLAGS=-I%{_includedir}/tcl-private/generic export ITK_CPPFLAGS=-I%{_includedir}/tk-private/generic # This path is wrong according to F-9 tcl packaging guidelines sh %{_libdir}/itclConfig.sh %configure \ --includedir=%{_includedir}/%{name} \ --libdir=%{_libdir}/%{name} \ --datadir=%{_datadir}/brlcad \ --disable-rpath \ --enable-shared \ --disable-static \ %ifarch x86_64 ppc64 ia64 --enable-64bit-build \ %endif --enable-opennurbs-build \ --disable-tcl-build \ --with-tcl=%{_libdir} \ --disable-tk-build \ --with-tk=%{_libdir} \ --disable-itcl-build \ --disable-iwidgets-build \ --disable-blt-build \ --disable-tkimg-build \ --disable-jove-build \ --with-x11=%{_prefix} \ --with-opengl \ --with-sdl \ --with-python=%{_bindir}/python \ --with-x=%{_prefix} # Comments # opennurbs is under active development but it is not ready for production use with 7.10.4 # --datarootdir=%{_datadir} \ # --datadir=%{_datadir}/brlcad \ # --with-itcl=%{_libdir} \ # --with-itk=%{_libdir} \ # --with-libs="-L%{_libdir}/itcl3.3/ -L%{_libdir}/itk3.3/" # Prevent some files to be used rm -rf src/other/{blt,incrTcl,iwidgets,jove,libpng,libregex,libtermlib,libz,tcl,tk,tkimg} # Fake the src/other content (as the path are hardcoded) ln -fs %{_includedir}/tcl-private src/other/tcl ln -fs %{_includedir}/tk-private src/other/tk mkdir -p src/other/blt ln -fs %{_includedir}/blt src/other/blt/src make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT __doc __doc-html make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' rm -rf $RPM_BUILD_ROOT%{_datadir}/{AUTHORS,COPYING,HACKING,INSTALL,NEWS,README} # Remove rpaths on installed files # Note: we want them at build time, then removed at install time find $RPM_BUILD_ROOT%{_bindir} -type f -exec chrpath -d {} ';' || : # Move docs mkdir __doc cp -pR $RPM_BUILD_ROOT%{_datadir}/brlcad/doc/* __doc rm -rf $RPM_BUILD_ROOT%{_datadir}/brlcad/doc mkdir __doc-html cp -pR $RPM_BUILD_ROOT%{_datadir}/brlcad/html/ __doc-html/ rm -rf $RPM_BUILD_ROOT%{_datadir}/brlcad/html #Remove docs files installed rm -rf $RPM_BUILD_ROOT%{_datadir}/brlcad/{AUTHORS,COPYING,HACKING,INSTALL,NEWS,README} # Fix shebang sed -i -e 's|/usr/brlcad/bin/btclsh|%{_bindir}/tclsh|' \ $RPM_BUILD_ROOT%{_datadir}/brlcad/tclscripts/mged/points.tcl sed -i -e 's|/bin/tclsh|%{_bindir}/tclsh|' \ $RPM_BUILD_ROOT%{_datadir}/brlcad/tclscripts/geometree/GeometryBrowser.tcl #Rename wall #mv $RPM_BUILD_ROOT%{_bindir}/wall $RPM_BUILD_ROOT%{_bindir}/brlcad-wall mv $RPM_BUILD_ROOT%{_bindir}/dstat $RPM_BUILD_ROOT%{_bindir}/brlcad-dstat mv $RPM_BUILD_ROOT%{_bindir}/istat $RPM_BUILD_ROOT%{_bindir}/brlcad-istat # Move libs to _libdir/brlcad mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/ echo "%{_libdir}/%{name}" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf mv $RPM_BUILD_ROOT%{_libdir}/%{name}/pkgconfig $RPM_BUILD_ROOT%{_libdir} %check make test make benchmark %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS BUGS COPYING NEWS README ChangeLog %exclude %{_bindir}/brlcad-config %{_bindir}/* %{_mandir}/man1/*.gz %{_mandir}/man5/*.gz %dir %{_datadir}/brlcad %{_datadir}/brlcad/awf/ %{_datadir}/brlcad/db/ %{_datadir}/brlcad/pix/ %{_datadir}/brlcad/plugins/ %{_datadir}/brlcad/sample_applications/ %{_datadir}/brlcad/tclscripts/ %{_datadir}/brlcad/vfont/ %files libs %defattr(-,root,root,-) %config %{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.so.* %{_libdir}/%{name}/librtserver.jnilib.* %files devel %defattr(-,root,root,-) %doc HACKING %{_includedir}/%{name}/ %{_bindir}/brlcad-config %{_libdir}/%{name}/*.so %{_libdir}/%{name}/librtserver.jnilib %{_libdir}/pkgconfig/* %{_mandir}/man3/*.gz %files docs %defattr(-,root,root,-) %doc __doc/* __doc-html/* %changelog * Thu Apr 24 2008 kwizart < kwizart at gmail.com > - 7.12.2-1 - Update to 7.12.2 * Fri Apr 4 2008 kwizart < kwizart at gmail.com > - 7.12.0-1 - Update to 7.12.0 * Thu Oct 25 2007 kwizart < kwizart at gmail.com > - 7.10.4-1 - Update to 7.10.4 * Tue Apr 10 2007 kwizart < kwizart at gmail.com > - 7.10.0-1 - Update to 7.10.0 * Mon Jan 29 2007 kwizart < kwizart at gmail.com > - 7.8.4-1 - Initial release