>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> Lars Gullik Bjønnes wrote: >> | Second (and very minor), I noticed that on a clean installation, >> the | LyX user's directory is ~/Library/Application\ Support/lyx; >> it should | be ~/Library/Application\ Support/LyX -- both for >> consistency with | 1.3.6 and to conform to Mac conventions for >> naming application | support folders. >> >> This I wont touch. (i.e. I leave it for somebody else) Angus> Ok, looks like some things fell between the cracks. The Angus> attached pair of patches sync the two LyX versions. I'll commit Angus> both as they're obviously correct. Well, the 1.4.x version is not obviously correct. I have decided in head to set explicitly PACKAGE to LyX when needed. Unfortunately, my code was untested and wrong. The patch below (which reverts yours) should fix all the problems. Bennett, Angus, I would appreciate if you could test it. I think the code to handle package in configure is much cleaner now. JMarc
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.1033 diff -u -p -r1.1033 ChangeLog --- ChangeLog 30 Sep 2005 09:44:36 -0000 1.1033 +++ ChangeLog 12 Oct 2005 10:02:13 -0000 @@ -1,3 +1,8 @@ +2005-10-12 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * configure.ac: call LYX_USE_PACKAGING early. Sanitize PACKAGE + setting. + 2005-09-30 Angus Leeming <[EMAIL PROTECTED]> * configure.ac: check for NewAPIs.h. If found, define the Index: configure.ac =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.64 diff -u -p -r1.64 configure.ac --- configure.ac 10 Oct 2005 13:33:03 -0000 1.64 +++ configure.ac 12 Oct 2005 10:02:13 -0000 @@ -7,9 +7,12 @@ AM_CONFIG_HEADER([src/config.h]) AC_CONFIG_AUX_DIR(config) -PACKAGE=lyx${program_suffix} +# first the version VERSION="1.4.0cvs" LYX_CHECK_VERSION +# Check how the files should be packaged +LYX_USE_PACKAGING +LYX_VERSION_SUFFIX dnl default maintainer mode to true for development versions if test "${enable_maintainer_mode+set}" != set; then @@ -18,9 +21,7 @@ fi AM_MAINTAINER_MODE AC_CANONICAL_TARGET -LYX_VERSION_SUFFIX - -AM_INIT_AUTOMAKE($lyxname, $VERSION) +AM_INIT_AUTOMAKE($PACKAGE, $VERSION) ### Set the execute permissions of the various scripts correctly for file in config/install-sh config/mkinstalldirs lib/configure ; do @@ -227,8 +228,6 @@ dnl qt build will fail without moc or ui esac done -### Check how the files should be packaged -LYX_USE_PACKAGING # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' Index: config/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v retrieving revision 1.175 diff -u -p -r1.175 ChangeLog --- config/ChangeLog 29 Sep 2005 13:25:36 -0000 1.175 +++ config/ChangeLog 12 Oct 2005 10:02:13 -0000 @@ -1,3 +1,9 @@ +2005-10-12 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * lyxinclude.m4 (LYX_USE_PACKAGING): set PACKAGE depending on + packaging setting. + (LYX_VERSION_SUFFIX): honor PACKAGE value. + 2005-09-29 Angus Leeming <[EMAIL PROTECTED]> * lyxinclude.m4: add a new MSYS_AC_CANONICAL_PATH macro that Index: config/lyxinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.116 diff -u -p -r1.116 lyxinclude.m4 --- config/lyxinclude.m4 29 Sep 2005 13:25:36 -0000 1.116 +++ config/lyxinclude.m4 12 Oct 2005 10:02:13 -0000 @@ -28,7 +28,7 @@ dnl Define the option to set a LyX versi dnl dnl AC_DEFUN([LYX_VERSION_SUFFIX],[ -AC_MSG_CHECKING([for install target ... ]) +AC_MSG_CHECKING([for install target]) RPM_VERSION_SUFFIX='""' AC_ARG_WITH(version-suffix, [ --with-version-suffix[=<version>] install lyx files as lyx<version>], @@ -37,12 +37,11 @@ AC_ARG_WITH(version-suffix, withval="-$VERSION" ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"` fi - lyxname="lyx$withval" + PACKAGE="$PACKAGE$withval" program_suffix=$withval - RPM_VERSION_SUFFIX="--with-version-suffix=$withval"], - [lyxname=lyx]) + RPM_VERSION_SUFFIX="--with-version-suffix=$withval"]) AC_SUBST(RPM_VERSION_SUFFIX) -AC_MSG_RESULT([$lyxname]) +AC_MSG_RESULT([$PACKAGE]) ]) @@ -587,20 +586,21 @@ 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]) - test $PACKAGE = "lyx" && PACKAGE=LyX + PACKAGE=LyX default_prefix="/Applications/LyX.app" bindir='${prefix}/Contents/MacOS' libdir='${prefix}/Contents/Resources' datadir='${prefix}/Contents/Resources' mandir='${prefix}/Contents/Resources/man' ;; windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) - test $PACKAGE = "lyx" && PACKAGE=LyX + PACKAGE=LyX default_prefix="C:/Program Files/LyX" bindir='${prefix}/bin' libdir='${prefix}/Resources' datadir='${prefix}/Resources' 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 default_prefix=$ac_default_prefix ;; *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;; esac Index: src/support/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/ChangeLog,v retrieving revision 1.361 diff -u -p -r1.361 ChangeLog --- src/support/ChangeLog 30 Sep 2005 12:24:50 -0000 1.361 +++ src/support/ChangeLog 12 Oct 2005 10:02:14 -0000 @@ -1,3 +1,8 @@ +2005-10-12 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * package.C.in (get_default_user_support_dir): do not play tricks + with PACKAGE value. + 2005-09-30 Angus Leeming <[EMAIL PROTECTED]> * os_win32.h: new file, providing a public and portable interface Index: src/support/package.C.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/package.C.in,v retrieving revision 1.15 diff -u -p -r1.15 package.C.in --- src/support/package.C.in 10 Oct 2005 21:54:38 -0000 1.15 +++ src/support/package.C.in 12 Oct 2005 10:02:14 -0000 @@ -591,9 +591,8 @@ string const get_default_user_support_di #if defined (USE_WINDOWS_PACKAGING) (void)home_dir; // Silence warning about unused variable. - string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE; os::GetFolderPath win32_folder_path; - return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), user_dir); + return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE); #elif defined (USE_MACOSX_PACKAGING) (void)home_dir; // Silence warning about unused variable. @@ -612,8 +611,7 @@ string const get_default_user_support_di if (status_code != 0) return string(); - string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE; - return AddPath(reinterpret_cast<char const *>(store), user_dir); + return AddPath(reinterpret_cast<char const *>(store), PACKAGE); #else // USE_POSIX_PACKAGING return AddPath(home_dir, string(".") + PACKAGE);