On Fri, Sep 09 2022, Nam Nguyen <n...@berkeley.edu> wrote:
> Here is an update to audio/flac 1.4.0 released on Sep. 9, 2022.
>
> Release notes: https://github.com/xiph/flac/releases/tag/1.4.0
>
> This diff does the following:
> - removes cpu.c patch because there is a new else condition that sets
>   ppc.arch* = false instead of erroring out as before
> - removes flac.1 patch because flac.1 is empty.
> - flac.1 must be deleted in order for pandoc to run. I do not think
>   flac.1 was intended to be bundled so I reported this.
>   see: https://github.com/xiph/flac/issues/432
> - adds textproc/pandoc to BUILD_DEPENDS to generate man pages

pandoc is only available on amd64 on OpenBSD.  Depending on it at build
time effectively limits audio/flac to amd64.

> - major bump to both libFLAC and libFLAC++
> - remove doc/ from configure and Makefile to avoid installing empty
>   FLAC.tag file and logos.
>
>   While doc/ used to contain html pages, upstream thought html is now
>   pointless to include.
>
>   see:
>   https://github.com/xiph/flac/commit/80d064e15d843eb137ff80c9e9797b9c180e1743
>   https://github.com/xiph/flac/commit/dd8a264c566292de4d7da8f43688a169ffb431a1
>
> Testing
> =======
> `make test' passes. I tested flac playback with the following consumers:
> libsndfile audacity cmus deadbeef flac123 moc sox pacpl.
>
> Feedback and tests are welcome. OK?

A major bump looks appropriate but the switch to using pandoc
unconditionally doesn't.

I suggest using lowdown(1) from textproc/lowdown to format them,
proposal below.  I added an override in CONFIGURE_ENV so that pandoc
isn't picked up even if the empty .1 files are removed in a subsequent
update.

If you and naddy agree, please use the diff below with my ok.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/audio/flac/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- Makefile    8 Mar 2022 14:27:48 -0000       1.64
+++ Makefile    11 Sep 2022 00:18:54 -0000
@@ -1,11 +1,10 @@
 COMMENT=       free lossless audio codec
 
-DISTNAME=      flac-1.3.4
-REVISION=      0
+DISTNAME=      flac-1.4.0
 CATEGORIES=    audio archivers
 HOMEPAGE=      https://www.xiph.org/flac/
-SHARED_LIBS +=  FLAC                 12.0     # 11.0
-SHARED_LIBS +=  FLAC++               10.0     # 9.0
+SHARED_LIBS +=  FLAC                 13.0     # 12.0
+SHARED_LIBS +=  FLAC++               11.0     # 10.0
 
 MAINTAINER=    Christian Weisgerber <na...@openbsd.org>
 
@@ -20,6 +19,7 @@ WANTLIB=      c iconv m ogg ${COMPILER_LIBCXX
 
 COMPILER =     base-clang ports-gcc base-gcc
 
+BUILD_DEPENDS= textproc/lowdown
 LIB_DEPENDS=   audio/libogg converters/libiconv
 
 .if ${MACHINE_ARCH} == "i386"
@@ -36,11 +36,23 @@ CONFIGURE_ENV=      CPPFLAGS="-I${LOCALBASE}/
 
 # powerpc64 doesn't support VSX yet
 CONFIGURE_ARGS += --disable-vsx
+# don't pick up pandoc to rebuild man pages
+CONFIGURE_ENV =        ac_cv_prog_PANDOC=""
 
 DEBUG_PACKAGES=        ${BUILD_PACKAGES}
 
+post-extract:
+# skip doc/ which contains logos and empty doxygen file
+       sed -i 's;doc/Doxyfile doc/Makefile doc/images/Makefile;;' \
+               ${WRKSRC}/configure
+
+post-configure:
+       sed -i 's;SUBDIRS = doc;SUBDIRS =;' ${WRKSRC}/Makefile
+
 post-install:
-       ${SUBST_CMD} ${PREFIX}/man/man1/flac.1
-       rm ${PREFIX}/man/man1/flac.1.beforesubst
+.for manpage in flac metaflac
+       lowdown -s -tman -m section=1 -mtitle=${manpage} \
+           ${WRKSRC}/man/${manpage}.md > ${PREFIX}/man/man1/${manpage}.1
+.endfor
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/audio/flac/distinfo,v
retrieving revision 1.14
diff -u -p -r1.14 distinfo
--- distinfo    25 Feb 2022 20:45:09 -0000      1.14
+++ distinfo    10 Sep 2022 23:30:35 -0000
@@ -1,2 +1,2 @@
-SHA256 (flac-1.3.4.tar.xz) = j/BgfnWjIt181uxI9PIlRxQEricw0OqUUSexNVFV5zc=
-SIZE (flac-1.3.4.tar.xz) = 1038356
+SHA256 (flac-1.4.0.tar.xz) = r0HAczyTwjfD5S9k3YfjsNmvOCWfHH0R6Mv1g8SMJQY=
+SIZE (flac-1.4.0.tar.xz) = 783372
Index: patches/patch-man_flac_1
===================================================================
RCS file: patches/patch-man_flac_1
diff -N patches/patch-man_flac_1
--- patches/patch-man_flac_1    8 Mar 2022 14:27:48 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- man/flac.1.orig    Tue Nov 25 04:40:14 2014
-+++ man/flac.1 Sun Nov 30 20:59:42 2014
-@@ -384,7 +384,7 @@ These flags can be used to invert the sense of the cor
- .PP
- metaflac(1)
- .PP
--The programs are documented fully by HTML format documentation, available in 
\fI/usr/share/doc/libflac-doc/html\fR on Debian GNU/Linux systems.
-+The programs are documented fully by HTML format documentation, available in 
\fI${TRUEPREFIX}/share/doc/flac/html\fR.
- .SH "AUTHOR"
- .PP
- This manual page was initially written by Matt Zimmerman <m...@debian.org> 
for the Debian GNU/Linux system (but may be used by others). It has been kept 
up-to-date by the Xiph.org Foundation.
Index: patches/patch-src_libFLAC_cpu_c
===================================================================
RCS file: patches/patch-src_libFLAC_cpu_c
diff -N patches/patch-src_libFLAC_cpu_c
--- patches/patch-src_libFLAC_cpu_c     8 Mar 2022 14:27:48 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-No support for reading PPC hwcaps on OpenBSD.
-
-Index: src/libFLAC/cpu.c
---- src/libFLAC/cpu.c.orig
-+++ src/libFLAC/cpu.c
-@@ -262,7 +262,7 @@ ppc_cpu_info (FLAC__CPUInfo *info)
-       } else if (hwcaps & PPC_FEATURE2_ARCH_2_07) {
-               info->ppc.arch_2_07 = true;
-       }
--#elif defined(__APPLE__)
-+#elif defined(__APPLE__) || defined(__OpenBSD__)
-       /* no Mac OS X version supports CPU with Power AVI v2.07 or better */
-       info->ppc.arch_2_07 = false;
-       info->ppc.arch_3_00 = false;
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/audio/flac/pkg/PLIST,v
retrieving revision 1.20
diff -u -p -r1.20 PLIST
--- pkg/PLIST   8 Mar 2022 14:27:48 -0000       1.20
+++ pkg/PLIST   10 Sep 2022 23:30:35 -0000
@@ -28,26 +28,3 @@ lib/pkgconfig/flac.pc
 @man man/man1/metaflac.1
 share/aclocal/libFLAC++.m4
 share/aclocal/libFLAC.m4
-share/doc/flac/
-share/doc/flac/FLAC.tag
-share/doc/flac/changelog.html
-share/doc/flac/developers.html
-share/doc/flac/documentation.html
-share/doc/flac/documentation_bugs.html
-share/doc/flac/documentation_example_code.html
-share/doc/flac/documentation_format_overview.html
-share/doc/flac/documentation_tools.html
-share/doc/flac/documentation_tools_flac.html
-share/doc/flac/documentation_tools_metaflac.html
-share/doc/flac/faq.html
-share/doc/flac/favicon.ico
-share/doc/flac/features.html
-share/doc/flac/flac.css
-share/doc/flac/format.html
-share/doc/flac/id.html
-share/doc/flac/images/
-share/doc/flac/images/logo.svg
-share/doc/flac/images/logo130.gif
-share/doc/flac/index.html
-share/doc/flac/license.html
-share/doc/flac/ogg_mapping.html

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to