Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 395664 Details for
Bug 538876
media-libs/smpeg2 installs /usr/bin/smpeg2-config which is hardcoded to only work with abi_x86_64
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds multilib capable pkgconfig .pc file for media-libs/smpeg2-2.0.0-r2
smpeg2-2.0.0-smpeg2-pkgconf.patch (text/plain), 9.73 KB, created by
James D. Taylor
on 2015-02-06 02:59:24 UTC
(
hide
)
Description:
Adds multilib capable pkgconfig .pc file for media-libs/smpeg2-2.0.0-r2
Filename:
MIME Type:
Creator:
James D. Taylor
Created:
2015-02-06 02:59:24 UTC
Size:
9.73 KB
patch
obsolete
>Index: Makefile.am >=================================================================== >--- Makefile.am (revision 412) >+++ Makefile.am (working copy) >@@ -101,6 +101,9 @@ > m4datadir = $(datadir)/aclocal > m4data_DATA = smpeg2.m4 > >+pkgconfdir = $(libdir)/pkgconfig >+pkgconf_DATA = smpeg2.pc >+ > # Rule to build tar-gzipped distribution package > $(PACKAGE)-$(VERSION).tar.gz: dist > >Index: configure.in >=================================================================== >--- configure.in (revision 412) >+++ configure.in (working copy) >@@ -139,6 +139,7 @@ > ) > CFLAGS="$CFLAGS $SDL_CFLAGS" > LIBS="$LIBS $SDL_LIBS" >+AC_SUBST(SDL_VERSION) > > dnl See if we need to pass -lm for the math library > AC_CHECK_LIB(m, sqrt, LIBS="$LIBS -lm") >@@ -241,5 +242,6 @@ > AC_OUTPUT([ > Makefile > smpeg2-config >+smpeg2.pc > smpeg2.spec > ]) >Index: smpeg2.m4 >=================================================================== >--- smpeg2.m4 (revision 412) >+++ smpeg2.m4 (working copy) >@@ -1,71 +1,88 @@ > # Configure paths for SMPEG >-# Nicolas Vignal 11/19/2000 >-# stolen from Sam Lantinga >+# stolen from SDL2 2/5/2015 >+# stolen from Nicolas Vignal 11/19/2000 >+# stolen from Sam Lantinga 9/21/99 > # stolen from Manish Singh > # stolen back from Frank Belew > # stolen from Manish Singh > # Shamelessly stolen from Owen Taylor > >-dnl AM_PATH_SMPEG2([MINIMUM-VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) >+# serial 1 >+ >+dnl AM_PATH_SMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) > dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS > dnl > AC_DEFUN([AM_PATH_SMPEG2], >-[dnl >+[dnl > dnl Get the cflags and libraries from the smpeg2-config script > dnl >-AC_ARG_WITH([smpeg-prefix], >- AS_HELP_STRING([--with-smpeg-prefix=PFX], >- [Prefix where SMPEG is installed (optional)]), >- [smpeg_prefix="$withval"], [smpeg_prefix=""]) >-AC_ARG_WITH([smpeg-exec-prefix], >- AS_HELP_STRING([--with-smpeg-exec-prefix=PFX], >- [Exec prefix where SMPEG is installed (optional)]), >- [smpeg_exec_prefix="$withval"], [smpeg_exec_prefix=""]) >-AC_ARG_ENABLE([smpegtest], >- AS_HELP_STRING([--disable-smpegtest], >- [Do not try to compile and run a test SMPEG program]), >- [], [enable_smpegtest=yes]) >+AC_ARG_WITH(smpeg-prefix,[ --with-smpeg-prefix=PFX Prefix where SMPEG is installed (optional)], >+ smpeg_prefix="$withval", smpeg_prefix="") >+AC_ARG_WITH(smpeg-exec-prefix,[ --with-smpeg-exec-prefix=PFX Exec prefix where SMPEG is installed (optional)], >+ smpeg_exec_prefix="$withval", smpeg_exec_prefix="") >+AC_ARG_ENABLE(smpegtest, [ --disable-smpegtest Do not try to compile and run a test SMPEG program], >+ , enable_smpegtest=yes) > >- if test x$smpeg_exec_prefix != x ; then >- smpeg_args="$smpeg_args --exec-prefix=$smpeg_exec_prefix" >- if test x${SMPEG_CONFIG+set} != xset ; then >+ min_smpeg_version=ifelse([$1], ,2.0.0,$1) >+ >+ if test "x$smpeg_prefix$smpeg_exec_prefix" = x ; then >+ PKG_CHECK_MODULES([SMPEG], [smpeg2 >= $min_smpeg_version], >+ [smpeg_pc=yes], >+ [smpeg_pc=no]) >+ else >+ smpeg_pc=no >+ if test x$smpeg_exec_prefix != x ; then >+ smpeg_config_args="$smpeg_config_args --exec-prefix=$smpeg_exec_prefix" >+ if test x${SMPEG_CONFIG+set} != xset ; then > SMPEG_CONFIG=$smpeg_exec_prefix/bin/smpeg2-config >- fi >- fi >- if test x$smpeg_prefix != x ; then >- smpeg_args="$smpeg_args --prefix=$smpeg_prefix" >- if test x${SMPEG_CONFIG+set} != xset ; then >+ fi >+ fi >+ if test x$smpeg_prefix != x ; then >+ smpeg_config_args="$smpeg_config_args --prefix=$smpeg_prefix" >+ if test x${SMPEG_CONFIG+set} != xset ; then > SMPEG_CONFIG=$smpeg_prefix/bin/smpeg2-config >- fi >+ fi >+ fi > fi > >- AC_PATH_PROG([SMPEG_CONFIG], [smpeg2-config], [no]) >- min_smpeg_version=ifelse([$1], [], [2.0.0], [$1]) >- AC_MSG_CHECKING([for SMPEG - version >= $min_smpeg_version]) >- no_smpeg="" >- if test "$SMPEG_CONFIG" = "no" ; then >- no_smpeg=yes >+ if test "x$smpeg_pc" = xyes ; then >+ no_smpeg="" >+ SMPEG_CONFIG="pkg-config smpeg2" > else >- SMPEG_CFLAGS=`$SMPEG_CONFIG $smpegconf_args --cflags` >- SMPEG_LIBS=`$SMPEG_CONFIG $smpegconf_args --libs` >+ as_save_PATH="$PATH" >+ if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then >+ PATH="$prefix/bin:$prefix/usr/bin:$PATH" >+ fi >+ AC_PATH_PROG(SMPEG_CONFIG, smpeg2-config, no, [$PATH]) >+ PATH="$as_save_PATH" >+ AC_MSG_CHECKING(for SMPEG - version >= $min_smpeg_version) >+ no_smpeg="" > >- smpeg_major_version=`$SMPEG_CONFIG $smpeg_args --version | \ >- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` >- smpeg_minor_version=`$SMPEG_CONFIG $smpeg_args --version | \ >- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` >- smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ >- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` >- if test "x$enable_smpegtest" = "xyes" ; then >- ac_save_CFLAGS="$CFLAGS" >- ac_save_LIBS="$LIBS" >- CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" >- LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" >+ if test "$SMPEG_CONFIG" = "no" ; then >+ no_smpeg=yes >+ else >+ SMPEG_CFLAGS=`$SMPEG_CONFIG $smpeg_config_args --cflags` >+ SMPEG_LIBS=`$SMPEG_CONFIG $smpeg_config_args --libs` >+ >+ smpeg_major_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ >+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` >+ smpeg_minor_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ >+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` >+ smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ >+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` >+ if test "x$enable_smpegtest" = "xyes" ; then >+ ac_save_CFLAGS="$CFLAGS" >+ ac_save_CXXFLAGS="$CXXFLAGS" >+ ac_save_LIBS="$LIBS" >+ CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" >+ CXXFLAGS="$CXXFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" >+ LIBS="$LIBS $SMPEG_LIBS" > dnl > dnl Now check if the installed SMPEG is sufficiently new. (Also sanity > dnl checks the results of smpeg2-config to some extent > dnl > rm -f conf.smpegtest >- AC_RUN_IFELSE([AC_LANG_SOURCE([[ >+ AC_TRY_RUN([ > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >@@ -75,7 +92,7 @@ > my_strdup (char *str) > { > char *new_str; >- >+ > if (str) > { > new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); >@@ -83,7 +100,7 @@ > } > else > new_str = NULL; >- >+ > return new_str; > } > >@@ -122,16 +139,21 @@ > } > } > >-]])],[],[no_smpeg=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"]) >- CFLAGS="$ac_save_CFLAGS" >- LIBS="$ac_save_LIBS" >- fi >+],, no_smpeg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) >+ CFLAGS="$ac_save_CFLAGS" >+ CXXFLAGS="$ac_save_CXXFLAGS" >+ LIBS="$ac_save_LIBS" >+ fi >+ fi >+ if test "x$no_smpeg" = x ; then >+ AC_MSG_RESULT(yes) >+ else >+ AC_MSG_RESULT(no) >+ fi > fi > if test "x$no_smpeg" = x ; then >- AC_MSG_RESULT([yes]) >- ifelse([$2], [], [:], [$2]) >+ ifelse([$2], , :, [$2]) > else >- AC_MSG_RESULT([no]) > if test "$SMPEG_CONFIG" = "no" ; then > echo "*** The smpeg2-config script installed by SMPEG could not be found" > echo "*** If SMPEG was installed in PREFIX, make sure PREFIX/bin is in" >@@ -143,12 +165,17 @@ > else > echo "*** Could not run SMPEG test program, checking why..." > CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" >- LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" >- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ >+ CXXFLAGS="$CXXFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" >+ LIBS="$LIBS $SMPEG_LIBS" >+ AC_TRY_LINK([ > #include <stdio.h> > #include "smpeg.h" >-]], >- [[ return 0; ]])], >+ >+int main(int argc, char *argv[]) >+{ return 0; } >+#undef main >+#define main K_and_R_C_main >+], [ return 0; ], > [ echo "*** The test program compiled, but did not run. This usually means" > echo "*** that the run-time linker is not finding SMPEG or finding the wrong" > echo "*** version of SMPEG. If it is not finding SMPEG, you'll need to set your" >@@ -155,7 +182,7 @@ > echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" > echo "*** to the installed location Also, make sure you have run ldconfig if that" > echo "*** is required on your system" >- echo "***" >+ echo "***" > echo "*** If you have an old version installed, it is best to remove it, although" > echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], > [ echo "*** The test program failed to compile or link. See the file config.log for the" >@@ -163,14 +190,15 @@ > echo "*** or that you have moved SMPEG since it was installed. In the latter case, you" > echo "*** may want to edit the smpeg2-config script: $SMPEG_CONFIG" ]) > CFLAGS="$ac_save_CFLAGS" >+ CXXFLAGS="$ac_save_CXXFLAGS" > LIBS="$ac_save_LIBS" > fi > fi > SMPEG_CFLAGS="" > SMPEG_LIBS="" >- ifelse([$3], [], [:], [$3]) >+ ifelse([$3], , :, [$3]) > fi >- AC_SUBST([SMPEG_CFLAGS]) >- AC_SUBST([SMPEG_LIBS]) >+ AC_SUBST(SMPEG_CFLAGS) >+ AC_SUBST(SMPEG_LIBS) > rm -f conf.smpegtest > ]) >Index: smpeg2.pc.in >=================================================================== >--- smpeg2.pc.in (revision 0) >+++ smpeg2.pc.in (working copy) >@@ -0,0 +1,12 @@ >+prefix=@prefix@ >+exec_prefix=@exec_prefix@ >+libdir=@libdir@ >+includedir=@includedir@ >+ >+Name: smpeg2 >+Description: SDL MPEG Library >+Version: @VERSION@ >+Requires: sdl2 >= @SDL_VERSION@ >+Libs: -L${libdir} -lsmpeg2 >+Cflags: -I${includedir}/smpeg2 -I${includedir}/SDL2 >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 538876
: 395664