Bug 107438 - mail/mew: fix several issues
Summary: mail/mew: fix several issues
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-02 20:20 UTC by Hiroki Sato
Modified: 2007-01-05 06:20 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (6.46 KB, patch)
2007-01-02 20:20 UTC, Hiroki Sato
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroki Sato freebsd_committer 2007-01-02 20:20:17 UTC
	mail/mew has the following rough edges to be polished:

	- MASTER_SITE_PORTS_JP should be removed in MASTER_SITES.

	- DOCSDIR and CONFIGURE_TARGET is automatically set by
          bsd.port.mk.

	- Since Mew's configure supports --with-elispdir, use it
	  instead of EMACS_SITE_LISPDIR in the Makefile.

	- Separate the Japanese info files by using NOPORTDOCS.

	- Use EMACS_LIBDIR for non-lisp files such as images.
	  EMACS_SITE_LISPDIR is not for such files.

Fix: A patch is attached below. This is also available at
	http://people.FreeBSD.org/~hrs/mew.diff.
How-To-Repeat: 	N/A
Comment 1 Edwin Groothuis freebsd_committer 2007-01-02 20:20:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anray

anray@ wants to have elisp PRs
Comment 2 Edwin Groothuis freebsd_committer 2007-01-02 20:20:33 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 3 hiroto.kagotani 2007-01-04 03:54:43 UTC
Thank you very much for the improvement.

I approve the first four points, but do not the last one:

> - Use EMACS_LIBDIR for non-lisp files such as images.
> EMACS_SITE_LISPDIR is not for such files.

as it is since mew assumes icon files are stored in "etc" directory which
is in the *same directory* as mew.el. (see the definitions of
mew-icon-directory and mew-which-mew-etc in mew-key.el.)

If the icon directory should be changed for the suitability,
the default value of mew-icon-directory should also be changed to
${LOCALBASE}/${EMACS_LIBDIR}/etc/mew.

Good solution is very welcome.
-- 
Hiroto Kagotani
<hiroto.kagotani@gmail.com>
Comment 4 Edwin Groothuis freebsd_committer 2007-01-04 05:58:41 UTC
State Changed
From-To: feedback->open

maintainer approved
Comment 5 Hiroki Sato freebsd_committer 2007-01-04 11:26:05 UTC
----Security_Multipart0(Thu_Jan__4_20_26_05_2007_116)--
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Thu_Jan__4_20_26_05_2007_755)--"
Content-Transfer-Encoding: 7bit

----Next_Part(Thu_Jan__4_20_26_05_2007_755)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Hiroto Kagotani" <hiroto.kagotani@gmail.com> wrote
  in <ca15a72c0701031954o2daffed9i659d0f737f4cbb1a@mail.gmail.com>:

hi> Thank you very much for the improvement.
hi>
hi> I approve the first four points, but do not the last one:
hi>
hi> > - Use EMACS_LIBDIR for non-lisp files such as images.
hi> > EMACS_SITE_LISPDIR is not for such files.
hi>
hi> as it is since mew assumes icon files are stored in "etc" directory which
hi> is in the *same directory* as mew.el. (see the definitions of
hi> mew-icon-directory and mew-which-mew-etc in mew-key.el.)
hi>
hi> If the icon directory should be changed for the suitability,
hi> the default value of mew-icon-directory should also be changed to
hi> ${LOCALBASE}/${EMACS_LIBDIR}/etc/mew.

 Right, so how about the attached one including a patch for
 mew-key.el?  It is still a hack, but I think there is no problem
 since the original logic for file search is broken for XEmacs anyway
 (probably this should be done in configure's --etcdir option).

 Any comments are appreciated.

--
| Hiroki SATO

----Next_Part(Thu_Jan__4_20_26_05_2007_755)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="mew.diff"

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/mew/Makefile,v
retrieving revision 1.40
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -r1.40 Makefile
--- Makefile	19 Jul 2006 19:23:42 -0000	1.40
+++ Makefile	4 Jan 2007 11:04:14 -0000
@@ -8,44 +8,52 @@

 PORTNAME=	mew
 PORTVERSION=	5.1
+PORTREVISION=	1
 CATEGORIES=	mail elisp
-MASTER_SITES=	http://www.Mew.org/Release/ \
-		${MASTER_SITE_PORTS_JP}
+MASTER_SITES=	http://www.Mew.org/Release/
 PKGNAMESUFFIX=	-${EMACS_PORT_NAME}

 MAINTAINER?=	hiroto.kagotani@gmail.com
 COMMENT?=	Messaging in the Emacs World for emacs

-# document install directory by install-doc target
-DOCSDIR=	share/doc/${PORTNAME}
-
 # emacs port setup
 USE_EMACS=	yes
 EMACS_PORT_NAME?=	emacs21

 GNU_CONFIGURE=	yes
-CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-MAKE_ARGS+=	EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR}
+CONFIGURE_ARGS=	--with-elispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR}/mew \
+		--with-etcdir=${LOCALBASE}/${EMACS_LIBDIR}/etc/mew

 # target name for make build and install
