diff --git a/brewtarget.spec b/brewtarget.spec index 2c49a0d..8aa3eb9 100644 --- a/brewtarget.spec +++ b/brewtarget.spec @@ -11,7 +11,7 @@ priming sugar calculators, OG correction help, and a unique mash designing tool. It also can export and import recipes in BeerXML.} Name: brewtarget -Version: 3.0.6 +Version: 3.0.9 Release: %{autorelease} Summary: An open source beer recipe creation tool 🍺 %forgemeta @@ -24,36 +24,42 @@ Summary: An open source beer recipe creation tool 🍺 License: GPL-3.0-or-later AND BSD-2-Clause AND WTFPL AND (CC-BY-SA-3.0 OR LGPL-3.0-only) AND LGPL-2.1-only URL: %{forgeurl} Source0: %{forgesource} +Patch: fix_boost_requirements.patch BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel, qt5-qtwebkit-devel, qt5-qtsvg-devel BuildRequires: qt5-qtmultimedia-devel, qt5-linguist BuildRequires: boost-devel, xerces-c-devel, xalan-c-devel BuildRequires: desktop-file-utils +BuildRequires: meson +BuildRequires: git-core +BuildRequires: pandoc +BuildRequires: xorg-x11-server-Xvfb Requires: sqlite %description %_description %prep -%setup -q -n %{name}-%{version} +%autosetup -n %{name}-%{version} -S git +# Crude way of disabling testLogRotation +sed -i -e '/testLogRotation/d' meson.build + %build -%cmake -DDO_RELEASE_BUILD:BOOL=ON -%cmake_build +%meson +%meson_build + %install -%cmake_install -# Remove generated files. We use what's provided in tarball. -rm %buildroot/%{_docdir}/%{name}/{RelaseNotes.markdown,changelog.Debian.gz,copyright} -gzip doc/brewtarget.1 -/usr/bin/install -m 0644 -Dp doc/brewtarget.1.gz %buildroot%{_mandir}/man1/brewtarget.1.gz -# symlink manual, which is accessible in application -rm %buildroot/%{_datadir}/%{name}/manual-en.pdf -pushd %buildroot/%{_datadir}/%{name} -ln -s ../doc/%{name}/manual-en.pdf . -popd +%meson_install + %check +# Run in minimal graphical env (thanks @ankursinha). +# We need to pass the Meson test command as a script to xvfb-run. +echo -e '#!/bin/sh\n\n%meson_test --verbose' > mesontest.sh +chmod a+x mesontest.sh +xvfb-run ./mesontest.sh desktop-file-validate %buildroot%{_datadir}/applications/%{name}.desktop %files @@ -62,7 +68,9 @@ desktop-file-validate %buildroot%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_mandir}/man1/brewtarget* -%doc CHANGES.markdown README.markdown doc/manual-en.pdf +%{_docdir}/%{name}/*.markdown +%{_docdir}/%{name}/copyright +%doc doc/manual-en.pdf %license COPYRIGHT COPYING.GPLv3 COPYING.WTFPL %changelog diff --git a/fix_boost_requirements.patch b/fix_boost_requirements.patch new file mode 100644 index 0000000..a5c4a43 --- /dev/null +++ b/fix_boost_requirements.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 830b615c..4f3af58f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -665,7 +665,7 @@ elseif(APPLE) + find_package(Boost 1.79.0 REQUIRED) + else() + # Note that header-only libraries don't have a component +- find_package(Boost 1.79.0 REQUIRED COMPONENTS stacktrace_backtrace) ++ find_package(Boost REQUIRED) + endif() + include_directories(${Boost_INCLUDE_DIRS}) + # Uncomment the next two lines if you want to find where Boost headers and DLLs are on your system +diff --git a/meson.build b/meson.build +index f7dc861b..594fdeed 100644 +--- a/meson.build ++++ b/meson.build +@@ -406,13 +406,8 @@ qtTestRunnerDependencies = dependency('qt5', version : '>=5.9.5', modules: ['Tes + # For Boost, per https://mesonbuild.com/Dependencies.html#boost, we only need to supply module names for libraries we + # need to link against. For the header-only Boost libraries, the 'boost' dependency suffices. + boostModules = [] +-if host_machine.system() == 'linux' +- boostModules += 'stacktrace_backtrace' +- add_global_arguments('-DBOOST_STACKTRACE_LINK', language : 'cpp') +- add_global_arguments('-DBOOST_STACKTRACE_USE_BACKTRACE', language : 'cpp') +-endif + boostDependency = dependency('boost', +- version : '>=1.79.0', ++ version : '>=1.78.0', + modules : boostModules, + static : true) + message('Boost:', boostDependency.name(), 'found =', boostDependency.found(), 'version =', boostDependency.version()) +@@ -468,12 +463,12 @@ endif + + # Note that, unlike, say, the parameters to include_directories(), the dirs argument to find_library() must be absolute + # paths +-libbacktraceDir = join_paths(meson.project_source_root(), 'third-party/libbacktrace/.libs') +-backtraceDependency = compiler.find_library('backtrace', +- required : true, +- static : true, +- dirs : [libbacktraceDir]) +- ++#libbacktraceDir = join_paths(meson.project_source_root(), 'third-party/libbacktrace/.libs') ++#backtraceDependency = compiler.find_library('backtrace', ++# required : true, ++# static : true, ++# dirs : [libbacktraceDir]) ++# + #======================================== Find the other libraries we depend on ======================================== + # + # See https://mesonbuild.com/Reference-manual_returned_dep.html for what info we can pull from a dependency object +@@ -1086,9 +1081,9 @@ generatedFromMocForUnitTests = qt.compile_moc(headers : unitTestMocHeaders, + # + # We make a point here of displaying the output of run_command because we want to show message emitted by lupdate about + # what it did. +-message('Running lupdate on the following ts files:', run_command('ls', translationSourceFiles, check: true).stdout()) ++message('Running lupdate-qt5 on the following ts files:', run_command('ls', translationSourceFiles, check: true).stdout()) + message( +- run_command('lupdate', ++ run_command('lupdate-qt5', + meson.project_source_root() + '/src', + meson.project_source_root() + '/ui', + '-ts', +@@ -1110,8 +1105,7 @@ commonDependencies = [qtCommonDependencies, + xercesDependency, + xalanDependency, + boostDependency, +- dlDependency, +- backtraceDependency] ++ dlDependency] + mainExeDependencies = commonDependencies + qtMainExeDependencies + testRunnerDependencies = commonDependencies + qtTestRunnerDependencies + diff --git a/sources b/sources index a2b8154..4b12e5d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (brewtarget-3.0.6.tar.gz) = 1bddc32338c5a90e96970154c0b21a5e911224cd8c1430824e67176ad1d69261bfa53f63829f3375598fd1a37f79f75d3e6b278f46d4179d4fc1891fd48797b4 +SHA512 (brewtarget-3.0.9.tar.gz) = 7547948bf3d79d68f5ee156a3560e3ba53b45160349d24ebb9ae2086ee5b00bf086830a1bf702d50cd4f7a9385f09afd2e5e742e3e0bc59195448748c8b017ea