]>
Commit | Line | Data |
---|---|---|
bfda6270 JB |
1 | Summary: JasPer library for images manipulation - MinGW32 cross version |
2 | Summary(pl.UTF-8): Biblioteka JasPer do obróbki obrazów - wersja skrośna dla MinGW32 | |
99735e94 | 3 | Name: crossmingw32-jasper |
8cf7fbcf | 4 | Version: 3.0.6 |
b7a5aaf3 | 5 | Release: 1 |
8cf7fbcf | 6 | License: JasPer v2.0 (BSD-like) |
99735e94 | 7 | Group: Development/Libraries |
f1a2c8da JB |
8 | #Source0Download: https://github.com/jasper-software/jasper/releases |
9 | Source0: https://github.com/jasper-software/jasper/releases/download/version-%{version}/jasper-%{version}.tar.gz | |
8cf7fbcf JB |
10 | # Source0-md5: f9388d52a6220303141a42d4c2c81e62 |
11 | Patch0: jasper-mingw32.patch | |
f1a2c8da | 12 | URL: https://www.ece.uvic.ca/~frodo/jasper/ |
6bc1029c | 13 | BuildRequires: cmake >= 2.8.11 |
1e64b50d | 14 | BuildRequires: crossmingw32-gcc |
99735e94 | 15 | BuildRequires: crossmingw32-libjpeg |
99735e94 | 16 | Requires: crossmingw32-libjpeg |
f1a2c8da | 17 | Obsoletes: crossmingw32-jasper-static < 2 |
99735e94 JB |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %define no_install_post_strip 1 | |
f1a2c8da | 21 | %define _enable_debug_packages 0 |
99735e94 JB |
22 | |
23 | %define target i386-mingw32 | |
24 | %define target_platform i386-pc-mingw32 | |
25 | ||
26 | %define _sysprefix /usr | |
27 | %define _prefix %{_sysprefix}/%{target} | |
28 | %define _libdir %{_prefix}/lib | |
6bc1029c | 29 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
99735e94 JB |
30 | %define _dlldir /usr/share/wine/windows/system |
31 | %define __cc %{target}-gcc | |
32 | %define __cxx %{target}-g++ | |
33 | ||
34 | %ifnarch %{ix86} | |
35 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
36 | %define optflags -O2 | |
37 | %endif | |
38 | # -z options are invalid for mingw linker | |
39 | %define filterout_ld -Wl,-z,.* | |
0c098d73 JR |
40 | %define filterout_c -f[-a-z0-9=]* |
41 | %define filterout_cxx -f[-a-z0-9=]* | |
99735e94 JB |
42 | |
43 | %description | |
44 | JasPer is a collection of software (i.e., a library and application | |
45 | programs) for the coding and manipulation of images. This software can | |
46 | handle image data in a variety of formats. One such format supported | |
47 | by JasPer is the JPEG-2000 code stream format defined in ISO/IEC | |
48 | 15444-1:2000 (but JasPer contains only partial implementation). | |
49 | ||
50 | This package contains the cross version of library for Win32. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | JasPer to zestaw oprogramowania (biblioteka i aplikacje) do kodowania | |
54 | i obróbki obrazków w różnych formatach. Jednym z nich jest JPEG-2000 | |
55 | zdefiniowany w ISO/IEC 15444-1:2000 (JasPer zawiera tylko częściową | |
56 | implementację tego formatu). | |
57 | ||
58 | Ten pakiet zawiera wersję skrośną biblioteki dla Win32. | |
59 | ||
99735e94 JB |
60 | %package dll |
61 | Summary: DLL JasPer library for Windows | |
62 | Summary(pl.UTF-8): Biblioteka DLL JasPer dla Windows | |
63 | Group: Applications/Emulators | |
64 | Requires: crossmingw32-libjpeg-dll | |
65 | Requires: wine | |
66 | ||
67 | %description dll | |
68 | DLL JasPer library for Windows. | |
69 | ||
70 | %description dll -l pl.UTF-8 | |
71 | Biblioteka DLL JasPer dla Windows. | |
72 | ||
73 | %prep | |
f1a2c8da | 74 | %setup -q -n jasper-%{version} |
8cf7fbcf | 75 | %patch0 -p1 |
99735e94 JB |
76 | |
77 | %build | |
6bc1029c JB |
78 | # there is upstream directory named "build", use different name |
79 | install -d builddir | |
80 | cd builddir | |
81 | # note: build/jasper.pc.in expects CMAKE_INSTALL_INCLUDEDIR and CMAKE_INSTALL_LIBDIR relative to CMAKE_INSTALL_PREFIX | |
82 | %cmake .. \ | |
9acdc5de | 83 | -DCMAKE_CROSSCOMPILING=ON \ |
6bc1029c JB |
84 | -DCMAKE_INSTALL_INCLUDEDIR:PATH=include \ |
85 | -DCMAKE_INSTALL_LIBDIR:PATH=lib \ | |
86 | -DCMAKE_SYSTEM_NAME=Windows \ | |
173f6bf3 JB |
87 | -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \ |
88 | -DJAS_ENABLE_DOC=OFF \ | |
89 | -DJAS_ENABLE_OPENGL=OFF \ | |
8cf7fbcf | 90 | -DJAS_STDC_VERSION="$(i386-mingw32-cpp -x c -dM < /dev/null | grep __STDC_VERSION__| cut -d' ' -f3)" \ |
244019a4 JB |
91 | -DJPEG_INCLUDE_DIR:PATH=%{_includedir} \ |
92 | -DJPEG_LIBRARY=%{_libdir}/libjpeg.dll.a | |
99735e94 JB |
93 | |
94 | %{__make} | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
6bc1029c | 99 | %{__make} -C builddir install \ |
99735e94 JB |
100 | DESTDIR=$RPM_BUILD_ROOT |
101 | ||
102 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
b7a5aaf3 | 103 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/*.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 |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
8cf7fbcf | 119 | %doc ChangeLog LICENSE.txt NEWS.txt README.md 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 |