michael@67: ## michael@67: ## libgdiplus.spec -- OpenPKG RPM Package Specification michael@67: ## Copyright (c) 2009 Michael Schloh von Bennewitz michael@67: ## michael@67: ## Permission to use, copy, modify, and distribute this software for michael@67: ## any purpose with or without fee is hereby granted, provided that michael@67: ## the above copyright notice and this permission notice appear in all michael@67: ## copies. michael@67: ## michael@67: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@67: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@67: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@67: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@67: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@67: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@67: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@67: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@67: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@67: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@67: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@67: ## SUCH DAMAGE. michael@67: ## michael@67: michael@67: # package information michael@67: Name: libgdiplus michael@67: Summary: Unix GDI+ Development API michael@67: URL: http://www.mono-project.com/Libgdiplus michael@67: Packager: Michael Schloh von Bennewitz michael@67: Distribution: Europalab Production michael@67: Class: EVAL michael@67: Group: XWindow michael@67: License: MIT X11 michael@67: Version: 2.0 michael@67: Release: 20090106 michael@67: michael@67: # build options michael@67: %option with_shared no michael@67: michael@67: # list of sources michael@67: Source0: ftp://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-%{version}.tar.bz2 michael@67: michael@67: # build information michael@67: Prefix: %{l_prefix} michael@67: BuildRoot: %{l_buildroot} michael@85: BuildPreReq: OpenPKG, openpkg >= 20040130, make michael@85: PreReq: OpenPKG, openpkg >= 20040130 michael@85: BuildPreReq: zlib, glib2, X11, xrender, cairo michael@85: PreReq: zlib, glib2, X11, xrender, cairo michael@85: BuildPreReq: fontconfig, freetype, giflib, jpeg, png, tiff michael@85: PreReq: fontconfig, freetype, giflib, jpeg, png, tiff michael@67: AutoReq: no michael@67: AutoReqProv: no michael@67: Conflicts: pnet michael@67: michael@67: %description michael@67: The Graphics Device Interface Plus (GDI+) development API exposes michael@67: abstract graphics and formatted text logic. The calling process michael@67: may write to those devices for which the GDI+ has a device driver, michael@67: such as a video display or printer. michael@67: michael@67: %track michael@67: prog libgdiplus = { michael@67: version = %{version} michael@67: url = ftp://ftp.novell.com/pub/mono/sources/libgdiplus/ michael@67: regex = libgdiplus-(\d+\.\d+)\.tar\.bz2 michael@67: } michael@67: michael@67: %prep michael@67: # unpack sources michael@67: %setup -q michael@67: michael@67: # remove subdirectory builds to assure internal library usage michael@67: rm -rf cairo michael@67: michael@67: # correct flaws in the build configuration michael@67: %{l_shtool} subst \ michael@67: -e 's;\(libexif_pkgconfig=\)\("No\.[^"]*"\);\1no \&\& echo \2;g' \ michael@67: configure michael@67: %{l_shtool} subst \ michael@67: -e 's;^\(SUBDIRS\) *= *@CAIRO_DIR@ src tests;\1=src tests;' \ michael@67: Makefile.in michael@67: michael@67: %build michael@67: # detect X11 paths michael@67: x11_incdir=`%{l_rc} --query x11_incdir` michael@67: x11_libdir=`%{l_rc} --query x11_libdir` michael@67: michael@67: %if "%{with_shared}" == "yes" michael@67: # configure shared library michael@67: CC="%{l_cc}" \ michael@67: CFLAGS="%{l_cflags -O}" \ michael@67: CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \ michael@67: LDFLAGS="%{l_ldflags}" \ michael@67: ./configure \ michael@67: --prefix=%{l_prefix} \ michael@67: --with-cairo=installed \ michael@67: --without-libexif \ michael@67: --disable-static \ michael@67: --enable-shared \ michael@67: --with-gnu-ld michael@67: michael@67: # build shared library michael@67: %{l_make} %{l_mflags -O} michael@67: michael@67: # install early, as we delete to build again michael@67: %{l_shtool} mkdir -f -p -m 755 gdidyn michael@67: mv src/.libs/libgdiplus* gdidyn/ michael@67: michael@67: # reset build configuration michael@67: %{l_make} %{l_mflags} distclean michael@67: %endif michael@67: michael@67: # configure static library michael@67: CC="%{l_cc}" \ michael@67: CFLAGS="%{l_cflags -O}" \ michael@67: CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \ michael@67: LDFLAGS="%{l_ldflags}" \ michael@67: ./configure \ michael@67: --prefix=%{l_prefix} \ michael@67: --with-cairo=installed \ michael@67: --without-libexif \ michael@67: --enable-static \ michael@67: --disable-shared \ michael@67: --with-gnu-ld michael@67: michael@67: # build static library michael@67: %{l_make} %{l_mflags -O} michael@67: michael@67: %install michael@67: # install static library michael@67: rm -rf $RPM_BUILD_ROOT michael@67: %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" michael@67: michael@67: %if "%{with_shared}" == "yes" michael@67: # install shared library michael@67: %{l_tar} cf - gdidyn | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib michael@67: %endif michael@67: michael@67: # determine installation files michael@67: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@67: %{l_files_std} \ michael@67: '%not %dir %{l_prefix}/lib/pkgconfig' michael@67: michael@67: %files -f files michael@67: michael@67: %clean michael@67: rm -rf $RPM_BUILD_ROOT michael@67: