%bcond docs 1 Name: libipuz Version: 0.4.6 Release: 1.20240511061030128750.master.137.g497ffeb%{?dist} Summary: Library for parsing .ipuz puzzle files License: LGPL-2.1-or-later OR MIT URL: https://gitlab.gnome.org/jrb/libipuz Source: libipuz-0.4.6.tar.gz # Ensure we only enable rust support from 0.4.6 onwards %bcond rust %([ $(echo %{version} | tr -d .) -ge 046 ] && echo 1 || echo 0) %if %{with rust} BuildRequires: cargo-rpm-macros >= 24 BuildRequires: sed %endif BuildRequires: gcc BuildRequires: gettext BuildRequires: meson BuildRequires: python3 %if %{with docs} BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-rtd-theme) BuildRequires: python3dist(myst-parser) %endif BuildRequires: glib2-devel BuildRequires: json-glib-devel %description This is a library for parsing .ipuz puzzle files, for crossword puzzles, sudokus, etc. The library only handles crosswords for now. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %if %{with docs} Suggests: %{name}-doc = %{version}-%{release} %endif %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %if %{with docs} %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc This package contains additional documentation for %{name}. %endif %package tests Summary: Tests for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description tests The %{name}-tests package contains tests for %{name}. %prep %autosetup -p1 -n libipuz-0.4.6 %if %{with rust} %cargo_prep # Drop version locks rm libipuz/rust/Cargo.lock sed -i '/Cargo.lock/d' libipuz/rust/meson.build %generate_buildrequires cd libipuz/rust %cargo_generate_buildrequires %endif %build %meson %meson_build %if %{with docs} sphinx-build-3 docs html rm -rf html/.{doctrees,buildinfo} %endif %install %meson_install %check %meson_test %files %license LICENSE COPYING.LGPL COPYING.MIT %doc README.md NEWS.md %{_libdir}/lib%{name}-0.4.so %files devel %{_includedir}/* %{_libdir}/pkgconfig/%{name}-0.4.pc %if %{with docs} %files doc %license LICENSE COPYING.LGPL COPYING.MIT %doc html %endif %files tests %dir %{_datadir}/installed-tests %{_datadir}/installed-tests/%{name}-1.0 %dir %{_libexecdir}/installed-tests %{_libexecdir}/installed-tests/%{name}-1.0 %changelog * Sat May 11 2024 Packit - 0.4.6-1.20240511061030128750.master.137.g497ffeb - allow non_snake_case (Jonathan Blandford) - enumeration: use glib::dgettext for i18n (Pranjal Kole) - enumeration: remove ipuz_enumeration_dup (Pranjal Kole) - enumeration: add more tests (Pranjal Kole) - enumeration: port to rust (Pranjal Kole) - Use &* instead of ManuallyDrop::new (Jonathan Blandford) - Fix a word in the doc comment (Jonathan Blandford) - Add a test for check_text() (Jonathan Blandford) - New function: check_text() (Jonathan Blandford) - Add a ';' (Jonathan Blandford) - Have ipuz_crossword_clue_foreach() match cell_foreach() (Jonathan Blandford) - Add a method to explicitly set the char count (Jonathan Blandford) - ipuz_html_to_markup: Support underlined text (Gwyneth Morgan) - rust/charset: u32, i32 -> c_uint, c_int (Pranjal Kole) - rust/messages: move from charset (Pranjal Kole) - Remove cell_array prefix from shuffle() and pop_front() (Federico Mena Quintero) - Remove CellArray.copy() - we can use clone() (Federico Mena Quintero) - Derive Ord/PartialOrd on IPuzCellCoord to get rid of the custom comparison function (Federico Mena Quintero) - Make cell_array.rs build (Federico Mena Quintero) - cell-array: added cell-array.rs to libipuz (shruti2522) - Don't go off the end of the quote_str. (Jonathan Blandford) - docs/rust.md: Add a section on glib-like argument checks (Federico Mena Quintero) - rust/charset: check for NULL pointers from C (Pranjal Kole) - CI: Make sure we get symbol names in stack traces in the asan job (Federico Mena Quintero) - CI: for the asan job, also catch undefined behavior (Federico Mena Quintero) - Don't calculate the flags in two places. (Jonathan Blandford) - Add an INVALID_CHARS flag to the puzzle (Jonathan Blandford) - Force puzzles to have a charset by default (Jonathan Blandford) - Fix spelling of charset (Jonathan Blandford) - Actually set the quote_clue, and not just calculate it (Jonathan Blandford) - docs/rust.md: add a list of suggestions of things to port to Rust (Federico Mena Quintero) - Fix typo in acrostic test name (Jonathan Blandford) - use g_string_free instead of g_string_free_and_steal (Jonathan Blandford) - Use "sync-direction" instead of "direction" for fix_all (Jonathan Blandford) - Change IPUZ_ACROSTIC_FIX_* to IPUZ_ACROSTIC_SYNC_* (Jonathan Blandford) - Clean up tests (Jonathan Blandford) - Reverse polarity of syncing (Jonathan Blandford) - We need to update the quote_clue now that the grid has changed (Jonathan Blandford) - Add a g_assert() to guard against changes to MAX_QUOTE_STR_LENGTH (Jonathan Blandford) - change ipuz_acrostic_fix_quote to ipuz_acrostic_fix_quote_str (Jonathan Blandford) - Convert to unichars (Tanmay Patil) - Test fix_quote for non-english acrostics (Tanmay Patil) - Loop until we encounter NULL (Tanmay Patil) - Improve test (Tanmay Patil) - Rename "charset" property to "lang-charset" for IPuzAcrostic (Tanmay Patil) - Add tests for non-english acrostics (Tanmay Patil) - Fix leak (Tanmay Patil) - Do not uppercase the character (Tanmay Patil) - Uppercase and sanitize the input before setting as quote string (Tanmay Patil) - Fix grid only if mentioned in var arguments (Tanmay Patil) - Add charset as a property to IPuzAcrostic (Tanmay Patil) - Handle unicode characters (Tanmay Patil) - Split into two calls (Tanmay Patil) - Do not set guesses (Tanmay Patil) - Overwrite IPuzCrossword fix_all method (Tanmay Patil) - Indent python block (Tanmay Patil) - Add a diagram of "fixed" grid (Tanmay Patil) - Do not pass non-ASCII letters to Charset (Tanmay Patil) - Update doc to add more questions that need answering (Jonathan Blandford) - Add fix_all method to IPuzAcrosticClass (Tanmay Patil) - Implement ipuz_acrostic_fix_quote_str (Tanmay Patil) - Handle NULL strings (Tanmay Patil) - Resize the board during fix_grid (Tanmay Patil) - Update board dimensions while setting quote string (Tanmay Patil) - Charset API changes (Tanmay Patil) - Fix uninitialized variable (Federico Mena Quintero) - Use --release as appropriate for 'cargo test' (Federico Mena Quintero) - Don't add the solution if it's NULL (Jonathan Blandford) - pull-container-image.sh: Remind the user to set up the environment (Federico Mena Quintero) - Fix cargo paths relative to the meson srcdir (Federico Mena Quintero) - Note that IPuzCharsetIter needs to be made to terminate to free the iterator. (Federico Mena Quintero) - CI: Print the failed test logs from meson (Federico Mena Quintero) - Document the Rust API (Federico Mena Quintero) - Note on running only the Rust tests (Federico Mena Quintero) - Link to the Rust-related docs (Federico Mena Quintero) - Plug 'cargo test' into 'meson test' (Federico Mena Quintero) - CI: oops, all the jobs need env.sh to set up the Cargo installation path (Federico Mena Quintero) - Remove ipuz-charset.c. Yay! (Federico Mena Quintero) - Copy the docs from ipuz-charset.c to ipuz-charset.h (Federico Mena Quintero) - Implement ipuz_charset_builder_remove_text() (Federico Mena Quintero) - Implement charset iteration in Rust (Federico Mena Quintero) - rust.md: start a Rust/C cheatsheet (Federico Mena Quintero) - WIP: start porting ipuz-charset to Rust (Federico Mena Quintero) - Split functions between IPuzCharsetBuilder and IPuzCharset (Federico Mena Quintero) - ipuz-charset.h: Reorder the prototypes (Federico Mena Quintero) - Don't compile tests or code for ipuz_charset_clone / contains_text / remove_text (Federico Mena Quintero) - New document on porting IPuzCharset to Rust (Federico Mena Quintero) - Start a document on the Rust port (Federico Mena Quintero) - Test that the charset actually coalesces duplicated letters (Federico Mena Quintero) - Write tests for ipuz_acrostic_fix_grid (Tanmay Patil) - Fix memory leak (Tanmay Patil) - Fix indentation (Tanmay Patil) - Handle lowercase letters in quote string (Tanmay Patil) - Remove fix_quote_str for now (Tanmay Patil) - Add g_return_if_fail to ipuz_acrostic_fix_quote (Tanmay Patil) - Update grid from quote_str (Tanmay Patil) - Remove puzzle-kind property from the g_object_new call (Jonathan Blandford) - charset.rs: Start sketching the Rust version (Federico Mena Quintero) - Actually use ipuz_noop() to test compiling/linking (Federico Mena Quintero) - Infinite scream puzzle to try and break things (Jonathan Blandford) - Add an ipuz_noop() implemented in Rust (Federico Mena Quintero) - CI: Update the Rust installation scripts from librsvg (Federico Mena Quintero) - CI: Move python installation to a script (Federico Mena Quintero) - set_barred(), not border. (Jonathan Blandford) - ipuz_barred_set_cell_bars() now will (mostly) respect existing styles (Jonathan Blandford) - Have fix_styles() keep cell-bound styles as seperate. (Jonathan Blandford) - Remove unused variable (Jonathan Blandford) - Add _ipuz_style_is_empty_except_bars() (Jonathan Blandford) - Merge ipuz_barred_fix_styles() with ipuz_crossword_fix_styles() (Jonathan Blandford) - add a fix_style() fix function (Jonathan Blandford) - New function: ipuz_style_is_empty() (Jonathan Blandford) - Change from IPuzStyleShapeEnum to just IPuzStyleShape (Jonathan Blandford) - Add ipuz_style_shape_get_name() (Jonathan Blandford) - Add the full puzzle kind doc to the main index (Jonathan Blandford) - Add some open questions (Jonathan Blandford) - Turn the table into more of a tree (Jonathan Blandford) - Add an initial proposed inheritance tree (Jonathan Blandford) - Post-release version bump (Jonathan Blandford) - Add more methods to IPuzAcrostic (Tanmay Patil)