Blob Blame History Raw
Name:           adobe-source-libraries
Version:        1.0.43
Release:        12%{?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-gcc.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-uninitialized-move.patch

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

# needs to match TBB
ExclusiveArch: %{ix86} x86_64 ia64

%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

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-mt -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 %{_datadir}/doc/%{name}-%{version}/documentation

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

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


%changelog
* Thu Aug  3 2012  Alec Leamas <leamas@nowhere.net>           1.0.43-12
- Handling boost bug 6940
- Trying to fix build error.

* 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