Subject: pkg/22949: some suggested fixes to Packages.txt
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 09/25/2003 14:28:35
>Number:         22949
>Category:       pkg
>Synopsis:       some suggested fixes to Packages.txt
>Confidential:   yes
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 25 18:29:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        2003/09/17
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

	here are some suggested fixes to Packages.txt

>How-To-Repeat:

>Fix:

Index: Packages.txt
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/Packages.txt,v
retrieving revision 1.308
diff -c -r1.308 Packages.txt
*** Packages.txt	17 Sep 2003 19:04:21 -0000	1.308
--- Packages.txt	19 Sep 2003 14:42:36 -0000
***************
*** 668,678 ****
  	${MASTER_SITE_XEMACS}
  
  If one of these predefined sites is chosen, you may require the ability to
! specify a subdirectory of that site.  Since these macros may expand to
! more than one actual site, you MUST use the following construct to specify
! a subdirectory:
  
  	${MASTER_SITE_GNU:=subdirectory/name/}
  
  (Note the trailing slash after the subdirectory name.) Use of the deprecated
  MASTER_SITE_SUBDIR will not work.
--- 668,680 ----
  	${MASTER_SITE_XEMACS}
  
  If one of these predefined sites is chosen, you may require the ability to
! specify a subdirectory of that site.  This is in fact almost always the
! case with all of the above.  Since these macros may expand to more than one
! actual site, you MUST use the following construct to specify a
! subdirectory:
  
  	${MASTER_SITE_GNU:=subdirectory/name/}
+ 	${MASTER_SITE_SOURCEFORGE:=project_name/}
  
  (Note the trailing slash after the subdirectory name.) Use of the deprecated
  MASTER_SITE_SUBDIR will not work.
***************
*** 756,770 ****
  
  This directory contains files that are used by the patch(1) command to
  modify the sources as distributed in the distribution file into a form that
! will compile and run perfectly on NetBSD. The files are applied
  successively in alphabetic order (as returned by a shell "patches/patch-*"
  glob expansion), so patch-aa is applied before patch-ab etc.
  
! The patch-?? files should be in "diff -bu" format, and apply without
! a fuzz to avoid problems (To force patches to apply with fuzz you
! can set PATCH_FUZZ_FACTOR=-F2).  Furthermore, do not put changes
! for more than one file into a single patch-file, as this will make
! future modifications more difficult.
  
  Similar, a file should be patched at most once, not several times by
  several different patches. If a file needs several patches, they should
--- 758,797 ----
  
  This directory contains files that are used by the patch(1) command to
  modify the sources as distributed in the distribution file into a form that
! will compile and run perfectly on NetBSD.  The files are applied
  successively in alphabetic order (as returned by a shell "patches/patch-*"
  glob expansion), so patch-aa is applied before patch-ab etc.
  
! Patch files which are optional and will depend on local site configuration
! can be included with names matching the pattern "patches/patch-optional-*".
! Their suffixes should match the configuration options.  The selected
! optional patch file names should be assigned to the variable
! $OPTIONAL_PATCHFILES.  They will not be applied by default.
! 
! For example if a package data file needs patching to indicate the default
! local printer paper size as specified in the $PAPERSIZE file you can
! include patches for all the possible paper sizes other than the one the
! package comes configured for by default.  In this case you might have a
! patch called "patch-optional-Letter-papersize" and/or another patch called
! "patch-optional-A4-papersize".  In your Makefile you would select between
! them with the following construct:
! 
!    PATCHDIR=	${.CURDIR}/patches
!    .if exists(${PATCHDIR}/patch-optional-${PAPERSIZE}-papersize)
! 	OPTIONAL_PATCHFILES+= ${PATCHDIR}/patch-optional-${PAPERSIZE}-papersize
!    .endif
! 
! Note that you have to define the value of $PATCHDIR in order to use it in a
! ".if" statement like this as otherwise it's not defined until too late
! during the processing of the Makefile.  You should use a ".if" statement in
! order to avoid problems should the configuration item ($PAPERSIZE in this
! example) be set to an unexpected value.
! 
! The patch-* files should be in "diff -bu" format, and apply without a fuzz
! to avoid problems (to force patches to apply with fuzz you can set
! PATCH_FUZZ_FACTOR=-F2).  Furthermore, do not put changes for more than one
! file into a single patch-file, as this will make future modifications more
! difficult.
  
  Similar, a file should be patched at most once, not several times by
  several different patches. If a file needs several patches, they should
***************
*** 791,796 ****
--- 818,826 ----
  for the patch files by using the "make makepatchsum" command, see
  section 4.2.
  
+ Patch files that are distributed by the author or other maintainers can be
+ listed in $PATCHFILES.
+ 
  If it is desired to store any patches that should not be committed into
  pkgsrc, they can be kept outside the pkgsrc tree in the $LOCALPATCHES
  directory. The directory tree there is expected to have the same
***************
*** 1060,1066 ****
  3. For the linking of the library, remove any "ar", "ranlib", and "ld
     -Bshareable" commands, and use instead:
  
