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