>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> This patch looks good to me, so that if the OSX and Win people Lars> say that this works for them and nothing else regresses this Lars> should go in. Lars> I'd like this in before I spin a pre5. (I want a pre5 anyway Lars> because of the cvs->svn change) I updated it again, so that now the system directory is not /Application/LyX.app/Contents/Resource/LyX/ on OSX, but rather /Application/LyX.app/Contents/Resource/ The same holds for windows. This fixes a problem pointed by Bennett about a mixup between Resource/LyX and Resource/LyX${version_suffix}. An earlier version of this patch removed the additional $version_suffix at the end of binaries names for windows and OSX. I removed it because it breaks lib/configure when the --with-version-suffix option is given. I am not sure which one is better. Bennett I can do as you prefer: if you provide a preference file with the right tex2lyx invocation, getting rid of the version suffix on binaries may be better. Lars, since you plan to do a pre5, I think we can safely apply the patch and see whether windows/osx packagers complain :) I think the behaviour for posix is correct. Finally, concerning automake 1.9, I see there is a port on the mingw downloqd page. Is there a reason why it does not work? JMarc
Index: src/support/ChangeLog =================================================================== --- src/support/ChangeLog (revision 13217) +++ src/support/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-02-12 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * package.C.in (relative_system_support_dir): fix for win32 and + OSX packaging. + 2005-11-02 Angus Leeming <[EMAIL PROTECTED]> * path.C: trivial fix to a MSVS warning. Index: src/support/package.C.in =================================================================== --- src/support/package.C.in (revision 13217) +++ src/support/package.C.in (working copy) @@ -699,7 +699,7 @@ 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 Index: configure.ac =================================================================== --- configure.ac (revision 13217) +++ configure.ac (working copy) @@ -9,7 +9,13 @@ # 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,15 +23,10 @@ fi AM_MAINTAINER_MODE +save_PACKAGE=$PACKAGE AM_INIT_AUTOMAKE([foreign dist-bzip2 tar-ustar no-define 1.9]) +PACKAGE=$save_PACKAGE -# 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]) - ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs lib/configure ; do chmod 755 ${srcdir}/${file} @@ -302,7 +303,8 @@ ### 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 @@ ${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) Index: ChangeLog =================================================================== --- ChangeLog (revision 13217) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-02-07 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * 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 <[EMAIL PROTECTED]> * configure.ac: @@ -7,7 +12,7 @@ * Delete all .cvsignore files from the source tree -2006-01-26 <[EMAIL PROTECTED]> +2006-01-26 Lars Gullik Bjonnes <[EMAIL PROTECTED]> * autogen.sh: remove the --force-missing option to automake Index: config/ChangeLog =================================================================== --- config/ChangeLog (revision 13217) +++ config/ChangeLog (working copy) @@ -1,5 +1,12 @@ -2006-01-26 Lars Gullik Bjønne s<[EMAIL PROTECTED]> +2006-02-07 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + * 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 <[EMAIL PROTECTED]> + * ltmain.sh: apply patch for darwin 2005-12-30 Lars Gullik Bjonnes <[EMAIL PROTECTED]> Index: config/lyxinclude.m4 =================================================================== --- config/lyxinclude.m4 (revision 13217) +++ config/lyxinclude.m4 (working copy) @@ -7,7 +7,7 @@ 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 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[=<version>] install lyx files as lyx<version>], [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_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) ])