Bug 3990 - port japanese/prn: bug fix
Summary: port japanese/prn: bug fix
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: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-06-30 09:30 UTC by TAOKA Satoshi
Modified: 1997-07-02 01:37 UTC (History)
0 users

See Also:


Attachments
file.diff (287 bytes, patch)
1997-06-30 09:30 UTC, TAOKA Satoshi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TAOKA Satoshi 1997-06-30 09:30:01 UTC
japanese/prn/pkg/PLIST has a problem.
Comment 1 Masafumi Max NAKANE freebsd_committer freebsd_triage 1997-06-30 12:44:39 UTC
>japanese/prn/pkg/PLIST has a problem.
>
>   Fix
>          
>
>diff -ur /usr/ports/japanese/prn/pkg/PLIST ./prn/pkg/PLIST
>--- /usr/ports/japanese/prn/pkg/PLIST   Mon Jun 23 23:31:11 1997
>+++ ./prn/pkg/PLIST     Thu Jun 26 12:47:38 1997
>@@ -1,5 +1,6 @@
> bin/prn
>-bin/cprn
>+@exec ln -sf %D/%F %B/cprn
>+@unexec rm %B/cprn
> bin/cmt
> bin/psconv
> lib/prn/cmtdefs

What exactly is the problem?  This port in ports-current seems to
installs the symbolic link correctly and the package
installs/deinstall the link appropriately, though.

Max
Comment 2 TAOKA Satoshi 1997-07-01 01:17:43 UTC
If you make this package in setting PREFIX to '/usr/local', then
the tarboll is the following.

# tar tvfz jp-prn-1.0.tgz 
-rw-r--r-- root/bin        804 Jul  1 08:54 1997 +CONTENTS
-rw-r--r-- root/bin         77 Jul  1 08:54 1997 +COMMENT
-rw-r--r-- root/bin        357 Jul  1 08:54 1997 +DESC
-r--r--r-- root/wheel     3288 Jun 19 13:03 1997 +MTREE_DIRS
-rwxr-xr-x root/bin      16384 Jul  1 08:54 1997 bin/prn
lrwxr-xr-x bin/bin           0 Jul  1 08:54 1997 bin/cprn -> /usr/local/bin/prn
-rwxr-xr-x root/bin      24576 Jul  1 08:54 1997 bin/cmt
-rwxr-xr-x root/bin      20480 Jul  1 08:54 1997 bin/psconv
-rw-r--r-- root/bin      14937 Jul  1 08:54 1997 lib/prn/cmtdefs
-rw-r--r-- root/bin       3663 Jul  1 08:54 1997 man/ja_JP.EUC/man1/prn.1.gz
-rw-r--r-- root/bin         81 Jul  1 08:54 1997 man/ja_JP.EUC/man1/cprn.1.gz
-rw-r--r-- root/bin       2269 Jul  1 08:54 1997 man/ja_JP.EUC/man1/cmt.1.gz
-rw-r--r-- root/bin       2097 Jul  1 08:54 1997 man/ja_JP.EUC/man1/psconv.1.gz
-rw-r--r-- root/bin       3773 Jul  1 08:54 1997 man/ja_JP.EUC/man5/cmtdefs.5.gz

'bin/cprn' is a symbolic link to '/usr/local/bin/prn'. If you install
by executing 'pkg_add -p /share jp-prn-1.0.tar.gz' for such the
package, /share/bin/cprn is a link to '/usr/local/bin/prn'.  Note that
PREFIX is '/share'.

By the following patch, the problem can be solved.

> >diff -ur /usr/ports/japanese/prn/pkg/PLIST ./prn/pkg/PLIST
> >--- /usr/ports/japanese/prn/pkg/PLIST   Mon Jun 23 23:31:11 1997
> >+++ ./prn/pkg/PLIST     Thu Jun 26 12:47:38 1997
> >@@ -1,5 +1,6 @@
> > bin/prn
> >-bin/cprn
> >+@exec ln -sf %D/%F %B/cprn
> >+@unexec rm %B/cprn
> > bin/cmt
> > bin/psconv
> > lib/prn/cmtdefs