! 	${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info major:minor
  
     Note that the library is changed to have a .la extension, and the
     objects are changed to have a .lo extension.  Change OBJS as necessary.
--- 1090,1096 ----
  3. For the linking of the library, remove any "ar", "ranlib", and "ld
     -Bshareable" commands, and use instead:
  
! 	${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info CURRENT:REVISION:AGE
  
     Note that the library is changed to have a .la extension, and the
     objects are changed to have a .lo extension.  Change OBJS as necessary.
***************
*** 1069,1074 ****
--- 1099,1127 ----
     the -version-info especially when major and minor are zero, as libtool
     will otherwise strip off the shared library version.
  
+    PLIST gets all of the .a, .la and so, .so.major and .so.major.minor
+    entries.
+ 
+    From the libtool manual:
+ 
+ 	libtool library versions are described by three integers:
+ 
+ 	CURRENT
+ 	     The most recent interface number that this library implements.
+ 
+ 	REVISION
+ 	     The implementation number of the CURRENT interface.
+ 
+ 	AGE
+ 	     The difference between the newest and oldest interfaces that this
+ 	     library implements.  In other words, the library implements all the
+ 	     interface numbers in the range from number `CURRENT - AGE' to
+ 	     `CURRENT'.
+ 
+ 	If two libraries have identical CURRENT and AGE numbers, then the
+ 	dynamic linker chooses the library with the greater REVISION
+ 	number.
+ 
     The "-release" option will produce different results for a.out and ELF
     (excluding symlinks) in only one case. An ELF library of the form
     libfoo-release.so.x.y will have a symlink of libfoo.so.x.y on an a.out
***************
*** 1109,1116 ****
     This will install the static .a, shared library, any needed symlinks,
     and run "ldconfig."
  
! 7. In your PLIST, include all of the .a, .la, and so, .so.major and
!    .so.major.minor files (this is a change from the previous behaviour).
  
  
   6.3 Using libtool on GNU packages that already support libtool
--- 1162,1170 ----
     This will install the static .a, shared library, any needed symlinks,
     and run "ldconfig."
  
! 7. In your PLIST, include all of the .a, .la, and so, .so.CURRENT and
!    .so.CURRENT.REVISION files (this is a change from the previous
!    behaviour).
  
  
   6.3 Using libtool on GNU packages that already support libtool
***************
*** 1177,1182 ****
--- 1231,1239 ----
  	...
  	.include "../mk/automake.mk"
  
+ Packages which use GNU Automake will almost certainly require GNU Make, but
+ that's automatically provided for you in "mk/automake.mk".
+ 
  There are times when the configure process makes additional changes to the
  generated files, which then causes the build process to try to re-execute
  the automake sequence.  This is prevented by touching various files in
***************
*** 1820,1827 ****
  (shar), but the quick solution is to set EXTRACT_SUFX to the name after the
  DISTNAME field, and add the following to your package's Makefile:
  
! 	EXTRACT_SUFX=   .msg.gz
! 	EXTRACT_CMD=            zcat
  
  
   10.3 Packages not creating their own subdirectory
--- 1877,1884 ----
  (shar), but the quick solution is to set EXTRACT_SUFX to the name after the
  DISTNAME field, and add the following to your package's Makefile:
  
! 	EXTRACT_SUFX=		.msg.gz
! 	EXTRACT_CMD=		zcat -d < ${DOWNLOADED_DISTFILE} | ${SH}
  
  
   10.3 Packages not creating their own subdirectory
***************
*** 2038,2045 ****
  (it relies on the jpeg sources being present in source form during the
  build):
  
! 	if [ ! -e ${_PKGSRCDIR}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ]; then \
! 		cd ${_PKGSRCDIR}/../../graphics/jpeg && ${MAKE} extract;              \
  	fi
  
  If you build any other packages that way, please make sure the working
--- 2095,2102 ----
  (it relies on the jpeg sources being present in source form during the
  build):
  
! 	if [ ! -e ${_PKGSRCDIR}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ]; then	\
! 		cd ${_PKGSRCDIR}/../../graphics/jpeg && ${MAKE} extract;	\
  	fi
  
  If you build any other packages that way, please make sure the working
***************
*** 2112,2118 ****
  When compiling the pkgsrc/pkgtools/pkg_install package, you get the error
  from make that it doesn't know how to make /usr/share/tmac/tmac.andoc? This
  indicates that you don't have installed the "text" set on your machine
! (nroff, ...). It is recommended to do that.
  
  In the case of the pkg_install package, you can get away with setting
  NOMAN=YES either in the environment or in /etc/mk.conf.
--- 2169,2175 ----
  When compiling the pkgsrc/pkgtools/pkg_install package, you get the error
  from make that it doesn't know how to make /usr/share/tmac/tmac.andoc? This
  indicates that you don't have installed the "text" set on your machine
! (nroff, ...). It is recommended that you do that.
  
  In the case of the pkg_install package, you can get away with setting
  NOMAN=YES either in the environment or in /etc/mk.conf.
***************
*** 3020,3026 ****
  
  ###########################################################################
  # Local Variables:
! # mode:				Text
  # fill-column:			75
! # sentence-end-double-space:	nil
  # End:
--- 3077,3083 ----
  
  ###########################################################################
  # Local Variables:
! # mode:				Indented-Text
  # fill-column:			75
! # sentence-end-double-space:	t
  # End:
>Release-Note:
>Audit-Trail:
>Unformatted: