]> git.pld-linux.org Git - packages/crossmingw32-jasper.git/blame - crossmingw32-jasper.spec
- added nocxx patch (disable cmake check for C++ compiler)
[packages/crossmingw32-jasper.git] / crossmingw32-jasper.spec
CommitLineData
bfda6270
JB
1Summary: JasPer library for images manipulation - MinGW32 cross version
2Summary(pl.UTF-8): Biblioteka JasPer do obróbki obrazów - wersja skrośna dla MinGW32
99735e94 3Name: crossmingw32-jasper
6bc1029c 4Version: 2.0.10
244019a4 5Release: 2
99735e94
JB
6License: BSD-like
7Group: Development/Libraries
6bc1029c
JB
8#Source0Download: http://www.ece.uvic.ca/~frodo/jasper/#download
9Source0: http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.tar.gz
10# Source0-md5: 06882adcf92524eb493f3cf0d3f62c9a
11Patch0: %{name}-libname.patch
244019a4
JB
12Patch1: jasper-nocxx.patch
13Patch2: jasper-nodocs.patch
6bc1029c
JB
14URL: http://www.ece.uvic.ca/~frodo/jasper/
15BuildRequires: cmake >= 2.8.11
1e64b50d 16BuildRequires: crossmingw32-gcc
99735e94 17BuildRequires: crossmingw32-libjpeg
99735e94 18Requires: crossmingw32-libjpeg
6bc1029c 19Obsoletes: crossmingw32-jasper-static
99735e94
JB
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%define no_install_post_strip 1
23
24%define target i386-mingw32
25%define target_platform i386-pc-mingw32
26
27%define _sysprefix /usr
28%define _prefix %{_sysprefix}/%{target}
29%define _libdir %{_prefix}/lib
6bc1029c 30%define _pkgconfigdir %{_prefix}/lib/pkgconfig
99735e94
JB
31%define _dlldir /usr/share/wine/windows/system
32%define __cc %{target}-gcc
33%define __cxx %{target}-g++
34
35%ifnarch %{ix86}
36# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
37%define optflags -O2
38%endif
39# -z options are invalid for mingw linker
40%define filterout_ld -Wl,-z,.*
0c098d73
JR
41%define filterout_c -f[-a-z0-9=]*
42%define filterout_cxx -f[-a-z0-9=]*
99735e94
JB
43
44%description
45JasPer is a collection of software (i.e., a library and application
46programs) for the coding and manipulation of images. This software can
47handle image data in a variety of formats. One such format supported
48by JasPer is the JPEG-2000 code stream format defined in ISO/IEC
4915444-1:2000 (but JasPer contains only partial implementation).
50
51This package contains the cross version of library for Win32.
52
53%description -l pl.UTF-8
54JasPer to zestaw oprogramowania (biblioteka i aplikacje) do kodowania
55i obróbki obrazków w różnych formatach. Jednym z nich jest JPEG-2000
56zdefiniowany w ISO/IEC 15444-1:2000 (JasPer zawiera tylko częściową
57implementację tego formatu).
58
59Ten pakiet zawiera wersję skrośną biblioteki dla Win32.
60
99735e94
JB
61%package dll
62Summary: DLL JasPer library for Windows
63Summary(pl.UTF-8): Biblioteka DLL JasPer dla Windows
64Group: Applications/Emulators
65Requires: crossmingw32-libjpeg-dll
66Requires: wine
67
68%description dll
69DLL JasPer library for Windows.
70
71%description dll -l pl.UTF-8
72Biblioteka DLL JasPer dla Windows.
73
74%prep
75%setup -q -n jasper-%{version}
6bc1029c 76%patch0 -p1
244019a4
JB
77%patch1 -p1
78%patch2 -p1
99735e94
JB
79
80%build
6bc1029c
JB
81# there is upstream directory named "build", use different name
82install -d builddir
83cd builddir
84# note: build/jasper.pc.in expects CMAKE_INSTALL_INCLUDEDIR and CMAKE_INSTALL_LIBDIR relative to CMAKE_INSTALL_PREFIX
85%cmake .. \
86 -DCMAKE_INSTALL_INCLUDEDIR:PATH=include \
87 -DCMAKE_INSTALL_LIBDIR:PATH=lib \
88 -DCMAKE_SYSTEM_NAME=Windows \
89 -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=FALSE \
90 -DJAS_ENABLE_OPENGL=FALSE \
244019a4
JB
91 -DJPEG_INCLUDE_DIR:PATH=%{_includedir} \
92 -DJPEG_LIBRARY=%{_libdir}/libjpeg.dll.a
99735e94
JB
93
94%{__make}
95
96%install
97rm -rf $RPM_BUILD_ROOT
98
6bc1029c 99%{__make} -C builddir install \
99735e94
JB
100 DESTDIR=$RPM_BUILD_ROOT
101
102install -d $RPM_BUILD_ROOT%{_dlldir}
6bc1029c 103%{__mv} $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
99735e94
JB
104
105%if 0%{!?debug:1}
106%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
107%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
108%endif
109
6bc1029c
JB
110%{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe \
111 $RPM_BUILD_ROOT%{_mandir}/man1/*.1
112%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/{README,*.pdf,html}
113
99735e94
JB
114%clean
115rm -rf $RPM_BUILD_ROOT
116
117%files
118%defattr(644,root,root,755)
6bc1029c 119%doc ChangeLog LICENSE README doc/jasper.pdf doc/jpeg2000.pdf
99735e94 120%{_libdir}/libjasper.dll.a
99735e94 121%{_includedir}/jasper
6bc1029c 122%{_pkgconfigdir}/jasper.pc
99735e94
JB
123
124%files dll
125%defattr(644,root,root,755)
6bc1029c 126%{_dlldir}/libjasper.dll
This page took 0.073669 seconds and 4 git commands to generate.