3 cd "$(dirname "$0")" && . ..
/common
/update-lib.sh
9 url
=http
://ftp.OpenBSD.org
/pub
/OpenBSD
/OpenSSH
/portable
/
13 opt_flags
="-O3 -s -march=i386"
14 export CFLAGS
=${CFLAGS:-"${opt_flags}"}
15 export CPPFLAGS
="${CPPFLAGS} -D__CYGWIN__"
16 export LDFLAGS
="${LDFLAGS} -Wl,--enable-auto-import"
18 configure_options
="--prefix=/usr --libexecdir=/libexec \
19 --datarootdir=\${prefix}/share
20 --without-rpath --sysconfdir=/etc/ssh --with-mantype=man \
21 --with-libs=-lminires"
25 test -f /lib
/textreadmode.o
&& return
26 cat > "$d"/textreadmode.c
<<-"EOF"
29 Copyright 2004 Red Hat, Inc.
31 This file is part of Cygwin.
33 This software is a copyrighted work licensed under the terms of the
34 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
38 #include <sys/fcntl.h>
39 #include <sys/cygwin.h>
42 cygwin_premain0 (int argc, char **argv, struct per_process *myself)
44 static struct __cygwin_perfile pf[] =
46 {"", O_RDONLY | O_TEXT},
49 cygwin_internal (CW_PERFILE, pf);
52 gcc -D__CYGWIN__ -o /lib/textreadmode.o -c "$d"/textreadmode.c &&
53 rm -f "$d"/textreadmode.c ||
54 die "Could not make textreadmode.o"
57 make_interface_libaries() {
58 test -f /lib/libminires.dll.a && return
59 (pexports /bin/msys-minires.dll > "$d"/tmp.def &&
60 dlltool -D msys-minires.dll -d "$d"/tmp.def -l /lib/libminires.dll.a &&
61 pexports /bin/msys-z.dll > "$d"/tmp.def &&
62 dlltool -D msys-z.dll -d "$d"/tmp.def -l /lib/libz.dll.a &&
63 pexports /bin/msys-crypto-1.0.0.dll | sed '1 s/-1\.0\.0//' > "$d"/tmp.def &&
64 dlltool -D msys-crypto-1.0.0.dll -d "$d"/tmp.def -l /lib/libcrypto.dll.a &&
65 rm -f "$d"/tmp.def) ||
66 die "Could not make interface libraries"
74 make_interface_libaries
76 (cd "$d" && autoreconf -ivf) || die "Could not autoreconf"
86 (cd "$d" && make install) || die "Could not install"