Hello all,

This patch fixes 3 things in texlive:
a) TL will now buil even if already installed.
b) It cleans up it's symlinks. I wrote a patch for the "texlinks"
script and it has been committed upstream.
c) Karl Berry also cleaned up the texlinks usage options in the same
commit as (b), so I thought I may aswell backport this also.

---8<---
diff -urN texlive/base/Makefile texlive.new/base/Makefile
--- texlive/base/Makefile       Mon Sep 10 14:37:26 2007
+++ texlive.new/base/Makefile   Mon Oct 15 16:35:15 2007
@@ -4,7 +4,7 @@

 V=                     2007
 DISTNAME=              texlive_base-${V}-src
-PKGNAME=               texlive_base-${V}p0
+PKGNAME=               texlive_base-${V}p1
 SHARED_LIBS=           kpathsea        0.0

 WANTLIB=               m X11 ICE freetype Xt pthread c Xext fontconfig \
diff -urN texlive/base/patches/patch-texk_tetex_texlinks
texlive.new/base/patches/patch-texk_tetex_texlinks
--- texlive/base/patches/patch-texk_tetex_texlinks      Thu Jan  1 01:00:00 1970
+++ texlive.new/base/patches/patch-texk_tetex_texlinks  Mon Oct 15 09:50:58 2007
@@ -0,0 +1,140 @@
+$OpenBSD$
+--- texk/tetex/texlinks.orig   Wed Jan 17 16:31:31 2007
++++ texk/tetex/texlinks        Mon Oct 15 09:49:15 2007
+@@ -6,6 +6,9 @@
+ # the lines given in fmtutil.cnf.
+
+ # History:
++#   Tue Oct  9 14:23:01 BST 2007
++#      Added unlink option (-u) to aid OpenBSD package uninstall
++#      Edd Barrett <[EMAIL PROTECTED]>
+ #   Sun Aug 28 21:41:06 CEST 2005
+ #      remove special cases for csplain,cslatex,pdfcslatex,pdfcsplain
+ #   Fr Apr  8 19:15:05 CEST 2005
+@@ -35,34 +38,31 @@ export PATH
+ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+
+ cnf=fmtutil.cnf   # name of the config file
+-version=1169050907 # seconds since `00:00:00 1970-01-01 UTC'
++version=1192147136 # seconds since `00:00:00 1970-01-01 UTC'
+                    # date '+%s' (with GNU date)
+ progname=texlinks
+
+-usage='texlinks [options] [directories]
++usage='Usage: texlinks [OPTION]... [DIRECTORY]...
+
+ Create symbolic links format -> engine according to fmtutil setup.
+
+-Valid options:
+-  --help
+-  -h                    show this help text
+-  --version             show version string
+-  --cnffile file
+-  -f file               use file as config file (default: fmtutil.cnf)
+-  --verbose
+-  -v                    set verbose mode on (default: off)
+-  --multiplatform
+-  -m                    operate in all platform specific directories
++Mandatory arguments to long options are mandatory for short options too.
++  -h, --help           show this help text
++  --version            show version string
++  -f, --cnffile FILE   use FILE as config file (default: fmtutil.cnf)
++  -v, --verbose        enable verbose messages (default: off)
++  -m, --multiplatform  operate in all platform specific directories
+                         (default: operate only in directory for this platform)
+-  --silent
+-  -s                    silently skip over existing scripts / binaries
+-                        instead of creating a warning
++  -s, --silent         silently skip existing scripts / binaries
++                        (default: issue warning)
++  -u, --unlink               remove symlinks created by texlinks
+
+-directories is an optional list of directories in which to operate.
+-If no directories are specified the list of directories depends on the
+---multiplatform option.
+-'
++The DIRECTORY arguments are an optional list of directories in which to
++operate.  If no directories are specified the list of directories
++depends on the --multiplatform option.
+
++Report bugs to [EMAIL PROTECTED]'
++
+ 
###############################################################################
+ # abort(errmsg)
+ #   print `errmsg' to stderr and exit with error code 1
+@@ -140,7 +140,7 @@ install_link()
+         fi
+         if test -f $selfautoloc/mf && test -f $selfautoloc/mf-nowin; then
+           # have both mf and mf-nowin binaries.  no link.
+-          verbose_echo "metafont symlink $src -> $dest skipped (special case)"
++          verbose_echo "skipped metafont symlink $src -> $dest (special case)"
+           return
+         fi
+       fi
+@@ -149,7 +149,7 @@ install_link()
+
+   case $src in
+     */cont-??|*/metafun|*/mptopdf)
+-      verbose_echo "symlink $src -> $dest skipped (special case)"
++      verbose_echo "skipped ConTeXtish symlink $src -> $dest (special case)"
+       ;;
+     *)
+       test "x$src" != "x`(ls -ld $src | awk '{print $NF}') 2>/dev/null`" &&
+@@ -205,6 +205,24 @@ upd_symlinkdir()
+ }
+
+ 
###############################################################################
++# rm_link()
++#   Delete a previously installed link
++###############################################################################
++rm_link()
++{
++  link=$1;
++  if test -e $link; then
++    if test -h $link; then
++      verbose_do rm -Rf $link
++    else
++      verbose_echo "kept $link, since not a symlink"
++    fi
++  else
++    verbose_echo "skipped $link, non-existent"
++  fi
++}
++
++###############################################################################
+ # main()
+ #   parse commandline arguments, initialize variables,
+ #   switch into temp. direcrory, execute desired command
+@@ -217,6 +235,7 @@ main()
+
+   multiplatform=false
+   verbose=false
++  unlink=false
+   silent=false
+   thisdir=`pwd`
+   : ${KPSE_DOT=$thisdir}; export KPSE_DOT
+@@ -232,6 +251,7 @@ main()
+       --v*|-v) verbose=true;;
+       --s*|-s) silent=true;;
+       --m*|-m) multiplatform=true;;
++      --u*|-u) unlink=true;;
+       -*) errmsg "fmtutil: unknown option \`$1' ignored.";;
+       *)  break;;
+     esac
+@@ -278,9 +298,14 @@ main()
+
+       test "x$fmt" = "x$engine" && continue
+       if test -f "$d/$engine"; then
+-        install_link "$engine" "$d/$fmt"
++        case $unlink in
++        true)
++          rm_link "$d/$fmt";;
++        *)
++          install_link "$engine" "$d/$fmt";;
++        esac
+       else
+-        verbose_echo "$d/$engine: engine does not exist. Skipping..."
++        verbose_echo "skipped $d/$engine, engine does not exist"
+       fi
+
+       # restore positional arguments:
diff -urN texlive/base/patches/patch-utils_dialog_Makefile_in
texlive.new/base/patches/patch-utils_dialog_Makefile_in
--- texlive/base/patches/patch-utils_dialog_Makefile_in Tue Jul 17 22:53:31 2007
+++ texlive.new/base/patches/patch-utils_dialog_Makefile_in     Mon Oct 15
15:58:02 2007
@@ -1,20 +1,27 @@
 $OpenBSD: patch-utils_dialog_Makefile_in,v 1.1.1.1 2007/07/17
