1 | # $Id: Portfile 57551 2009-09-12 22:18:08Z ryandesign@macports.org $ |
---|
2 | # vim :set ts=2: |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name scribus |
---|
7 | version 1.3.5.1 |
---|
8 | categories print |
---|
9 | maintainers nomaintainer |
---|
10 | description Qt4-based WYSIWYG desktop publishing application |
---|
11 | long_description Scribus is an open source desktop publishing program. \ |
---|
12 | It provides a true WYSIWYG editing, excellent PDF export \ facilities, and a wide range of other input and output \ options. |
---|
13 | # |
---|
14 | platforms darwin |
---|
15 | homepage http://www.scribus.net/ |
---|
16 | master_sites sourceforge:scribus |
---|
17 | use_bzip2 yes |
---|
18 | # |
---|
19 | checksums md5 4cadca0c780491ad61dc2d815776f10b \ |
---|
20 | sha1 d138e47e2177974d18c2f7c87a1db9e462bf6287 \ |
---|
21 | rmd160 8b8a73909b3c482de2a77cd344e91a8aedbf2611 |
---|
22 | # |
---|
23 | depends_build path:bin/pkg-config:pkgconfig \ |
---|
24 | bin:bin/cmake:cmake |
---|
25 | |
---|
26 | depends_lib port:qt4-mac \ |
---|
27 | port:cairo \ |
---|
28 | port:freetype \ |
---|
29 | port:tiff \ |
---|
30 | port:lcms \ |
---|
31 | port:jpeg \ |
---|
32 | port:libpng \ |
---|
33 | port:fontconfig \ |
---|
34 | port:libxml2 \ |
---|
35 | port:boost \ |
---|
36 | bin:bin/gs:ghostscript \ |
---|
37 | port:podofo |
---|
38 | |
---|
39 | use_configure no |
---|
40 | |
---|
41 | variant bundle description "Builds application bundle" {} |
---|
42 | variant universal description "Builds universal app" {} |
---|
43 | |
---|
44 | variant aspell { |
---|
45 | depends_lib-append port:aspell |
---|
46 | } |
---|
47 | |
---|
48 | configure { |
---|
49 | set CMAKE_OPTIONS " " |
---|
50 | append CMAKE_OPTIONS "-DCMAKE_CXX_COMPILER=${configure.cxx} " |
---|
51 | append CMAKE_OPTIONS "-DCMAKE_C_COMPILER=${configure.cc} " |
---|
52 | append CMAKE_OPTIONS "-DZLIB_LIBRARY_RELEASE=${prefix}/lib/libz.dylib " |
---|
53 | append CMAKE_OPTIONS "-DZLIB_INCLUDE_DIR=${prefix}/include " |
---|
54 | append CMAKE_OPTIONS "-DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib " |
---|
55 | append CMAKE_OPTIONS "-DWANT_CAIRO=1 " |
---|
56 | |
---|
57 | if {[variant_isset bundle]} { |
---|
58 | append CMAKE_OPTIONS "-DAPPLEBUNDLE=TRUE " |
---|
59 | append CMAKE_OPTIONS "-DBUILD_OSX_BUNDLE=1 " |
---|
60 | append CMAKE_OPTIONS "-DCMAKE_INSTALL_PREFIX=${applications_dir} " |
---|
61 | } else { |
---|
62 | append CMAKE_OPTIONS "-DAPPLEBUNDLE=FALSE " |
---|
63 | append CMAKE_OPTIONS "-DBUILD_OSX_BUNDLE=0 " |
---|
64 | append CMAKE_OPTIONS "-DCMAKE_INSTALL_PREFIX=${destroot} " |
---|
65 | } |
---|
66 | |
---|
67 | if {[variant_isset universal]} { |
---|
68 | set archs "-DCMAKE_OSX_ARCHITECTURES=\"" |
---|
69 | foreach arch ${configure.universal_archs} { |
---|
70 | append archs " " ${arch} ";" |
---|
71 | } |
---|
72 | append CMAKE_OPTIONS ${archs} "\" " |
---|
73 | |
---|
74 | append CMAKE_OPTIONS "-DCMAKE_CXX_FLAGS=\"" \ |
---|
75 | [portconfigure::configure_get_universal_archflags] "\" " |
---|
76 | |
---|
77 | append CMAKE_OPTIONS "-DCMAKE_C_FLAGS=\"" \ |
---|
78 | [portconfigure::configure_get_universal_archflags] "\" " |
---|
79 | |
---|
80 | append CMAKE_OPTIONS "-DCMAKE_EXE_LINKER_FLAGS=\"" \ |
---|
81 | [portconfigure::configure_get_universal_archflags] "\" " |
---|
82 | |
---|
83 | append CMAKE_OPTIONS "-DCMAKE_MODULE_LINKER_FLAGS=\"" \ |
---|
84 | [portconfigure::configure_get_universal_archflags] "\" " |
---|
85 | |
---|
86 | append CMAKE_OPTIONS "-DCMAKE_SHARED_LINKER_FLAGS=\"" \ |
---|
87 | [portconfigure::configure_get_universal_archflags] "\" " |
---|
88 | } |
---|
89 | |
---|
90 | append CMAKE_OPTIONS "-DQT_QMAKE_EXECUTABLE=${prefix}/bin/qmake-mac " |
---|
91 | |
---|
92 | puts ${CMAKE_OPTIONS} |
---|
93 | |
---|
94 | system "cd ${worksrcpath} && cmake ${CMAKE_OPTIONS} ." |
---|
95 | } |
---|
96 | |
---|
97 | # Patch : why is libpodofo is wrongly referenced? |
---|
98 | |
---|
99 | post-build { |
---|
100 | system "PODOFO=`otool -L ${worksrcpath}/scribus/scribus | grep libpodo | \ |
---|
101 | awk '{printf \$1}'`; \ |
---|
102 | install_name_tool -change \$PODOFO ${prefix}/lib/\$PODOFO \ |
---|
103 | ${worksrcpath}/scribus/scribus ; \ |
---|
104 | install_name_tool -change \$PODOFO ${prefix}/lib/\$PODOFO \ |
---|
105 | ${worksrcpath}/scribus/plugins/aiimplugin/libimportai.so ; \ |
---|
106 | install_name_tool -change \$PODOFO ${prefix}/lib/\$PODOFO \ |
---|
107 | ${worksrcpath}/scribus/plugins/psimport/libimportps.so" |
---|
108 | } |
---|
109 | |
---|
110 | use_parallel_build yes |
---|
111 | |
---|
112 | livecheck.type regex |
---|
113 | livecheck.url ${homepage} |
---|
114 | livecheck.regex Scribus v(\[0-9.\]+) |
---|