%define svn_url http://svn.netlabs.org/repos/ports/sdl_image/trunk %define svn_rev 1433 %define prefix %{_prefix} %define version 2.0.25 %define release 1 %define _unpackaged_files_terminate_build 0 Summary: SDL graphics drawing primitives and other support functions Name: sdl_gfx Version: %{version} Release: %{release}%{?dist} License: ZLIB Group: System Environment/Libraries Prefix: %{prefix} #Source: http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.25.tar.gz Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip #Patch0: %{name}-os2.patch Packager: Danny Sung Vendor: Andreas Schiffler BuildRoot: /tmp/%{name}-root-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: sdl-devel %description The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing routines such as lines, circles or polygons and SDL_rotozoom which implemented a interpolating rotozoomer for SDL surfaces. The current components of the SDL_gfx library are: * Graphic Primitives (SDL_gfxPrimitves.h) * Rotozoomer (SDL_rotozoom.h) * Framerate control (SDL_framerate.h) * MMX image filters (SDL_imageFilter.h) * Custom blit functions (SDL_gfxBlitFunc.h) The library is is written in plain C and can be used in C++ code. %package devel Summary: Libraries and includes to develop SDL_gfx programs Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: sdl-devel %description devel The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing routines such as lines, circles or polygons and SDL_rotozoom which implemented a interpolating rotozoomer for SDL surfaces. The current components of the SDL_gfx library are: * Graphic Primitives (SDL_gfxPrimitves.h) * Rotozoomer (SDL_rotozoom.h) * Framerate control (SDL_framerate.h) * MMX image filters (SDL_imageFilter.h) * Custom blit functions (SDL_gfxBlitFunc.h) The library is is written in plain C and can be used in C++ code. %package demos Summary: SDL_gfx demo and test programs Group: Applications/Multimedia Requires: %{name} = %{version} %description demos SDL_gfx demo applications and source code. %debug_package %prep %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} %setup -q %else %setup -q -n "%{name}-%{version}" -Tc svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") %endif #%patch0 -p1 autoreconf -fi %build CFLAGS="-g -DBUILD_SDL" LDFLAGS="-g -Zhigh-mem" ./configure --prefix=%{_prefix} --disable-static %{__make} %{?_smp_mflags} cd Test autoreconf -fi CFLAGS="-I." LDFLAGS="-L../.libs" ./configure --prefix=%{_prefix} mkdir SDL cd SDL ln -sf ../../SDL_framerate.h ln -sf ../../SDL_gfxBlitFunc.h ln -sf ../../SDL_gfxPrimitives_font.h ln -sf ../../SDL_gfxPrimitives.h ln -sf ../../SDL_imageFilter.h ln -sf ../../SDL_rotozoom.h cd .. %{__make} %{?_smp_mflags} cd .. %install %makeinstall install -m755 -d $RPM_BUILD_ROOT%{_datadir}/SDL_gfx-demos rm -rf Test/m4 Test/SDL Test/autom4te.cache Test/.libs rm -rf Test/*.o Test/config.log Test/config.* Test/configure Test/configure.lineno cp Test/* $RPM_BUILD_ROOT%{_datadir}/SDL_gfx-demos # create import libs emximp -o %{buildroot}%{_libdir}/SDL_gfx_dll.lib %{buildroot}%{_libdir}/SDL_gf15.dll emximp -o %{buildroot}%{_libdir}/SDL_gfx15_dll.lib %{buildroot}%{_libdir}/SDL_gf15.dll # create forwarder cat << EOF >%{buildroot}%{_libdir}/sdlgfx.def LIBRARY SDLgfx DESCRIPTION '@#libsdl org:1.2.15#@##1## 2016-03-16 dtp::::::@@SDL_gfx (alternative port) forwarder' IMPORTS SDL_initFramerate=SDL_gf15.SDL_initFramerate SDL_setFramerate=SDL_gf15.SDL_setFramerate SDL_getFramerate=SDL_gf15.SDL_getFramerate SDL_framerateDelay=SDL_gf15.SDL_framerateDelay pixelColor=SDL_gf15.pixelColor pixelRGBA=SDL_gf15.pixelRGBA hlineColor=SDL_gf15.hlineColor hlineRGBA=SDL_gf15.hlineRGBA vlineColor=SDL_gf15.vlineColor vlineRGBA=SDL_gf15.vlineRGBA rectangleColor=SDL_gf15.rectangleColor rectangleRGBA=SDL_gf15.rectangleRGBA boxColor=SDL_gf15.boxColor boxRGBA=SDL_gf15.boxRGBA lineColor=SDL_gf15.lineColor lineRGBA=SDL_gf15.lineRGBA aalineColor=SDL_gf15.aalineColor aalineRGBA=SDL_gf15.aalineRGBA circleColor=SDL_gf15.circleColor circleRGBA=SDL_gf15.circleRGBA aacircleColor=SDL_gf15.aacircleColor aacircleRGBA=SDL_gf15.aacircleRGBA filledCircleColor=SDL_gf15.filledCircleColor filledCircleRGBA=SDL_gf15.filledCircleRGBA ellipseColor=SDL_gf15.ellipseColor ellipseRGBA=SDL_gf15.ellipseRGBA aaellipseColor=SDL_gf15.aaellipseColor aaellipseRGBA=SDL_gf15.aaellipseRGBA filledEllipseColor=SDL_gf15.filledEllipseColor filledEllipseRGBA=SDL_gf15.filledEllipseRGBA pieColor=SDL_gf15.pieColor pieRGBA=SDL_gf15.pieRGBA filledPieColor=SDL_gf15.filledPieColor filledPieRGBA=SDL_gf15.filledPieRGBA trigonColor=SDL_gf15.trigonColor trigonRGBA=SDL_gf15.trigonRGBA aatrigonColor=SDL_gf15.aatrigonColor aatrigonRGBA=SDL_gf15.aatrigonRGBA filledTrigonColor=SDL_gf15.filledTrigonColor filledTrigonRGBA=SDL_gf15.filledTrigonRGBA polygonColor=SDL_gf15.polygonColor polygonRGBA=SDL_gf15.polygonRGBA aapolygonColor=SDL_gf15.aapolygonColor aapolygonRGBA=SDL_gf15.aapolygonRGBA filledPolygonColor=SDL_gf15.filledPolygonColor filledPolygonRGBA=SDL_gf15.filledPolygonRGBA gfxPrimitivesSetFont=SDL_gf15.gfxPrimitivesSetFont characterColor=SDL_gf15.characterColor characterRGBA=SDL_gf15.characterRGBA stringColor=SDL_gf15.stringColor stringRGBA=SDL_gf15.stringRGBA bezierColor=SDL_gf15.bezierColor bezierRGBA=SDL_gf15.bezierRGBA SDL_imageFilterMMXdetect=SDL_gf15.SDL_imageFilterMMXdetect SDL_imageFilterMMXoff=SDL_gf15.SDL_imageFilterMMXoff SDL_imageFilterMMXon=SDL_gf15.SDL_imageFilterMMXon SDL_imageFilterAdd=SDL_gf15.SDL_imageFilterAdd SDL_imageFilterMean=SDL_gf15.SDL_imageFilterMean SDL_imageFilterSub=SDL_gf15.SDL_imageFilterSub SDL_imageFilterAbsDiff=SDL_gf15.SDL_imageFilterAbsDiff SDL_imageFilterMult=SDL_gf15.SDL_imageFilterMult SDL_imageFilterMultNor=SDL_gf15.SDL_imageFilterMultNor SDL_imageFilterMultDivby2=SDL_gf15.SDL_imageFilterMultDivby2 SDL_imageFilterMultDivby4=SDL_gf15.SDL_imageFilterMultDivby4 SDL_imageFilterBitAnd=SDL_gf15.SDL_imageFilterBitAnd SDL_imageFilterBitOr=SDL_gf15.SDL_imageFilterBitOr SDL_imageFilterDiv=SDL_gf15.SDL_imageFilterDiv SDL_imageFilterBitNegation=SDL_gf15.SDL_imageFilterBitNegation SDL_imageFilterAddByte=SDL_gf15.SDL_imageFilterAddByte SDL_imageFilterAddUint=SDL_gf15.SDL_imageFilterAddUint SDL_imageFilterAddByteToHalf=SDL_gf15.SDL_imageFilterAddByteToHalf SDL_imageFilterSubByte=SDL_gf15.SDL_imageFilterSubByte SDL_imageFilterSubUint=SDL_gf15.SDL_imageFilterSubUint SDL_imageFilterShiftRight=SDL_gf15.SDL_imageFilterShiftRight SDL_imageFilterShiftRightUint=SDL_gf15.SDL_imageFilterShiftRightUint SDL_imageFilterMultByByte=SDL_gf15.SDL_imageFilterMultByByte SDL_imageFilterShiftRightAndMultByByte=SDL_gf15.SDL_imageFilterShiftRightAndMultByByte SDL_imageFilterShiftLeftByte=SDL_gf15.SDL_imageFilterShiftLeftByte SDL_imageFilterShiftLeftUint=SDL_gf15.SDL_imageFilterShiftLeftUint SDL_imageFilterShiftLeft=SDL_gf15.SDL_imageFilterShiftLeft SDL_imageFilterBinarizeUsingThreshold=SDL_gf15.SDL_imageFilterBinarizeUsingThreshold SDL_imageFilterClipToRange=SDL_gf15.SDL_imageFilterClipToRange SDL_imageFilterNormalizeLinear=SDL_gf15.SDL_imageFilterNormalizeLinear SDL_imageFilterConvolveKernel3x3Divide=SDL_gf15.SDL_imageFilterConvolveKernel3x3Divide SDL_imageFilterConvolveKernel5x5Divide=SDL_gf15.SDL_imageFilterConvolveKernel5x5Divide SDL_imageFilterConvolveKernel7x7Divide=SDL_gf15.SDL_imageFilterConvolveKernel7x7Divide SDL_imageFilterConvolveKernel9x9Divide=SDL_gf15.SDL_imageFilterConvolveKernel9x9Divide SDL_imageFilterConvolveKernel3x3ShiftRight=SDL_gf15.SDL_imageFilterConvolveKernel3x3ShiftRight SDL_imageFilterConvolveKernel5x5ShiftRight=SDL_gf15.SDL_imageFilterConvolveKernel5x5ShiftRight SDL_imageFilterConvolveKernel7x7ShiftRight=SDL_gf15.SDL_imageFilterConvolveKernel7x7ShiftRight SDL_imageFilterConvolveKernel9x9ShiftRight=SDL_gf15.SDL_imageFilterConvolveKernel9x9ShiftRight SDL_imageFilterSobelX=SDL_gf15.SDL_imageFilterSobelX SDL_imageFilterSobelXShiftRight=SDL_gf15.SDL_imageFilterSobelXShiftRight SDL_imageFilterAlignStack=SDL_gf15.SDL_imageFilterAlignStack SDL_imageFilterRestoreStack=SDL_gf15.SDL_imageFilterRestoreStack rotozoomSurfaceSizeXY=SDL_gf15.rotozoomSurfaceSizeXY rotozoomSurfaceSize=SDL_gf15.rotozoomSurfaceSize rotozoomSurface=SDL_gf15.rotozoomSurface rotozoomSurfaceXY=SDL_gf15.rotozoomSurfaceXY zoomSurfaceSize=SDL_gf15.zoomSurfaceSize zoomSurface=SDL_gf15.zoomSurface EXPORTS SDL_initFramerate @1 SDL_setFramerate @2 SDL_getFramerate @3 SDL_framerateDelay @4 pixelColor @5 pixelRGBA @6 hlineColor @7 hlineRGBA @8 vlineColor @9 vlineRGBA @10 rectangleColor @11 rectangleRGBA @12 boxColor @13 boxRGBA @14 lineColor @15 lineRGBA @16 aalineColor @17 aalineRGBA @18 circleColor @19 circleRGBA @20 aacircleColor @21 aacircleRGBA @22 filledCircleColor @23 filledCircleRGBA @24 ellipseColor @25 ellipseRGBA @26 aaellipseColor @27 aaellipseRGBA @28 filledEllipseColor @29 filledEllipseRGBA @30 pieColor @31 pieRGBA @32 filledPieColor @33 filledPieRGBA @34 trigonColor @35 trigonRGBA @36 aatrigonColor @37 aatrigonRGBA @38 filledTrigonColor @39 filledTrigonRGBA @40 polygonColor @41 polygonRGBA @42 aapolygonColor @43 aapolygonRGBA @44 filledPolygonColor @45 filledPolygonRGBA @46 gfxPrimitivesSetFont @47 characterColor @48 characterRGBA @49 stringColor @50 stringRGBA @51 bezierColor @52 bezierRGBA @53 SDL_imageFilterMMXdetect @54 SDL_imageFilterMMXoff @55 SDL_imageFilterMMXon @56 SDL_imageFilterAdd @57 SDL_imageFilterMean @58 SDL_imageFilterSub @59 SDL_imageFilterAbsDiff @60 SDL_imageFilterMult @61 SDL_imageFilterMultNor @62 SDL_imageFilterMultDivby2 @63 SDL_imageFilterMultDivby4 @64 SDL_imageFilterBitAnd @65 SDL_imageFilterBitOr @66 SDL_imageFilterDiv @67 SDL_imageFilterBitNegation @68 SDL_imageFilterAddByte @69 SDL_imageFilterAddUint @70 SDL_imageFilterAddByteToHalf @71 SDL_imageFilterSubByte @72 SDL_imageFilterSubUint @73 SDL_imageFilterShiftRight @74 SDL_imageFilterShiftRightUint @75 SDL_imageFilterMultByByte @76 SDL_imageFilterShiftRightAndMultByByte @77 SDL_imageFilterShiftLeftByte @78 SDL_imageFilterShiftLeftUint @79 SDL_imageFilterShiftLeft @80 SDL_imageFilterBinarizeUsingThreshold @81 SDL_imageFilterClipToRange @82 SDL_imageFilterNormalizeLinear @83 SDL_imageFilterConvolveKernel3x3Divide @84 SDL_imageFilterConvolveKernel5x5Divide @85 SDL_imageFilterConvolveKernel7x7Divide @86 SDL_imageFilterConvolveKernel9x9Divide @87 SDL_imageFilterConvolveKernel3x3ShiftRight @88 SDL_imageFilterConvolveKernel5x5ShiftRight @89 SDL_imageFilterConvolveKernel7x7ShiftRight @90 SDL_imageFilterConvolveKernel9x9ShiftRight @91 SDL_imageFilterSobelX @92 SDL_imageFilterSobelXShiftRight @93 SDL_imageFilterAlignStack @94 SDL_imageFilterRestoreStack @95 rotozoomSurfaceSizeXY @96 rotozoomSurfaceSize @97 rotozoomSurface @98 rotozoomSurfaceXY @99 zoomSurfaceSize @100 zoomSurface @101 EOF echo "">%{buildroot}%{_libdir}/dummy.c gcc -Zomf -o %{buildroot}%{_libdir}/dummy.o -c %{buildroot}%{_libdir}/dummy.c gcc -Zomf -Zdll -o %{buildroot}%{_libdir}/SDLgfx.dll \ %{buildroot}%{_libdir}/sdlgfx.def %{buildroot}%{_libdir}/dummy.o rm -rf %{buildroot}%{_libdir}/dummy.* %{buildroot}%{_libdir}/sdlgfx.def %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/SDL*.dll %files devel %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README %doc Docs/ %{_libdir}/SDL*.a %exclude %{_libdir}/libSDL_gfx.la* %{_libdir}/SDL*.lib %{_libdir}/pkgconfig/SDL_gfx.pc %{_includedir}/SDL/SDL_framerate.h %{_includedir}/SDL/SDL_gfxPrimitives_font.h %{_includedir}/SDL/SDL_gfxPrimitives.h %{_includedir}/SDL/SDL_imageFilter.h %{_includedir}/SDL/SDL_rotozoom.h %{_includedir}/SDL/SDL_gfxBlitFunc.h %files demos %defattr(-,root,root) %{_datadir}/SDL_gfx-demos %changelog * Wed Mar 16 2016 Valery V.Sedletski <_valerius@mail.ru> - 2.0.25-1 - Initial OS/2 packaging