Blob Blame History Raw
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

Name:           adobe-source-libraries
Version:        1.0.43
Release:        34%{?dist}

Summary:        General purpose C++ libraries
Group:          System Environment/Libraries
                # License breakdown: http://stlab.adobe.com/licenses.html
License:        MIT
URL:            http://stlab.adobe.com/

Source0:        http://downloads.sourceforge.net/project/adobe-source/adobe-source/%{version}/asl_%{version}.tgz
                # pkg-config(1) configuration file, part of packaging.
Source1:        adobe-source-libraries.pc
Source2:        README.fedora
# https://sourceforge.net/tracker/?func=detail&aid=3487687&group_id=132417&atid=724218
# (pathch0, patch1)
Patch0:         asl-gcc5.patch
Patch1:         asl-fedora-build-options.patch
# https://svn.boost.org/trac/boost/ticket/4647
Patch2:         asl-no-concept-check1043.patch
# https://svn.boost.org/trac/boost/ticket/6940
Patch3:         asl-time-utc.patch
Patch4:         asl-boost-1.50.patch
Patch6:         asl-boost-1.57.patch
Patch7:         asl-boost-1.60.patch
Patch8:         asl-gcc6.patch

BuildRequires:  boost-build
BuildRequires:  boost-devel
BuildRequires:  doxygen
BuildRequires:  tbb-devel
BuildRequires:  texlive-dvips texlive-latex

# needs to match TBB
ExcludeArch: s390 s390x

%description
ASL provides peer-reviewed and portable C++ source libraries. The
libraries are intended to be widely useful, leveraging and extending
both the C++ Standard Library and the Boost Libraries.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description    devel
Libraries and header files for developing applications that
use %{name}.

%package        doc
Summary:        Documentation
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    doc
API and other documentation for Adobe Source Libraries (ASL).


%prep
%setup -qn source_release
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1

find . \( -name *.hpp -o -name *.jpg \) -executable -exec chmod 644 {} \;
iconv -f iso8859-1 -t utf-8 release_notes.txt > release_notes.txt.conv && \
    mv -f release_notes.txt.conv release_notes.txt
chmod 644 LICENSE_1_0_0.txt

sed -i 's!@optflags@!%{optflags}!g'  jamroot.jam
sed -i 's/@version@/%{version}/g'    %{SOURCE1}
mv boost-build.jam boost-build.nojam


%build
# Using static lib (relinked in next step) due to soname problems:
# https://svn.boost.org/trac/boost/ticket/2746.
bjam link=static toolset=gcc variant=release asl_dev

