diff --git a/README.md b/README.md index 97dfa00..d95d7f9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # cmake +CMake is used to control the software compilation process using simple platform and compiler independent configuration files. +CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. +CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation. + +CMake was developed by Kitware as part of the NLM Insight Segmentation and Registration Toolkit project. +The ASCI VIEWS project also provided support in the context of their parallel computation environment. +Other sponsors include the Insight, VTK, and VXL open source software communities. + diff --git a/cmake-2.4.5_use_intree_xmlrpc.patch b/cmake-2.4.5_use_intree_xmlrpc.patch new file mode 100644 index 0000000..6ea9f79 --- /dev/null +++ b/cmake-2.4.5_use_intree_xmlrpc.patch @@ -0,0 +1,12 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -128,6 +128,7 @@ ELSE(CMAKE_ALLOW_SYSTEM_LIBRARIES) + SET(CMAKE_USE_SYSTEM_XMLRPC 0) + SET(CMAKE_USE_SYSTEM_ZLIB 0) + ENDIF(CMAKE_ALLOW_SYSTEM_LIBRARIES) ++SET(CMAKE_USE_SYSTEM_XMLRPC 0) + + # Inform utility library header wrappers whether to use system versions. + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in diff --git a/cmake-2.8.11.2-ImageMagick-6.8.patch b/cmake-2.8.11.2-ImageMagick-6.8.patch new file mode 100644 index 0000000..dac53fa --- /dev/null +++ b/cmake-2.8.11.2-ImageMagick-6.8.patch @@ -0,0 +1,43 @@ +--- cmake-2.8.11.2/Modules/FindImageMagick.cmake.orig 2013-07-02 15:41:39.000000000 +0200 ++++ cmake-2.8.11.2/Modules/FindImageMagick.cmake 2013-08-26 13:49:15.004586070 +0200 +@@ -80,6 +80,9 @@ + PATHS + ${ImageMagick_INCLUDE_DIRS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include" ++ HINTS ++ ${PC_${component}_INCLUDEDIR} ++ ${PC_${component}_INCLUDE_DIRS} + PATH_SUFFIXES + ImageMagick + DOC "Path to the ImageMagick include dir." +@@ -88,6 +91,9 @@ + NAMES ${ARGN} + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib" ++ HINTS ++ ${PC_${component}_LIBDIR} ++ ${PC_${component}_LIB_DIRS} + DOC "Path to the ImageMagick Magick++ library." + ) + +@@ -147,17 +153,17 @@ + ) + if(component STREQUAL "Magick++") + FIND_IMAGEMAGICK_API(Magick++ Magick++.h +- Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 ++ Magick++ CORE_RL_Magick++_ Magick++-6.Q16HDRI Magick++-6.Q16 Magick++-Q16HDRI Magick++-Q16 Magick++-6.Q8 Magick++-Q8 + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY) + elseif(component STREQUAL "MagickWand") + FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h +- Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 ++ Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16HDRI MagickWand-6.Q16 MagickWand-Q16HDRI MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY) + elseif(component STREQUAL "MagickCore") + FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h +- Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 ++ Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16HDRI MagickCore-6.Q16 MagickCore-Q16HDRI MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY) + else() diff --git a/cmake-2.8.12.1-freetype-2.5.1.patch b/cmake-2.8.12.1-freetype-2.5.1.patch new file mode 100644 index 0000000..01f3da4 --- /dev/null +++ b/cmake-2.8.12.1-freetype-2.5.1.patch @@ -0,0 +1,23 @@ +diff -Nru cmake-2.8.12.1.orig/Modules/FindFreetype.cmake cmake-2.8.12.1/Modules/FindFreetype.cmake +--- cmake-2.8.12.1.orig/Modules/FindFreetype.cmake 2013-11-05 20:07:22.000000000 +0100 ++++ cmake-2.8.12.1/Modules/FindFreetype.cmake 2013-11-30 19:40:16.007470855 +0100 +@@ -56,7 +56,7 @@ + PATH_SUFFIXES include/freetype2 include + ) + +-find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h ++find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h + HINTS + ENV FREETYPE_DIR + PATHS +@@ -91,8 +91,8 @@ + endif() + set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") + +-if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") +- file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str ++if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") ++ file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h" freetype_version_str + REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") + + unset(FREETYPE_VERSION_STRING) diff --git a/cmake-rpmmacro b/cmake-rpmmacro new file mode 100644 index 0000000..0395598 --- /dev/null +++ b/cmake-rpmmacro @@ -0,0 +1,20 @@ +%_cmake_lib_suffix64 -DLIB_SUFFIX=64 +%__cmake %{_bindir}/cmake + +%cmake(d:) \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ + bdir=. \ + %{-d:dir=%{-d*} ; mkdir -p $dir ; cd $dir ; bdir=.. } \ + %__cmake \\\ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\ + -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ + -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ + -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ + -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ +%if "%{?_lib}" == "lib64" \ + %{?_cmake_lib_suffix64} \\\ +%endif \ + -DBUILD_SHARED_LIBS:BOOL=ON $bdir diff --git a/cmake.spec b/cmake.spec new file mode 100644 index 0000000..ca6c1d4 --- /dev/null +++ b/cmake.spec @@ -0,0 +1,187 @@ +%define majorminor %(echo %version | cut -d. -f 1-2) + +Name: cmake +Version: 2.8.12.2 +Release: 1mamba +Summary: A cross-platform, open-source make system +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Aleph0 +URL: http://www.cmake.org/ +Source0: http://www.cmake.org/files/v%{majorminor}/cmake-%{version}.tar.gz +Source1: cmake-rpmmacro +Patch: %{name}-2.4.5_use_intree_xmlrpc.patch +Patch1: cmake-2.8.11.2-ImageMagick-6.8.patch +Patch2: cmake-2.8.12.1-freetype-2.5.1.patch +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libarchive-devel +BuildRequires: libcurl-devel +BuildRequires: libexpat-devel +BuildRequires: libgcc +BuildRequires: libncurses-devel +BuildRequires: libstdc++6-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRequires: gcc-c++ +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libICE-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +CMake is used to control the software compilation process using simple platform and compiler independent configuration files. +CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. +CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation. + +CMake was developed by Kitware as part of the NLM Insight Segmentation and Registration Toolkit project. +The ASCI VIEWS project also provided support in the context of their parallel computation environment. +Other sponsors include the Insight, VTK, and VXL open source software communities. + +%prep +%setup -q +#%patch1 -p1 +%patch2 -p1 + +%build +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +./configure \ + --prefix=%{_prefix} \ + --datadir=/share/%{name} \ + --docdir=/share/doc/%{name}-%{version} \ + --mandir=/share/man \ + --system-libs + +%make VERBOSE=1 + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +cp -a Example %{buildroot}%{_datadir}/doc/%{name}-%{version}/ +install -D -m 0644 Docs/cmake-mode.el \ + %{buildroot}%{_datadir}/emacs/site-lisp/cmake-mode.el + +install -D -m 0644 %{S:1} \ + %{buildroot}%{_sysconfdir}/rpm/macros.cmake + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/ccmake +%{_bindir}/cmake +%{_bindir}/cpack +%{_bindir}/ctest +%{_datadir}/%{name}/ +%{_mandir}/man1/ccmake.* +%{_mandir}/man1/cmake.* +%{_mandir}/man1/cmakecommands.* +%{_mandir}/man1/cmakecompat.* +%{_mandir}/man1/cmakemodules.* +%{_mandir}/man1/cmakepolicies.* +%{_mandir}/man1/cmakeprops.* +%{_mandir}/man1/cmakevars.* +%{_mandir}/man1/cpack.* +%{_mandir}/man1/ctest.* +%{_datadir}/aclocal/cmake.m4 +%{_datadir}/doc/%{name}-%{version}/ +%{_datadir}/emacs/* +%{_sysconfdir}/rpm/macros.cmake + +%changelog +* Sun Jan 26 2014 Automatic Build System 2.8.12.2-1mamba +- automatic version update by autodist + +* Sat Nov 30 2013 Silvan Calarco 2.8.12.1-2mamba +- patch FindFreetype.cmake module for freetype 2.5.1 + +* Fri Nov 08 2013 Automatic Build System 2.8.12.1-1mamba +- automatic version update by autodist + +* Thu Oct 10 2013 Automatic Build System 2.8.12-1mamba +- automatic version update by autodist + +* Mon Aug 26 2013 Silvan Calarco 2.8.11.2-2mamba +- added patch for 6.Q16HDRI ImageMagick from http://public.kitware.com/Bug/view.php?id=14012 + +* Thu Jul 04 2013 Automatic Build System 2.8.11.2-1mamba +- automatic version update by autodist + +* Sat Jun 08 2013 Automatic Build System 2.8.11.1-1mamba +- automatic version update by autodist + +* Tue May 21 2013 Automatic Build System 2.8.11-1mamba +- automatic update by autodist + +* Mon Jan 07 2013 Automatic Build System 2.8.10.2-1mamba +- automatic version update by autodist + +* Fri Nov 09 2012 Automatic Build System 2.8.10.1-1mamba +- automatic version update by autodist + +* Mon Nov 05 2012 Automatic Build System 2.8.10-1mamba +- automatic version update by autodist + +* Mon Aug 20 2012 Automatic Build System 2.8.9-1mamba +- automatic version update by autodist + +* Wed Aug 08 2012 Automatic Build System 2.8.8-1mamba +- automatic version update by autodist + +* Thu Dec 22 2011 Automatic Build System 2.8.6-1mamba +- automatic version update by autodist + +* Wed Feb 23 2011 Automatic Build System 2.8.4-1mamba +- automatic update by autodist + +* Fri Nov 05 2010 Silvan Calarco 2.8.3-1mamba +- update to 2.8.3 + +* Sat May 09 2009 Automatic Build System 2.6.4-1mamba +- automatic update by autodist + +* Mon Mar 30 2009 Silvan Calarco 2.6.3-1mamba +- automatic update by autodist + +* Mon Feb 02 2009 Silvan Calarco 2.6.2-1mamba +- update to 2.6.2 + +* Thu Aug 28 2008 Aleph0 2.6.1-1mamba +- update to 2.6.1 + +* Mon May 12 2008 Aleph0 2.6.0-1mamba +- update to 2.6.0 + +* Mon Mar 03 2008 Aleph0 2.4.8-1mamba +- update to 2.4.8 +- updated macros.cmake to permit extra directives to %%cmake + +* Wed Dec 26 2007 Aleph0 2.4.7-4mamba +- modify %%cmake to permit both in-source and out-of-source builds + +* Sun Dec 23 2007 Aleph0 2.4.7-3mamba +- add rpm macro macros.cmake (which defines %%cmake) + +* Tue Dec 04 2007 Aleph0 2.4.7-2mamba +- updated specfile +- added missing build requirements + +* Mon Oct 29 2007 Aleph0 2.4.7-1mamba +- update to 2.4.7 + +* Mon Jun 04 2007 Aleph0 2.4.6-2mamba +- rebuilt + +* Tue Feb 27 2007 Aleph0 2.4.6-1qilnx +- update to version 2.4.6 by autospec +- updated X11 build requirements +- use system libraries +- added build requirements for system libraries + +* Thu Dec 14 2006 Aleph0 2.4.5-1qilnx +- package created by autospec