On 8/5/19 3:34 PM, Christian Weisgerber wrote:
Brian Callahan:
do-configure:
+ sed -i -e "s,LMAJ,`echo ${LIBmpv_VERSION} | cut -f 1 -d .`,g" \
+ -e "s,LMIN,`echo ${LIBmpv_VERSION} | cut -f 2 -d .`,g" \
+ ${WRKSRC}/libmpv/client.h
${DO_WAF} configure ${CONFIGURE_ARGS}
sed -i -e 's,LMAJ,${LIBmpv_VERSION:R},g' \
-e 's,LMIN,${LIBmpv_VERSION:E},g' \
Learned something new today. New diff attached.
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/mpv/Makefile,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile
--- Makefile 14 Jul 2019 00:39:38 -0000 1.48
+++ Makefile 6 Aug 2019 02:03:52 -0000
@@ -6,7 +6,9 @@ GH_ACCOUNT = mpv-player
GH_PROJECT = mpv
GH_TAGNAME = v0.29.1
-REVISION = 0
+REVISION = 1
+
+SHARED_LIBS += mpv 0.0 # 1.101
CATEGORIES = multimedia x11
@@ -60,6 +62,7 @@ CONFIGURE_ARGS = --confloaddir=${SYSCONF
--enable-cdda \
--enable-dvdnav \
--enable-dvdread \
+ --enable-libmpv-shared \
--enable-sndio \
--enable-sdl2 \
--enable-tv \
@@ -110,6 +113,9 @@ post-patch:
cp ${DISTDIR}/${WAF:T} ${WAF}
do-configure:
+ sed -i -e "s,LMAJ,${LIBmpv_VERSION:R},g" \
+ -e "s,LMIN,${LIBmpv_VERSION:E},g" \
+ ${WRKSRC}/libmpv/client.h
${DO_WAF} configure ${CONFIGURE_ARGS}
do-build:
Index: patches/patch-libmpv_client_h
===================================================================
RCS file: patches/patch-libmpv_client_h
diff -N patches/patch-libmpv_client_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libmpv_client_h 6 Aug 2019 02:03:52 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Could not find an easy way to do this.
+
+Index: libmpv/client.h
+--- libmpv/client.h.orig
++++ libmpv/client.h
+@@ -210,7 +210,7 @@ extern "C" {
+ * relational operators (<, >, <=, >=).
+ */
+ #define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
+-#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 101)
++#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(LMAJ, LMIN)
+
+ /**
+ * The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/multimedia/mpv/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST
--- pkg/PLIST 29 Jun 2018 22:16:18 -0000 1.6
+++ pkg/PLIST 6 Aug 2019 02:03:52 -0000
@@ -1,5 +1,14 @@
@comment $OpenBSD: PLIST,v 1.6 2018/06/29 22:16:18 espie Exp $
@bin bin/mpv
+include/mpv/
+include/mpv/client.h
+include/mpv/opengl_cb.h
+include/mpv/qthelper.hpp
+include/mpv/render.h
+include/mpv/render_gl.h
+include/mpv/stream_cb.h
+@lib lib/libmpv.so.${LIBmpv_VERSION}
+lib/pkgconfig/mpv.pc
@man man/man1/mpv.1
share/applications/mpv.desktop
share/examples/mpv/