libgdiplus/libgdiplus.spec

Sun, 11 Jan 2009 00:48:38 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 11 Jan 2009 00:48:38 +0100
changeset 67
ce0d31e18b66
child 85
e6a1cd7ed6ba
permissions
-rw-r--r--

Import new package spec for introduction into repository.

     1 ##
     2 ##  libgdiplus.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         libgdiplus
    26 Summary:      Unix GDI+ Development API
    27 URL:          http://www.mono-project.com/Libgdiplus
    28 Packager:     Michael Schloh von Bennewitz
    29 Distribution: Europalab Production
    30 Class:        EVAL
    31 Group:        XWindow
    32 License:      MIT X11
    33 Version:      2.0
    34 Release:      20090106
    36 #   build options
    37 %option       with_shared  no
    39 #   list of sources
    40 Source0:      ftp://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-%{version}.tar.bz2
    42 #   build information
    43 Prefix:       %{l_prefix}
    44 BuildRoot:    %{l_buildroot}
    45 BuildPreReq:  OpenPKG, openpkg >= 20040130, zlib, glib2, X11, xrender
    46 BuildPreReq:  cairo, fontconfig, freetype, giflib, jpeg, png, tiff
    47 PreReq:       OpenPKG, openpkg >= 20040130, zlib, glib2, X11, xrender
    48 PreReq:       cairo, fontconfig, freetype, giflib, jpeg, png, tiff
    49 AutoReq:      no
    50 AutoReqProv:  no
    51 Conflicts:    pnet
    53 %description
    54     The Graphics Device Interface Plus (GDI+) development API exposes
    55     abstract graphics and formatted text logic. The calling process
    56     may write to those devices for which the GDI+ has a device driver,
    57     such as a video display or printer.
    59 %track
    60     prog libgdiplus = {
    61         version   = %{version}
    62         url       = ftp://ftp.novell.com/pub/mono/sources/libgdiplus/
    63         regex     = libgdiplus-(\d+\.\d+)\.tar\.bz2
    64     }
    66 %prep
    67     #   unpack sources
    68     %setup -q
    70     #   remove subdirectory builds to assure internal library usage
    71     rm -rf cairo
    73     #   correct flaws in the build configuration
    74     %{l_shtool} subst \
    75         -e 's;\(libexif_pkgconfig=\)\("No\.[^"]*"\);\1no \&\& echo \2;g' \
    76         configure
    77     %{l_shtool} subst \
    78         -e 's;^\(SUBDIRS\) *= *@CAIRO_DIR@ src tests;\1=src tests;' \
    79         Makefile.in
    81 %build
    82     #   detect X11 paths
    83     x11_incdir=`%{l_rc} --query x11_incdir`
    84     x11_libdir=`%{l_rc} --query x11_libdir`
    86 %if "%{with_shared}" == "yes"
    87     #   configure shared library
    88     CC="%{l_cc}" \
    89     CFLAGS="%{l_cflags -O}" \
    90     CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \
    91     LDFLAGS="%{l_ldflags}" \
    92     ./configure \
    93         --prefix=%{l_prefix} \
    94         --with-cairo=installed \
    95         --without-libexif \
    96         --disable-static \
    97         --enable-shared \
    98         --with-gnu-ld
   100     #   build shared library
   101     %{l_make} %{l_mflags -O}
   103     #   install early, as we delete to build again
   104     %{l_shtool} mkdir -f -p -m 755 gdidyn
   105     mv src/.libs/libgdiplus* gdidyn/
   107     #   reset build configuration
   108     %{l_make} %{l_mflags} distclean
   109 %endif
   111     #   configure static library
   112     CC="%{l_cc}" \
   113     CFLAGS="%{l_cflags -O}" \
   114     CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \
   115     LDFLAGS="%{l_ldflags}" \
   116     ./configure \
   117         --prefix=%{l_prefix} \
   118         --with-cairo=installed \
   119         --without-libexif \
   120         --enable-static \
   121         --disable-shared \
   122         --with-gnu-ld
   124     #   build static library
   125     %{l_make} %{l_mflags -O}
   127 %install
   128     #   install static library
   129     rm -rf $RPM_BUILD_ROOT
   130     %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
   132 %if "%{with_shared}" == "yes"
   133     #   install shared library
   134     %{l_tar} cf - gdidyn | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib
   135 %endif
   137     #   determine installation files
   138     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   139         %{l_files_std} \
   140         '%not %dir %{l_prefix}/lib/pkgconfig'
   142 %files -f files
   144 %clean
   145     rm -rf $RPM_BUILD_ROOT

mercurial