#
# spec file for package fribidi
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define lname   libfribidi0
Name:           fribidi
Version:        1.0.10
Release:        1.2
Summary:        An implementation of the Unicode BiDi algorithm
License:        LGPL-2.1-only
URL:            https://github.com/fribidi/fribidi
Source:         https://github.com/fribidi/fribidi/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source2:        baselibs.conf
BuildRequires:  pkgconfig
#
Provides:       locale(ar;he)
# bug437293
%ifarch ppc64
Obsoletes:      fribidi-64bit
%endif

%description
This library implements the algorithm as described in "Unicode
Standard Annex #9, the Bidirectional Algorithm".

%package -n %{lname}
Summary:        An implementation of the Unicode BiDi algorithm

%description -n %{lname}
This library implements the algorithm as described in "Unicode
Standard Annex #9, the Bidirectional Algorithm,
http://www.unicode.org/unicode/reports/tr9/". FriBidi is
tested against the Bidi Reference Code and, to the best of the
developers' knowledge, does not contain any conformance bugs.

The API was inspired by the document "Bi-Di languages support - BiDi
API proposal" by Franck Portaneri, which he wrote as a proposal for
adding BiDi support to Mozilla.

%package devel
Summary:        Development Files for FriBiDi
Requires:       %{lname} = %{version}

%description devel
This package provides headers and manual files for FriBiDi.

%prep
%autosetup -p1

%build
%configure --disable-static
%make_build

%check
%make_build check

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post   -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig

%files
%doc NEWS README
%{_bindir}/fribidi

%files -n %{lname}
%license COPYING
%{_libdir}/libfribidi.so.0*

%files devel
%doc AUTHORS ChangeLog THANKS TODO
%{_mandir}/man3/fribidi_*
%{_includedir}/fribidi/
%{_libdir}/libfribidi.so
%{_libdir}/pkgconfig/fribidi.pc

%changelog
* Sun Aug  9 2020 Matthias Eliasson <elimat@opensuse.org>
- Update to version 1.0.10:
  * Fixed various compilation problems and symbol exports necessary for
    proper compilation under windows.
- Changes from version 1.0.9:
  * A bug fix in the fribidi unicode algorithm where isolate sequences were
    not really isolated.
  * Restored mistakenly removed deprecated function
    fribidi_log2vis_get_embedding_levels()
  * autotools now generates xz archives instead of bzip2 archives
- Changes from version 1.0.8:
  * A bug fix in the fribidi unicode algorithm for multiple isolate
    sequences.
  * Fixed a potential buffer overflow for a long sequence of isolate
    overrides characters
- Changes from version 1.0.7:
  * This is a minor bugfix that removes symlinks and updates the meson
    version.
- Changes from version 1.0.6:
  * This is a minor bugfix release that fixes a list of minor issues that
    have turned up during the last year.
  * Various compilation and cross compilation issues.
  * Various minor header cleanups.
  * Removed libc's bsearch for performance and portability reasons
- Run spec-cleaner
  * Remove package groups
- Drop patches fixed upstream
  * Truncate-isolate_level-to-FRIBIDI_BIDI_MAX_EXPLICIT_.diff
  * no-config-h.diff
* Fri May 22 2020 Carsten Ziepke <kieltux@gmail.com>
- Add no-config-h.diff - copied from Debian
  Remove HAVE_CONFIG_H from public API
- Add Truncate-isolate_level-to-FRIBIDI_BIDI_MAX_EXPLICIT_.diff -
  copied from Debian, CVE-2019-18397
  Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
- Run spec-cleaner
* Fri Nov 29 2019 Martin Liška <mliska@suse.cz>
- Use %%make_build macros.
* Wed Oct 24 2018 sean@suspend.net
- Update to version 1.0.5:
  + Updated unicode tables to version 11
  + Bugfix release - character tests were not running previously
  + Small speedup due to small arrays being allocated on the stack
* Sun Feb 18 2018 jengelh@inai.de
- Trim redundancies in the description.
* Sat Feb 17 2018 luc14n0@linuxmail.org
- Update to version 1.0.1:
  + Minor distribution related fixes.
