MACOSX_DEPLOYMENT_TARGET="10.4" # Tiger support is default
SDKROOT="/Developer/SDKs/MacOSX10.5.sdk" # Leopard build is default
+# detection of script home
+LyxSourceDir=`dirname "$0"`
+if [ ! -d "${LyxSourceDir}" ]; then
+ echo Missing LyX source directory.
+ exit 2
+fi
+case "${LyxSourceDir}" in
+/*/development)
+ LyxSourceDir=`dirname "${LyxSourceDir}"`
+ ;;
+/*)
+ ;;
+*/development|development)
+ LyxSourceDir=`dirname "${LyxSourceDir}"`
+ LyxSourceDir=`cd "${LyxSourceDir}";pwd`
+ ;;
+*)
+ LyxSourceDir=`cd "${LyxSourceDir}";pwd`
+ ;;
+esac
+
usage() {
- echo Build script for LyX on Mac OS X
+ echo "*" Build script for LyX on Mac OS X
echo
echo Optional arguments:
echo " --aspell-deployment=yes|no ." default yes
echo
echo "All other arguments with -- are passed to configure"
echo "including the defaults: ${LyXConfigureOptions}"
- echo
+ if [ -x "${LyxSourceDir}/configure" ]; then
+ echo
+ echo "*" Configure options of LyX
+ echo
+ "${LyxSourceDir}/configure" --help
+ fi
exit 0
}
LyxBuildDir=`echo ${1}|cut -d= -f2`
shift
;;
- --help)
+ --help|--help=*)
usage
;;
--without-aspell)
strip="-strip"
aspellstrip=
-# detection of script home
-LyxSourceDir=${1:-`dirname "$0"`}
-if [ ! -d "${LyxSourceDir}" ]; then
- echo Missing LyX source directory.
- exit 2
-fi
-case "${LyxSourceDir}" in
-/*/development)
- LyxSourceDir=`dirname "${LyxSourceDir}"`
- ;;
-/*)
- ;;
-*/development|development)
- LyxSourceDir=`dirname "${LyxSourceDir}"`
- LyxSourceDir=`cd "${LyxSourceDir}";pwd`
- ;;
-*)
- LyxSourceDir=`cd "${LyxSourceDir}";pwd`
- ;;
-esac
-
LyxBuildDir=${LyxBuildDir:-`dirname "${LyxSourceDir}"`/lyx-build}
DMGLocation=${DMGLocation:-"${LyxBuildDir}"}
# if zip file is needed... remove the comment sign
#LyxAppZip="${LyxAppPrefix}.zip"
-BuildSystem=`"${LyxSourceDir}/config/config.guess"`
-
# ---------------------------------
# DON'T MODIFY ANYTHING BELOW HERE!
# ---------------------------------
"${HunSpellSourceDir}/configure"\
--prefix="${HunSpellInstallDir}"\
${HunspellConfigureOptions}
- #--host="${HOSTSYSTEM}" ${BuildSystem:+"--build=${BuildSystem}"}
make && make install${strip}
for file in ${FILE_LIST} ; do
if [ -f "${HunSpellInstallDir}"/lib/${file} ]; then
CXXFLAGS=-g "${ASpellSourceDir}/configure"\
--prefix="${ASpellInstallDir}"\
${AspellConfigureOptions}
- #--host="${HOSTSYSTEM}" ${BuildSystem:+"--build=${BuildSystem}"}
make && make install${aspellstrip}
for file in ${FILE_LIST} ; do
if [ -f "${ASpellInstallDir}"/lib/${file} ]; then
CPPFLAGS="${CPPFLAGS} -I${SDKROOT}/Library/Frameworks/QtCore.framework/Headers"
CPPFLAGS="${CPPFLAGS} -I${SDKROOT}/Library/Frameworks/QtGui.framework/Headers"
fi
- LDFLAGS="${LDFLAGS}"${MAC_API:+" -framework Carbon"}
- LDFLAGS="${LDFLAGS} -framework AppKit"
echo LDFLAGS="${LDFLAGS}"
export LDFLAGS
--prefix="${LyxAppPrefix}" --with-version-suffix="-${LyXVersionSuffix}"\
${QtInstallDir:+"--with-qt4-dir=${QtInstallDir}"} \
${LyXConfigureOptions}\
- --host="${HOSTSYSTEM}" --build="${BuildSystem}" --enable-build-type=rel && \
+ --enable-build-type=rel && \
make -j2 && make install${strip}
for file in ${LYX_FILE_LIST} ; do
if [ -f "${LYX_BUNDLE_PATH}/${file}" ]; then
test -f "${condir}/Resources/qt.conf" || cat - > "${condir}/Resources/qt.conf" <<-EOF
[Paths]
Plugins = PlugIns
+Translations = translations
EOF
if [ ! -d "${condir}/PlugIns" ]; then
mkdir -p "${condir}/PlugIns"
"@executable_path/../${fwdir}/${version}${libnm}"\
"${target}"
done
+ if [ ! -d "${condir}/translations" ]; then
+ mkdir -p "${condir}/translations"
+ fi
+ echo Copy Qt translations to "${condir}/translations"
+ cp -p "${source}"/translations/qt_*.qm "${condir}/translations"
}
# -------------------------
make_dmg "${DMGLocation}"
if [ -d "${QtInstallDir}/lib/QtCore.framework/Versions/${QtFrameworkVersion}" -a "yes" = "${qt4_deployment}" ]; then
rm -f "${DMGLocation}/${DMGNAME}+qt4.dmg"
- echo move to "${DMGLocation}/${DMGNAME}+qt4.dmg"
+ echo move to "${DMGLocation}/${DMGNAME}+qt4${MAC_API}.dmg"
mv "${DMGLocation}/${DMGNAME}.dmg" "${DMGLocation}/${DMGNAME}+qt4${MAC_API}.dmg"
fi
)