2024-11-22 00:08 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000259mercuryFeature Requestpublic2013-06-04 03:41
Reporterony 
Assigned To 
PriorityhighSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformAllOSAllOS VersionAll
Product Version 
Target VersionFixed in Version 
Summary0000259: Impossible to override /lib dir with /lib64 etc
DescriptionTo support multilib install we need to have possibility to use /usr/lib64 instead of /usr/lib.
Appropriate patch based on rotd-2012-07-01 attached
TagsNo tags attached.
Attached Files
  • patch file icon 0001-Allow-usr-lib64-override-required-for-multilib.patch (2,422 bytes) 2012-07-08 03:58 -
    From fe004251b15889c2ab2c6675fc179529efaaebe0 Mon Sep 17 00:00:00 2001
    From: Nikolay Orlyuk <virkony@gmail.com>
    Date: Sat, 7 Jul 2012 20:53:25 +0300
    Subject: [PATCH] Allow /usr/lib64 override (required for multilib)
    
    Many linux distributives uses /usr/lib64 for amd64 libraries and
    /usr/lib32 for x86. To support those this change allows to override
    /usr/lib with standart libdir var in autoconf.
    ---
     scripts/Mmake.vars.in |   28 ++++++++++++++++------------
     1 file changed, 16 insertions(+), 12 deletions(-)
    
    diff --git a/scripts/Mmake.vars.in b/scripts/Mmake.vars.in
    index f808d21..e5d782a 100644
    --- a/scripts/Mmake.vars.in
    +++ b/scripts/Mmake.vars.in
    @@ -691,26 +691,30 @@ else
         DESTDIR_AND_SLASH=$(DESTDIR)/
     endif
     
    -INSTALL_PREFIX		= $(DESTDIR_AND_SLASH)@prefix@
    +prefix = @prefix@
    +exec_prefix = @exec_prefix@
    +libdir = @libdir@
    +
    +INSTALL_PREFIX		= $(DESTDIR_AND_SLASH)$(prefix)
     INSTALL_BINDIR		= $(INSTALL_PREFIX)/bin
    -INSTALL_LIBDIR		= $(INSTALL_PREFIX)/lib/mercury
    +INSTALL_LIBDIR		= $(DESTDIR_AND_SLASH)$(libdir)/mercury
     INSTALL_INFO_DIR	= $(INSTALL_PREFIX)/info
    -INSTALL_DVI_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_TEXT_DIR	= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_PS_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_PDF_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    +INSTALL_DVI_DIR		= $(INSTALL_LIBDIR)/doc
    +INSTALL_TEXT_DIR	= $(INSTALL_LIBDIR)/doc
    +INSTALL_PS_DIR		= $(INSTALL_LIBDIR)/doc
    +INSTALL_PDF_DIR		= $(INSTALL_LIBDIR)/doc
     INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
    -INSTALL_HTML_DIR	= $(INSTALL_PREFIX)/lib/mercury/html
    -INSTALL_MDB_DOC_DIR	= $(INSTALL_PREFIX)/lib/mercury/mdb
    -INSTALL_ELISP_DIR	= $(INSTALL_PREFIX)/lib/mercury/elisp
    +INSTALL_HTML_DIR	= $(INSTALL_LIBDIR)/html
    +INSTALL_MDB_DOC_DIR	= $(INSTALL_LIBDIR)/mdb
    +INSTALL_ELISP_DIR	= $(INSTALL_LIBDIR)/elisp
     INSTALL_CGI_DIR		= $(DESTDIR_AND_SLASH)@CGIDIR@
     
    -FINAL_INSTALL_PREFIX	= @prefix@
    +FINAL_INSTALL_PREFIX	= $(prefix)
     FINAL_INSTALL_BINDIR 	= $(FINAL_INSTALL_PREFIX)/bin
    -FINAL_INSTALL_LIBDIR	= $(FINAL_INSTALL_PREFIX)/lib/mercury
    +FINAL_INSTALL_LIBDIR	= $(libdir)/mercury
     FINAL_INSTALL_INFO_DIR	= $(FINAL_INSTALL_PREFIX)/info
     FINAL_INSTALL_MAN_DIR	= $(FINAL_INSTALL_PREFIX)/man
    -FINAL_INSTALL_ELISP_DIR	= $(FINAL_INSTALL_PREFIX)/lib/mercury/elisp
    +FINAL_INSTALL_ELISP_DIR	= $(FINAL_INSTALL_LIBDIR)/elisp
     FINAL_INSTALL_CGI_DIR	= @CGIDIR@
     
     # You should not need to override anything below here
    -- 
    1.7.10.4
    
    
  • patch file icon 0001-Add-man-info-and-lisp-dirs-configuring.patch (1,869 bytes) 2012-07-08 06:39 -
    From bd9a3b7f187d945ddfc8d6a0fd43a8a48d078630 Mon Sep 17 00:00:00 2001
    From: Nikolay Orlyuk <virkony@gmail.com>
    Date: Sat, 7 Jul 2012 23:36:07 +0300
    Subject: [PATCH] Add man, info and lisp dirs configuring
    
    ---
     scripts/Mmake.vars.in |   17 ++++++++++++-----
     1 file changed, 12 insertions(+), 5 deletions(-)
    
    diff --git a/scripts/Mmake.vars.in b/scripts/Mmake.vars.in
    index e5d782a..b54d29f 100644
    --- a/scripts/Mmake.vars.in
    +++ b/scripts/Mmake.vars.in
    @@ -691,9 +691,16 @@ else
         DESTDIR_AND_SLASH=$(DESTDIR)/
     endif
     
    +# autoconf provided vars
     prefix = @prefix@
     exec_prefix = @exec_prefix@
     libdir = @libdir@
    +datarootdir = @datarootdir@
    +mandir = @mandir@
    +infodir = @infodir@
    +lispdir = @lispdir@
    +
    +# actual vars used for installation
     
     INSTALL_PREFIX		= $(DESTDIR_AND_SLASH)$(prefix)
     INSTALL_BINDIR		= $(INSTALL_PREFIX)/bin
    @@ -703,18 +710,18 @@ INSTALL_DVI_DIR		= $(INSTALL_LIBDIR)/doc
     INSTALL_TEXT_DIR	= $(INSTALL_LIBDIR)/doc
     INSTALL_PS_DIR		= $(INSTALL_LIBDIR)/doc
     INSTALL_PDF_DIR		= $(INSTALL_LIBDIR)/doc
    -INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
    +INSTALL_MAN_DIR		= $(DESTDIR_AND_SLASH)$(mandir)
     INSTALL_HTML_DIR	= $(INSTALL_LIBDIR)/html
     INSTALL_MDB_DOC_DIR	= $(INSTALL_LIBDIR)/mdb
    -INSTALL_ELISP_DIR	= $(INSTALL_LIBDIR)/elisp
    +INSTALL_ELISP_DIR	= $(DESTDIR_AND_SLASH)$(lispdir)
     INSTALL_CGI_DIR		= $(DESTDIR_AND_SLASH)@CGIDIR@
     
     FINAL_INSTALL_PREFIX	= $(prefix)
     FINAL_INSTALL_BINDIR 	= $(FINAL_INSTALL_PREFIX)/bin
     FINAL_INSTALL_LIBDIR	= $(libdir)/mercury
    -FINAL_INSTALL_INFO_DIR	= $(FINAL_INSTALL_PREFIX)/info
    -FINAL_INSTALL_MAN_DIR	= $(FINAL_INSTALL_PREFIX)/man
    -FINAL_INSTALL_ELISP_DIR	= $(FINAL_INSTALL_LIBDIR)/elisp
    +FINAL_INSTALL_INFO_DIR	= $(infodir)/info
    +FINAL_INSTALL_MAN_DIR	= $(mandir)
    +FINAL_INSTALL_ELISP_DIR	= $(lsipdir)
     FINAL_INSTALL_CGI_DIR	= @CGIDIR@
     
     # You should not need to override anything below here
    -- 
    1.7.10.4
    
    
    patch file icon 0001-Add-man-info-and-lisp-dirs-configuring.patch (1,869 bytes) 2012-07-08 06:39 +
  • patch file icon 0002-Add-man-info-and-lisp-dirs-configuring.patch (1,847 bytes) 2012-07-08 08:54 -
    From ecf30d037caf1dec0a4b46841f4ac633d2971c5d Mon Sep 17 00:00:00 2001
    From: Nikolay Orlyuk <virkony@gmail.com>
    Date: Sat, 7 Jul 2012 23:36:07 +0300
    Subject: [PATCH 2/2] Add man, info and lisp dirs configuring
    
    ---
     scripts/Mmake.vars.in |   14 ++++++++++----
     1 file changed, 10 insertions(+), 4 deletions(-)
    
    diff --git a/scripts/Mmake.vars.in b/scripts/Mmake.vars.in
    index e5d782a..c411bbc 100644
    --- a/scripts/Mmake.vars.in
    +++ b/scripts/Mmake.vars.in
    @@ -691,19 +691,25 @@ else
         DESTDIR_AND_SLASH=$(DESTDIR)/
     endif
     
    +# autoconf provided vars
     prefix = @prefix@
     exec_prefix = @exec_prefix@
     libdir = @libdir@
    +datarootdir = @datarootdir@
    +mandir = @mandir@
    +infodir = @infodir@
    +
    +# actual vars used for installation
     
     INSTALL_PREFIX		= $(DESTDIR_AND_SLASH)$(prefix)
     INSTALL_BINDIR		= $(INSTALL_PREFIX)/bin
     INSTALL_LIBDIR		= $(DESTDIR_AND_SLASH)$(libdir)/mercury
    -INSTALL_INFO_DIR	= $(INSTALL_PREFIX)/info
    +INSTALL_INFO_DIR	= $(DESTDIR_AND_SLASH)$(infodir)
     INSTALL_DVI_DIR		= $(INSTALL_LIBDIR)/doc
     INSTALL_TEXT_DIR	= $(INSTALL_LIBDIR)/doc
     INSTALL_PS_DIR		= $(INSTALL_LIBDIR)/doc
     INSTALL_PDF_DIR		= $(INSTALL_LIBDIR)/doc
    -INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
    +INSTALL_MAN_DIR		= $(DESTDIR_AND_SLASH)$(mandir)
     INSTALL_HTML_DIR	= $(INSTALL_LIBDIR)/html
     INSTALL_MDB_DOC_DIR	= $(INSTALL_LIBDIR)/mdb
     INSTALL_ELISP_DIR	= $(INSTALL_LIBDIR)/elisp
    @@ -712,8 +718,8 @@ INSTALL_CGI_DIR		= $(DESTDIR_AND_SLASH)@CGIDIR@
     FINAL_INSTALL_PREFIX	= $(prefix)
     FINAL_INSTALL_BINDIR 	= $(FINAL_INSTALL_PREFIX)/bin
     FINAL_INSTALL_LIBDIR	= $(libdir)/mercury
    -FINAL_INSTALL_INFO_DIR	= $(FINAL_INSTALL_PREFIX)/info
    -FINAL_INSTALL_MAN_DIR	= $(FINAL_INSTALL_PREFIX)/man
    +FINAL_INSTALL_INFO_DIR	= $(infodir)
    +FINAL_INSTALL_MAN_DIR	= $(mandir)
     FINAL_INSTALL_ELISP_DIR	= $(FINAL_INSTALL_LIBDIR)/elisp
     FINAL_INSTALL_CGI_DIR	= @CGIDIR@
     
    -- 
    1.7.10.4
    
    
    patch file icon 0002-Add-man-info-and-lisp-dirs-configuring.patch (1,847 bytes) 2012-07-08 08:54 +
  • patch file icon mercury-13.05-bug259-dirs-overriding.patch (2,680 bytes) 2013-05-19 03:39 -
    Source: Nikolay Orlyuk <virkony@gmail.com>
    Upstream: http://bugs.mercury.csse.unimelb.edu.au/view.php?id=259
    Reason: Current Mercury sources doesn't handle libdir override well as well as
            man, info and lisp dirs. But this is crusical for multilib env.
    
    --- mercury-srcdist-13.05/configure.ac.orig	2013-05-14 07:10:16.000000000 +0300
    +++ mercury-srcdist-13.05/configure.ac	2013-05-18 12:48:16.489028416 +0300
    @@ -1103,6 +1103,9 @@
     AC_SUBST(FIX_PATH_FOR_CC)
     AC_SUBST(CYGPATH)
     
    +lispdir='${datarootdir}/emacs/site-lisp'
    +AC_SUBST(lispdir)
    +
     #-----------------------------------------------------------------------------#
     # Check for `-lm': some systems, e.g. MacOS X (Darwin), don't have it.
     # The result of this check may be overridden below.
    --- mercury-srcdist-13.05/scripts/Mmake.vars.in.orig	2013-05-18 13:02:09.669064476 +0300
    +++ mercury-srcdist-13.05/scripts/Mmake.vars.in	2013-05-18 13:08:41.195748087 +0300
    @@ -684,24 +684,24 @@
     
     INSTALL_PREFIX		= $(DESTDIR_AND_SLASH)@prefix@
     INSTALL_BINDIR		= $(INSTALL_PREFIX)/bin
    -INSTALL_LIBDIR		= $(INSTALL_PREFIX)/lib/mercury
    -INSTALL_INFO_DIR	= $(INSTALL_PREFIX)/info
    -INSTALL_DVI_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_TEXT_DIR	= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_PS_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_PDF_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
    -INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
    -INSTALL_HTML_DIR	= $(INSTALL_PREFIX)/lib/mercury/html
    -INSTALL_MDB_DOC_DIR	= $(INSTALL_PREFIX)/lib/mercury/mdb
    -INSTALL_ELISP_DIR	= $(INSTALL_PREFIX)/lib/mercury/elisp
    +INSTALL_LIBDIR		= $(DESTDIR_AND_SLASH)@libdir@/mercury
    +INSTALL_INFO_DIR	= $(DESTDIR_AND_SLASH)@infodir@
    +INSTALL_DVI_DIR		= $(DESTDIR_AND_SLASH)@docdir@
    +INSTALL_TEXT_DIR	= $(DESTDIR_AND_SLASH)@docdir@
    +INSTALL_PS_DIR		= $(DESTDIR_AND_SLASH)@docdir@
    +INSTALL_PDF_DIR		= $(DESTDIR_AND_SLASH)@docdir@
    +INSTALL_MAN_DIR		= $(DESTDIR_AND_SLASH)@mandir@
    +INSTALL_HTML_DIR	= $(DESTDIR_AND_SLASH)@docdir@/html
    +INSTALL_MDB_DOC_DIR	= $(DESTDIR_AND_SLASH)@docdir@/mdb
    +INSTALL_ELISP_DIR	= $(INSTALL_PREFIX)@lispdir@
     INSTALL_CGI_DIR		= $(DESTDIR_AND_SLASH)@CGIDIR@
     
     FINAL_INSTALL_PREFIX	= @prefix@
     FINAL_INSTALL_BINDIR 	= $(FINAL_INSTALL_PREFIX)/bin
    -FINAL_INSTALL_LIBDIR	= $(FINAL_INSTALL_PREFIX)/lib/mercury
    -FINAL_INSTALL_INFO_DIR	= $(FINAL_INSTALL_PREFIX)/info
    -FINAL_INSTALL_MAN_DIR	= $(FINAL_INSTALL_PREFIX)/man
    -FINAL_INSTALL_ELISP_DIR	= $(FINAL_INSTALL_PREFIX)/lib/mercury/elisp
    +FINAL_INSTALL_LIBDIR	= @libdir@/mercury
    +FINAL_INSTALL_INFO_DIR	= @infodir@
    +FINAL_INSTALL_MAN_DIR	= @mandir@
    +FINAL_INSTALL_ELISP_DIR	= @lispdir@
     FINAL_INSTALL_CGI_DIR	= @CGIDIR@
     
     # You should not need to override anything below here
    
    patch file icon mercury-13.05-bug259-dirs-overriding.patch (2,680 bytes) 2013-05-19 03:39 +

