summaryrefslogtreecommitdiff
path: root/Build/source/utils/xindy/xindy-2.4-PATCHES/patch-61-detect-TL
blob: 2c0c67dc807f1ca8f9429d8edf2de5f5a1c970fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
diff -ur -N -x Makefile.in -x autom4te.cache xindy-2.4.orig/user-commands/Makefile.am xindy-2.4/user-commands/Makefile.am
--- xindy-2.4.orig/user-commands/Makefile.am	2010-05-11 01:15:51.000000000 +0200
+++ xindy-2.4/user-commands/Makefile.am	2011-03-31 19:05:38.000000000 +0200
@@ -24,36 +24,7 @@
 
 bin_SCRIPTS =
 
-if TEXLIVE_BUILD
-
-scriptspath = texmf/scripts/xindy
-scriptsdir = ${prefix}/$(scriptspath)
-install-exec-hook:
-	$(MKDIR_P) "$(DESTDIR)$(scriptsdir)"
-	@for f in $(scripts); do \
-	  $(INSTALL_SCRIPT) "$(srcdir)/$$f.in" "$(DESTDIR)$(scriptsdir)/$$f.pl"; \
-	done
-	case "$(bindir)" in \
-	  */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
-	  */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
-	  *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
-	     exit 1;; \
-	esac
-.PHONY: install-links
-install-links:
-	@cd "$(DESTDIR)$(bindir)" && \
-	for f in $(scripts); do \
-	  rm -f $$f; \
-	  echo "creating link '$$f' -> '$(REL)/$(scriptspath)/$$f.pl'"; \
-	  $(LN_S) $(REL)/$(scriptspath)/$$f.pl $$f; \
-	done
-uninstall-hook:
-	@for f in $(scripts); do \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	  rm -f "$(DESTDIR)$(scriptsdir)/$$f.pl"; \
-	done
-
-else !TEXLIVE_BUILD
+if !TEXLIVE_BUILD
 
 bin_SCRIPTS += $(scripts)
 
diff -ur -x Makefile.in -x autom4te.cache xindy-2.4.orig/user-commands/texindy.in xindy-2.4/user-commands/texindy.in
--- xindy-2.4.orig/user-commands/texindy.in	2010-05-11 01:39:24.000000000 +0200
+++ xindy-2.4/user-commands/texindy.in	2010-05-12 11:09:39.000000000 +0200
@@ -352,6 +352,7 @@
 
 # Determine environment. Where is our library directory, and our modules?
 
+our $is_TL = ( '@is_TL@' eq 'yes' );
 our $is_w32 = ( $OSNAME =~ /^MSWin/i ) ;
 our $real_cmd = Cwd::realpath($0);
 our $cmd_dir = dirname($real_cmd);
@@ -362,14 +363,8 @@
 # the actual scripts are in the library directory and have a .pl
 # extension. In standalone installations, user command xindy is
 # expected to be in the same directory as our command.
-#
-# FIXME: This code assumes that on TeX-Live -- and only there! -- the
-# real command has a .pl extension, this is used for detection that we
-# are on TeX-Live. This is blatantly untrue, in a standalone Windows
-# installation, xindy has also a .pl extension. We have to fix this
-# later, cleanup of this issue would delay inclusion in TL 2010.
 
-if ( $real_cmd =~ /\.pl$/ ) { # TeX Live
+if ( $is_TL ) { # TeX Live
 
     if ( $is_w32 ) {
 	$xindy = "$cmd_dir/xindy.pl";
diff -ur -x Makefile.in -x autom4te.cache xindy-2.4.orig/user-commands/xindy.in xindy-2.4/user-commands/xindy.in
--- xindy-2.4.orig/user-commands/xindy.in	2010-05-11 01:39:24.000000000 +0200
+++ xindy-2.4/user-commands/xindy.in	2010-05-12 11:09:37.000000000 +0200
@@ -337,6 +337,7 @@
 
 # Determine environment. Where is our library directory, and our modules?
 
+our $is_TL = ( '@is_TL@' eq 'yes' );
 our $is_w32 = ( $OSNAME =~ /^MSWin/i ) ;
 our $is_windows = ( $is_w32 || $OSNAME eq 'cygwin' ) ;
 our $clisp = ( $is_windows ? 'clisp.exe' : 'clisp' ) ;
@@ -354,16 +355,10 @@
 # images are located in a lib directory, modules are located in a
 # share directory.
 #
-# FIXME: This code assumes that on TeX-Live -- and only there! -- the
-# real command has a .pl extension, this is used for detection that we
-# are on TeX-Live. This is blatantly untrue, in a standalone Windows
-# installation, xindy has also a .pl extension. We have to fix this
-# later, cleanup of this issue would delay inclusion in TL 2010.
-#
 # FIXME: In standalone installations, modules are still placed in lib
 # directory. This is not conformant to FHS.
 
-if ( $real_cmd =~ /\.pl$/ ) { # TeX Live
+if ( $is_TL ) { # TeX Live
 
     $modules_dir = Cwd::realpath("$cmd_dir/../../xindy/modules");
     die "$cmd: Cannot locate xindy modules directory"  unless -d $modules_dir;
@@ -515,8 +510,7 @@
 }
 
 
-# Execution: Obey environment variables, create xindy start
-# expression, and eventually call it.
+# Execution: Create xindy start expression and call it.
 
 my $xindy_expression = xindy_expression(); # accesses global option vars
 my $exit_code = call_xindy ($mem_file, $xindy_expression);