pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/archivers/star



Module Name:    pkgsrc
Committed By:   micha
Date:           Thu May 14 11:36:35 UTC 2020

Modified Files:
        pkgsrc/archivers/star: Makefile PLIST

Log Message:
archivers/star: Fix man page handling for different operating systems

- Check which systems need and support processing tables with tbl
  The default case matches for NetBSD (no processing)
- Man pages are installed into native OS sections
  PLIST must match this logic (use variables)


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/archivers/star/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/archivers/star/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/archivers/star/Makefile
diff -u pkgsrc/archivers/star/Makefile:1.48 pkgsrc/archivers/star/Makefile:1.49
--- pkgsrc/archivers/star/Makefile:1.48 Thu May 14 08:47:12 2020
+++ pkgsrc/archivers/star/Makefile      Thu May 14 11:36:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2020/05/14 08:47:12 micha Exp $
+# $NetBSD: Makefile,v 1.49 2020/05/14 11:36:34 micha Exp $
 
 DISTNAME=      schily-2020-05-11
 PKGNAME=       star-1.6.1
@@ -14,17 +14,34 @@ LICENSE=    cddl-1.0
 
 MAKE_JOBS_SAFE=        no
 
-# tbl(1) of NetBSD 9 can't process the man page, but man(1) can.
-# Install man page with unprocessed tables as workaround (may break other OS)
-#USE_TOOLS+=   tbl
+.include "../../mk/bsd.prefs.mk"
+
+# tbl(1) of NetBSD 9 cannot be used and cripples the man pages, but man(1)
+# from mandoc uses a builtin tbl that is good enough.
+# This check should catch all supported OS that needs processed tables for
+# man pages and have a tbl that can be used to do that.
+.if ${OPSYS} == "AIX" ||       \
+    ${OPSYS} == "Cygwin" ||    \
+    ${OPSYS} == "Darwin" ||    \
+    ${OPSYS} == "DragonFly" || \
+    ${OPSYS} == "Haiku" ||     \
+    ${OPSYS} == "HPUX" ||      \
+    ${OPSYS} == "IRIX" ||      \
+    ${OPSYS} == "Linux" ||     \
+    ${OPSYS} == "Minix" ||     \
+    ${OPSYS} == "MirBSD" ||    \
+    ${OPSYS} == "OSF1" ||      \
+    ${OPSYS} == "QNX" ||       \
+    ${OPSYS} == "SunOS"
+USE_TOOLS+=    tbl
+.endif
+
 TOOL_DEPENDS+= smake-[0-9]*:../../devel/smake
 SMAKE=         MAKEFLAGS= smake
 MAKE_FLAGS+=   DESTDIR=${DESTDIR} INS_BASE=${PREFIX} DEFMANBASE=. MANDIR=${PKGMANDIR}
 # Honor CPPFLAGS, CFLAGS and LDFLAGS
 MAKE_FLAGS+=   CPPOPTX=${CPPFLAGS:Q} COPTX=${CFLAGS:Q} LDOPTX=${LDFLAGS:Q}
 
-.include "../../mk/bsd.prefs.mk"
-
 # The default location is /etc/default/star
 # We patch the documentation appropriately. Additionally, we also install
 # INSTALL.pkgsrc stating the reasons we do this, as required by the license.
@@ -51,6 +68,19 @@ SUBST_FILES.install= ${WRKDIR}/INSTALL.p
 SUBST_SED.install=     -e 's,PKGNAME_NOREV,${PKGNAME_NOREV},'
 SUBST_SED.install+=    -e 's,STAR_CONF,${STAR_CONF:Q},'
 
+# Man pages with documentation of file formats should go to section 4 on
+# SysV based systems. All supported systems that are treated by schilytools
+# with "MANSTYLE= sysv" in the RULES/os-${OPSYS}.def" files must be catched
+# by this check (IRIX and OSF/1 are treated with BSD style by schilytools).
+PLIST_VARS+=   bsd sysv
+.if ${OPSYS} == "AIX" ||       \
+    ${OPSYS} == "HPUX" ||      \
+    ${OPSYS} == "SunOS"
+PLIST.sysv=    yes
+.else
+PLIST.bsd=     yes
+.endif
+
 # Shared platform specific code for schilytools (provided by smake package)
 .include "../../devel/smake/Makefile.common"
 
@@ -67,15 +97,17 @@ do-build:
        cd ${WRKSRC}/star && ${SMAKE} ${MAKE_FLAGS}
 
 # Process tables in manpage
-#post-build:
-#      cd ${WRKSRC} && if ${TEST} -f star/pkgsrc_tbl.done; then :;     \
-#      else                                                            \
-#              ${TBL} star/spax.1 >star/spax.1.tmp &&                  \
-#              ${MV} -f star/spax.1.tmp star/spax.1 &&                 \
-#              ${TBL} star/star.4 >star/star.4.tmp &&                  \
-#              ${MV} -f star/star.4.tmp star/star.4 &&                 \
-#              ${TOUCH} star/pkgsrc_tbl.done;                          \
-#      fi
+.if !empty(USE_TOOLS:Mtbl)
+post-build:
+       cd ${WRKSRC} && if ${TEST} -f star/pkgsrc_tbl.done; then :;     \
+       else                                                            \
+               ${TBL} star/spax.1 >star/spax.1.tmp &&                  \
+               ${MV} -f star/spax.1.tmp star/spax.1 &&                 \
+               ${TBL} star/star.4 >star/star.4.tmp &&                  \
+               ${MV} -f star/star.4.tmp star/star.4 &&                 \
+               ${TOUCH} star/pkgsrc_tbl.done;                          \
+       fi
+.endif
 
 do-test:
        cd ${WRKSRC}/star && cd tests ; ${SMAKE} ${MAKE_FLAGS} tests

Index: pkgsrc/archivers/star/PLIST
diff -u pkgsrc/archivers/star/PLIST:1.5 pkgsrc/archivers/star/PLIST:1.6
--- pkgsrc/archivers/star/PLIST:1.5     Fri Oct  4 14:27:51 2019
+++ pkgsrc/archivers/star/PLIST Thu May 14 11:36:34 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2019/10/04 14:27:51 micha Exp $
+@comment $NetBSD: PLIST,v 1.6 2020/05/14 11:36:34 micha Exp $
 bin/gnutar
 bin/scpio
 bin/spax
@@ -12,7 +12,8 @@ man/man1/spax.1
 man/man1/star.1
 man/man1/suntar.1
 man/man1/ustar.1
-man/man5/star.5
+${PLIST.sysv}man/man4/star.4
+${PLIST.bsd}man/man5/star.5
 share/doc/star/INSTALL.pkgsrc
 share/doc/star/README
 share/doc/star/README.ACL



Home | Main Index | Thread Index | Old Index