Remove two oldish scripts (#9656)
parent
d8f3273292
commit
2e4d1ecc12
|
@ -1,138 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#**************************************************************************
|
||||
#* *
|
||||
#* OCaml *
|
||||
#* *
|
||||
#* Damien Doligez, projet Moscova, INRIA Rocquencourt *
|
||||
#* *
|
||||
#* Copyright 2003 Institut National de Recherche en Informatique et *
|
||||
#* en Automatique. *
|
||||
#* *
|
||||
#* All rights reserved. This file is distributed under the terms of *
|
||||
#* the GNU Lesser General Public License version 2.1, with the *
|
||||
#* special exception on linking described in the file LICENSE. *
|
||||
#* *
|
||||
#**************************************************************************
|
||||
|
||||
cd package-macosx
|
||||
rm -rf ocaml.pkg ocaml-rw.dmg
|
||||
|
||||
VERSION=`sed -e 1q ../VERSION`
|
||||
VERSION_MAJOR=`sed -n -e '1s/^\([0-9]*\)\..*/\1/p' ../VERSION`
|
||||
VERSION_MINOR=`sed -n -e '1s/^[0-9]*\.\([0-9]*\)[.+].*/\1/p' ../VERSION`
|
||||
|
||||
cat >Description.plist <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionDeleteWarning</key>
|
||||
<string></string>
|
||||
<key>IFPkgDescriptionDescription</key>
|
||||
<string>The OCaml compiler and tools</string>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>OCaml</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string>${VERSION}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
cat >Info.plist <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>OCaml ${VERSION}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>fr.inria.ocaml</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OCaml</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${VERSION}</string>
|
||||
<key>IFMajorVersion</key>
|
||||
<integer>${VERSION_MAJOR}</integer>
|
||||
<key>IFMinorVersion</key>
|
||||
<integer>${VERSION_MINOR}</integer>
|
||||
<key>IFPkgFlagAllowBackRev</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>AdminAuthorization</string>
|
||||
<key>IFPkgFlagDefaultLocation</key>
|
||||
<string>/usr/local</string>
|
||||
<key>IFPkgFlagInstallFat</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRelocatable</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRestartAction</key>
|
||||
<string>NoRestart</string>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagUpdateInstalledLanguages</key>
|
||||
<false/>
|
||||
<key>IFPkgFormatVersion</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
mkdir -p resources
|
||||
|
||||
# stop here -> |
|
||||
cat >resources/ReadMe.txt <<EOF
|
||||
This package installs OCaml version ${VERSION}.
|
||||
You need Mac OS X 10.11.x (El Capitan) or later, with the
|
||||
XCode tools installed (v7.3 or later) and the command-line
|
||||
tools for XCode.
|
||||
|
||||
Files will be installed in the following directories:
|
||||
|
||||
/usr/local/bin - command-line executables
|
||||
/usr/local/lib/ocaml - library and support files
|
||||
/usr/local/man - manual pages
|
||||
|
||||
Note that this package installs only command-line
|
||||
tools and does not include any GUI application.
|
||||
EOF
|
||||
|
||||
chmod -R g-w root
|
||||
sudo chown -R root:wheel root
|
||||
|
||||
# HOW TO INSTALL PackageMaker:
|
||||
# Get PackageMaker.app from
|
||||
# https://developer.apple.com/downloads/index.action?name=Auxiliary
|
||||
# It's in the "Auxiliary Tools for Xcode" download.
|
||||
# Copy it to /Applications/.
|
||||
/Applications/PackageMaker.app/Contents/MacOS/PackageMaker \
|
||||
-build -p "`pwd`/ocaml.pkg" -f "`pwd`/root" -i "`pwd`/Info.plist" \
|
||||
-d "`pwd`/Description.plist" -r "`pwd`/resources"
|
||||
|
||||
size=`du -s ocaml.pkg | cut -f 1`
|
||||
size=`expr $size + 8192`
|
||||
|
||||
hdiutil create -sectors $size ocaml-rw.dmg
|
||||
name=`hdid -nomount ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
|
||||
volname="OCaml ${VERSION}"
|
||||
newfs_hfs -v "$volname" $name
|
||||
hdiutil detach $name
|
||||
|
||||
name=`hdid ocaml-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
|
||||
if test -d "/Volumes/$volname"; then
|
||||
ditto -rsrcFork ocaml.pkg "/Volumes/$volname/ocaml.pkg"
|
||||
cp resources/ReadMe.txt "/Volumes/$volname/"
|
||||
else
|
||||
echo "Unable to mount the disk image as \"/Volumes/$volname\"" >&2
|
||||
exit 3
|
||||
fi
|
||||
open "/Volumes/$volname"
|
||||
sleep 2
|
||||
hdiutil detach $name
|
||||
|
||||
rm -rf "ocaml-${VERSION}.dmg"
|
||||
hdiutil convert ocaml-rw.dmg -format UDZO -o "ocaml-${VERSION}.dmg"
|
|
@ -1,54 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#**************************************************************************
|
||||
#* *
|
||||
#* OCaml *
|
||||
#* *
|
||||
#* Damien Doligez, projet Cristal, INRIA Rocquencourt *
|
||||
#* *
|
||||
#* Copyright 2005 Institut National de Recherche en Informatique et *
|
||||
#* en Automatique. *
|
||||
#* *
|
||||
#* All rights reserved. This file is distributed under the terms of *
|
||||
#* the GNU Lesser General Public License version 2.1, with the *
|
||||
#* special exception on linking described in the file LICENSE. *
|
||||
#* *
|
||||
#**************************************************************************
|
||||
|
||||
TMP="${TMPDIR=/tmp}"
|
||||
TEMP="${TMP}"/ocaml-objcopy-$$.o
|
||||
UNDEF="${TMP}"/ocaml-objcopy-$$.sym
|
||||
|
||||
usage () {
|
||||
echo "usage: objcopy {--redefine-sym <old>=<new>} file.o" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
: > "$UNDEF"
|
||||
|
||||
while : ; do
|
||||
case $# in
|
||||
0) break;;
|
||||
*) case $1 in
|
||||
--redefine-sym)
|
||||
case $2 in
|
||||
*=*) ALIAS="$ALIAS -i${2#*=}:${2%%=*}"
|
||||
echo ${2%%=*} >>"$UNDEF"
|
||||
;;
|
||||
*) usage;;
|
||||
esac
|
||||
shift 2
|
||||
;;
|
||||
-*) usage;;
|
||||
*) case $FILE in
|
||||
"") FILE=$1; shift;;
|
||||
*) usage;;
|
||||
esac;;
|
||||
esac;;
|
||||
esac
|
||||
done
|
||||
|
||||
ld -o "$TEMP" -r $ALIAS "$FILE"
|
||||
ld -o "$FILE" -r -unexported_symbols_list "$UNDEF" "$TEMP"
|
||||
|
||||
rm -f "$TEMP" "$UNDEF"
|
Loading…
Reference in New Issue