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.10 |
---|
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}. Installing this \ |
---|
15 | port allows the usage of the `port dpkg` command. |
---|
16 | homepage http://wiki.debian.org/Teams/Dpkg |
---|
17 | |
---|
18 | master_sites debian:d/${name}/ |
---|
19 | checksums md5 a20a06a5272717274a8b009368f237da \ |
---|
20 | sha1 bd67ce10236a674a2349d13feaa096b41fea4c9c \ |
---|
21 | rmd160 e04b3834056cd97c1cb955007f02e1358a8e8fa0 \ |
---|
22 | sha256 aeaacf0884039940d9463901102194f9a42eb5702157b9e7a23f43e0d9f65cf2 |
---|
23 | |
---|
24 | use_xz yes |
---|
25 | extract.asroot yes |
---|
26 | |
---|
27 | depends_build-append \ |
---|
28 | port:pkgconfig \ |
---|
29 | path:share/aclocal/ax_check_gnu_make.m4:autoconf-archive \ |
---|
30 | bin:git:git-core |
---|
31 | |
---|
32 | # Use MacPorts versions explicitly |
---|
33 | depends_lib-append port:gettext \ |
---|
34 | port:libiconv \ |
---|
35 | port:perl5 \ |
---|
36 | port:coreutils \ |
---|
37 | port:bzip2 \ |
---|
38 | port:zlib \ |
---|
39 | port:ncurses \ |
---|
40 | port:gnutar \ |
---|
41 | path:lib/pkgconfig/liblzma.pc:xz |
---|
42 | |
---|
43 | depends_run-append bin:gnutar:gnutar \ |
---|
44 | bin:lzma:xz \ |
---|
45 | port:debianutils |
---|
46 | |
---|
47 | # got to do some underscore-to-hyphen twiddling... |
---|
48 | distname ${name}_${version} |
---|
49 | worksrcdir ${name}-${version} |
---|
50 | |
---|
51 | configure.env-append \ |
---|
52 | PERL=${prefix}/bin/perl5 \ |
---|
53 | PKG_CONFIG=${prefix}/bin/pkg-config \ |
---|
54 | TAR=${prefix}/bin/gnutar |
---|
55 | configure.args-append \ |
---|
56 | --with-libintl-prefix=${prefix} \ |
---|
57 | --with-libiconv-prefix=${prefix} \ |
---|
58 | --with-admindir=${prefix}/var/db/${name} \ |
---|
59 | --with-logdir=${prefix}/var/log \ |
---|
60 | --mandir=${prefix}/share/man \ |
---|
61 | --with-zlib --with-bz2 --with-liblzma \ |
---|
62 | --disable-linker-optimisations \ |
---|
63 | --disable-silent-rules \ |
---|
64 | --disable-start-stop-daemon |
---|
65 | # The start-stop-daemon patch now applies again, but now it leads to build errors, |
---|
66 | # so disabling it with a configure flag again |
---|
67 | |
---|
68 | build.type gnu |
---|
69 | |
---|
70 | set vardpkg ${destroot}${prefix}/var/db/${name} |
---|
71 | destroot.keepdirs ${vardpkg} ${vardpkg}/updates ${vardpkg}/info ${prefix}/var/log |
---|
72 | |
---|
73 | patchfiles-append patch-configure.ac.diff \ |
---|
74 | patch-lib_dpkg_dpkg.h.diff \ |
---|
75 | patch-lib_dpkg_tarfn.c.diff \ |
---|
76 | patch-src_remove.c.diff \ |
---|
77 | patch-src_archives.c.diff \ |
---|
78 | patch-utils_start-stop-daemon.c.diff |
---|
79 | |
---|
80 | post-patch { |
---|
81 | set scripts ${worksrcpath}/scripts |
---|
82 | reinplace s|/etc/${name}/|${prefix}/etc/${name}/| \ |
---|
83 | ${scripts}/${name}-shlibdeps.pl \ |
---|
84 | ${scripts}/${name}-source.pl |
---|
85 | file copy ${prefix}/share/aclocal/ax_check_gnu_make.m4 ${worksrcpath}/m4 |
---|
86 | system -W ${worksrcpath} "git init" |
---|
87 | } |
---|
88 | |
---|
89 | use_autoreconf yes |
---|
90 | autoreconf.args -fvi |
---|
91 | |
---|
92 | pre-destroot { |
---|
93 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
94 | } |
---|
95 | |
---|
96 | post-destroot { |
---|
97 | file mkdir ${vardpkg} |
---|
98 | file mkdir ${vardpkg}/updates |
---|
99 | file mkdir ${vardpkg}/info |
---|
100 | system "touch ${vardpkg}/available ${vardpkg}/status" |
---|
101 | } |
---|
102 | |
---|
103 | platform darwin { |
---|
104 | depends_build-append bin:gnumake:gmake |
---|
105 | } |
---|
106 | |
---|
107 | platform freebsd { |
---|
108 | depends_build-append bin:gmake:gmake |
---|
109 | } |
---|
110 | |
---|
111 | # This variant currently hangs while building and fails to actually install the documentation, |
---|
112 | # not entirely sure why... |
---|
113 | variant docs description {Build documentation} { |
---|
114 | depends_build-append port:doxygen path:bin/dot:graphviz |
---|
115 | set docdir ${prefix}/share/doc/${name} |
---|
116 | configure.args-append --docdir=${docdir} \ |
---|
117 | --htmldir=${docdir}/html \ |
---|
118 | --dvidir=${docdir}/dvi \ |
---|
119 | --pdfdir=${docdir}/pdf \ |
---|
120 | --psdir=${docdir}/ps |
---|
121 | build.target-append doc |
---|
122 | post-build { |
---|
123 | system -W ${worksrcpath}/doc "doxygen" |
---|
124 | } |
---|
125 | } |
---|
126 | |
---|
127 | # Tests currently fail, this needs to be fixed |
---|
128 | test.run yes |
---|
129 | test.target check |
---|
130 | |
---|
131 | livecheck.type regex |
---|
132 | livecheck.url http://ftp.debian.org/debian/pool/main/d/${name}/ |
---|
133 | livecheck.regex "${name}_(\\d+\\.\\d+(\\.\\d+)*)" |
---|