diff options
Diffstat (limited to 'dev-lang/mercury/files/mercury-10.04.1-multilib.patch')
-rw-r--r-- | dev-lang/mercury/files/mercury-10.04.1-multilib.patch | 232 |
1 files changed, 232 insertions, 0 deletions
diff --git a/dev-lang/mercury/files/mercury-10.04.1-multilib.patch b/dev-lang/mercury/files/mercury-10.04.1-multilib.patch new file mode 100644 index 000000000000..ba62e85fdf67 --- /dev/null +++ b/dev-lang/mercury/files/mercury-10.04.1-multilib.patch @@ -0,0 +1,232 @@ +diff -ur mercury-compiler-10.04.1.orig/compiler/file_util.m mercury-compiler-10.04.1/compiler/file_util.m +--- mercury-compiler-10.04.1.orig/compiler/file_util.m 2009-10-14 18:28:32.000000000 +1300 ++++ mercury-compiler-10.04.1/compiler/file_util.m 2010-09-05 15:35:56.000000000 +1200 +@@ -261,7 +261,7 @@ + ( InstallNamePath0 = "" -> + globals.lookup_string_option(Globals, install_prefix, InstallPrefix), + grade_directory_component(Globals, GradeDir), +- InstallNamePath = InstallPrefix / "lib" / "mercury" / "lib" / GradeDir ++ InstallNamePath = InstallPrefix / "@libdir@" / "mercury" / "lib" / GradeDir + ; + InstallNamePath = InstallNamePath0 + ), +diff -ur mercury-compiler-10.04.1.orig/compiler/libs.file_util.c mercury-compiler-10.04.1/compiler/libs.file_util.c +--- mercury-compiler-10.04.1.orig/compiler/libs.file_util.c 2010-08-30 04:35:03.000000000 +1200 ++++ mercury-compiler-10.04.1/compiler/libs.file_util.c 2010-09-05 11:29:44.000000000 +1200 +@@ -856,7 +856,7 @@ + MR_tempr1 = MR_sv(1); + MR_sv(1) = MR_r1; + MR_r1 = MR_tempr1; +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + } + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + libs__file_util__get_install_name_option_3_0_i8); +diff -ur mercury-compiler-10.04.1.orig/compiler/make.program_target.c mercury-compiler-10.04.1/compiler/make.program_target.c +--- mercury-compiler-10.04.1.orig/compiler/make.program_target.c 2010-08-30 04:37:52.000000000 +1200 ++++ mercury-compiler-10.04.1/compiler/make.program_target.c 2010-09-05 08:58:59.000000000 +1200 +@@ -5422,7 +5422,7 @@ + make__program_target__install_grade_init_6_0_i2); + MR_def_label(make__program_target__install_grade_init_6_0,2) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_grade_init_6_0_i3); + MR_def_label(make__program_target__install_grade_init_6_0,3) +@@ -5873,7 +5873,7 @@ + make__program_target__make_grade_install_dirs_6_0_i2); + MR_def_label(make__program_target__make_grade_install_dirs_6_0,2) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__make_grade_install_dirs_6_0_i3); + MR_def_label(make__program_target__make_grade_install_dirs_6_0,3) +@@ -6318,7 +6318,7 @@ + MR_GOTO_LAB(make__program_target__install_library_grade_files_10_0_i11); + } + MR_r1 = MR_sv(10); +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_library_grade_files_10_0_i14); + MR_def_label(make__program_target__install_library_grade_files_10_0,14) +@@ -6382,7 +6382,7 @@ + MR_GOTO_LAB(make__program_target__install_library_grade_files_10_0_i20); + } + MR_r1 = MR_sv(10); +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_library_grade_files_10_0_i23); + MR_def_label(make__program_target__install_library_grade_files_10_0,23) +@@ -6448,7 +6448,7 @@ + MR_def_label(make__program_target__install_library_grade_files_10_0,20) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE + MR_r1 = MR_sv(10); +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_library_grade_files_10_0_i30); + MR_def_label(make__program_target__install_library_grade_files_10_0,30) +@@ -6585,7 +6585,7 @@ + make__program_target__make_install_dirs_5_0_i2); + MR_def_label(make__program_target__make_install_dirs_5_0,2) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__make_install_dirs_5_0_i3); + MR_def_label(make__program_target__make_install_dirs_5_0,3) +@@ -6806,7 +6806,7 @@ + make__program_target__install_library_7_0_i11); + MR_def_label(make__program_target__install_library_7_0,11) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_library_7_0_i12); + MR_def_label(make__program_target__install_library_7_0,12) +@@ -10596,7 +10596,7 @@ + make__program_target__install_ints_and_headers_8_0_i13); + MR_def_label(make__program_target__install_ints_and_headers_8_0,13) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_ints_and_headers_8_0_i14); + MR_def_label(make__program_target__install_ints_and_headers_8_0,14) +@@ -11222,7 +11222,7 @@ + make__program_target__install_grade_ints_and_headers_9_0_i5); + MR_def_label(make__program_target__install_grade_ints_and_headers_9_0,5) + MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE +- MR_r2 = (MR_Word) MR_string_const("lib", 3); ++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3); + MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0, + make__program_target__install_grade_ints_and_headers_9_0_i6); + MR_def_label(make__program_target__install_grade_ints_and_headers_9_0,6) +diff -ur mercury-compiler-10.04.1.orig/compiler/make.program_target.m mercury-compiler-10.04.1/compiler/make.program_target.m +--- mercury-compiler-10.04.1.orig/compiler/make.program_target.m 2010-05-20 21:29:30.000000000 +1200 ++++ mercury-compiler-10.04.1/compiler/make.program_target.m 2010-09-05 15:35:08.000000000 +1200 +@@ -1370,7 +1370,7 @@ + ), + + globals.lookup_string_option(Globals, install_prefix, Prefix), +- LibDir = Prefix/"lib"/"mercury", ++ LibDir = Prefix/"@libdir@"/"mercury", + list.map_foldl( + install_subdir_file(Globals, SubdirLinkSucceeded, LibDir/"ints", + ModuleName), +@@ -1424,7 +1424,7 @@ + globals.lookup_accumulating_option(Globals, extra_library_header, + ExtraHdrs), + globals.lookup_string_option(Globals, install_prefix, Prefix), +- IncDir = Prefix / "lib" / "mercury" / "inc", ++ IncDir = Prefix / "@libdir@" / "mercury" / "inc", + list.foldl2(install_extra_header(Globals, IncDir), ExtraHdrs, + yes, ExtraHdrsSucceeded, !IO). + +@@ -1572,19 +1572,19 @@ + globals.lookup_string_option(Globals, install_prefix, Prefix), + + ( string.prefix(GradeDir, "java") -> +- GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir, ++ GradeLibDir = Prefix/"@libdir@"/"mercury"/"lib"/GradeDir, + install_file(Globals, JarFileName, GradeLibDir, LibsSucceeded, + !IO), + InitSucceeded = yes + ; string.prefix(GradeDir, "erlang") -> +- GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir, ++ GradeLibDir = Prefix/"@libdir@"/"mercury"/"lib"/GradeDir, + % Our "Erlang archives" are actually directories. + install_directory(Globals, ErlangArchiveFileName, GradeLibDir, + LibsSucceeded, !IO), + install_grade_init(Globals, GradeDir, ModuleName, InitSucceeded, + !IO) + ; +- GradeLibDir = Prefix/"lib"/"mercury"/"lib"/GradeDir, ++ GradeLibDir = Prefix/"@libdir@"/"mercury"/"lib"/GradeDir, + maybe_install_library_file(Globals, "static", LibFileName, + GradeLibDir, LibSuccess, !IO), + ( LibFileName = SharedLibFileName -> +@@ -1615,7 +1615,7 @@ + + install_grade_init(Globals, GradeDir, ModuleName, Succeeded, !IO) :- + globals.lookup_string_option(Globals, install_prefix, Prefix), +- GradeModulesDir = Prefix / "lib" / "mercury" / "modules" / GradeDir, ++ GradeModulesDir = Prefix / "@libdir@" / "mercury" / "modules" / GradeDir, + module_name_to_file_name(Globals, ModuleName, ".init", do_not_create_dirs, + InitFileName, !IO), + install_file(Globals, InitFileName, GradeModulesDir, Succeeded, !IO). +@@ -1632,7 +1632,7 @@ + ( + MaybeImports = yes(Imports), + globals.lookup_string_option(Globals, install_prefix, Prefix), +- LibDir = Prefix/"lib"/"mercury", ++ LibDir = Prefix/"@libdir@"/"mercury", + + globals.get_target(Globals, Target), + globals.lookup_bool_option(Globals, highlevel_code, HighLevelCode), +@@ -1784,7 +1784,7 @@ + + make_install_dirs(Globals, Result, LinkResult, !IO) :- + globals.lookup_string_option(Globals, install_prefix, Prefix), +- LibDir = Prefix/"lib"/"mercury", ++ LibDir = Prefix/"@libdir@"/"mercury", + make_directory(LibDir/"inc", Result1, !IO), + make_directory(LibDir/"modules", Result2, !IO), + +@@ -1815,7 +1815,7 @@ + + make_grade_install_dirs(Globals, Grade, Result, LinkResult, !IO) :- + globals.lookup_string_option(Globals, install_prefix, Prefix), +- LibDir = Prefix/"lib"/"mercury", ++ LibDir = Prefix/"@libdir@"/"mercury", + + GradeIntsSubdir = LibDir/"ints"/Grade/"Mercury", + make_directory(GradeIntsSubdir, Result1, !IO), +diff -ur mercury-compiler-10.04.1.orig/library/Mmakefile mercury-compiler-10.04.1/library/Mmakefile +--- mercury-compiler-10.04.1.orig/library/Mmakefile 2010-09-05 11:44:16.000000000 +1200 ++++ mercury-compiler-10.04.1/library/Mmakefile 2010-09-05 09:02:39.000000000 +1200 +@@ -268,8 +268,8 @@ + [ -d jmercury/runtime ] || cp -r ../java/runtime jmercury + + install_mer_rt: $(RT_LIB_NAME).jar +- mkdir -p $(INSTALL_PREFIX)/lib/mercury/lib/$(GRADE) +- cp $(RT_LIB_NAME).jar $(INSTALL_PREFIX)/lib/mercury/lib/$(GRADE) ++ mkdir -p $(INSTALL_LIBDIR)/lib/$(GRADE) ++ cp $(RT_LIB_NAME).jar $(INSTALL_LIBDIR)/lib/$(GRADE) + + else + +diff -ur mercury-compiler-10.04.1.orig/scripts/Mmake.vars.in mercury-compiler-10.04.1/scripts/Mmake.vars.in +--- mercury-compiler-10.04.1.orig/scripts/Mmake.vars.in 2010-05-20 21:29:31.000000000 +1200 ++++ mercury-compiler-10.04.1/scripts/Mmake.vars.in 2010-09-05 08:59:58.000000000 +1200 +@@ -688,17 +688,17 @@ + INSTALL_PREFIX = @prefix@ + FINAL_INSTALL_PREFIX = @prefix@ + INSTALL_BINDIR = $(INSTALL_PREFIX)/bin +-INSTALL_LIBDIR = $(INSTALL_PREFIX)/lib/mercury +-FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/lib/mercury ++INSTALL_LIBDIR = $(INSTALL_PREFIX)/@libdir@/mercury ++FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/@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_PREFIX)/@libdir@/mercury/doc ++INSTALL_TEXT_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc ++INSTALL_PS_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc ++INSTALL_PDF_DIR = $(INSTALL_PREFIX)/@libdir@/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_HTML_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/html ++INSTALL_MDB_DOC_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/mdb ++INSTALL_ELISP_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/elisp + INSTALL_CGI_DIR = @CGIDIR@ + + # You should not need to override anything below here |