rm -rf tmp; mkdir tmp; cd tmp
ar x ../../built_artifacts/*/*/*/*/threading-multi/libasl_dev.a
gcc -shared -g -Wl,-soname=libasl_dev.so.%{version} -Wl,-as-needed \
    *.o -o ../libasl_dev.so.%{version}                             \
    -lboost_thread -lboost_signals -lboost_filesystem

#bjam link=static toolset=gcc variant=release documentation/examples
cd ../documentation
./build_docs.pl


%install
cp %SOURCE2 .
cd documentation
rm -f build_docs.pl
find . -name *.dox -delete
rm -rf asl doxygen_support_files doxyfile performance stldoc \
       structure tutorials widget_lib
# https://sourceforge.net/projects/adobe-source/forums/forum/449268/topic/5126565
[ -s performance/index.html ] ||  rm -f performance/index.html

mkdir -p  %{buildroot}%{_datadir}/doc/%{name}-%{version}
cd ..
mv documentation %{buildroot}%{_datadir}/doc/%{name}-%{version}

mkdir -p %{buildroot}%{_libdir}/pkgconfig
cp %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_includedir}
cp -ar  adobe %{buildroot}%{_includedir}

sofile=libasl_dev.so.%{version}
mkdir -p %{buildroot}%{_libdir}
install -m 755 $sofile %{buildroot}%{_libdir}
cd %{buildroot}%{_libdir}
ln -sf $sofile ${sofile%%.*}
ln -sf $sofile ${sofile%%.*.*}
ln -sf $sofile ${sofile%%.*.*.*}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%doc LICENSE_1_0_0.txt read_me.html release_notes.txt README.fedora
%{_libdir}/*.so.*
%exclude %{_pkgdocdir}/documentation

%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%files doc
%doc %{_datadir}/doc/%{name}-%{version}/documentation


%changelog
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.0.43-34
- Rebuilt for Boost 1.63

* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.0.43-33
- Rebuilt for Boost 1.63

* Mon May 16 2016 Jonathan Wakely <jwakely@redhat.com> - 1.0.43-32
- Rebuilt for linker errors in boost (#1331983)
- Patched for C++14 support in GCC 6

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.43-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 14 2016 Jonathan Wakely <jwakely@redhat.com> 1.0.43-30
- Add patch for Boost 1.60.0

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.0.43-29
- Rebuilt for Boost 1.59

* Wed Aug 05 2015 Jonathan Wakely <jwakely@redhat.com> 1.0.43-28
- Update patches for GCC 5 compatiblity.
- Fix changelog dates.

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.43-27
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.0.43-26
- rebuild for Boost 1.58

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.43-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Jan 29 2015 Petr Machata <pmachata@redhat.com> - 1.0.43-24
- Rebuild for boost 1.57.0
- Mention namespace at several adobe::move calls (asl-boost-1.57.patch)

* Sat Oct 25 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.43-23
- sync tbb arches

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.43-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.43-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.0.43-20
- Rebuild for boost 1.55.0

* Fri Aug 09 2013 Alec Leamas <leamas@nowhere.net>           - 1.0.43-19
- Fix f20 unversioned docdir glitch

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.43-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 27 2013 Petr Machata <pmachata@redhat.com>         - 1.0.43-17
- Rebuild for boost 1.54.0
- Boost package doesn't use tagged sonames anymore, drop the -mt
  suffix from linker command line.

* Fri May 24 2013 Petr Machata <pmachata@redhat.com>         - 1.0.43-16
- Rebuild for TBB memory barrier bug

* Sat Feb 16 2013 Alec Leamas <leamas@nowhere.net>           - 1.0.43-15
- Patching for new gcc version (C11 compatibility).

* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.0.43-14
- Rebuild for Boost-1.53.0

* Fri Aug  3 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-13
- Updating to boost 1.50.

* Fri Aug  3 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-12
- Handling boost bug 6940

* Thu Apr  5 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-11
- Fixing hard-coded version in .pc file

* Tue Apr  3 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-10
- Adding README.fedora, typos in spec fixed.

* Sun Apr  1 2012  Dan HorĂ¡k <dan[at]danny.cz>                1.0.43-9
- set ExclusiveArch to match TBB

* Wed Mar 28 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-8
- Adding Patch2: Relaxing certain tests to fit bombono-dvd

* Tue Mar 20 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-7
- Removing remaining documentation sources, minor fixes

* Mon Mar 19 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-7
- Removing documentation from base package (%%exclude)
- Removing .dox files from documentation

* Mon Mar 19 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-7
- Fixing bad source URL.
- Handling empty performance/index.html
- Moving documentation.

* Sun Mar 18 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-6
- Using boost-build, purging get-source.sh, related clean-up.
- Source0 refers directly to sourceforge.

* Sat Mar 17 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-5
- Updating get-source.sh to exclude APL.

* Fri Mar 16 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-5.fc15
- Updating get-source.sh (wrong version packed in v4)
- Comments update, renamed patch0.

* Sun Feb 19 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-4.fc15
- Fixing David Timms's comment #12.
- Removing unused parts of bundled boost in get-source.sh.
- Documenting boost bundling in spec file.
- Several patches removed, not required anymore.

* Thu Feb 16 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-3.fc15
- Even better handling of instruction set (removed it).
- Factored out fedora flags to new patch.

* Wed Feb 15 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-2.fc15
- Fixed linkage problems in installed package.
- Better handling of instruction set in %%prep.

* Fri Feb 10 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-1.fc15
- Initial package