diff --git a/ChangeLog b/ChangeLog index 11f87054d0..c711abcba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-07 Jean-Marc Lasgouttes + + * configure.ac: call LYX_VERSION_SUFFIX and LYX_USE_PACKAGING + earlier (bug 2237); fix definition of LYX_ABS_INSTALLED_DATADIR. + 2006-02-11 Lars Gullik Bjønnes * configure.ac: @@ -7,7 +12,7 @@ * Delete all .cvsignore files from the source tree -2006-01-26 +2006-01-26 Lars Gullik Bjonnes * autogen.sh: remove the --force-missing option to automake diff --git a/config/ChangeLog b/config/ChangeLog index 954da63a31..82bde36552 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,4 +1,11 @@ -2006-01-26 Lars Gullik Bjønne s +2006-02-07 Jean-Marc Lasgouttes + + * lyxinclude.m4 (LYX_VERSION_SUFFIX): do not alter PACKAGE here. + (LYX_USE_PACKAGING): add $version_suffix to PACKAGE here and set + program_suffix for posix (bug 2237); provide a custom definition + of pkgdatadir for OSX and windows. + +2006-01-26 Lars Gullik Bjønnes * ltmain.sh: apply patch for darwin diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index d1a657782c..ca5211ea47 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -7,7 +7,7 @@ dnl Allan Rae (rae@lyx.org) dnl Usage LYX_CHECK_VERSION Displays version of LyX being built and dnl sets variables "lyx_devel_version" and "lyx_prerelease" AC_DEFUN([LYX_CHECK_VERSION],[ -echo "configuring LyX version $VERSION" +echo "configuring LyX version" AC_PACKAGE_VERSION if echo AC_PACKAGE_VERSION | grep 'svn' >/dev/null ; then lyx_devel_version=yes AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX]) @@ -28,20 +28,19 @@ dnl Define the option to set a LyX version on installed executables and director dnl dnl AC_DEFUN([LYX_VERSION_SUFFIX],[ -AC_MSG_CHECKING([for install target]) +AC_MSG_CHECKING([for version suffix]) RPM_VERSION_SUFFIX='""' AC_ARG_WITH(version-suffix, [ --with-version-suffix[=] install lyx files as lyx], [if test "x$withval" = "xyes"; then - withval="-$VERSION" + withval="-"AC_PACKAGE_VERSION ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"` fi - PACKAGE="$PACKAGE$withval" - program_suffix=$withval + version_suffix=$withval RPM_VERSION_SUFFIX="--with-version-suffix=$withval"]) AC_SUBST(RPM_VERSION_SUFFIX) -AC_MSG_RESULT([$PACKAGE]) +AC_MSG_RESULT([$withval]) ]) @@ -586,24 +585,31 @@ AC_ARG_WITH(packaging, AC_MSG_RESULT($lyx_use_packaging) case $lyx_use_packaging in macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout]) - PACKAGE=LyX - default_prefix="/Applications/LyX.app" + PACKAGE=LyX${version_suffix} + program_suffix=$version_suffix + default_prefix="/Applications/${PACKAGE}.app" bindir='${prefix}/Contents/MacOS' libdir='${prefix}/Contents/Resources' datadir='${prefix}/Contents/Resources' - mandir='${prefix}/Contents/Resources/man' ;; + pkgdatadir='${datadir}' + mandir='${datadir}/man' ;; windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) - PACKAGE=LyX - default_prefix="C:/Program Files/LyX" + PACKAGE=LyX${version_suffix} + program_suffix=$version_suffix + default_prefix="C:/Program Files/${PACKAGE}" bindir='${prefix}/bin' libdir='${prefix}/Resources' datadir='${prefix}/Resources' + pkgdatadir='${datadir}' mandir='${prefix}/Resources/man' ;; posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout]) - PACKAGE=lyx + PACKAGE=lyx${version_suffix} + program_suffix=$version_suffix + pkgdatadir='${datadir}/${PACKAGE}' default_prefix=$ac_default_prefix ;; *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;; esac +AC_SUBST(pkgdatadir) ]) diff --git a/configure.ac b/configure.ac index aa6b6a1f46..978babc572 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,13 @@ AC_CONFIG_AUX_DIR(config) # First check the version LYX_CHECK_VERSION +LYX_VERSION_SUFFIX +# Check how the files should be packaged AC_CANONICAL_TARGET +LYX_USE_PACKAGING +# We need to define these variables here and the no-define option of +# AM_INIT_AUTOMAKE above because we alter $PACKAGE in LYX_USE_PACKAGING. +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) dnl default maintainer mode to true for development versions if test "${enable_maintainer_mode+set}" != set; then @@ -17,14 +23,9 @@ if test "${enable_maintainer_mode+set}" != set; then fi AM_MAINTAINER_MODE +save_PACKAGE=$PACKAGE AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar no-define 1.9]) - -# Check how the files should be packaged -LYX_USE_PACKAGING -LYX_VERSION_SUFFIX -# We need to define these variables here and the no-define option of -# AM_INIT_AUTOMAKE above because LYX_VERSION_SUFFIX alters $PACKAGE. -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +PACKAGE=$save_PACKAGE ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs lib/configure ; do @@ -302,7 +303,8 @@ AC_FUNC_SELECT_ARGTYPES ### Some information on what just happened real_bindir=`eval "echo \`eval \"echo ${bindir}\"\`"` -real_datadir=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"` +real_pkgdatadir=`eval "echo \`eval \"echo ${pkgdatadir}\"\`"` +real_localedir=`eval "echo \`eval \"echo ${datadir}/locale\"\`"` VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${lyx_flags}\n\ @@ -317,12 +319,11 @@ VERSION_INFO="Configuration\n\ ${FRONTEND_INFO}\ Packaging: ${lyx_use_packaging}\n\ LyX binary dir: ${real_bindir}\n\ - LyX files dir: ${real_datadir}\n" + LyX files dir: ${real_pkgdatadir}\n" -real_localedir=`eval "echo \`eval \"echo ${datadir}/locale\"\`"` MSYS_AC_CANONICAL_PATH(LYX_ABS_TOP_SRCDIR, ${srcdir}) MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_LOCALEDIR, ${real_localedir}) -MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_datadir}) +MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_pkgdatadir}) AC_SUBST(VERSION_INFO) AC_SUBST(RPM_FRONTEND) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index f5c011a649..867e9fdb5e 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,8 @@ +2006-02-12 Jean-Marc Lasgouttes + + * package.C.in (relative_system_support_dir): fix for win32 and + OSX packaging. + 2005-11-02 Angus Leeming * path.C: trivial fix to a MSVS warning. diff --git a/src/support/package.C.in b/src/support/package.C.in index 7c553006ed..2ac24d02e5 100644 --- a/src/support/package.C.in +++ b/src/support/package.C.in @@ -699,7 +699,7 @@ string const relative_system_support_dir() string result; #if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING) - result = AddPath("../Resources/", PACKAGE); + result = "../Resources/"; #else // Posix-like. result = AddPath("../share/", PACKAGE); #endif