1 |
< |
### RPM external graphviz 1.9-CMS3 |
2 |
< |
Source: http://service-spi.web.cern.ch/service-spi/external/tarFiles/%{n}-%{realversion}.tar.gz |
1 |
> |
### RPM external graphviz 2.16.1-CMS19 |
2 |
> |
Source: http://www.graphviz.org/pub/%{n}/ARCHIVE/%{n}-%{realversion}.tar.gz |
3 |
|
Requires: expat zlib libjpg libpng |
4 |
– |
Patch0: graphviz |
4 |
|
|
5 |
|
%prep |
6 |
|
%setup -n %{n}-%{realversion} |
8 |
– |
%patch0 -p1 |
7 |
|
|
8 |
|
%build |
9 |
+ |
which gcc |
10 |
+ |
LIB64_SUFFIX= |
11 |
+ |
case %cmsplatf in |
12 |
+ |
*_ia32_* ) |
13 |
+ |
export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -e 's|lib64|lib|g'` |
14 |
+ |
ADDITIONAL_OPTIONS=--without-freetype |
15 |
+ |
;; |
16 |
+ |
*_amd64_* ) |
17 |
+ |
LIB64_SUFFIX=64 |
18 |
+ |
ADDITIONAL_OPTIONS=--without-freetype |
19 |
+ |
;; |
20 |
+ |
osx* ) |
21 |
+ |
ADDITIONAL_OPTIONS= |
22 |
+ |
;; |
23 |
+ |
esac |
24 |
|
./configure \ |
25 |
< |
--with-expatlibdir=$EXPAT_ROOT/lib \ |
25 |
> |
--with-expatlibdir=$EXPAT_ROOT/lib$LIB64_SUFFIX \ |
26 |
|
--with-expatincludedir=$EXPAT_ROOT/include \ |
27 |
|
--with-zincludedir=$ZLIB_ROOT/include \ |
28 |
< |
--with-zlibdir=$ZLIB_ROOT/lib \ |
28 |
> |
--with-zlibdir=$ZLIB_ROOT/lib$LIB64_SUFFIX \ |
29 |
|
--with-pngincludedir=$LIBJPG_ROOT/include \ |
30 |
< |
--with-pnglibdir=$LIBJPG_ROOT/lib \ |
30 |
> |
--with-pnglibdir=$LIBJPG_ROOT/lib$LIB64_SUFFIX \ |
31 |
|
--with-jpegincludedir=$LIBPNG_ROOT/include \ |
32 |
< |
--with-jpeglibdir=$LIBPNG_ROOT/lib \ |
32 |
> |
--with-jpeglibdir=$LIBPNG_ROOT/lib$LIB64_SUFFIX \ |
33 |
|
--without-x \ |
34 |
|
--without-tclsh \ |
35 |
|
--without-tcl \ |
36 |
+ |
--without-fontconfig \ |
37 |
|
--without-tk \ |
38 |
< |
--prefix=%{i} |
38 |
> |
--without-perl \ |
39 |
> |
--without-python \ |
40 |
> |
--without-ruby \ |
41 |
> |
--disable-ruby \ |
42 |
> |
--disable-perl \ |
43 |
> |
--without-pangocairo \ |
44 |
> |
--without-freetype \ |
45 |
> |
--without-fontconfig \ |
46 |
> |
--without-gdk-pixbuf \ |
47 |
> |
--disable-sharp \ |
48 |
> |
--disable-guile \ |
49 |
> |
--disable-java \ |
50 |
> |
--disable-lua \ |
51 |
> |
--disable-ocaml \ |
52 |
> |
--disable-perl \ |
53 |
> |
--disable-php \ |
54 |
> |
--disable-python \ |
55 |
> |
--prefix=%{i} \ |
56 |
> |
$ADDITIONAL_OPTIONS |
57 |
> |
|
58 |
|
# This is a workaround for the fact that sort from coreutils 5.96 doesn't |
59 |
|
# like "sort +0 -1", not really something specific to ppc64/ydl5.0 |
60 |
|
if [ "$(uname -m)" == "ppc64" ] |
61 |
|
then |
62 |
|
perl -p -i -e "s|\+0 \-1|-k1,1|g" dotneato/common/Makefile |
63 |
|
fi |
64 |
+ |
# Probably the configure should just be remade on Darwin, but it builds |
65 |
+ |
# as-is with this small cleanup |
66 |
+ |
%ifos darwin |
67 |
+ |
perl -p -i -e "s|-lexpat||g" configure |
68 |
+ |
%endif |
69 |
|
make |
70 |
+ |
|
71 |
+ |
%install |
72 |
+ |
make install |
73 |
+ |
# SCRAM ToolBox toolfile |
74 |
+ |
mkdir -p %i/etc/scram.d |
75 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
76 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
77 |
+ |
<Tool name=%n version=%v> |
78 |
+ |
<info url="http://www.research.att.com/sw/tools/graphviz/"></info> |
79 |
+ |
<Client> |
80 |
+ |
<Environment name=GRAPHVIZ_BASE default="%i"></Environment> |
81 |
+ |
<Environment name=GRAPHVIZ_BINDIR default="$GRAPHVIZ_BASE/bin"></Environment> |
82 |
+ |
<Environment name=LIBDIR default="$GRAPHVIZ_BASE/lib/graphviz"></Environment> |
83 |
+ |
</Client> |
84 |
+ |
<Runtime name=PATH value="$GRAPHVIZ_BINDIR" type=path> |
85 |
+ |
<Use name=expat> |
86 |
+ |
<Use name=zlib> |
87 |
+ |
<Use name=libjpg> |
88 |
+ |
<use name=libpng> |
89 |
+ |
</Tool> |
90 |
+ |
EOF_TOOLFILE |
91 |
+ |
|
92 |
|
%post |
93 |
< |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|" $RPM_INSTALL_PREFIX/%pkgrel/bin/dotneato-config `find $RPM_INSTALL_PREFIX/%pkgrel/lib/graphviz -name *.la` |
93 |
> |
# It appears one needs to list at least one explicitly as the macro adds |
94 |
> |
# the prefix, but then the find can add it and the others (also with the |
95 |
> |
# prefix) |
96 |
> |
%{relocateConfig}/lib/libgraph.la `find $RPM_INSTALL_PREFIX/%pkgrel/lib -name *.la` |
97 |
> |
%{relocateConfig}etc/scram.d/%n |