From ed0eaf565337c39bb824d7fbd6eb70b6bdac0f81 Mon Sep 17 00:00:00 2001
From: Eric Gallager <egall@gwmail.gwu.edu>
Date: Thu, 27 Mar 2014 09:49:38 -0400
Subject: [PATCH] update the patch for dpkg's Portfile
---
sysutils/dpkg/Portfile.diff | 141 +++++++++++++++++++++++++++++++++++---------
1 file changed, 113 insertions(+), 28 deletions(-)
diff --git a/sysutils/dpkg/Portfile.diff b/sysutils/dpkg/Portfile.diff
index f40cc2b..880f5cc 100644
a
|
b
|
|
1 | | --- /opt/local/var/macports/sources/LocalPorts/sysutils/dpkg/Portfile_fixedwhitespace 2013-05-07 12:56:30.000000000 -0400 |
2 | | +++ /opt/local/var/macports/sources/LocalPorts/sysutils/dpkg/Portfile 2013-05-08 01:04:20.000000000 -0400 |
3 | | @@ -4,66 +4,74 @@ |
| 1 | --- /opt/local/var/macports/sources/LocalPorts/sysutils/dpkg/Portfile_fixedwhitespace 2014-01-18 19:07:10.000000000 -0500 |
| 2 | +++ Portfile 2014-03-16 20:21:41.000000000 -0400 |
| 3 | @@ -4,66 +4,128 @@ |
4 | 4 | PortSystem 1.0 |
5 | 5 | |
6 | 6 | name dpkg |
7 | 7 | -version 1.14.29 |
8 | 8 | -revision 4 |
9 | | +version 1.16.10 |
| 9 | +version 1.16.12 |
10 | 10 | +revision 0 |
11 | 11 | platforms darwin freebsd |
12 | 12 | categories sysutils archivers |
… |
… |
|
15 | 15 | +maintainers gwmail.gwu.edu:egall openmaintainer |
16 | 16 | description Debian package maintenance system |
17 | 17 | -long_description ${description} |
18 | | +long_description ${name} is the basis of the ${description}. Installing this \ |
19 | | + port allows the usage of the `port dpkg` command. |
| 18 | +long_description ${name} is the basis of the ${description}. \ |
| 19 | + Installing this port allows the usage of the \ |
| 20 | + \`port dpkg\` command. |
| 21 | + |
20 | 22 | homepage http://wiki.debian.org/Teams/Dpkg |
21 | 23 | |
22 | 24 | -master_sites debian:d/dpkg/ |
23 | 25 | -checksums md5 4326172a959b5b6484b4bc126e9f628d \ |
24 | 26 | - sha1 15a35dd96dac6a99f24844b2eff85f8fad37ab06 |
25 | 27 | +master_sites debian:d/${name}/ |
26 | | +checksums md5 a20a06a5272717274a8b009368f237da \ |
27 | | + sha1 bd67ce10236a674a2349d13feaa096b41fea4c9c \ |
28 | | + rmd160 e04b3834056cd97c1cb955007f02e1358a8e8fa0 \ |
29 | | + sha256 aeaacf0884039940d9463901102194f9a42eb5702157b9e7a23f43e0d9f65cf2 |
| 28 | +checksums md5 b7e9cac52ff7882b088a3058b52081b5 \ |
| 29 | + sha1 5969bb7f30ade840a56f512571ca5ab56d434af1 \ |
| 30 | + rmd160 1912afd35b835901e661d2c0df563198de4e8420 \ |
| 31 | + sha256 af96447758ecbfda51fc57d4b3bc3d208ad6393e71b91c9b52c6687697a208da |
30 | 32 | + |
31 | 33 | +use_xz yes |
| 34 | +extract.asroot yes |
32 | 35 | + |
33 | 36 | +depends_build-append \ |
34 | | + port:pkgconfig |
| 37 | + port:pkgconfig \ |
| 38 | + port:autoconf-archive \ |
| 39 | + port:xorg-util-macros \ |
| 40 | + port:gnutar \ |
| 41 | + port:perl5 \ |
| 42 | + bin:git:git-core \ |
| 43 | + bin:lzma:xz |
35 | 44 | |
36 | 45 | # Use MacPorts versions explicitly |
37 | 46 | -depends_lib port:gettext \ |
… |
… |
|
44 | 53 | - |
45 | 54 | -depends_run bin:gnutar:gnutar \ |
46 | 55 | - bin:lzma:xz |
| 56 | - |
47 | 57 | + port:zlib \ |
48 | 58 | + port:ncurses \ |
49 | | + lib:liblzma:xz |
| 59 | + port:gnutar \ |
| 60 | + path:lib/pkgconfig/liblzma.pc:xz |
50 | 61 | + |
51 | | +depends_run-append bin:gnutar:gnutar \ |
| 62 | +depends_run-append port:gnutar \ |
52 | 63 | + bin:lzma:xz \ |
| 64 | + bin:perl:perl5 \ |
53 | 65 | + port:debianutils |
54 | 66 | |
55 | | |
| 67 | +# got to do some underscore-to-hyphen twiddling... |
56 | 68 | distname ${name}_${version} |
57 | 69 | worksrcdir ${name}-${version} |
58 | 70 | |
… |
… |
|
66 | 78 | -configure.env PERL=${prefix}/bin/perl5 |
67 | 79 | -configure.args --without-sgml-doc --with-libintl-prefix=${prefix} \ |
68 | 80 | - --with-libiconv-prefix=${prefix} --with-admindir=${prefix}/var/db/dpkg \ |
69 | | +configure.env-append \ |
70 | | + PERL=${prefix}/bin/perl5 \ |
71 | | + PKG_CONFIG=${prefix}/bin/pkg-config |
| 81 | +configure.perl ${prefix}/bin/perl5 |
| 82 | +configure.pkg_config ${prefix}/bin/pkg-config |
| 83 | +configure.env-append TAR=${prefix}/bin/gnutar |
72 | 84 | +configure.args-append \ |
73 | 85 | + --with-libintl-prefix=${prefix} \ |
74 | 86 | + --with-libiconv-prefix=${prefix} \ |
… |
… |
|
77 | 89 | --mandir=${prefix}/share/man \ |
78 | 90 | - --with-zlib --with-bz2 \ |
79 | 91 | - --disable-linker-optimisations |
80 | | + --with-zlib --with-bz2 --with-liblzma \ |
| 92 | + --with-zlib \ |
| 93 | + --with-bz2 \ |
| 94 | + --with-liblzma \ |
81 | 95 | + --disable-linker-optimisations \ |
82 | 96 | + --disable-silent-rules \ |
83 | 97 | + --disable-start-stop-daemon |
| 98 | +# The start-stop-daemon patch now applies again, but now it leads to build |
| 99 | +# errors, so disabling it with a configure flag again (as done above) |
| 100 | + |
| 101 | +# ccache is trouble |
| 102 | +configure.ccache no |
| 103 | + |
| 104 | +# Older versions of gcc choke with the -Wvla warning flag |
| 105 | +configure.cflags-delete -Wvla |
| 106 | +configure.cppflags-delete -Wvla |
| 107 | +configure.ldflags-delete -Wvla |
| 108 | + |
| 109 | +post-configure { |
| 110 | + reinplace "s|-Wvla||" ${worksrcpath}/Makefile |
| 111 | + eval reinplace "s|-Wvla||" [glob ${worksrcpath}/*/Makefile] |
| 112 | + eval reinplace "s|-Wvla||" [glob ${worksrcpath}/lib/*/Makefile] |
| 113 | + reinplace "s|-Wvla||" ${worksrcpath}/lib/dpkg/test/Makefile |
| 114 | + reinplace "s|-Wmissing-declarations||" ${worksrcpath}/dselect/Makefile |
| 115 | +} |
| 116 | + |
| 117 | +compiler.blacklist-append cc gcc-3.3 gcc-4.0 apple-gcc-4.0 |
84 | 118 | |
85 | 119 | build.type gnu |
86 | 120 | |
87 | 121 | -set vardpkg ${destroot}${prefix}/var/db/dpkg |
88 | 122 | -destroot.keepdirs ${vardpkg} ${vardpkg}/updates ${vardpkg}/info |
89 | 123 | +set vardpkg ${destroot}${prefix}/var/db/${name} |
90 | | +destroot.keepdirs ${vardpkg} ${vardpkg}/updates ${vardpkg}/info ${prefix}/var/log |
| 124 | +destroot.keepdirs-append \ |
| 125 | + ${vardpkg} \ |
| 126 | + ${vardpkg}/updates \ |
| 127 | + ${vardpkg}/info \ |
| 128 | + ${destroot}${prefix}/var/log \ |
| 129 | + ${destroot}${prefix}/etc/${name} |
| 130 | + |
| 131 | +patchfiles-append patch-configure.ac.diff \ |
| 132 | + patch-lib_dpkg_dpkg.h.diff \ |
| 133 | + patch-lib_dpkg_tarfn.c.diff \ |
| 134 | + patch-src_remove.c.diff \ |
| 135 | + patch-src_archives.c.diff \ |
| 136 | + patch-utils_start-stop-daemon.c.diff |
| 137 | + |
| 138 | +patch.args-append --backup |
91 | 139 | |
92 | 140 | post-patch { |
93 | 141 | set scripts ${worksrcpath}/scripts |
… |
… |
|
97 | 145 | - |
98 | 146 | - reinplace s|/etc/alternatives|${prefix}/etc/alternatives|g \ |
99 | 147 | - ${scripts}/update-alternatives.pl |
100 | | + reinplace s|/etc/${name}/|${prefix}/etc/${name}/| \ |
| 148 | + reinplace "s|/etc/${name}/|${prefix}/etc/${name}/|" \ |
101 | 149 | + ${scripts}/${name}-shlibdeps.pl \ |
102 | 150 | + ${scripts}/${name}-source.pl |
| 151 | + reinplace "s|AC_ERROR|AC_MSG_ERROR|" ${worksrcpath}/m4/dpkg-build.m4 |
| 152 | + file copy ${prefix}/share/aclocal/ax_check_gnu_make.m4 ${worksrcpath}/m4 |
| 153 | + file copy ${prefix}/share/aclocal/xorg-macros.m4 ${worksrcpath}/m4 |
| 154 | + system -W ${worksrcpath} "git init" |
103 | 155 | } |
104 | 156 | |
| 157 | +use_autoreconf yes |
| 158 | +autoreconf.args -fvi --warnings=all |
| 159 | + |
105 | 160 | pre-destroot { |
106 | 161 | - file mkdir ${destroot}${prefix}/share/doc/dpkg |
107 | 162 | + file mkdir ${destroot}${prefix}/share/doc/${name} |
108 | 163 | } |
109 | 164 | |
110 | 165 | post-destroot { |
111 | | @@ -75,14 +83,29 @@ |
| 166 | @@ -73,16 +135,58 @@ |
| 167 | system "touch ${vardpkg}/available ${vardpkg}/status" |
| 168 | } |
112 | 169 | |
| 170 | +# These platform variants had previously had patches associated |
| 171 | +# with them... |
113 | 172 | platform darwin { |
114 | 173 | depends_build-append bin:gnumake:gmake |
115 | 174 | - patchfiles-append patch-utils_start-stop-daemon.c bsd/patch-main_help.c |
… |
… |
|
120 | 179 | - patchfiles-append patch-utils_start-stop-daemon.c bsd/patch-main_help.c |
121 | 180 | } |
122 | 181 | |
123 | | +# This variant currently hangs while building and fails to actually install the documentation, |
124 | | +# not entirely sure why... |
125 | | +variant docs description {Build documentation} { |
126 | | + depends_build-append port:doxygen path:bin/dot:graphviz |
| 182 | -livecheck.type regex |
| 183 | -livecheck.url http://ftp.debian.org/debian/pool/main/d/dpkg/ |
| 184 | +# This variant sometimes hangs while building... |
| 185 | +variant docs description {Build documentation (warning: building documentation takes a long time)} { |
| 186 | + depends_build-append port:doxygen \ |
| 187 | + path:bin/dot:graphviz \ |
| 188 | + port:fontconfig \ |
| 189 | + port:freefont-ttf |
127 | 190 | + set docdir ${prefix}/share/doc/${name} |
128 | 191 | + configure.args-append --docdir=${docdir} \ |
129 | 192 | + --htmldir=${docdir}/html \ |
… |
… |
|
131 | 194 | + --pdfdir=${docdir}/pdf \ |
132 | 195 | + --psdir=${docdir}/ps |
133 | 196 | + build.target-append doc |
| 197 | + pre-build { |
| 198 | + elevateToRoot "doxygen" |
| 199 | + system -W ${worksrcpath}/doc "${prefix}/bin/doxygen -u" |
| 200 | + } |
| 201 | + post-build { |
| 202 | + system -W ${worksrcpath}/doc "${prefix}/bin/doxygen" |
| 203 | + dropPrivileges |
| 204 | + set destroot_docdir ${destroot}${prefix}/share/doc/${name} |
| 205 | + xinstall -d ${destroot_docdir} |
| 206 | + copy ${worksrcpath}/doc/doc ${destroot_docdir} |
| 207 | + copy ${worksrcpath}/doc/html ${destroot_docdir} |
| 208 | + foreach docfile {coding-style.txt triggers.txt README.feature-removal-schedule frontend.txt README.api} { |
| 209 | + xinstall -m 644 ${worksrcpath}/doc/${docfile} ${destroot_docdir} |
| 210 | + } |
| 211 | + } |
134 | 212 | +} |
135 | 213 | + |
136 | | +# Tests currently fail, this needs to be fixed |
| 214 | +# Tests currently fail, this needs to be fixed eventually: |
137 | 215 | +test.run yes |
138 | 216 | +test.target check |
139 | 217 | + |
140 | | livecheck.type regex |
141 | | -livecheck.url http://ftp.debian.org/debian/pool/main/d/dpkg/ |
| 218 | +pre-test { |
| 219 | + elevateToRoot "test" |
| 220 | +} |
| 221 | +post-test { |
| 222 | + dropPrivileges |
| 223 | +} |
| 224 | + |
| 225 | +# odd-numbered releases are unstable, so ignore them |
| 226 | +livecheck.type none |
142 | 227 | +livecheck.url http://ftp.debian.org/debian/pool/main/d/${name}/ |
143 | 228 | livecheck.regex "${name}_(\\d+\\.\\d+(\\.\\d+)*)" |