| 1 | %define svn_url http://svn.netlabs.org/repos/ports/sdl_ttf/trunk | 
|---|
| 2 | %define svn_rev 1421 | 
|---|
| 3 |  | 
|---|
| 4 | %define name SDL_ttf | 
|---|
| 5 | %define version 2.0.11 | 
|---|
| 6 | %define release 2 | 
|---|
| 7 |  | 
|---|
| 8 | Name:           %{name} | 
|---|
| 9 | Version:        %{version} | 
|---|
| 10 | Release:        %{release}%{?dist} | 
|---|
| 11 | Summary:        Simple DirectMedia Layer TrueType Font library | 
|---|
| 12 |  | 
|---|
| 13 | Group:          System Environment/Libraries | 
|---|
| 14 | License:        LGPLv2+ | 
|---|
| 15 | URL:            http://www.libsdl.org/projects/SDL_ttf/ | 
|---|
| 16 | #Source0:       http://www.libsdl.org/projects/%{name}/release/%{name}-%{version}.tar.gz | 
|---|
| 17 | Source0:        %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip | 
|---|
| 18 | Patch0:         sdl_ttf-os2.patch | 
|---|
| 19 | BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root | 
|---|
| 20 |  | 
|---|
| 21 | BuildRequires:  SDL-devel >= 1.2.4 | 
|---|
| 22 | BuildRequires:  freetype-devel >= 2.0 | 
|---|
| 23 | BuildRequires:  zlib-devel | 
|---|
| 24 |  | 
|---|
| 25 | %description | 
|---|
| 26 | This library allows you to use TrueType fonts to render text in SDL | 
|---|
| 27 | applications. | 
|---|
| 28 |  | 
|---|
| 29 |  | 
|---|
| 30 | %package devel | 
|---|
| 31 | Summary:        Development files for %{name} | 
|---|
| 32 | Group:          Development/Libraries | 
|---|
| 33 | Requires:       %{name} = %{version}-%{release} | 
|---|
| 34 | Requires:       SDL-devel >= 1.2.4 | 
|---|
| 35 |  | 
|---|
| 36 | %description devel | 
|---|
| 37 | The %{name}-devel package contains libraries and header files for | 
|---|
| 38 | developing applications that use %{name}. | 
|---|
| 39 |  | 
|---|
| 40 | %debug_package | 
|---|
| 41 |  | 
|---|
| 42 | %prep | 
|---|
| 43 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} | 
|---|
| 44 | %setup -q | 
|---|
| 45 | %else | 
|---|
| 46 | %setup -q -n "%{name}-%{version}" -Tc | 
|---|
| 47 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force | 
|---|
| 48 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" | 
|---|
| 49 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") | 
|---|
| 50 | %endif | 
|---|
| 51 |  | 
|---|
| 52 | #%patch0 -p1 | 
|---|
| 53 |  | 
|---|
| 54 | libtoolize -fci | 
|---|
| 55 | ./autogen.sh | 
|---|
| 56 |  | 
|---|
| 57 | %build | 
|---|
| 58 | export CFLAGS="-g -DBUILD_SDL" LDFLAGS="-g -Zhigh-mem" | 
|---|
| 59 |  | 
|---|
| 60 | %configure \ | 
|---|
| 61 | --disable-static | 
|---|
| 62 |  | 
|---|
| 63 | %{__make} %{?_smp_mflags} | 
|---|
| 64 |  | 
|---|
| 65 | %install | 
|---|
| 66 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 67 | %makeinstall | 
|---|
| 68 |  | 
|---|
| 69 | # create import libs | 
|---|
| 70 | emximp -o %{buildroot}%{_libdir}/SDL_ttf_dll.lib %{buildroot}%{_libdir}/SDL_t200.dll | 
|---|
| 71 | emximp -o %{buildroot}%{_libdir}/SDL_ttf200_dll.lib %{buildroot}%{_libdir}/SDL_t200.dll | 
|---|
| 72 | emximp -o %{buildroot}%{_libdir}/SDL_ttf_dll.a %{buildroot}%{_libdir}/SDL_t200.dll | 
|---|
| 73 | emximp -o %{buildroot}%{_libdir}/SDL_ttf200_dll.a %{buildroot}%{_libdir}/SDL_t200.dll | 
|---|
| 74 |  | 
|---|
| 75 | # create forwarder | 
|---|
| 76 | cat << EOF >%{buildroot}%{_libdir}/sdlttf.def | 
|---|
| 77 | LIBRARY SDLttf | 
|---|
| 78 | DESCRIPTION '@#libsdl org:1.2.15#@##1## 2016-03-16               dtp::::::@@SDL_ttf (alternative port) forwarder' | 
|---|
| 79 | IMPORTS | 
|---|
| 80 | TTF_Linked_Version=SDL_t200.TTF_Linked_Version | 
|---|
| 81 | TTF_ByteSwappedUNICODE=SDL_t200.TTF_ByteSwappedUNICODE | 
|---|
| 82 | TTF_Init=SDL_t200.TTF_Init | 
|---|
| 83 | TTF_OpenFontIndexRW=SDL_t200.TTF_OpenFontIndexRW | 
|---|
| 84 | TTF_OpenFontRW=SDL_t200.TTF_OpenFontRW | 
|---|
| 85 | TTF_OpenFontIndex=SDL_t200.TTF_OpenFontIndex | 
|---|
| 86 | TTF_OpenFont=SDL_t200.TTF_OpenFont | 
|---|
| 87 | TTF_CloseFont=SDL_t200.TTF_CloseFont | 
|---|
| 88 | TTF_FontHeight=SDL_t200.TTF_FontHeight | 
|---|
| 89 | TTF_FontAscent=SDL_t200.TTF_FontAscent | 
|---|
| 90 | TTF_FontDescent=SDL_t200.TTF_FontDescent | 
|---|
| 91 | TTF_FontLineSkip=SDL_t200.TTF_FontLineSkip | 
|---|
| 92 | TTF_GetFontKerning=SDL_t200.TTF_GetFontKerning | 
|---|
| 93 | TTF_SetFontKerning=SDL_t200.TTF_SetFontKerning | 
|---|
| 94 | TTF_FontFaces=SDL_t200.TTF_FontFaces | 
|---|
| 95 | TTF_FontFaceIsFixedWidth=SDL_t200.TTF_FontFaceIsFixedWidth | 
|---|
| 96 | TTF_FontFaceFamilyName=SDL_t200.TTF_FontFaceFamilyName | 
|---|
| 97 | TTF_FontFaceStyleName=SDL_t200.TTF_FontFaceStyleName | 
|---|
| 98 | TTF_GlyphIsProvided=SDL_t200.TTF_GlyphIsProvided | 
|---|
| 99 | TTF_GlyphMetrics=SDL_t200.TTF_GlyphMetrics | 
|---|
| 100 | TTF_SizeText=SDL_t200.TTF_SizeText | 
|---|
| 101 | TTF_SizeUTF8=SDL_t200.TTF_SizeUTF8 | 
|---|
| 102 | TTF_SizeUNICODE=SDL_t200.TTF_SizeUNICODE | 
|---|
| 103 | TTF_RenderText_Solid=SDL_t200.TTF_RenderText_Solid | 
|---|
| 104 | TTF_RenderUTF8_Solid=SDL_t200.TTF_RenderUTF8_Solid | 
|---|
| 105 | TTF_RenderUNICODE_Solid=SDL_t200.TTF_RenderUNICODE_Solid | 
|---|
| 106 | TTF_RenderGlyph_Solid=SDL_t200.TTF_RenderGlyph_Solid | 
|---|
| 107 | TTF_RenderText_Shaded=SDL_t200.TTF_RenderText_Shaded | 
|---|
| 108 | TTF_RenderUTF8_Shaded=SDL_t200.TTF_RenderUTF8_Shaded | 
|---|
| 109 | TTF_RenderUNICODE_Shaded=SDL_t200.TTF_RenderUNICODE_Shaded | 
|---|
| 110 | TTF_RenderGlyph_Shaded=SDL_t200.TTF_RenderGlyph_Shaded | 
|---|
| 111 | TTF_RenderText_Blended=SDL_t200.TTF_RenderText_Blended | 
|---|
| 112 | TTF_RenderUTF8_Blended=SDL_t200.TTF_RenderUTF8_Blended | 
|---|
| 113 | TTF_RenderUNICODE_Blended=SDL_t200.TTF_RenderUNICODE_Blended | 
|---|
| 114 | TTF_RenderGlyph_Blended=SDL_t200.TTF_RenderGlyph_Blended | 
|---|
| 115 | TTF_SetFontStyle=SDL_t200.TTF_SetFontStyle | 
|---|
| 116 | TTF_GetFontStyle=SDL_t200.TTF_GetFontStyle | 
|---|
| 117 | TTF_SetFontOutline=SDL_t200.TTF_SetFontOutline | 
|---|
| 118 | TTF_GetFontOutline=SDL_t200.TTF_GetFontOutline | 
|---|
| 119 | TTF_SetFontHinting=SDL_t200.TTF_SetFontHinting | 
|---|
| 120 | TTF_GetFontHinting=SDL_t200.TTF_GetFontHinting | 
|---|
| 121 | TTF_Quit=SDL_t200.TTF_Quit | 
|---|
| 122 | TTF_WasInit=SDL_t200.TTF_WasInit | 
|---|
| 123 | EXPORTS | 
|---|
| 124 | TTF_Linked_Version                          @1 | 
|---|
| 125 | TTF_ByteSwappedUNICODE                      @2 | 
|---|
| 126 | TTF_Init                                    @3 | 
|---|
| 127 | TTF_OpenFontIndexRW                         @4 | 
|---|
| 128 | TTF_OpenFontRW                              @5 | 
|---|
| 129 | TTF_OpenFontIndex                           @6 | 
|---|
| 130 | TTF_OpenFont                                @7 | 
|---|
| 131 | TTF_CloseFont                               @8 | 
|---|
| 132 | TTF_FontHeight                              @9 | 
|---|
| 133 | TTF_FontAscent                              @10 | 
|---|
| 134 | TTF_FontDescent                             @11 | 
|---|
| 135 | TTF_FontLineSkip                            @12 | 
|---|
| 136 | TTF_GetFontKerning                          @13 | 
|---|
| 137 | TTF_SetFontKerning                          @14 | 
|---|
| 138 | TTF_FontFaces                               @15 | 
|---|
| 139 | TTF_FontFaceIsFixedWidth                    @16 | 
|---|
| 140 | TTF_FontFaceFamilyName                      @17 | 
|---|
| 141 | TTF_FontFaceStyleName                       @18 | 
|---|
| 142 | TTF_GlyphIsProvided                         @19 | 
|---|
| 143 | TTF_GlyphMetrics                            @20 | 
|---|
| 144 | TTF_SizeText                                @21 | 
|---|
| 145 | TTF_SizeUTF8                                @22 | 
|---|
| 146 | TTF_SizeUNICODE                             @23 | 
|---|
| 147 | TTF_RenderText_Solid                        @24 | 
|---|
| 148 | TTF_RenderUTF8_Solid                        @25 | 
|---|
| 149 | TTF_RenderUNICODE_Solid                     @26 | 
|---|
| 150 | TTF_RenderGlyph_Solid                       @27 | 
|---|
| 151 | TTF_RenderText_Shaded                       @28 | 
|---|
| 152 | TTF_RenderUTF8_Shaded                       @29 | 
|---|
| 153 | TTF_RenderUNICODE_Shaded                    @30 | 
|---|
| 154 | TTF_RenderGlyph_Shaded                      @31 | 
|---|
| 155 | TTF_RenderText_Blended                      @32 | 
|---|
| 156 | TTF_RenderUTF8_Blended                      @33 | 
|---|
| 157 | TTF_RenderUNICODE_Blended                   @34 | 
|---|
| 158 | TTF_RenderGlyph_Blended                     @35 | 
|---|
| 159 | TTF_SetFontStyle                            @36 | 
|---|
| 160 | TTF_GetFontStyle                            @37 | 
|---|
| 161 | TTF_SetFontOutline                          @38 | 
|---|
| 162 | TTF_GetFontOutline                          @39 | 
|---|
| 163 | TTF_SetFontHinting                          @40 | 
|---|
| 164 | TTF_GetFontHinting                          @41 | 
|---|
| 165 | TTF_Quit                                    @42 | 
|---|
| 166 | TTF_WasInit                                 @43 | 
|---|
| 167 | EOF | 
|---|
| 168 | echo "">%{buildroot}%{_libdir}/dummy.c | 
|---|
| 169 | gcc -Zomf -o %{buildroot}%{_libdir}/dummy.o -c %{buildroot}%{_libdir}/dummy.c | 
|---|
| 170 | gcc -Zomf -Zdll -o %{buildroot}%{_libdir}/SDLttf.dll \ | 
|---|
| 171 | %{buildroot}%{_libdir}/sdlttf.def %{buildroot}%{_libdir}/dummy.o | 
|---|
| 172 | rm -rf %{buildroot}%{_libdir}/dummy.* %{buildroot}%{_libdir}/sdlttf.def | 
|---|
| 173 |  | 
|---|
| 174 | %clean | 
|---|
| 175 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 176 |  | 
|---|
| 177 | %files | 
|---|
| 178 | %defattr(-,root,root) | 
|---|
| 179 | %doc README CHANGES COPYING | 
|---|
| 180 | %{_libdir}/SDL*.dll | 
|---|
| 181 |  | 
|---|
| 182 | %files devel | 
|---|
| 183 | %defattr(-,root,root) | 
|---|
| 184 | %{_libdir}/SDL*.a | 
|---|
| 185 | %exclude %{_libdir}/lib*.la* | 
|---|
| 186 | %{_libdir}/SDL*.lib | 
|---|
| 187 | %{_libdir}/pkgconfig/*.pc | 
|---|
| 188 | %{_includedir}/SDL/ | 
|---|
| 189 |  | 
|---|
| 190 | %changelog | 
|---|
| 191 | * Thu Apr 14 2016 Valery V.Sedletski <_valerius@mail.ru> - 2.0.11-2 | 
|---|
| 192 | - Made the .spec in accordance with Fedora version, renamed to SDL_ttf | 
|---|
| 193 |  | 
|---|
| 194 | * Tue Mar 15 2016 Valery V.Sedletski <_valerius@mail.ru> - 2.0.11-1 | 
|---|
| 195 | - Initial OS/2 packaging | 
|---|
| 196 |  | 
|---|