From 8950601d8519cb86ff6411bbaf07726657015ab7 Mon Sep 17 00:00:00 2001 From: kuriyama Date: Fri, 12 Feb 1999 14:43:42 +0000 Subject: A major mode for editing SGML and XML documents for emacs. PR: ports/9635 Submitted by: Shigeyuki FUKUSHIMA --- editors/psgml-emacs/Makefile | 91 +++++++++++++++++++++++++++++++++++ editors/psgml-emacs/distinfo | 1 + editors/psgml-emacs/files/patch-ac | 27 +++++++++++ editors/psgml-emacs/files/patch-ad | 13 +++++ editors/psgml-emacs/files/patch-ae | 47 ++++++++++++++++++ editors/psgml-emacs/files/patch-af | 16 ++++++ editors/psgml-emacs/files/patch-ag | 39 +++++++++++++++ editors/psgml-emacs/pkg-comment | 1 + editors/psgml-emacs/pkg-descr | 20 ++++++++ editors/psgml-emacs/pkg-plist | 26 ++++++++++ editors/psgml-emacs/scripts/configure | 14 ++++++ 11 files changed, 295 insertions(+) create mode 100644 editors/psgml-emacs/Makefile create mode 100644 editors/psgml-emacs/distinfo create mode 100644 editors/psgml-emacs/files/patch-ac create mode 100644 editors/psgml-emacs/files/patch-ad create mode 100644 editors/psgml-emacs/files/patch-ae create mode 100644 editors/psgml-emacs/files/patch-af create mode 100644 editors/psgml-emacs/files/patch-ag create mode 100644 editors/psgml-emacs/pkg-comment create mode 100644 editors/psgml-emacs/pkg-descr create mode 100644 editors/psgml-emacs/pkg-plist create mode 100644 editors/psgml-emacs/scripts/configure (limited to 'editors/psgml-emacs') diff --git a/editors/psgml-emacs/Makefile b/editors/psgml-emacs/Makefile new file mode 100644 index 00000000000..78e48596b93 --- /dev/null +++ b/editors/psgml-emacs/Makefile @@ -0,0 +1,91 @@ +# New ports collection makefile for: psgml for emacs +# Version required: 1.1.6 +# Date created: 23 January 1999 +# Whom: shige +# +# $Id$ +# + +DISTNAME= psgml-1.1.6 +CATEGORIES= editors elisp +MASTER_SITES= ftp://ftp.lysator.liu.se/pub/sgml/ALPHA/ + +MAINTAINER?= shige@kuis.kyoto-u.ac.jp + +# distfile version +PSGML_VER= 1.1.6 +PSGML_SETUPEL= psgml-setup.el +CATALOG= ${PREFIX}/share/sgml/catalog +INFILES= ${PSGML_SETUPEL} + +# This is a master port. +PORTCLASS?= master + +.if (${PORTCLASS} == "master") +EMACS_NAME= emacs +EMACS_PORT= emacs +EMACS_VER= 19.34 +EMACS_LIBDIR= share/${EMACS_NAME} +REQUIRE_SETUPEL= YES +.endif + +# if RUN_DEPENDS emacs port name has the suffix `-common' +.if !defined(HAVE_COMMON_PORT) +HAVE_COMMON_PORT= NO +.endif +# if RUN_DEPENDS emacs needs setup elisp +.if !defined(REQUIRE_SETUPEL) +REQUIRE_SETUPEL= NO +.endif + +# +# emacs ports setup +# +.if defined(EMACS_PORT) +PKGNAME= psgml-${EMACS_PORT}-${PSGML_VER} +EMACS_CMD= ${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER} +BUILD_DEPENDS= ${EMACS_CMD}:${PORTSDIR}/editors/${EMACS_PORT} +.if defined(HAVE_COMMON_PORT) && (${HAVE_COMMON_PORT} == "YES") +RUN_DEPENDS= ${EMACS_CMD}:${PORTSDIR}/editors/${EMACS_PORT}-common +.else +RUN_DEPENDS= ${EMACS_CMD}:${PORTSDIR}/editors/${EMACS_PORT} +.endif +CONFIGURE_ENV= EMACS=${EMACS_CMD} +MAKE_FLAGS= EMACS=${EMACS_CMD} +SCRIPTS_ENV= INFILES=${INFILES} \ + EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} +PLIST_SUB= EMACS_LIBDIR=${EMACS_LIBDIR} EMACS_VER=${EMACS_VER} +.else +.BEGIN: + @${ECHO} "Error: Bad port." + @${ECHO} "You must define EMACS_NAME, EMACS_PORT, EMACS_VER, EMACS_LIBDIR." + @${FALSE} +.endif + +# +# main configurations +# +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-emacs="${EMACS_CMD}" +RUN_DEPENDS+= ${CATALOG}:${PORTSDIR}/textproc/dtd-catalogs + +pre-configure: + (cd ${WRKSRC} ; \ + for i in psgml.el psgml.texi ; do \ + ${RM} -f $${i}.in ; \ + ${MV} $${i} $${i}.in ; \ + done) +.if (${REQUIRE_SETUPEL} == "YES") + ${CP} ${FILESDIR}/${PSGML_SETUPEL}.in ${WRKDIR} +.endif + +pre-build: + @${RM} -f ${WRKSRC}/psgml.info ${WRKSRC}/psgml-api.info + +post-install: +.if (${REQUIRE_SETUPEL} == "YES") + @${INSTALL_DATA} ${WRKDIR}/${PSGML_SETUPEL} \ + ${PREFIX}/${EMACS_LIBDIR}/site-lisp +.endif + +.include diff --git a/editors/psgml-emacs/distinfo b/editors/psgml-emacs/distinfo new file mode 100644 index 00000000000..52929d01254 --- /dev/null +++ b/editors/psgml-emacs/distinfo @@ -0,0 +1 @@ +MD5 (psgml-1.1.6.tar.gz) = 0736a2aee7d41dcfad16140354a929d4 diff --git a/editors/psgml-emacs/files/patch-ac b/editors/psgml-emacs/files/patch-ac new file mode 100644 index 00000000000..640c089d0e4 --- /dev/null +++ b/editors/psgml-emacs/files/patch-ac @@ -0,0 +1,27 @@ +--- psgml.el.orig Mon Nov 16 06:45:03 1998 ++++ psgml.el Sat Jan 23 19:14:44 1999 +@@ -335,7 +335,7 @@ + (put 'sgml-system-path 'sgml-type 'file-list) + + (defvar sgml-public-map (or (sgml-parse-colon-path (getenv "SGML_PATH")) +- '("%S" "/usr/local/lib/sgml/%o/%c/%d" )) ++ '("%S" "@prefix@/share/sgml/%o/%c/%d" )) + "*Mapping from public identifiers to file names. + This is a list of possible file names. To find the file for a public + identifier the elements of the list are used one at the time from the +@@ -361,13 +361,13 @@ + (defvar sgml-catalog-files (or (delete nil + (sgml-parse-colon-path + (getenv "SGML_CATALOG_FILES"))) +- '("catalog" "/usr/local/lib/sgml/catalog")) ++ '("catalog" "@prefix@/share/sgml/catalog")) + "*List of catalog entry files. + The files are in the format defined in the SGML Open Draft Technical + Resolution on Entity Management.") + (put 'sgml-catalog-files 'sgml-type 'file-list) + +-(defvar sgml-ecat-files '("ECAT" "~/sgml/ECAT" "/usr/local/lib/sgml/ECAT") ++(defvar sgml-ecat-files '("ECAT" "~/sgml/ECAT" "@prefix@/share/sgml/ECAT") + "*List of catalog files for PSGML.") + (put 'sgml-ecat-files 'sgml-type 'file-list) + diff --git a/editors/psgml-emacs/files/patch-ad b/editors/psgml-emacs/files/patch-ad new file mode 100644 index 00000000000..ba3f8cf7f55 --- /dev/null +++ b/editors/psgml-emacs/files/patch-ad @@ -0,0 +1,13 @@ +--- Makefile.in.orig Sat Jan 23 20:58:07 1999 ++++ Makefile.in Sat Jan 23 20:58:55 1999 +@@ -81,8 +81,8 @@ + $(INSTALL_DATA) psgml-api.info $(infodir) + if $(SHELL) -c 'install-info --version' \ + >/dev/null 2>&1; then \ +- install-info --info-dir=$(infodir) psgml.info; \ +- install-info --info-dir=$(infodir) psgml-api.info; \ ++ install-info $(infodir)/psgml.info $(infodir)/dir; \ ++ install-info $(infodir)/psgml-api.info $(infodir)/dir; \ + else true; fi + + diff --git a/editors/psgml-emacs/files/patch-ae b/editors/psgml-emacs/files/patch-ae new file mode 100644 index 00000000000..6910b39d7a8 --- /dev/null +++ b/editors/psgml-emacs/files/patch-ae @@ -0,0 +1,47 @@ +--- psgml.texi.orig Mon Nov 16 06:45:07 1998 ++++ psgml.texi Sat Jan 23 21:10:21 1999 +@@ -11,10 +11,9 @@ + + @ifinfo +-@format +-START-INFO-DIR-ENTRY ++@dircategory The Emacs editor and associated tools ++@direntry + * PSGML: (psgml). PSGML, a major mode for SGML documents. +-END-INFO-DIR-ENTRY +-@end format ++@end direntry + @end ifinfo + + @ifinfo +@@ -401,10 +400,10 @@ + @code{SGML_PATH}. + + Given the public identifier above and the file name template +-@samp{/usr/local/lib/sgml/%o/%c/%d}, the resulting file name is ++@samp{@prefix@/share/sgml/%o/%c/%d}, the resulting file name is + + @example +-/usr/local/lib/sgml/ISO_8879:1986/entities/Added_Latin_1 ++@prefix@/share/sgml/ISO_8879:1986/entities/Added_Latin_1 + @end example + + Note: blanks are transliterated to @samp{_} (and also @samp{/} to +@@ -420,7 +419,7 @@ + is undefined the default is + + @lisp +-("CATALOG" "/usr/local/lib/sgml/CATALOG") ++("catalog" "@prefix@/share/sgml/catalog") + @end lisp + @end defopt + +@@ -448,7 +447,7 @@ + environment variable is undefined the default is + + @lisp +-("%S" "/usr/local/lib/sgml/%o/%c/%d") ++("%S" "@prefix@/share/sgml/%o/%c/%d") + @end lisp + @c Mapping from public identifiers to file names. + @end defopt diff --git a/editors/psgml-emacs/files/patch-af b/editors/psgml-emacs/files/patch-af new file mode 100644 index 00000000000..18a91659852 --- /dev/null +++ b/editors/psgml-emacs/files/patch-af @@ -0,0 +1,16 @@ +--- psgml-api.texi.orig Mon Nov 16 06:45:06 1998 ++++ psgml-api.texi Sat Jan 23 21:11:18 1999 +@@ -8,10 +8,9 @@ + + @ifinfo +-@format +-START-INFO-DIR-ENTRY ++@dircategory The Emacs editor and associated tools ++@direntry + * PSGML-API: (psgml-api). PSGML, the API documentation. +-END-INFO-DIR-ENTRY +-@end format ++@end direntry + @end ifinfo + + @ifinfo diff --git a/editors/psgml-emacs/files/patch-ag b/editors/psgml-emacs/files/patch-ag new file mode 100644 index 00000000000..90792b64da9 --- /dev/null +++ b/editors/psgml-emacs/files/patch-ag @@ -0,0 +1,39 @@ +--- psgml-parse.el.orig Mon Nov 16 06:45:04 1998 ++++ psgml-parse.el Sat Jan 23 20:28:15 1999 +@@ -1217,6 +1217,11 @@ + (sgml-check-dtd-subset) + (sgml-pop-entity) + (erase-buffer) ++ ;; For Mule ++ (if (string-match "Emacs 20\." (emacs-version)) ++ (set-buffer-file-coding-system 'binary) ++ (if (boundp 'MULE) ++ (set-file-coding-system *noconv*))) + (sgml-write-dtd sgml-dtd-info to-file) + t)) + +@@ -1244,6 +1249,10 @@ + "Merge the binary coded dtd in the current buffer with the current dtd. + The current dtd is the variable sgml-dtd-info. Return t if mereged + was successfull or nil if failed." ++ (if (string-match "Emacs 20\." (emacs-version)) ++ (set-buffer-file-coding-system 'binary) ++ (if (boundp 'MULE) ++ (set-file-coding-system *noconv*))) + (goto-char (point-min)) + (sgml-read-sexp) ; skip filev + (let ((dependencies (sgml-read-sexp)) +@@ -2461,7 +2470,12 @@ + (set-buffer sgml-scratch-buffer) + ;; For MULE to not misinterpret binary data set the mc-flag + ;; (reported by Jeffrey Friedl ) +- (set 'mc-flag nil) ++ (set 'mc-flag nil) ++ ;; For MULE/Emacs 20 to not misinterpret binary data ++ (if (string-match "Emacs 20\." (emacs-version)) ++ (set-buffer-file-coding-system 'binary) ++ (if (boundp 'MULE) ++ (set-file-coding-system *noconv*))) + (when (eq sgml-scratch-buffer (default-value 'sgml-scratch-buffer)) + (make-local-variable 'sgml-scratch-buffer) + (setq sgml-scratch-buffer nil)) diff --git a/editors/psgml-emacs/pkg-comment b/editors/psgml-emacs/pkg-comment new file mode 100644 index 00000000000..c781c9ae70d --- /dev/null +++ b/editors/psgml-emacs/pkg-comment @@ -0,0 +1 @@ +A major mode for editing SGML and XML documents for emacs. diff --git a/editors/psgml-emacs/pkg-descr b/editors/psgml-emacs/pkg-descr new file mode 100644 index 00000000000..c9ac6c20c19 --- /dev/null +++ b/editors/psgml-emacs/pkg-descr @@ -0,0 +1,20 @@ +PSGML: a major mode for editing SGML and XML documents for emacs. + +--- Emacs Library Porting + + PSGML is a major mode for editing SGML and XML documents. It works +with GNU Emacs 19.34, 20.3 and later or with XEmacs 19.9 and later. +PSGML contains a simple SGML parser and can work with any DTD. +Functions provided includes menus and commands for inserting tags with +only the contextually valid tags, identification of structural errors, +editing of attribute values in a separate window with information about +types and defaults, and structure based editing. + + PSGML is installed the following directory tree: + ${PREFIX}/share/emacs/site-lisp/psgml/ + +To use psgml, put the following setup into your ~/.emacs: + + (require 'psml-setup) + +--- Porting by shige diff --git a/editors/psgml-emacs/pkg-plist b/editors/psgml-emacs/pkg-plist new file mode 100644 index 00000000000..74a376a96c5 --- /dev/null +++ b/editors/psgml-emacs/pkg-plist @@ -0,0 +1,26 @@ +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-api.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-api.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-charent.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-charent.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-dtd.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-dtd.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-edit.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-edit.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-info.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-info.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-lucid.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-other.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-other.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-parse.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml-parse.elc +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml.el +%%EMACS_LIBDIR%%/site-lisp/psgml/psgml.elc +%%EMACS_LIBDIR%%/site-lisp/psgml-setup.el +@dirrm %%EMACS_LIBDIR%%/site-lisp/psgml +@unexec install-info --delete %D/info/psgml.info %D/info/dir +@unexec install-info --delete %D/info/psgml-api.info %D/info/dir +info/psgml.info +info/psgml-api.info +@exec [ -f %D/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir +@exec install-info %D/info/psgml.info %D/info/dir +@exec install-info %D/info/psgml-api.info %D/info/dir diff --git a/editors/psgml-emacs/scripts/configure b/editors/psgml-emacs/scripts/configure new file mode 100644 index 00000000000..2feca2181be --- /dev/null +++ b/editors/psgml-emacs/scripts/configure @@ -0,0 +1,14 @@ +#!/bin/sh + +TARGETS=${INFILES} + +for i in ${TARGETS} +do + if [ -f ${WRKDIR}/${i}.in ]; then + cat ${WRKDIR}/${i}.in | /usr/bin/sed \ + -e "s;@@PREFIX@@;${PREFIX};g" \ + -e "s;@@EMACS_LIBDIR@@;${EMACS_LIBDIR};g" \ + -e "s;@@EMACS_VER@@;${EMACS_VER};g" \ + > ${WRKDIR}/${i} + fi +done -- cgit