-ALL_TARGET?=	all info jinfo
-INSTALL_TARGET?=	install install-jinfo
+ALL_TARGET=	all info
+INSTALL_TARGET=	install
+.if !defined(NOPORTDOCS)
+ALL_TARGET+=	jinfo
+INSTALL_TARGET+=install-jinfo
+.endif

 # manuals
 MAN1=		mewcat.1 mewdecode.1 mewencode.1 mewl.1 incm.1
-INFO=		mew mew.jis
+INFO=		mew
+.if !defined(NOPORTDOCS)
+INFO+=		mew.jis
+.endif
+
+pre-build:
+	${REINPLACE_CMD} -e \
+		's,%%MEWICONDIR%%,${LOCALBASE}/${EMACS_LIBDIR}/etc/mew,' \
+		${WRKSRC}/mew-key.el

 post-install:
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${PREFIX}/${DOCSDIR}
+	${MKDIR} ${DOCSDIR}
 	(cd ${WRKSRC} ; \
-		${INSTALL_DATA} 00* mew.dot.* ${PREFIX}/${DOCSDIR}/ ; \
+		${INSTALL_DATA} 00* mew.dot.* ${DOCSDIR}/ ; \
 		for dir in contrib; do \
-			${CP} -R $${dir} ${PREFIX}/${DOCSDIR}/ ; \
+			${CP} -R $${dir} ${DOCSDIR}/ ; \
 		done)
-	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/${DOCSDIR}
+	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
 .endif
-
 	@${CAT} ${PKGMESSAGE}

 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/mail/mew/pkg-plist,v
retrieving revision 1.7
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -r1.7 pkg-plist
--- pkg-plist	19 Jul 2006 19:23:42 -0000	1.7
+++ pkg-plist	4 Jan 2007 11:25:52 -0000
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
 bin/incm
 bin/mewcat
 bin/mewdecode
@@ -28,45 +29,45 @@
 %%PORTDOCS%%%%DOCSDIR%%/contrib/mew-nmz-fixer.el
 %%PORTDOCS%%%%DOCSDIR%%/contrib/mew-refile-view.el
 %%PORTDOCS%%%%DOCSDIR%%/contrib/mew-toolbar-frame.el
-%%EMACS_SITE_LISPDIR%%/mew/etc/Mew.img
-%%EMACS_SITE_LISPDIR%%/mew/etc/Mew.png
-%%EMACS_SITE_LISPDIR%%/mew/etc/Mew.xbm
-%%EMACS_SITE_LISPDIR%%/mew/etc/Mew.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/COLOR
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/mew-Plain.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/mew-curr.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/mew-folder.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/mew-inc2.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/etc/mew-kill.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Audio.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Blank.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-External.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Folder.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Image.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Octet-Stream.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Postscript.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Rfc822.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Text.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Unknown.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-Video.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-attach.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-cite.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-forward.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-inc.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-lock.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-next.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-pgp-enc.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-pgp-sigenc.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-pgp-sign.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-prev.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-queue.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-refile.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-reply.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-send.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-sep.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-show.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-write.xpm
-%%EMACS_SITE_LISPDIR%%/mew/etc/mew-yank.xpm
+%%EMACS_LIBDIR%%/etc/mew/Mew.img
+%%EMACS_LIBDIR%%/etc/mew/Mew.png
+%%EMACS_LIBDIR%%/etc/mew/Mew.xbm
+%%EMACS_LIBDIR%%/etc/mew/Mew.xpm
+%%EMACS_LIBDIR%%/etc/mew/etc/COLOR
+%%EMACS_LIBDIR%%/etc/mew/etc/mew-Plain.xpm
+%%EMACS_LIBDIR%%/etc/mew/etc/mew-curr.xpm
+%%EMACS_LIBDIR%%/etc/mew/etc/mew-folder.xpm
+%%EMACS_LIBDIR%%/etc/mew/etc/mew-inc2.xpm
+%%EMACS_LIBDIR%%/etc/mew/etc/mew-kill.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Audio.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Blank.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-External.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Folder.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Image.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Octet-Stream.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Postscript.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Rfc822.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Text.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Unknown.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-Video.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-attach.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-cite.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-forward.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-inc.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-lock.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-next.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-pgp-enc.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-pgp-sigenc.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-pgp-sign.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-prev.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-queue.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-refile.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-reply.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-send.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-sep.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-show.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-write.xpm
+%%EMACS_LIBDIR%%/etc/mew/mew-yank.xpm
 %%EMACS_SITE_LISPDIR%%/mew/mew-addrbook.el
 %%EMACS_SITE_LISPDIR%%/mew/mew-addrbook.elc
 %%EMACS_SITE_LISPDIR%%/mew/mew-attach.el