-Relationships
+Relationships

-Notes

~0000473

ony (reporter)

sorry for 0001-Add-man-info-and-lisp-dirs-configuring.patch
second should be good (after applying first one).

I can create another issue for it (actually I'd prefer to edit description for this to make it sounds like "directory overriding for libdir, mandir, infodir etc").

~0000474

pbone (administrator)

Thanks. Someone will look at this as time permits (I promise!). Don't worry about adding a new issue, they've enough in common that a general issue is fine.

~0000518

ony (reporter)

both patches now in single mercury-13.05-bug259-dirs-overriding.patch

please consider using /usr/share/doc/mercury-13.05 etc for documentation rather than /usr/lib/mercury/doc. currently patch changes those folder according to this suggestion

~0000533

keri (reporter)

This bug is a little more complicated than first meets the eye. In addition to the changes in mercury-13.05-bug259-dirs-overriding.patch there are a few other places in which $(INSTALL_PREFIX)/lib/mercury is referenced:

* library/Mmakefile:

   260 install_mer_rt: $(RT_LIB_NAME).jar
   261 mkdir -p $(INSTALL_PREFIX)/lib/mercury/lib/$(GRADE)
   262 cp $(RT_LIB_NAME).jar $(INSTALL_PREFIX)/lib/mercury/lib/$(GRADE)

* the mercury compiler itself

compiler/file_util.m:

   262 InstallNamePath = InstallPrefix / "lib" / "mercury" / "lib" / GradeDir

compiler/make.program_target.m:

  1374 LibDir = Prefix/"lib"/"mercury",
  1427 IncDir = Prefix / "lib" / "mercury" / "inc",
  1576 GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir,
  1581 GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir,
  1586 GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir,
  1593 GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir,
  1624 GradeModulesDir = Prefix / "lib" / "mercury" / "modules" / GradeDir,
  1641 LibDir = Prefix/"lib"/"mercury",
  1788 LibDir = Prefix/"lib"/"mercury",
  1819 LibDir = Prefix/"lib"/"mercury",

* extras/posix/Mmakefile

    37 cp $(ADDITIONAL_HDRS) $(INSTALL_PREFIX)/lib/mercury/inc
+Notes

-Issue History
Date Modified Username Field Change
2012-07-08 03:58 ony New Issue
2012-07-08 03:58 ony File Added: 0001-Allow-usr-lib64-override-required-for-multilib.patch
2012-07-08 06:39 ony File Added: 0001-Add-man-info-and-lisp-dirs-configuring.patch
2012-07-08 08:54 ony File Added: 0002-Add-man-info-and-lisp-dirs-configuring.patch
2012-07-08 08:57 ony Note Added: 0000473
2012-07-08 10:59 pbone Note Added: 0000474
2013-05-19 03:39 ony File Added: mercury-13.05-bug259-dirs-overriding.patch
2013-05-19 03:44 ony Note Added: 0000518
2013-06-04 03:41 keri Note Added: 0000533
+Issue History