aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tf/0001-Add-DESTDIR-support.patch
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2018-01-24 10:07:31 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-01-27 19:44:23 +0000
commit24915c3da0f470c30262dcb1af32788fc702dfbc (patch)
tree02c12661be569b1e72093d1ef87f91c90395fd1d /testing/tf/0001-Add-DESTDIR-support.patch
parent73dc9eda8622e8f570d143fcd9fcadd822006553 (diff)
downloadaports-24915c3da0f470c30262dcb1af32788fc702dfbc.tar.bz2
aports-24915c3da0f470c30262dcb1af32788fc702dfbc.tar.xz
testing/tf: new package
Diffstat (limited to 'testing/tf/0001-Add-DESTDIR-support.patch')
-rw-r--r--testing/tf/0001-Add-DESTDIR-support.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/testing/tf/0001-Add-DESTDIR-support.patch b/testing/tf/0001-Add-DESTDIR-support.patch
new file mode 100644
index 0000000000..f7f2f7b1de
--- /dev/null
+++ b/testing/tf/0001-Add-DESTDIR-support.patch
@@ -0,0 +1,66 @@
+diff -Nurd tf-50b8/unix/unix.mak tf-50b8.new/unix/unix.mak
+--- tf-50b8/unix/unix.mak 2007-01-13 23:12:39.000000000 +0000
++++ tf-50b8.new/unix/unix.mak 2018-01-24 09:55:28.039801506 +0000
+@@ -87,46 +87,38 @@
+ -test -z "$(STRIP)" || $(STRIP) tf$(X) || true
+
+ PREFIXDIRS:
+- test -d "$(bindir)" || mkdir $(bindir)
+- test -d "$(datadir)" || mkdir $(datadir)
++ test -d "$(DESTDIR)$(bindir)" || mkdir -p $(DESTDIR)$(bindir)
++ test -d "$(DESTDIR)$(datadir)" || mkdir -p $(DESTDIR)$(datadir)
+
+ install_TF $(TF): tf$(X) $(BUILDERS)
+ -@rm -f $(TF)
+- cp tf$(X) $(TF)
+- chmod $(MODE) $(TF)
++ cp tf$(X) $(DESTDIR)$(TF)
++ chmod $(MODE) $(DESTDIR)$(TF)
+
+ SYMLINK $(SYMLINK): $(TF)
+- test -z "$(SYMLINK)" || { rm -f $(SYMLINK) && ln -s $(TF) $(SYMLINK); }
++ cd $(DESTDIR)$(bindir)
++ ln -s tf tf5
+
+ LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx
+ @echo '## Creating library directory...'
+-# @# Overly simplified shell commands, to avoid problems on ultrix
+- -@test -n "$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined."
+- test -n "$(TF_LIBDIR)"
+- test -d "$(TF_LIBDIR)" || mkdir $(TF_LIBDIR)
+- -@test -d "$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory. See if"
+- -@test -d "$(TF_LIBDIR)" || echo "there is already a file with that name."
+- test -d "$(TF_LIBDIR)"
+-#
+-# @#rm -f $(TF_LIBDIR)/*; # wrong: this would remove local.tf, etc.
++ test -d "$(DESTDIR)$(TF_LIBDIR)" || mkdir $(DESTDIR)$(TF_LIBDIR)
+ @echo '## Copying library files...'
+ cd ../tf-lib; \
+ for f in *; do test -f $$f && files="$$files $$f"; done; \
+- ( cd $(TF_LIBDIR); rm -f $$files tf.help tf.help.index; ); \
+- cp $$files $(TF_LIBDIR); \
+- cd $(TF_LIBDIR); \
++ ( cd $(DESTDIR)$(TF_LIBDIR); rm -f $$files tf.help tf.help.index; ); \
++ cp $$files $(DESTDIR)$(TF_LIBDIR); \
++ cd $(DESTDIR)$(TF_LIBDIR); \
+ chmod $(MODE) $$files; chmod ugo-wx $$files
+- -rm -f $(TF_LIBDIR)/CHANGES
+- cp ../CHANGES $(TF_LIBDIR)
+- chmod $(MODE) $(TF_LIBDIR)/CHANGES; chmod ugo-wx $(TF_LIBDIR)/CHANGES
+- chmod $(MODE) $(TF_LIBDIR)
+- -@cd $(TF_LIBDIR); old=`ls replace.tf 2>/dev/null`; \
++ -rm -f $(DESTDIR)$(TF_LIBDIR)/CHANGES
++ cp ../CHANGES $(DESTDIR)$(TF_LIBDIR)
++ chmod $(MODE) $(DESTDIR)$(TF_LIBDIR)/CHANGES; chmod ugo-wx $(DESTDIR)$(TF_LIBDIR)/CHANGES
++ chmod $(MODE) $(DESTDIR)$(TF_LIBDIR)
++ -@cd $(DESTDIR)$(TF_LIBDIR); old=`ls replace.tf 2>/dev/null`; \
+ if [ -n "$$old" ]; then \
+ echo "## WARNING: Obsolete files found in $(TF_LIBDIR): $$old"; \
+ fi
+ @echo '## Creating links so old library names still work...'
+-# @# note: ln -sf isn't portable.
+- @cd $(TF_LIBDIR); \
++ @cd $(DESTDIR)$(TF_LIBDIR); \
+ rm -f bind-bash.tf; ln -s kb-bash.tf bind-bash.tf; \
+ rm -f bind-emacs.tf; ln -s kb-emacs.tf bind-emacs.tf; \
+ rm -f completion.tf; ln -s complete.tf completion.tf; \