@@ -207,8 +208,9 @@
 %%EMACS_SITE_LISPDIR%%/mew/mew-xemacs.elc
 %%EMACS_SITE_LISPDIR%%/mew/mew.el
 %%EMACS_SITE_LISPDIR%%/mew/mew.elc
-@dirrm %%EMACS_SITE_LISPDIR%%/mew/etc/etc
-@dirrm %%EMACS_SITE_LISPDIR%%/mew/etc
+@dirrm %%EMACS_LIBDIR%%/etc/mew/etc
+@dirrm %%EMACS_LIBDIR%%/etc/mew
+@dirrmtry %%EMACS_LIBDIR%%/etc
 @dirrm %%EMACS_SITE_LISPDIR%%/mew
 @dirrmtry %%EMACS_SITE_LISPDIR%%
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/contrib
Index: files/patch-mew-key.el
===================================================================
RCS file: files/patch-mew-key.el
diff -N files/patch-mew-key.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-mew-key.el	4 Jan 2007 11:15:01 -0000
@@ -0,0 +1,23 @@
+--- mew-key.el.orig	Wed Jul 12 18:22:49 2006
++++ mew-key.el	Thu Jan  4 20:14:11 2007
+@@ -609,13 +609,16 @@
+ ;;;
+
+ (defun mew-which-mew-etc ()
+-  (let ((file "mew.el")
+-	(path load-path))
++  (let ((file1 "mew.el")
++        (file2 "Mew.png")
++	(path (list "%%MEWICONDIR%%" load-path)))
+     (catch 'loop
+       (while path
+-	(if (file-exists-p (expand-file-name file (car path)))
++	(if (file-exists-p (expand-file-name file1 (car path)))
+ 	    (throw 'loop (expand-file-name "etc" (car path)))
+-	  (setq path (cdr path)))))))
++        (if (file-exists-p (expand-file-name file2 (car path)))
++	    (throw 'loop (expand-file-name (car path)))
++	  (setq path (cdr path))))))))
+
+ (defvar mew-icon-directory (mew-which-mew-etc))
+

----Next_Part(Thu_Jan__4_20_26_05_2007_755)----

----Security_Multipart0(Thu_Jan__4_20_26_05_2007_116)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQBFnORNTyzT2CeTzy0RAhUqAKDF8neZxXn131UL4odhKyXsNadKwgCg0ZXj
Xp/NZT72JOdeSeCxSq0w9jI=
=P4vs
-----END PGP SIGNATURE-----

----Security_Multipart0(Thu_Jan__4_20_26_05_2007_116)----
Comment 6 Andrey Slusar freebsd_committer 2007-01-04 22:23:47 UTC
Responsible Changed
From-To: anray->hrs

Submitter is ports committer.
Comment 7 hiroto.kagotani 2007-01-05 04:18:43 UTC
Thank you for the nice patch.
I like it very much.
Please commit it.

Thanks.
-- 
Hiroto Kagotani
<hiroto.kagotani@gmail.com>
Comment 8 dfilter service freebsd_committer 2007-01-05 06:15:18 UTC
hrs         2007-01-05 06:15:12 UTC

  FreeBSD ports repository

  Modified files:
    mail/mew             Makefile pkg-plist 
  Added files:
    mail/mew/files       patch-mew-key.el 
  Log:
  Fix the following rough edges:
  
  - Fix MASTER_SITES.
  - Remove redundant DOCSDIR and CONFIGURE_TARGET.
  - Use EMACS_LIBDIR for non-lisp files for consistency.
  - Use --with-elispdir for EMACS_SITE_LISPDIR.
  - Separate the Japanese info files by using NOPORTDOCS.
  - The mew-icon-directory variable is set automatically
    even in XEmacs now.
  
  Approved by:    Hiroto Kagotani (maintainer)
  PR:             ports/107438
  
  Revision  Changes    Path
  1.41      +23 -15    ports/mail/mew/Makefile
  1.1       +23 -0     ports/mail/mew/files/patch-mew-key.el (new)
  1.8       +43 -41    ports/mail/mew/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Hiroki Sato freebsd_committer 2007-01-05 06:15:24 UTC
State Changed
From-To: open->closed

Committed, thanks!