21:53:31 jasper Exp $
 --- utils/dialog/Makefile.in.orig      Tue Jan 17 21:16:42 2006
-+++ utils/dialog/Makefile.in   Fri May  4 20:28:41 2007
-@@ -109,18 +109,18 @@ install: install-exec $(man1dir)/tcdialog.$(manext)
- install-exec: installdirs $(bindir)/tcdialog
++++ utils/dialog/Makefile.in   Mon Oct 15 15:57:46 2007
+@@ -104,23 +104,23 @@ SHELL = /bin/sh
+ @SET_MAKE@

+ .PHONY: install installdirs install-exec
+-install: install-exec $(man1dir)/tcdialog.$(manext)
++install: install-exec ${DESTDIR}$(man1dir)/tcdialog.$(manext)
+
+-install-exec: installdirs $(bindir)/tcdialog
++install-exec: installdirs ${DESTDIR}$(bindir)/tcdialog
+
  installdirs:
 -      $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(man1dir)
 +      $(SHELL) ${srcdir}/mkinstalldirs ${DESTDIR}$(bindir) 
${DESTDIR}$(man1dir)

- $(bindir)/tcdialog: dialog
--      $(INSTALL_PROGRAM) dialog $@
-+      $(INSTALL_PROGRAM) dialog ${DESTDIR}$@
+-$(bindir)/tcdialog: dialog
++${DESTDIR}$(bindir)/tcdialog: dialog
+       $(INSTALL_PROGRAM) dialog $@

- $(man1dir)/tcdialog.$(manext): dialog.man
--      $(INSTALL_DATA) $(srcdir)/dialog.man $@
-+      $(INSTALL_DATA) $(srcdir)/dialog.man ${DESTDIR}$@
+-$(man1dir)/tcdialog.$(manext): dialog.man
++${DESTDIR}$(man1dir)/tcdialog.$(manext): dialog.man
+       $(INSTALL_DATA) $(srcdir)/dialog.man $@


  check:
diff -urN texlive/base/pkg/PLIST texlive.new/base/pkg/PLIST
--- texlive/base/pkg/PLIST      Mon Sep 10 14:37:26 2007
+++ texlive.new/base/pkg/PLIST  Wed Oct 10 10:51:40 2007
@@ -1,5 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.2 2007/09/10 13:37:26 steven Exp $
 @conflict teTeX_base-*
[EMAIL PROTECTED] texlinks -u
 %%SHARED%%
 bin/a2ping
 bin/afm2pl
---8<---

Tested i386.

Thanks for your co-operation with this.

I was planning on back-porting what I currently have to 4.2 and
offering 3rd party packages on my web-page. Is this OK?

-- 
Best Regards

Edd

---------------------------------------------------
http://students.dec.bournemouth.ac.uk/ebarrett

Reply via email to