]> git.pld-linux.org Git - packages/SDL2_image.git/blame - SDL2_image.spec
rebuild for new soname of dynamically loaded libavif/libjxl; rel 2
[packages/SDL2_image.git] / SDL2_image.spec
CommitLineData
9c3fbf92
JP
1#
2# Conditional build:
3%bcond_without avif # AV1 Image File Format support
4%bcond_without jxl # JPEG XL support
5
7e96a0d5
JB
6Summary: Simple DirectMedia Layer 2 - Sample Image Loading Library
7Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków dla SDL2
8Summary(pt_BR.UTF-8): Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens
9Name: SDL2_image
3ba31064 10Version: 2.6.3
1a81da4a 11Release: 2
7e96a0d5
JB
12License: Zlib-like
13Group: Libraries
bba13cd2 14Source0: https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
3ba31064 15# Source0-md5: 191c3eb49cc2dce30abff81398a92e81
bf31c657 16Patch0: %{name}-libjpeg.patch
bba13cd2
JP
17Patch1: relax-soname-pattern.patch
18URL: https://github.com/libsdl-org/SDL_image
19BuildRequires: SDL2-devel >= 2.0.9
7e96a0d5
JB
20BuildRequires: autoconf
21BuildRequires: automake
9c3fbf92 22%{?with_avif:BuildRequires: libavif-devel}
7e96a0d5 23BuildRequires: libjpeg-devel >= 8
9c3fbf92 24%{?with_jxl:BuildRequires: libjxl-devel}
bf31c657 25BuildRequires: libpng-devel >= 2:1.6.0
7e96a0d5
JB
26BuildRequires: libtiff-devel >= 4
27BuildRequires: libtool >= 2:2
bf31c657 28BuildRequires: libwebp-devel >= 0.6.0
7e96a0d5 29BuildRequires: pkgconfig >= 1:0.9.0
9c3fbf92 30BuildRequires: rpmbuild(macros) >= 1.527
bba13cd2 31Requires: SDL2 >= 2.0.9
9c3fbf92 32%{?with_avif:Suggests: libavif}
7e96a0d5 33Suggests: libjpeg >= 8
9c3fbf92 34%{?with_jxl:Suggests: libjxl}
7e96a0d5 35Suggests: libpng >= 2:1.6.0
7e96a0d5 36Suggests: libtiff >= 4
bf31c657 37Suggests: libwebp >= 0.6.0
7e96a0d5
JB
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40# NOTE: libraries dlopened by sonames detected at build time:
1a81da4a 41# libavif.so.15
7e96a0d5 42# libjpeg.so.8
1a81da4a 43# libjxl.so.0.8
bf31c657 44# libpng16.so.16
7e96a0d5 45# libtiff.so.5
bf31c657 46# libwebp.so.7
7e96a0d5
JB
47
48%description
49This is a simple library to load images of various formats as SDL2
50surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX,
51PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats.
52
53%description -l pl.UTF-8
54Jest to prosta biblioteka służąca do ładowania różnego formatu
55obrazków jako powierzchni SDL2. W chwili obecnej biblioteka obsługuje
56następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM),
57TGA, TIFF, WebP, XCF oraz XPM.
58
59%description -l pt_BR.UTF-8
60Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens.
61
62%package devel
63Summary: Header files and more to develop SDL2_image applications
64Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image
65Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2
66Group: Development/Libraries
67Requires: %{name} = %{version}-%{release}
bba13cd2 68Requires: SDL2-devel >= 2.0.9
7e96a0d5
JB
69
70%description devel
71Header files and more to develop SDL2_image applications.
72
73%description devel -l pl.UTF-8
74Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image.
75
76%description devel -l pt_BR.UTF-8
77Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
78SDL2.
79
80%package static
81Summary: Static SDL2_image libraries
82Summary(pl.UTF-8): Statyczne biblioteki SDL2_image
83Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações SDL2
84Group: Development/Libraries
85Requires: %{name}-devel = %{version}-%{release}
86
87%description static
88Statis SDL2_image libraries.
89
90%description static -l pl.UTF-8
91Statyczne biblioteki SDL2_image.
92
93%description static -l pt_BR.UTF-8
94Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
95
96%prep
97%setup -q
bf31c657 98%patch0 -p1
bba13cd2 99%patch1 -p1
7e96a0d5
JB
100
101%build
102%{__libtoolize}
103%{__aclocal}
104%{__autoconf}
105%{__automake}
106%configure \
bba13cd2 107 --disable-stb-image \
9c3fbf92 108 %{__enable_disable avif} \
bba13cd2 109 --enable-avif-shared \
7e96a0d5
JB
110 --enable-bmp \
111 --enable-gif \
112 --enable-jpg \
113 --enable-jpg-shared \
9c3fbf92 114 %{__enable_disable jxl} \
bba13cd2 115 --enable-jxl-shared \
7e96a0d5
JB
116 --enable-lbm \
117 --enable-pcx \
118 --enable-png \
119 --enable-png-shared \
120 --enable-pnm \
bba13cd2
JP
121 --enable-qoi \
122 --enable-svg \
7e96a0d5
JB
123 --enable-tga \
124 --enable-tif \
125 --enable-tif-shared \
126 --enable-webp \
127 --enable-webp-shared \
128 --enable-xcf \
129 --enable-xpm \
130 --enable-xv
131
132%{__make}
133
134%install
135rm -rf $RPM_BUILD_ROOT
136install -d $RPM_BUILD_ROOT%{_bindir}
137
138%{__make} install \
139 DESTDIR=$RPM_BUILD_ROOT
140
141install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show
142
143# obsoleted by pkg-config
144%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
145
146%clean
147rm -rf $RPM_BUILD_ROOT
148
149%post -p /sbin/ldconfig
150%postun -p /sbin/ldconfig
151
152%files
153%defattr(644,root,root,755)
bba13cd2 154%doc CHANGES.txt LICENSE.txt README.txt
7e96a0d5
JB
155%attr(755,root,root) %{_bindir}/sdl2show
156%attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.*
157%attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0
158
159%files devel
160%defattr(644,root,root,755)
161%attr(755,root,root) %{_libdir}/libSDL2_image.so
bba13cd2 162%{_libdir}/cmake/SDL2_image
7e96a0d5
JB
163%{_includedir}/SDL2/SDL_image.h
164%{_pkgconfigdir}/SDL2_image.pc
165
166%files static
167%defattr(644,root,root,755)
168%{_libdir}/libSDL2_image.a
This page took 0.093919 seconds and 4 git commands to generate.