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