[vlc-commits] [Git][videolan/vlc][3.0.x] 4 commits: contrib: gme: Depend on zlib

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Aug 30 05:52:55 UTC 2022



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
90bbceda by David Fuhrmann at 2022-08-30T05:06:04+00:00
contrib: gme: Depend on zlib

The latest version of game-music-emu links against zlib if it is
available.

Refs #27262

(cherry picked from commit adf27a00179849228dee9220128b04b4670a8219)

- - - - -
b700dfd5 by David Fuhrmann at 2022-08-30T05:06:04+00:00
contrib: gme: Add libm to pkg-config file

This library links against libm, so it should be added into its
pkg-config file for static builds.

Refs #27262

(cherry picked from commit e5831665ea30c9fe0c4beb63e835c634b8117ca1)

- - - - -
4a9c9b54 by David Fuhrmann at 2022-08-30T05:06:04+00:00
contrib: gme: Prepare pkgconfig file and list lc++ on mac

On mac, we use libc++ instead of libstdc++. While the library is
actually build against libc++ already, the pkgconfig file still
hardcoded libstdc++ instead.

Refs #27262

(cherry picked from commit 9946913fa0ef9fbd56112fc69dd58a5c2b14650b)

- - - - -
ae70f7d5 by David Fuhrmann at 2022-08-30T05:06:04+00:00
configure.ac: Use pkg-config to detect presence of libgme

Use the existing pkg-config file to detect presence of libgme. This file
is already shipped on all known libgme versions (checked back until
0.6.0, which is from 2015).

This fixes build with recent libgme versions, which added even more
dependencies which were missing in the old check.

Fixes #27262

(cherry picked from commit 3a08825c8aea3148b4d51db85dd14d42c105987d)

- - - - -


4 changed files:

- configure.ac
- + contrib/src/gme/add-libm.patch
- + contrib/src/gme/mac-use-c-stdlib.patch
- contrib/src/gme/rules.mak


Changes:

=====================================
configure.ac
=====================================
@@ -2116,26 +2116,7 @@ AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
 dnl
 dnl  GME demux plugin
 dnl
-AC_ARG_ENABLE(gme,
-  [AS_HELP_STRING([--enable-gme],
-    [use Game Music Emu (default auto)])])
-AS_IF([test "${enable_gme}" != "no"], [
-  AC_CHECK_HEADER([gme/gme.h], [
-    AC_CHECK_LIB([gme], [gme_identify_header], [
-      VLC_ADD_PLUGIN([gme])
-    ], [
-      AC_CHECK_LIB([gme], [gme_identify_extension], [
-         VLC_ADD_LIBS([gme], [-lstdc++ $LIBM])
-         VLC_ADD_PLUGIN([gme])
-      ],, [-lstdc++ $LIBM])
-    ])
-    VLC_ADD_LIBS([gme], [-lgme])
-  ], [
-    AS_IF([test "x${enable_gme}" != "x"], [
-      AC_MSG_ERROR([GME cannot be found. Please install the development files.])
-    ])
-  ])
-])
+PKG_ENABLE_MODULES_VLC([GME], [], [libgme], [Game Music Emu support (default auto)], [auto])
 
 
 dnl


=====================================
contrib/src/gme/add-libm.patch
=====================================
@@ -0,0 +1,8 @@
+--- game-music-emu-0.6.3/gme/libgme.pc.in.old	2022-08-26 08:35:03.000000000 +0200
++++ game-music-emu-0.6.3/gme/libgme.pc.in	2022-08-26 08:35:18.000000000 +0200
+@@ -13,4 +13,4 @@
+ Version: @GME_VERSION@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -lgme
+-Libs.private: -lstdc++ @PKG_CONFIG_ZLIB@
++Libs.private: -lstdc++ -lm @PKG_CONFIG_ZLIB@


=====================================
contrib/src/gme/mac-use-c-stdlib.patch
=====================================
@@ -0,0 +1,8 @@
+--- game-music-emu/gme/libgme.pc.in.old	2022-08-25 21:46:36.000000000 +0200
++++ game-music-emu/gme/libgme.pc.in	2022-08-25 21:46:57.000000000 +0200
+@@ -13,4 +13,4 @@
+ Version: @GME_VERSION@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -lgme
+-Libs.private: -lstdc++ -lm @PKG_CONFIG_ZLIB@
++Libs.private: -lc++ -lm @PKG_CONFIG_ZLIB@


=====================================
contrib/src/gme/rules.mak
=====================================
@@ -8,11 +8,18 @@ PKGS += gme
 $(TARBALLS)/game-music-emu-$(GME_VERSION).tar.xz:
 	$(call download_pkg,$(GME_URL),gme)
 
+DEPS_gme = zlib $(DEPS_zlib)
+
 .sum-gme: game-music-emu-$(GME_VERSION).tar.xz
 
 game-music-emu: game-music-emu-$(GME_VERSION).tar.xz .sum-gme
 	$(UNPACK)
 	$(APPLY) $(SRC)/gme/skip-underrun.patch
+	$(APPLY) $(SRC)/gme/add-libm.patch
+ifdef HAVE_MACOSX
+	$(APPLY) $(SRC)/gme/mac-use-c-stdlib.patch
+endif
+	$(call pkg_static,"gme/libgme.pc.in")
 	$(MOVE)
 
 .gme: game-music-emu toolchain.cmake



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5f94c5b72f3a2e4b6d6d49e23740b3b6996ec944...ae70f7d5252afa01b0c895e5c159beca918b5b93

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5f94c5b72f3a2e4b6d6d49e23740b3b6996ec944...ae70f7d5252afa01b0c895e5c159beca918b5b93
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list