Changeset 1830 for spec/trunk/SPECS/cmake.spec
- Timestamp:
- Mar 14, 2023, 6:16:06 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/cmake.spec
r1695 r1830 1 # Do we add appdata-files? (disabled)1 # Do we add appdata-files? 2 2 # consider conditional on whether %%_metainfodir is defined or not instead -- rex 3 %if 0%{?fedora} || 0%{?rhel} > 7 4 %bcond_without appdata 5 %else 3 6 %bcond_with appdata 7 %endif 4 8 5 9 # Set to bcond_without or use --with bootstrap if bootstrapping a new release 6 10 # or architecture 11 %if !0%{?os2_version} 12 %bcond_with bootstrap 13 %else 7 14 %bcond_without bootstrap 8 9 # Build with Emacs support (disabled) 15 %endif 16 17 # Build with Emacs support 18 %if !0%{?os2_version} 19 %bcond_without emacs 20 %else 10 21 %bcond_with emacs 11 12 # Run git tests (disabled) 22 %global _emacs_sitelispdir %{_prefix}/share/emacs 23 %endif 24 25 # Run git tests 26 %if !0%{?os2_version} 27 %bcond_without git_test 28 %else 13 29 %bcond_with git_test 30 %endif 14 31 15 32 # Set to bcond_with or use --without gui to disable qt4 gui build … … 20 37 21 38 # Setting the Python-version used by default 39 %if 0%{?rhel} && 0%{?rhel} < 8 22 40 %bcond_with python3 41 %else 42 %bcond_without python3 43 %endif 23 44 24 45 # Enable RPM dependency generators for cmake files written in Python 25 46 %bcond_without rpm 26 47 27 # enable this when we have Sphinx-build (disabled) 48 %if !0%{?os2_version} 49 %bcond_without sphinx 50 %else 28 51 %bcond_with sphinx 29 30 # Run tests (disabled) 52 %endif 53 54 %if 0%{?os2_version} 55 %bcond_with bundled_jsoncpp 56 %bcond_without bundled_rhash 57 %else 58 %if !0%{?rhel} 59 %bcond_with bundled_jsoncpp 60 %bcond_with bundled_rhash 61 %else 62 %bcond_without bundled_jsoncpp 63 %bcond_without bundled_rhash 64 %endif 65 %endif 66 67 # Run tests 68 %if !0%{?os2_version} 69 %bcond_without test 70 %else 31 71 %bcond_with test 32 33 # Enable X11 tests (disabled) 72 %endif 73 74 # Enable X11 tests 75 %if !0%{?os2_version} 76 %bcond_without X11_test 77 %else 34 78 %bcond_with X11_test 79 %endif 80 81 # Do not build non-lto objects to reduce build time significantly. 82 %global optflags %(echo '%{optflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') 35 83 36 84 # Place rpm-macros into proper location … … 40 88 %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} 41 89 90 # Setup _vpath_builddir if not defined already 91 %{!?_vpath_builddir:%global _vpath_builddir %(echo '%{_target_platform}' | sed -e 's!/!!g')} 92 42 93 %global major_version 3 43 %global minor_version 1094 %global minor_version 20 44 95 # Set to RC version if building RC, else %%{nil} 45 #global rcsuf rc 396 #global rcsuf rc1 46 97 %{?rcsuf:%global relsuf .%{rcsuf}} 47 98 %{?rcsuf:%global versuf -%{rcsuf}} 99 100 # For handling bump release by rpmdev-bumpspec and mass rebuild 101 %global baserelease 1 48 102 49 103 # Uncomment if building for EPEL … … 51 105 %global orig_name cmake 52 106 53 54 107 Name: %{orig_name}%{?name_suffix} 55 Version: %{major_version}.%{minor_version}. 356 Release: 1%{?dist}108 Version: %{major_version}.%{minor_version}.6 109 Release: 2%{?dist} 57 110 Summary: Cross-platform make system 58 111 … … 64 117 License: BSD and MIT and zlib 65 118 URL: http://www.cmake.org 119 %if !0%{?os2_version} 120 Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?versuf}.tar.gz 121 Source1: %{name}-init.el 122 %else 66 123 Vendor: bww bitwise works GmbH 67 %scm_source github http://github.com/bitwiseworks/cmake-os2 master 124 %scm_source github http://github.com/bitwiseworks/cmake-os2 %{version}-os2 125 %endif 68 126 Source2: macros.%{name} 69 127 # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 … … 72 130 Source5: %{name}.req 73 131 132 %if !0%{?os2_version} 133 # Always start regular patches with numbers >= 100. 134 # We need lower numbers for patches in compat package. 135 # And this enables us to use %%autosetup 136 # 137 # Patch to fix RindRuby vendor settings 138 # http://public.kitware.com/Bug/view.php?id=12965 139 # https://bugzilla.redhat.com/show_bug.cgi?id=822796 140 Patch100: %{name}-findruby.patch 141 # Add dl to CMAKE_DL_LIBS on MINGW 142 # https://gitlab.kitware.com/cmake/cmake/issues/17600 143 %if 0%{?fedora} && 0%{?fedora} < 38 144 Patch102: %{name}-mingw-dl.patch 145 %endif 146 147 # Patch for renaming on EPEL 148 %if 0%{?name_suffix:1} 149 Patch1: %{name}-rename.patch 150 %endif 151 %endif 152 74 153 BuildRequires: coreutils 75 154 BuildRequires: findutils 76 BuildRequires: gcc 77 #BuildRequires: gcc-gfortran 155 BuildRequires: gcc-c++ 156 %if !0%{?os2_version} 157 BuildRequires: gcc-gfortran 158 %endif 78 159 BuildRequires: sed 160 %if !0%{?os2_version} 161 %if %{with git_test} 162 # Tests fail if only git-core is installed, bug #1488830 79 163 BuildRequires: git 164 %else 165 BuildConflicts: git-core 166 %endif 167 %endif 80 168 %if %{with X11_test} 81 169 BuildRequires: libX11-devel … … 87 175 BuildRequires: %{_bindir}/sphinx-build 88 176 %endif 89 %if %{without bootstrap} 177 %if %{without bootstrap} || 0%{?os2_version} 90 178 BuildRequires: bzip2-devel 91 179 BuildRequires: curl-devel 92 180 BuildRequires: expat-devel 93 #BuildRequires: jsoncpp-devel 94 #BuildRequires: libarchive-devel 95 #BuildRequires: libuv-devel 96 #BuildRequires: rhash-devel 181 %if %{with bundled_jsoncpp} 182 Provides: bundled(jsoncpp) 183 %else 184 BuildRequires: jsoncpp-devel 185 %endif 186 %if !0%{?os2_version} 187 %if 0%{?fedora} || 0%{?rhel} >= 7 188 BuildRequires: libarchive-devel 189 %else 190 BuildRequires: libarchive3-devel 191 %endif 192 %endif 193 BuildRequires: libuv-devel 194 %if %{with bundled_rhash} 195 Provides: bundled(rhash) 196 %else 197 BuildRequires: rhash-devel 198 %endif 97 199 BuildRequires: xz-devel 98 200 BuildRequires: zlib-devel 201 %if !0%{?os2_version} 202 BuildRequires: vim-filesystem 203 %endif 99 204 %endif 100 205 %if %{with emacs} 101 206 BuildRequires: emacs 102 207 %endif 208 BuildRequires: openssl-devel 103 209 %if %{with rpm} 104 210 %if %{with python3} … … 110 216 %endif 111 217 %if %{with gui} 218 %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?os2_version} 112 219 BuildRequires: pkgconfig(Qt5Widgets) 113 %if %{with appdata} 220 %else 221 BuildRequires: pkgconfig(QtGui) 222 %endif 223 %if !0%{?os2_version} 114 224 BuildRequires: desktop-file-utils 115 225 %endif 226 %endif 227 228 %if !0%{?os2_version} 229 BuildRequires: pkgconfig(bash-completion) 230 %global bash_completionsdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo '%{_datadir}/bash-completion/completions') 116 231 %endif 117 232 … … 120 235 BuildRequires: %{name}-rpm-macros 121 236 %endif 237 BuildRequires: make 122 238 123 239 Requires: %{name}-data = %{version}-%{release} 124 240 Requires: %{name}-rpm-macros = %{version}-%{release} 241 %if !0%{?os2_version} 242 Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} 243 %else 125 244 Requires: %{name}-filesystem = %{version}-%{release} 245 %endif 246 247 # Explicitly require make. (rhbz#1862014) 248 Requires: make 126 249 127 250 # Provide the major version name 128 251 Provides: %{orig_name}%{major_version} = %{version}-%{release} 129 252 253 # Source/kwsys/MD5.c 254 # see https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries 255 Provides: bundled(md5-deutsch) 256 257 # https://fedorahosted.org/fpc/ticket/555 258 Provides: bundled(kwsys) 130 259 131 260 %description … … 144 273 Requires: %{name}-rpm-macros = %{version}-%{release} 145 274 %if %{with emacs} 275 %if 0%{?fedora} || 0%{?rhel} >= 7 146 276 Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}} 277 %endif 278 %endif 279 %if !0%{?os2_version} 280 Requires: vim-filesystem 147 281 %endif 148 282 … … 172 306 Summary: Qt GUI for %{name} 173 307 308 %if !0%{?os2_version} 309 Requires: %{name}%{?_isa} = %{version}-%{release} 310 Requires: hicolor-icon-theme 311 Requires: shared-mime-info%{?_isa} 312 %else 174 313 Requires: %{name} = %{version}-%{release} 175 %if %{with appdata}176 Requires: hicolor-icon-theme177 Requires: shared-mime-info178 314 %endif 179 315 … … 195 331 196 332 333 %if 0%{?os2_version} 197 334 %debug_package 198 335 %endif 199 336 200 337 %prep 338 %if !0%{?os2_version} 339 %autosetup -n %{orig_name}-%{version}%{?versuf} -p 1 340 %else 201 341 %scm_setup 342 %endif 202 343 203 344 %if %{with rpm} … … 215 356 216 357 %build 217 export CFLAGS="%{optflags}" 218 export CXXFLAGS="%{optflags}" 358 %if 0%{?set_build_flags:1} 359 %{set_build_flags} 360 %else 361 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS 362 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS 363 FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS 364 FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS 365 %if !0%{?os2_version} 366 %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} 367 %else 219 368 export LDFLAGS="-Zomf -Zhigh-mem -lcx %{?__global_ldflags}" 220 369 export VENDOR="%{vendor}" 221 mkdir build 222 cd build 223 # --%{?with_bootstrap:no-}system-libs \ 224 # --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ 225 ../bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \ 226 --docdir=/share/doc/%{name} --mandir=/share/man \ 227 --verbose --system-bzip2 --system-curl --system-expat \ 228 --system-liblzma --system-zlib \ 370 %endif 371 %endif 372 %if !0%{?os2_version} 373 SRCDIR="$(/usr/bin/pwd)" 374 mkdir %{_vpath_builddir} 375 pushd %{_vpath_builddir} 376 %else 377 SRCDIR="$(/@unixroot/usr/bin/pwd)" 378 mkdir %{_vpath_builddir} 379 cd %{_vpath_builddir} 380 %endif 381 $SRCDIR/bootstrap --prefix=%{_prefix} \ 382 --datadir=/share/%{name} \ 383 --docdir=/share/doc/%{name} \ 384 --mandir=/share/man \ 385 %if !0%{?os2_version} 386 --%{?with_bootstrap:no-}system-libs \ 387 %else 388 --bootstrap-system-libuv \ 389 --system-libs \ 390 --no-system-libarchive \ 391 --no-system-nghttp2 \ 392 --no-system-zstd \ 393 %endif 394 --parallel="$(echo %{?_smp_mflags} | sed -e 's|-j||g')" \ 395 %if %{with bundled_rhash} 396 --no-system-librhash \ 397 %endif 398 %if %{with bundled_jsoncpp} 399 --no-system-jsoncpp \ 400 %endif 229 401 %if %{with sphinx} 230 --sphinx-man --sphinx-html} \ 231 %else 232 --sphinx-build=%{_bindir}/false \ 233 %endif 234 --%{!?with_gui:no-}qt-gui \ 235 -- -DCMAKE_USE_OPENSSL:BOOL=ON \ 236 ; 237 make VERBOSE=1 402 --sphinx-man --sphinx-html \ 403 %else 404 --sphinx-build=%{_bindir}/false \ 405 %endif 406 --%{!?with_gui:no-}qt-gui \ 407 -- \ 408 -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \ 409 -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \ 410 -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \ 411 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ 412 -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF 413 %if !0%{?os2_version} 414 popd 415 %make_build -C %{_vpath_builddir} 416 %else 417 cd .. 418 make -C %{_vpath_builddir} 419 %endif 238 420 239 421 240 422 %install 241 rm -rf %{buildroot}242 423 mkdir -p %{buildroot}%{_pkgdocdir} 243 %make_install -C buildCMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir}244 find %{buildroot} /%{_datadir}/%{name}/Modules -type f | xargs chmod -x245 [ -n "$(find %{buildroot} /%{_datadir}/%{name}/Modules -name \*.orig)" ] &&424 %make_install -C %{_vpath_builddir} CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} 425 find %{buildroot}%{_datadir}/%{name}/Modules -type f | xargs chmod -x 426 [ -n "$(find %{buildroot}%{_datadir}/%{name}/Modules -name \*.orig)" ] && 246 427 echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" && 247 428 exit 1 248 429 # Install major_version name links 430 %if !0%{?os2_version} 431 %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done} 432 %else 249 433 %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s ${f}.exe %{buildroot}%{_bindir}/${f}%{major_version}; done} 250 # Install bash completion symlinks 251 #mkdir -p %{buildroot}%{_datadir}/bash-completion/completions 252 #for f in %{buildroot}%{_datadir}/%{name}/completions/* 253 #do 254 # ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions 255 #done 434 %endif 435 436 %if 0%{?os2_version} 437 rm -rf %{buildroot}%{_prefix}/share/vim 438 rm -rf %{buildroot}%{_prefix}/share/bash-completion 439 %endif 256 440 %if %{with emacs} 257 441 # Install emacs cmake mode 258 mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} 259 install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el 442 mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} %{buildroot}%{_emacs_sitestartdir} 443 mv %{buildroot}%{_emacs_sitelispdir}/%{name}-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} 260 444 %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el 261 mkdir -p %{buildroot}%{_emacs_sitestartdir} 262 install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} 445 install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} 446 %else 447 rm -rf %{buildroot}%{_emacs_sitelispdir} 263 448 %endif 264 449 # RPM macros … … 296 481 %if %{with gui} 297 482 # Desktop file 298 %if %{with appdata}483 %if !0%{?os2_version} 299 484 desktop-file-install --delete-original \ 300 485 --dir=%{buildroot}%{_datadir}/applications \ 301 486 %{buildroot}%{_datadir}/applications/%{name}-gui.desktop 302 487 %endif 488 489 %if %{with appdata} 303 490 # Register as an application to be visible in the software center 304 491 # … … 349 536 find %{buildroot}%{_libdir}/%{orig_name} -type f | \ 350 537 sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > lib_files.mf 538 %if !0%{?os2_version} 539 find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ 540 sed -e '/.*-gui$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf 541 %else 351 542 find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ 352 543 sed -e '/.*-gui.exe$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf 353 544 %endif 354 545 355 546 %if %{with test} 356 547 %check 357 cd build 358 #CMake.FileDownload, CTestTestUpload, and curl require internet access 359 # RunCMake.CPack_RPM is broken if disttag contains "+", bug #1499151 360 NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM" 361 NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-IgnoreGroup" 362 # RunCMake.File_Generate fails on S390X 363 %ifarch s390x 364 NO_TEST="$NO_TEST|RunCMake.File_Generate" 365 %endif 366 export NO_TEST 367 bin/ctest%{?name_suffix} -V -E "$NO_TEST" %{?_smp_mflags} 548 %if !0%{?os2_version} 549 pushd %{_vpath_builddir} 550 %else 551 cd %{_vpath_builddir} 552 %endif 553 # CTestTestUpload requires internet access. 554 NO_TEST="CTestTestUpload" 555 # Likely failing for hardening flags from system. 556 NO_TEST="$NO_TEST|CustomCommand|RunCMake.PositionIndependentCode" 557 # curl test may fail during bootstrap 558 %if %{with bootstrap} 559 NO_TEST="$NO_TEST|curl" 560 %endif 561 bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure 562 ## do this only periodically, not for every build -- besser82 20221102 563 # Keep an eye on failing tests 564 #bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || : 565 %if !0%{?os2_version} 566 popd 567 %else 368 568 cd .. 569 %endif 369 570 %endif 370 571 … … 385 586 %files data -f data_files.mf 386 587 %{_datadir}/aclocal/%{name}.m4 387 #%{_datadir}/bash-completion 588 %if !0%{?os2_version} 589 %{bash_completionsdir}/c* 590 %endif 388 591 %if %{with emacs} 592 %if 0%{?fedora} || 0%{?rhel} >= 7 593 %{_emacs_sitelispdir}/%{name} 594 %{_emacs_sitestartdir}/%{name}-init.el 595 %else 389 596 %{_emacs_sitelispdir} 390 597 %{_emacs_sitestartdir} 391 598 %endif 392 599 %endif 600 %if !0%{?os2_version} 601 %{vimfiles_root}/indent/%{name}.vim 602 %{vimfiles_root}/syntax/%{name}.vim 603 %endif 604 %if 0%{?os2_version} 605 %ghost %{_datadir}/%{name}/Modules/Platform/os2.cmake 606 %endif 393 607 394 608 %files doc 395 609 # Pickup license-files from main-pkg's license-dir 396 610 # If there's no license-dir they are picked up by %%doc previously 397 #%{?_licensedir:%license %{_datadir}/licenses/%{name}*}611 %{?_licensedir:%license %{_datadir}/licenses/%{name}*} 398 612 %doc %{_pkgdocdir} 399 613 … … 404 618 %if %{with gui} 405 619 %files gui 620 %if !0%{?os2_version} 621 %{_bindir}/%{name}-gui 622 %else 406 623 %{_bindir}/%{name}-gui.exe 624 %endif 407 625 %if %{with appdata} 408 626 %{_metainfodir}/*.appdata.xml 409 %{_datadir}/applications/CMake%{?name_suffix}.desktop 410 %{_datadir}/mime/packages/ 627 %endif 628 %if !0%{?os2_version} 629 %{_datadir}/applications/%{name}-gui.desktop 630 %{_datadir}/mime/packages 411 631 %{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png 412 632 %endif … … 427 647 428 648 %changelog 649 * Fri Feb 24 2023 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.20.6-2 650 - fix a crash 651 - enable system jsoncpp 652 653 * Fri Jan 27 2023 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.20.6-1 654 - update to vendor version 3.20.6 655 - resync spec file with fedora 656 657 * Fri Jan 31 2020 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.15.3-1 658 - update to vendor version 3.15.3 659 - build with gcc9 660 - add rc file handling 661 - disable 1121 wlink messages 662 - don't use emxexp for c++ by default anymore, it relies on declspec 663 if you want the old way use -DOS2_USE_CXX_EMXEXP=ON 664 429 665 * Mon Sep 16 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.10.3-1 430 666 - update to vendor version 3.10.3
Note:
See TracChangeset
for help on using the changeset viewer.