- Changes from version 1.0.0:
  + Full isolate and parenthesis support as per Unicode 6.3 to
    Unicode 10.0.
  + To get access to the new algorithm calls to the function
    `fribidi_get_par_embedding_levels()` must be replaced with
    calls to `fribidi_get_par_embedding_levels_ex()`. These
    functions are not API compatible. Calling the older function
    will use default values for the new bracket properties and will
    sometimes yield non-complient results.
- Changes from version 0.19.7:
  + Disable thread-unsafe memory pool by default (fdo#79385).
  + Misc fixes.
- Update Url tag to https://github.com/fribidi/fribidi: the current
  Fribidi web page.
- Drop enable-malloc configure option: the thread safety problem is
  already fixed and it's not an available configure option anymore.
- Drop fdupes BuildRequires and its macro: it is no longer needed.
* Thu Nov  6 2014 i@marguerite.su
- update version 0.19.6
  * Fix two minor bidi bugs.
  * Build with new libtool to support ppc64le.
- fix boo#903462: -enable-malloc to be thread safe
* Wed Sep 10 2014 ftake@geeko.jp
- libfribidi-devel requires %%{lname} = %%{version}
* Sat Jul 19 2014 jengelh@inai.de
- Utilize shared library package naming guidelines
- Drop Requires:pkg-config for fribidi-devel, it is implicit
  (due to .pc file being picked up by rpm find-requires)
* Tue Mar 26 2013 mmeister@suse.com
- Added url as source.
  Please see http://en.opensuse.org/SourceUrls
* Sun Feb  6 2011 adam@mizerski.pl
- update to 0.19.2
  * Update to Unicode Character Database 5.1.0
* Fri Apr 30 2010 coolo@novell.com
- buildrequire pkg-config to fix provides
* Thu Dec 17 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
  (bnc#437293)
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Sun Jan  6 2008 crrodriguez@suse.de
- update to version 0.10.9
  * Fixed type sizes when stdint.h is not available.
  * Update to Unicode Character Database 5.0.0
  * Fixed type sizes on 64-bit architectures.
- disable static libraries
- remove libtool archive with empty dependency_libs
- do not require gtk2-devel for build as it is unused
- spec file cleanups
* Tue Feb 28 2006 mfabian@suse.de
- add "Provides: locale(ar,he)".
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Mar  9 2004 mfabian@suse.de
- Bugzilla #34267: fix this by adding the compiler option
  "-fno-strict-aliasing".
* Sat Jan 10 2004 adrian@suse.de
- add %%run_ldconfig
* Mon May 12 2003 nashif@suse.de
- package forgotten files
* Sat Aug 10 2002 nashif@suse.de
- added missing requires to devel package
* Wed Jul  3 2002 meissner@suse.de
- rerun auto* tools
* Sun Jun  9 2002 nashif@suse.de
- Update to version 0.10.4
* Fri May  3 2002 nashif@suse.de
- Update to 0.10.3
- Use _libdir macro and fix for x86_64
* Fri Mar  1 2002 nashif@suse.de
- Fixed for s390x: using _libdir instead of plain path
* Sat Feb  9 2002 nashif@suse.de
- Update to version 0.10.1
* Wed Apr 11 2001 nashif@suse.de
- Update to version 0.9.0
* Fri Feb  9 2001 nashif@suse.de
- Update to version 0.1.15
* Sun Nov  5 2000 nashif@suse.de
- Update to 0.1.14
- Changed neededforbuild
- add sub packages fribidi-devel
* Fri Sep 22 2000 nashif@suse.de
- Updated to 0.1.12
* Tue Jun 20 2000 schwab@suse.de
- Fix use of suse_update_config macro.
* Fri Apr 28 2000 nashif@suse.de
- Update to version 0.1.10
* Wed Apr 12 2000 nashif@suse.de
- Update to version 0.1.9
* Sat Apr  8 2000 bk@suse.de
- added suse update config macro
* Sun Feb 13 2000 nashif@suse.de
- Initial Release ( Version: 0.1.8 )