Ticket #27887: patch-svg2pdf-Portfile

File patch-svg2pdf-Portfile, 3.3 KB (added by ejtttje@…, 14 years ago)

Fix revision number and actually build universal now

Line 
1diff -ruN /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/svg2pdf/Portfile svg2pdf/Portfile
2--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/svg2pdf/Portfile  2009-10-28 03:02:00.000000000 -0400
3+++ svg2pdf/Portfile    2011-01-06 17:03:30.000000000 -0500
4@@ -3,22 +3,41 @@
5 PortSystem          1.0
6 
7 name                svg2pdf
8-version             0.1.3
9-revision            1
10+version             0.2.0
11+revision            0
12 categories          graphics
13 maintainers         nomaintainer
14 description         Render an SVG image to a PDF file (using cairo)
15 long_description    ${description}
16-# +universal isn't supported yet by libsvg and libsvg-cairo
17-universal_variant   no
18 
19 homepage            http://cairographics.org/
20 platforms           darwin
21-master_sites        http://cairographics.org/snapshots/
22-checksums           md5     0059ba059ff89931cf37720fcd102d8f \
23-                    sha1    07c5e8b95b43bcdd40d791ccb1a2cb5221093f19 \
24-                    rmd160  e7ed059a72cda28634e41d736296f6d1c432d0f8
25 
26-depends_lib         port:libsvg-cairo
27+# last 'snapshot' version is from 2005, uses libsvg-cairo
28+# libsvg-cairo also does not seem to be updated since 2005
29+# so this is lacking good SVG support (stylesheets, etc.)
30+#master_sites        http://cairographics.org/snapshots
31+#checksums           md5     0059ba059ff89931cf37720fcd102d8f \
32+#                    sha1    07c5e8b95b43bcdd40d791ccb1a2cb5221093f19 \
33+#                    rmd160  e7ed059a72cda28634e41d736296f6d1c432d0f8
34+#depends_lib         port:libsvg-cairo
35+#destroot.args-append   mandir=${prefix}/share/man
36+# +universal isn't supported yet by libsvg and libsvg-cairo
37+#universal_variant   no
38+
39+
40+# This git version cloned from cairo/tests/svg2pdf.c in 2007
41+# as the 'test' was being removed.  Constitutes a very thin
42+# wrapper around librsvg, which is actively maintained by GNOME
43+universal_variant   yes
44+fetch.type          git
45+git.url             git://anongit.freedesktop.org/~cworth/svg2pdf
46+use_configure       no
47+patchfiles          patch-Makefile
48+destroot.post_args  PREFIX=${destroot}${prefix}
49+depends_lib         port:librsvg
50 
51-destroot.args-append   mandir=${prefix}/share/man
52+variant universal {
53+       build.args-append CFLAGS="${configure.universal_cflags}" \
54+                         LDFLAGS="${configure.universal_ldflags}"
55+}
56diff -ruN /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/svg2pdf/files/patch-Makefile svg2pdf/files/patch-Makefile
57--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/svg2pdf/files/patch-Makefile      1969-12-31 19:00:00.000000000 -0500
58+++ svg2pdf/files/patch-Makefile        2011-01-06 11:07:52.000000000 -0500
59@@ -0,0 +1,20 @@
60+--- /Users/ejt/svg2pdf/Makefile        2011-01-06 10:47:08.000000000 -0500
61++++ Makefile   2011-01-06 11:04:25.000000000 -0500
62+@@ -2,6 +2,7 @@
63+
64+ MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing
65+ MYLDFLAGS=`pkg-config --libs librsvg-2.0 cairo-pdf`
66++PREFIX?=/usr/local
67+
68+ all: $(ALL)
69+
70+@@ -11,5 +12,9 @@
71+ %: %.c
72+       $(CC) $(CFLAGS) $(CPPFLAGS) $(MYCFLAGS) $(MYLDFLAGS) $^ -o $@
73+
74++install: $(ALL)
75++      mkdir -p $(PREFIX)/bin
76++      cp $(ALL) $(PREFIX)/bin
77++
78+ clean:
79+       rm -f $(ALL) *.o