1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 105815 2013-05-06 14:52:20Z landonf@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name dpkg |
---|
7 | version 1.16.12 |
---|
8 | revision 0 |
---|
9 | platforms darwin freebsd |
---|
10 | categories sysutils archivers |
---|
11 | license GPL-2+ |
---|
12 | maintainers gwmail.gwu.edu:egall openmaintainer |
---|
13 | description Debian package maintenance system |
---|
14 | long_description ${name} is the basis of the ${description}. \ |
---|
15 | Installing this port allows the usage of the \ |
---|
16 | \`port dpkg\` command. |
---|
17 | |
---|
18 | homepage http://wiki.debian.org/Teams/Dpkg |
---|
19 | |
---|
20 | master_sites debian:d/${name}/ |
---|
21 | checksums md5 b7e9cac52ff7882b088a3058b52081b5 \ |
---|
22 | sha1 5969bb7f30ade840a56f512571ca5ab56d434af1 \ |
---|
23 | rmd160 1912afd35b835901e661d2c0df563198de4e8420 \ |
---|
24 | sha256 af96447758ecbfda51fc57d4b3bc3d208ad6393e71b91c9b52c6687697a208da |
---|
25 | |
---|
26 | use_xz yes |
---|
27 | extract.asroot yes |
---|
28 | |
---|
29 | depends_build-append \ |
---|
30 | port:pkgconfig \ |
---|
31 | port:autoconf-archive \ |
---|
32 | port:xorg-util-macros \ |
---|
33 | port:gnutar \ |
---|
34 | port:perl5 \ |
---|
35 | bin:git:git-core \ |
---|
36 | bin:lzma:xz |
---|
37 | |
---|
38 | # Use MacPorts versions explicitly |
---|
39 | depends_lib-append port:gettext \ |
---|
40 | port:libiconv \ |
---|
41 | port:perl5 \ |
---|
42 | port:coreutils \ |
---|
43 | port:bzip2 \ |
---|
44 | port:zlib \ |
---|
45 | port:ncurses \ |
---|
46 | port:gnutar \ |
---|
47 | path:lib/pkgconfig/liblzma.pc:xz |
---|
48 | |
---|
49 | depends_run-append port:gnutar \ |
---|
50 | bin:lzma:xz \ |
---|
51 | bin:perl:perl5 \ |
---|
52 | port:debianutils |
---|
53 | |
---|
54 | # got to do some underscore-to-hyphen twiddling... |
---|
55 | distname ${name}_${version} |
---|
56 | worksrcdir ${name}-${version} |
---|
57 | |
---|
58 | configure.perl ${prefix}/bin/perl5 |
---|
59 | configure.pkg_config ${prefix}/bin/pkg-config |
---|
60 | configure.env-append TAR=${prefix}/bin/gnutar |
---|
61 | configure.args-append \ |
---|
62 | --with-libintl-prefix=${prefix} \ |
---|
63 | --with-libiconv-prefix=${prefix} \ |
---|
64 | --with-admindir=${prefix}/var/db/${name} \ |
---|
65 | --with-logdir=${prefix}/var/log \ |
---|
66 | --mandir=${prefix}/share/man \ |
---|
67 | --with-zlib \ |
---|
68 | --with-bz2 \ |
---|
69 | --with-liblzma \ |
---|
70 | --disable-linker-optimisations \ |
---|
71 | --disable-silent-rules \ |
---|
72 | --disable-start-stop-daemon |
---|
73 | # The start-stop-daemon patch now applies again, but now it leads to build |
---|
74 | # errors, so disabling it with a configure flag again (as done above) |
---|
75 | |
---|
76 | # ccache is trouble |
---|
77 | configure.ccache no |
---|
78 | |
---|
79 | # Older versions of gcc choke with the -Wvla warning flag |
---|
80 | configure.cflags-delete -Wvla |
---|
81 | configure.cppflags-delete -Wvla |
---|
82 | configure.ldflags-delete -Wvla |
---|
83 | |
---|
84 | post-configure { |
---|
85 | reinplace "s|-Wvla||" ${worksrcpath}/Makefile |
---|
86 | eval reinplace "s|-Wvla||" [glob ${worksrcpath}/*/Makefile] |
---|
87 | eval reinplace "s|-Wvla||" [glob ${worksrcpath}/lib/*/Makefile] |
---|
88 | reinplace "s|-Wvla||" ${worksrcpath}/lib/dpkg/test/Makefile |
---|
89 | reinplace "s|-Wmissing-declarations||" ${worksrcpath}/dselect/Makefile |
---|
90 | } |
---|
91 | |
---|
92 | compiler.blacklist-append cc gcc-3.3 gcc-4.0 apple-gcc-4.0 |
---|
93 | |
---|
94 | build.type gnu |
---|
95 | |
---|
96 | set vardpkg ${destroot}${prefix}/var/db/${name} |
---|
97 | destroot.keepdirs-append \ |
---|
98 | ${vardpkg} \ |
---|
99 | ${vardpkg}/updates \ |
---|
100 | ${vardpkg}/info \ |
---|
101 | ${destroot}${prefix}/var/log \ |
---|
102 | ${destroot}${prefix}/etc/${name} |
---|
103 | |
---|
104 | patchfiles-append patch-configure.ac.diff \ |
---|
105 | patch-lib_dpkg_dpkg.h.diff \ |
---|
106 | patch-lib_dpkg_tarfn.c.diff \ |
---|
107 | patch-src_remove.c.diff \ |
---|
108 | patch-src_archives.c.diff \ |
---|
109 | patch-utils_start-stop-daemon.c.diff |
---|
110 | |
---|
111 | patch.args-append --backup |
---|
112 | |
---|
113 | post-patch { |
---|
114 | set scripts ${worksrcpath}/scripts |
---|
115 | reinplace "s|/etc/${name}/|${prefix}/etc/${name}/|" \ |
---|
116 | ${scripts}/${name}-shlibdeps.pl \ |
---|
117 | ${scripts}/${name}-source.pl |
---|
118 | reinplace "s|AC_ERROR|AC_MSG_ERROR|" ${worksrcpath}/m4/dpkg-build.m4 |
---|
119 | file copy ${prefix}/share/aclocal/ax_check_gnu_make.m4 ${worksrcpath}/m4 |
---|
120 | file copy ${prefix}/share/aclocal/xorg-macros.m4 ${worksrcpath}/m4 |
---|
121 | system -W ${worksrcpath} "git init" |
---|
122 | } |
---|
123 | |
---|
124 | use_autoreconf yes |
---|
125 | autoreconf.args -fvi --warnings=all |
---|
126 | |
---|
127 | pre-destroot { |
---|
128 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
129 | } |
---|
130 | |
---|
131 | post-destroot { |
---|
132 | file mkdir ${vardpkg} |
---|
133 | file mkdir ${vardpkg}/updates |
---|
134 | file mkdir ${vardpkg}/info |
---|
135 | system "touch ${vardpkg}/available ${vardpkg}/status" |
---|
136 | } |
---|
137 | |
---|
138 | # These platform variants had previously had patches associated |
---|
139 | # with them... |
---|
140 | platform darwin { |
---|
141 | depends_build-append bin:gnumake:gmake |
---|
142 | } |
---|
143 | |
---|
144 | platform freebsd { |
---|
145 | depends_build-append bin:gmake:gmake |
---|
146 | } |
---|
147 | |
---|
148 | # This variant sometimes hangs while building... |
---|
149 | variant docs description {Build documentation (warning: building documentation takes a long time)} { |
---|
150 | depends_build-append port:doxygen \ |
---|
151 | path:bin/dot:graphviz \ |
---|
152 | port:fontconfig \ |
---|
153 | port:freefont-ttf |
---|
154 | set docdir ${prefix}/share/doc/${name} |
---|
155 | configure.args-append --docdir=${docdir} \ |
---|
156 | --htmldir=${docdir}/html \ |
---|
157 | --dvidir=${docdir}/dvi \ |
---|
158 | --pdfdir=${docdir}/pdf \ |
---|
159 | --psdir=${docdir}/ps |
---|
160 | build.target-append doc |
---|
161 | pre-build { |
---|
162 | elevateToRoot "doxygen" |
---|
163 | system -W ${worksrcpath}/doc "${prefix}/bin/doxygen -u" |
---|
164 | } |
---|
165 | post-build { |
---|
166 | system -W ${worksrcpath}/doc "${prefix}/bin/doxygen" |
---|
167 | dropPrivileges |
---|
168 | set destroot_docdir ${destroot}${prefix}/share/doc/${name} |
---|
169 | xinstall -d ${destroot_docdir} |
---|
170 | copy ${worksrcpath}/doc/doc ${destroot_docdir} |
---|
171 | copy ${worksrcpath}/doc/html ${destroot_docdir} |
---|
172 | foreach docfile {coding-style.txt triggers.txt README.feature-removal-schedule frontend.txt README.api} { |
---|
173 | xinstall -m 644 ${worksrcpath}/doc/${docfile} ${destroot_docdir} |
---|
174 | } |
---|
175 | } |
---|
176 | } |
---|
177 | |
---|
178 | # Tests currently fail, this needs to be fixed eventually: |
---|
179 | test.run yes |
---|
180 | test.target check |
---|
181 | |
---|
182 | pre-test { |
---|
183 | elevateToRoot "test" |
---|
184 | } |
---|
185 | post-test { |
---|
186 | dropPrivileges |
---|
187 | } |
---|
188 | |
---|
189 | # odd-numbered releases are unstable, so ignore them |
---|
190 | livecheck.type none |
---|
191 | livecheck.url http://ftp.debian.org/debian/pool/main/d/${name}/ |
---|
192 | livecheck.regex "${name}_(\\d+\\.\\d+(\\.\\d+)*)" |
---|