Ravenports generated: 09 Jan 2022 18:36
[ravenports.git] / bucket_53 / autotools-wrappers
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               autotools-wrappers
4 VERSION=                20131203
5 KEYWORDS=               devel
6 VARIANTS=               standard
7 SDESC[standard]=        Wrapper scripts for GNU autoconf and automake
8 HOMEPAGE=               none
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            none
13 SPKGS[standard]=        complete
14                         autoconf
15                         automake
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 FPC_EQUIVALENT=         devel/autoconf-wrapper
21
22 SKIP_BUILD=             yes
23
24 SUB_FILES=              autoconf-wrapper
25 SUB_LIST=               TOOL="AUTOCONF"
26                         TOOLS_CASE="autoconf|autoheader|autom4te|autoreconf|autoscan|autoupdate|ifnames"
27
28 do-install:
29         ${INSTALL_SCRIPT} ${WRKDIR}/autoconf-wrapper ${STAGEDIR}${PREFIX}/bin/
30         ${INSTALL_SCRIPT} ${WRKDIR}/automake-wrapper ${STAGEDIR}${PREFIX}/bin/
31 .for tool in autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames
32         ${LN} -sf autoconf-wrapper ${STAGEDIR}${PREFIX}/bin/${tool}
33 .endfor
34 .for tool in aclocal automake
35         ${LN} -sf automake-wrapper ${STAGEDIR}${PREFIX}/bin/${tool}
36 .endfor
37
38 do-patch:
39         # Rather than duplicate autotools-wrapper.in, just manually
40         # create second SUB_FILE
41         ${SED}  -e 's,%%PREFIX%%,${PREFIX},g' \
42                 -e 's,%%TOOL%%,AUTOMAKE,g' \
43                 -e 's,%%TOOLS_CASE%%,aclocal|automake,g' \
44                 ${FILESDIR}/autoconf-wrapper.in > ${WRKDIR}/automake-wrapper
45
46 [FILE:211:descriptions/desc.autoconf]
47 This port installs a wrapper script for autoconf, with symlinks to the
48 unversioned name of each tool included with autoconf.  This allows the
49 correct version to be selected depending on the user's requirements.
50
51
52 [FILE:211:descriptions/desc.automake]
53 This port installs a wrapper script for automake, with symlinks to the
54 unversioned name of each tool included with automake.  This allows the
55 correct version to be selected depending on the user's requirements.
56
57
58 [FILE:98:manifests/plist.autoconf]
59 bin/
60  autoconf
61  autoconf-wrapper
62  autoheader
63  autom4te
64  autoreconf
65  autoscan
66  autoupdate
67  ifnames
68
69
70 [FILE:42:manifests/plist.automake]
71 bin/
72  aclocal
73  automake
74  automake-wrapper
75
76
77 [FILE:2845:files/autoconf-wrapper.in]
78 #!/bin/sh
79 #-
80 # Copyright (c) 2007 Dag-Erling Smørgrav
81 # All rights reserved.
82 #
83 # Redistribution and use in source and binary forms, with or without
84 # modification, are permitted provided that the following conditions
85 # are met:
86 # 1. Redistributions of source code must retain the above copyright
87 #    notice, this list of conditions and the following disclaimer
88 #    in this position and unchanged.
89 # 2. Redistributions in binary form must reproduce the above copyright
90 #    notice, this list of conditions and the following disclaimer in the
91 #    documentation and/or other materials provided with the distribution.
92 #
93 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
94 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
95 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
96 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
97 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
98 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
99 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
100 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
101 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
102 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
103 # SUCH DAMAGE.
104 #
105
106 bindir=%%PREFIX%%/bin
107 tool=$(basename $0)
108
109 exec 4<&0
110
111 error() {
112         echo "$@" 1>&2
113         exit 1
114 }
115
116 # Verify that the requested tool is one we know about
117 case ${tool} in
118 %%TOOLS_CASE%%)
119         ;;
120 *)
121         error "${tool}: unknown tool"
122         ;;
123 esac
124
125 if [ -n "${AUTOTOOLS_DEBUG}" -a -n "${%%TOOL%%_VERSION}" ] ; then
126         echo "Requested ${tool} version ${%%TOOL%%_VERSION}" 1>&2
127 fi
128
129 #
130 # Identify available versions.
131 #
132 # The double sort is necessary to correctly identify 1.10 as newer
133 # than 1.9.
134 #
135 # Note that it is conceivable that version A.BC of the requested tool
136 # is present both as "toolABC" and as "tool-A.BC".  We take no special
137 # measures to handle this case.
138 #
139 /usr/bin/find ${bindir}/ -name "${tool}*[0-9]" | /usr/bin/sed -E \
140     -e "s@^.*/${tool}-([0-9])\\.([0-9]+)\$@\1 \2 \1.\2@" | \
141     /usr/bin/sort -n -k1 | /usr/bin/sort -n -s -k2 | {
142 while read maj min suffix ; do
143         selected_version=$suffix
144         if [ -n "${%%TOOL%%_VERSION}" -a \
145             "x${%%TOOL%%_VERSION}" = x${selected_version} ] ; then
146                 break
147         fi
148 done
149
150 if [ -z "${selected_version}" ] ; then
151         error "${tool}: not installed"
152 fi
153
154 if [ -n "${%%TOOL%%_VERSION}" -a \
155     "x${%%TOOL%%_VERSION}" != x${selected_version} ] ; then
156         error "${tool}: required version" \
157             "${%%TOOL%%_VERSION} not found"
158 fi
159
160 if [ -n "${AUTOTOOLS_DEBUG}" ] ; then
161         echo "Selecting ${tool} version ${selected_version}" \
162             "(${bindir}/${tool}-${selected_version})" 1>&2
163 fi
164
165 exec 0<&4 4<&-
166 exec ${bindir}/${tool}-${selected_version} "$@"
167 }
168