Import package vendor original specs for necessary manipulations.

Fri, 09 Jan 2009 01:40:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 09 Jan 2009 01:40:36 +0100
changeset 54
f012bbb2a542
parent 53
11a94c8e617e
child 55
35f87223d24d

Import package vendor original specs for necessary manipulations.

netpbm/netpbm.patch file | annotate | diff | comparison | revisions
netpbm/netpbm.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netpbm/netpbm.patch	Fri Jan 09 01:40:36 2009 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +Index: converter/other/jpeg2000/jpeg2ktopam.c
     1.5 +--- converter/other/jpeg2000/jpeg2ktopam.c.orig	2005-05-19 17:29:47 +0200
     1.6 ++++ converter/other/jpeg2000/jpeg2ktopam.c	2006-10-24 08:07:49 +0200
     1.7 +@@ -9,7 +9,6 @@
     1.8 + *****************************************************************************/
     1.9 + 
    1.10 + #define _BSD_SOURCE 1      /* Make sure strdup() is in string.h */
    1.11 +-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
    1.12 + #include <string.h>
    1.13 + 
    1.14 + #include "pam.h"
    1.15 +Index: converter/other/jpeg2000/pamtojpeg2k.c
    1.16 +--- converter/other/jpeg2000/pamtojpeg2k.c.orig	2005-02-21 04:56:41 +0100
    1.17 ++++ converter/other/jpeg2000/pamtojpeg2k.c	2006-10-24 08:07:49 +0200
    1.18 +@@ -9,7 +9,6 @@
    1.19 + *****************************************************************************/
    1.20 + 
    1.21 + #define _BSD_SOURCE 1    /* Make sure strdup() is in string.h */
    1.22 +-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
    1.23 + #include <string.h>
    1.24 + 
    1.25 + #include "pam.h"
    1.26 +Index: lib/libpm.c
    1.27 +--- lib/libpm.c.orig	2004-11-20 17:55:27 +0100
    1.28 ++++ lib/libpm.c	2006-10-24 08:07:49 +0200
    1.29 +@@ -617,7 +617,7 @@
    1.30 + pm_openr(const char * const name) {
    1.31 +     FILE* f;
    1.32 + 
    1.33 +-    if (strcmp(name, "-") == 0)
    1.34 ++    if (name == NULL || strcmp(name, "-") == 0)
    1.35 +         f = stdin;
    1.36 +     else {
    1.37 + #ifndef VMS
    1.38 +@@ -639,7 +639,7 @@
    1.39 + pm_openw(const char * const name) {
    1.40 +     FILE* f;
    1.41 + 
    1.42 +-    if (strcmp(name, "-") == 0)
    1.43 ++    if (name == NULL || strcmp(name, "-") == 0)
    1.44 +         f = stdout;
    1.45 +     else {
    1.46 + #ifndef VMS
    1.47 +Index: lib/pm_gamma.h
    1.48 +--- lib/pm_gamma.h.orig	2004-06-13 00:53:25 +0200
    1.49 ++++ lib/pm_gamma.h	2006-10-24 08:18:26 +0200
    1.50 +@@ -5,7 +5,7 @@
    1.51 + 
    1.52 + #include <math.h>
    1.53 + 
    1.54 +-static __inline__ float
    1.55 ++static float
    1.56 + pm_gamma709(float const intensity) {
    1.57 + 
    1.58 +     /* Here are parameters of the gamma transfer function
    1.59 +@@ -34,7 +34,7 @@
    1.60 + 
    1.61 + 
    1.62 + 
    1.63 +-static __inline__ float
    1.64 ++static float
    1.65 + pm_ungamma709(float const brightness) {
    1.66 + 
    1.67 +     /* These are the same parameters as in pm_gamma, above */
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/netpbm/netpbm.spec	Fri Jan 09 01:40:36 2009 +0100
     2.3 @@ -0,0 +1,131 @@
     2.4 +##
     2.5 +##  netpbm.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package information
    2.28 +Name:         netpbm
    2.29 +Summary:      Graphic Image Conversion Tool
    2.30 +URL:          http://netpbm.sourceforge.net/
    2.31 +Vendor:       Bryan Henderson et al.
    2.32 +Packager:     OpenPKG Foundation e.V.
    2.33 +Distribution: OpenPKG Community
    2.34 +Class:        BASE
    2.35 +Group:        Graphics
    2.36 +License:      MIT-style
    2.37 +Version:      10.26.56
    2.38 +Release:      20080814
    2.39 +
    2.40 +#   list of sources
    2.41 +Source0:      http://switch.dl.sourceforge.net/sourceforge/netpbm/netpbm-%{version}.tgz
    2.42 +Patch0:       netpbm.patch
    2.43 +
    2.44 +#   build information
    2.45 +Prefix:       %{l_prefix}
    2.46 +BuildRoot:    %{l_buildroot}
    2.47 +BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, make, gcc, flex, m4
    2.48 +PreReq:       OpenPKG, openpkg >= 20040130, perl
    2.49 +BuildPreReq:  tiff, jasper, jpeg, png, zlib
    2.50 +PreReq:       tiff, jasper, jpeg, png, zlib
    2.51 +AutoReq:      no
    2.52 +AutoReqProv:  no
    2.53 +
    2.54 +%description
    2.55 +    NetPBM is whole bunch of utilities for primitive manipulation of
    2.56 +    graphic images. Wide array of converters from one graphics format
    2.57 +    to another. E.g. from g3 fax format to jpeg. Many basic graphics
    2.58 +    editing tools such as magnifying and cropping.
    2.59 +
    2.60 +%track
    2.61 +    prog netpbm = {
    2.62 +        version   = %{version}
    2.63 +        url       = http://prdownloads.sourceforge.net/netpbm/
    2.64 +        regex     = netpbm-(\d+\.\d+\.\d+)\.tgz
    2.65 +    }
    2.66 +
    2.67 +%prep
    2.68 +    %setup -q
    2.69 +    %patch -p0
    2.70 +
    2.71 +%build
    2.72 +    ( cat Makefile.config.in
    2.73 +      echo ""
    2.74 +      echo "DEFAULT_TARGET = nonmerge"
    2.75 +      echo "NETPBMLIBTYPE=unixstatic"
    2.76 +      echo "NETPBMLIBSUFFIX=a"
    2.77 +      echo "STATICLIB_TOO=n"
    2.78 +      echo "CC = %{l_cc}"
    2.79 +      echo "CFLAGS = %{l_cflags -O}"
    2.80 +      echo "LDFLAGS = %{l_ldflags}"
    2.81 +      echo "TIFFHDR_DIR = %{l_prefix}/include/tiff"
    2.82 +      echo "TIFFLIB = libtiff.a"
    2.83 +      echo "TIFFLIB_LDFLAGS = -lz"
    2.84 +      echo "JASPERHDR_DIR = %{l_prefix}/include"
    2.85 +      echo "JASPERLIB = libjasper.a libjpeg.a"
    2.86 +      echo "JPEGHDR_DIR = %{l_prefix}/include"
    2.87 +      echo "JPEGLIB = libjpeg.a"
    2.88 +      echo "PNGHDR_DIR = %{l_prefix}/include"
    2.89 +      echo "PNGLIB = libpng.a"
    2.90 +      echo "ZHDR_DIR = %{l_prefix}/include"
    2.91 +      echo "ZLIB = libz.a"
    2.92 +      case "%{l_platform -t}" in
    2.93 +          *-sunos* ) echo "NETWORKLD = -lsocket -lnsl" ;;
    2.94 +      esac
    2.95 +    ) >Makefile.config
    2.96 +    %{l_make} %{l_mflags} -f GNUmakefile
    2.97 +
    2.98 +%install
    2.99 +    rm -rf $RPM_BUILD_ROOT
   2.100 +    %{l_shtool} subst \
   2.101 +        -e 's;\[ -d $(PKGDIR) \];false;' \
   2.102 +        -e 's;mkdir;true;' \
   2.103 +        GNUmakefile
   2.104 +    %{l_shtool} mkdir -f -p -m 755 \
   2.105 +        $RPM_BUILD_ROOT%{l_prefix} \
   2.106 +        $RPM_BUILD_ROOT%{l_prefix}/share/netpbm \
   2.107 +        $RPM_BUILD_ROOT%{l_prefix}/include/netpbm
   2.108 +    %{l_make} %{l_mflags} -f GNUmakefile package pkgdir=$RPM_BUILD_ROOT%{l_prefix}
   2.109 +    %{l_shtool} subst \
   2.110 +        -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
   2.111 +        $RPM_BUILD_ROOT%{l_prefix}/bin/manweb \
   2.112 +        $RPM_BUILD_ROOT%{l_prefix}/bin/pnmquant \
   2.113 +        $RPM_BUILD_ROOT%{l_prefix}/bin/ppmfade \
   2.114 +        $RPM_BUILD_ROOT%{l_prefix}/bin/ppmrainbow \
   2.115 +        $RPM_BUILD_ROOT%{l_prefix}/bin/ppmshadow
   2.116 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.117 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/doc.url
   2.118 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/pkginfo
   2.119 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/README
   2.120 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/web
   2.121 +    mv $RPM_BUILD_ROOT%{l_prefix}/include/*.h \
   2.122 +       $RPM_BUILD_ROOT%{l_prefix}/include/netpbm/
   2.123 +    mv $RPM_BUILD_ROOT%{l_prefix}/misc/* \
   2.124 +       $RPM_BUILD_ROOT%{l_prefix}/share/netpbm/
   2.125 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/misc
   2.126 +    mv $RPM_BUILD_ROOT%{l_prefix}/link \
   2.127 +       $RPM_BUILD_ROOT%{l_prefix}/lib
   2.128 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.129 +
   2.130 +%files -f files
   2.131 +
   2.132 +%clean
   2.133 +    rm -rf $RPM_BUILD_ROOT
   2.134 +

mercurial