ports/65824: sysutil/LPRng and sysutil/LPRngTool - add PORT_REPLACES_BASE_LPR option

Linh Pham question+freebsdpr at closedsrc.org
Tue Apr 20 20:10:23 UTC 2004


>Number:         65824
>Category:       ports
>Synopsis:       sysutil/LPRng and sysutil/LPRngTool - add PORT_REPLACES_BASE_LPR option
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 20 13:10:23 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Linh Pham
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD q.internal.closedsrc.org 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #1: Fri Apr 16 23:02:54 PDT 2004 question at q.internal.closedsrc.org:/usr/obj/usr/src/sys/Q i386
>Description:
Both the LPRng and the LPRngTool source tarballs support the "--mandir"
configure options which are not being exploited by the respective ports.
Instead, there is a messy kludge in both of the ports' Makefiles that
tell the user to use --prefix and --sysconfdir, as well as create a symlink
/usr/man -> /usr/share/man; or the other option includes a configure script
option which breaks when trying to build the dependencies of the two ports.

My suggestion is to add a PORT_REPLACES_BASE_LPR option, kind of like with
dns/bind9 where all three of the configure options are automatically filled,
or the user can opt not to use the "super" option and set the three options
to whatever the user wants.

The included fix is a kludge as I'm not too great with Makefiles and only
represents the changes to sysutils/LPRng and not to sysutils/LPRngTool.

Side question: why is LPRng under sysutils and not print like CUPS? I can
see why LPRngTool is, but even that could be under print as well.
>How-To-Repeat:
>Fix:
Attempt of a fix below, though I'm not very good at messing around with
Makefiles.

--- sysutils-LPRng_Makefile.diff begins here ---
--- Makefile.orig	Tue Apr 20 12:52:03 2004
+++ Makefile	Tue Apr 20 12:51:43 2004
@@ -36,11 +36,21 @@
 		CPPFLAGS="-I${LOCALBASE}/include" \
 		--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
 		--enable-gdbm=${LOCALBASE}
-.if defined(PREFIX)
-  CONFIGURE_ARGS+=  --prefix="${PREFIX}"
+
+.if defined(PORT_REPLACES_BASE_LPR)
+  CONFIGURE_ARGS+= --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
 .endif
-.if defined(SYSCONFDIR)
-  CONFIGURE_ARGS+=  --sysconfdir="${SYSCONFDIR}"
+
+.if !defined(PORT_REPLACES_BASE_LPR)
+  .if defined(PREFIX)
+    CONFIGURE_ARGS+=  --prefix="${PREFIX}"
+  .endif
+  .if defined(SYSCONFDIR)
+    CONFIGURE_ARGS+=  --sysconfdir="${SYSCONFDIR}"
+  .endif
+  .if defined(MANDIR)
+    CONFIGURE_ARGS+=  --mandir="${MANDIR}"
+  .endif
 .endif
 
 MAN1=	lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 \
@@ -48,11 +58,10 @@
 MAN5=	printcap.5 lpd.conf.5 lpd.perms.5
 MAN8=	lpc.8 checkpc.8 lpd.8
 
-pre-everything::
+pre-everything:
+.if !defined(PORT_REPLACES_BASE_LPR)
 	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
-	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc clean all install"
-	@${ECHO_MSG} " OR"
-	@${ECHO_MSG} "  make CONFIGURE_SCRIPT=STANDARD_configuration clean all install"
+	@${ECHO_MSG} "  make PORT_REPLACES_BASE_LPR=yes clean all install"
 	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
 		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
 		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
@@ -62,6 +71,8 @@
 		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
 		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
 	fi
+	.endif
+.endif
 
 post-install:
 .if !defined(NOPORTDOCS)
--- sysutils-LPRng_Makefile.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list