Thanks.

S. Taoka
Comment 3 Masafumi NAKANE 1997-07-01 10:04:23 UTC
     > If you make this package in setting PREFIX to '/usr/local',
     > then the tarboll is the following.  lrwxr-xr-x bin/bin 0 Jul 1
     > 08:54 1997 bin/cprn -> /usr/local/bin/prn

     > 'bin/cprn' is a symbolic link to '/usr/local/bin/prn'. If you
     > install by executing 'pkg_add -p /share jp-prn-1.0.tar.gz' for
     > such the package, /share/bin/cprn is a link to '
     > /usr/local/bin/prn'.  Note that PREFIX is '/share'.

Ok, I see your point.  However, I would rather solve this by making
bin/cprn point to prn, i.e., following modification to patch-aa.

The advantage of this method is that we can keep the PLIST simple and
we don't have to execute ln when doing pkg_{add,install}.

Index: patches/patch-aa
===================================================================
RCS file: /home/ncvs/ports/japanese/prn/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patch-aa	1997/06/23 14:31:12	1.1.1.1
+++ patch-aa	1997/07/01 08:55:01
@@ -1,5 +1,5 @@
 *** Makefile.orig	Wed May 11 17:00:58 1994
---- Makefile	Mon Jun 23 23:15:39 1997
+--- Makefile	Tue Jul  1 17:44:49 1997
 ***************
 *** 25,35 ****
   #	@(#)Makefile 2.3 (Y.Tonooka) 5/11/94
@@ -51,8 +51,28 @@
                TAGS = ctags
               ETAGS = etags
 ***************
-*** 98,103 ****
---- 102,108 ----
+*** 91,103 ****
+  
+  $(BINPATH)/cprn: $(BINPATH)/prn
+  	if [ $@ ]; then $(RM) $@; fi
+! 	$(LN) $(BINPATH)/prn $@
+  
+  $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y
+  	$(MAKE) cmt
+  	$(INSTALL) -s cmt $(BINPATH)
+  
+  $(LIBPATH)/cmtdefs: cmtdefs
+  	$(CP) cmtdefs $@; chmod 644 $@
+  
+  $(BINPATH)/psconv: psconv.c
+--- 95,108 ----
+  
+  $(BINPATH)/cprn: $(BINPATH)/prn
+  	if [ $@ ]; then $(RM) $@; fi
+! 	$(LN) prn $@
+  
+  $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y
+  	$(MAKE) cmt
   	$(INSTALL) -s cmt $(BINPATH)
   
   $(LIBPATH)/cmtdefs: cmtdefs


Thoughts?

     Cheers,
Max
Comment 4 TAOKA Satoshi 1997-07-02 01:19:17 UTC
> 
> The advantage of this method is that we can keep the PLIST simple and
> we don't have to execute ln when doing pkg_{add,install}.

I see. Please apply the following (your) patch to patch-aa.

Thanks.

S. Taoka

> 
> Index: patches/patch-aa
> ===================================================================
> RCS file: /home/ncvs/ports/japanese/prn/patches/patch-aa,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 patch-aa
> --- patch-aa	1997/06/23 14:31:12	1.1.1.1
> +++ patch-aa	1997/07/01 08:55:01
> @@ -1,5 +1,5 @@
>  *** Makefile.orig	Wed May 11 17:00:58 1994
> ---- Makefile	Mon Jun 23 23:15:39 1997

cut cut cut cut

> +  
> +  $(BINPATH)/cprn: $(BINPATH)/prn
> +  	if [ $@ ]; then $(RM) $@; fi
> +! 	$(LN) prn $@
> +  
> +  $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y
> +  	$(MAKE) cmt
>    	$(INSTALL) -s cmt $(BINPATH)
>    
>    $(LIBPATH)/cmtdefs: cmtdefs
Comment 5 Masafumi Max NAKANE freebsd_committer freebsd_triage 1997-07-02 01:36:11 UTC
State Changed
From-To: open->closed

The problem fixed by new patch-aa (rev.1.2.)