You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/mp/files/mp-5.1.3-asneeded.patch

228 lines
6.8 KiB

diff --git a/config.sh b/config.sh
index 17ade83..643b07e 100755
--- a/config.sh
+++ b/config.sh
@@ -80,7 +80,7 @@ echo "Configuring..."
echo "/* automatically created by config.sh - do not modify */" > config.h
echo "# automatically created by config.sh - do not modify" > makefile.opts
-> config.ldflags
+> config.libs
> config.cflags
> .config.log
@@ -134,7 +134,7 @@ done
if [ "$MPDM" != "NOTFOUND" ] ; then
echo "-I$MPDM" >> config.cflags
- echo "-L$MPDM -lmpdm" >> config.ldflags
+ echo "-L$MPDM -lmpdm" >> config.libs
echo "OK ($MPDM)"
else
echo "No"
@@ -146,7 +146,7 @@ if [ ! -f $MPDM/Makefile ] ; then
( echo ; cd $MPDM ; ./config.sh --prefix=$PREFIX --docdir=$PREFIX/share/doc/$APPNAME $CONF_ARGS ; echo )
fi
-cat $MPDM/config.ldflags >> config.ldflags
+cat $MPDM/config.libs >> config.libs
echo "MPDM=$MPDM" >> makefile.opts
# MPSL
@@ -160,7 +160,7 @@ done
if [ "$MPSL" != "NOTFOUND" ] ; then
echo "-I$MPSL" >> config.cflags
- echo "-L$MPSL -lmpsl" >> config.ldflags
+ echo "-L$MPSL -lmpsl" >> config.libs
echo "OK ($MPSL)"
else
echo "No"
@@ -172,7 +172,7 @@ if [ ! -f $MPSL/Makefile ] ; then
( echo ; cd $MPSL ; ./config.sh --prefix=$PREFIX --docdir=$PREFIX/share/doc/$APPNAME $CONF_ARGS ; echo )
fi
-cat $MPSL/config.ldflags >> config.ldflags
+cat $MPSL/config.libs >> config.libs
echo "MPSL=$MPSL" >> makefile.opts
# Win32
@@ -184,7 +184,7 @@ else
grep CONFOPT_WIN32 ${MPDM}/config.h >/dev/null
if [ $? = 0 ] ; then
- echo "-mwindows -lcomctl32" >> config.ldflags
+ echo "-mwindows -lcomctl32" >> config.libs
echo "#define CONFOPT_WIN32 1" >> config.h
echo "OK"
DRIVERS="win32 $DRIVERS"
@@ -279,7 +279,7 @@ else
if [ $? = 0 ] ; then
echo $TMP_CFLAGS >> config.cflags
- echo $TMP_LDFLAGS >> config.ldflags
+ echo $TMP_LDFLAGS >> config.libs
echo "#define CONFOPT_KDE4 1" >> config.h
echo "OK"
@@ -357,7 +357,7 @@ else
if [ $? = 0 ] ; then
echo "#define CONFOPT_GTK 2" >> config.h
echo "$TMP_CFLAGS " >> config.cflags
- echo "$TMP_LDFLAGS " >> config.ldflags
+ echo "$TMP_LDFLAGS " >> config.libs
echo "OK (2.0)"
DRIVERS="gtk $DRIVERS"
DRV_OBJS="mpv_gtk.o $DRV_OBJS"
diff --git a/makefile.in b/makefile.in
index 704eb57..5714f62 100644
--- a/makefile.in
+++ b/makefile.in
@@ -36,7 +36,7 @@ dep:
gcc -MM *.c `cat config.cflags` > makefile.depend
$(APPNAME): $(OBJS) $(MPDM)/libmpdm.a $(MPSL)/libmpsl.a
- $(CCLINK) $(CFLAGS) $(OBJS) `cat config.ldflags` -o $@
+ $(CCLINK) $(CFLAGS) $(OBJS) `cat config.ldflags` `cat config.libs` -o $@
mpv_kde4.o: mpv_kde4.cpp mpv_kde4.moc
$(CPP) $(CFLAGS) -I. `cat config.cflags` -c $<
@@ -54,7 +54,7 @@ mp_res.o: mp_res.rc
$(WINDRES) mp_res.rc mp_res.o
mp-5.exe: $(OBJS) mp_res.o $(MPDM)/libmpdm.a $(MPSL)/libmpsl.a
- $(CC) $(CFLAGS) $(OBJS) mp_res.o `cat config.ldflags` -o $@
+ $(CC) $(CFLAGS) $(OBJS) mp_res.o `cat config.ldflags` `cat config.libs` -o $@
clean:
rm -f $(APPNAME) $(LIB) $(OBJS) *.o *.moc tags *.tar.gz *.exe *.zip .installer.c *.1
@@ -62,7 +62,7 @@ clean:
(cd $(MPSL) ; make clean)
distclean: clean
- rm -f config.h config.cflags config.ldflags \
+ rm -f config.h config.cflags config.ldflags config.libs \
makefile.opts Makefile po/minimum-profit.pot
docsclean:
diff --git a/mpdm/config.sh b/mpdm/config.sh
index 9e4f2f8..16033d3 100755
--- a/mpdm/config.sh
+++ b/mpdm/config.sh
@@ -70,7 +70,7 @@ echo "Configuring MPDM..."
echo "/* automatically created by config.sh - do not modify */" > config.h
echo "# automatically created by config.sh - do not modify" > makefile.opts
-> config.ldflags
+> config.libs
> config.cflags
> .config.log
@@ -169,7 +169,7 @@ if [ "$WITH_PCRE" = 1 ] ; then
echo "OK (using pcre library)"
echo "#define CONFOPT_PCRE 1" >> config.h
echo "$TMP_CFLAGS " >> config.cflags
- echo "$TMP_LDFLAGS " >> config.ldflags
+ echo "$TMP_LDFLAGS " >> config.libs
REGEX_YET=1
fi
fi
@@ -316,7 +316,7 @@ else
if [ $? = 0 ] ; then
echo "OK (libintl needed)"
echo "#define CONFOPT_GETTEXT 1" >> config.h
- echo "$TMP_LDFLAGS" >> config.ldflags
+ echo "$TMP_LDFLAGS" >> config.libs
else
echo "No"
fi
@@ -349,7 +349,7 @@ else
if [ $? = 0 ] ; then
echo "OK (libiconv needed)"
echo "#define CONFOPT_ICONV 1" >> config.h
- echo "$TMP_LDFLAGS" >> config.ldflags
+ echo "$TMP_LDFLAGS" >> config.libs
else
echo "No"
fi
diff --git a/mpdm/makefile.in b/mpdm/makefile.in
index 17ee1a0..10c102d 100644
--- a/mpdm/makefile.in
+++ b/mpdm/makefile.in
@@ -32,7 +32,7 @@ $(LIB): $(OBJS)
$(AR) rv $(LIB) $(OBJS)
stress: stress.c $(LIB)
- $(CC) $(CFLAGS) `cat config.ldflags` stress.c -L. -lmpdm -o $@
+ $(CC) $(CFLAGS) `cat config.ldflags` `cat config.libs` stress.c -L. -lmpdm -o $@
.SUFFIXES: .txt .html
@@ -54,7 +54,7 @@ clean:
rm -f $(TARGET) $(LIB) $(OBJS) *.o tags *.tar.gz stress
distclean: clean
- rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
+ rm -f config.h config.cflags config.ldflags config.libs makefile.opts .config.log Makefile
realclean: distclean docsclean
diff --git a/mpsl/config.sh b/mpsl/config.sh
index d325412..4f36b06 100755
--- a/mpsl/config.sh
+++ b/mpsl/config.sh
@@ -69,7 +69,7 @@ echo "Configuring MPSL..."
echo "/* automatically created by config.sh - do not modify */" > config.h
echo "# automatically created by config.sh - do not modify" > makefile.opts
-> config.ldflags
+> config.libs
> config.cflags
> .config.log
@@ -131,7 +131,7 @@ done
if [ "$MPDM" != "NOTFOUND" ] ; then
echo "-I$MPDM" >> config.cflags
- echo "-L$MPDM -lmpdm" >> config.ldflags
+ echo "-L$MPDM -lmpdm" >> config.libs
echo "OK ($MPDM)"
else
echo "No"
@@ -143,7 +143,7 @@ if [ ! -f $MPDM/Makefile ] ; then
( echo ; cd $MPDM ; ./config.sh $CONF_ARGS ; echo )
fi
-cat $MPDM/config.ldflags >> config.ldflags
+cat $MPDM/config.libs >> config.libs
# if win32, the interpreter is called mpsl.exe
grep CONFOPT_WIN32 ${MPDM}/config.h >/dev/null && TARGET=mpsl.exe
diff --git a/mpsl/makefile.in b/mpsl/makefile.in
index 14ed62d..253e278 100644
--- a/mpsl/makefile.in
+++ b/mpsl/makefile.in
@@ -49,11 +49,11 @@ $(LIB): $(OBJS)
$(AR) rv $(LIB) $(OBJS)
$(TARGET): $(LIB) $(MPDM)/libmpdm.a
- $(CC) $(CFLAGS) -L. -lmpsl `cat config.ldflags` -o $@
+ $(CC) $(CFLAGS) -L. -lmpsl `cat config.ldflags` `cat config.libs` -o $@
stress: stress.c $(LIB) $(MPDM)/libmpdm.a
$(CC) $(CFLAGS) `cat config.cflags` stress.c \
- -L. -lmpsl `cat config.ldflags` -o $@
+ -L. -lmpsl `cat config.ldflags` `cat config.libs` -o $@
clean:
rm -f $(TARGET) $(LIB) $(OBJS) *.o tags *.tar.gz stress
@@ -62,7 +62,7 @@ realclean: clean
rm -f y.tab.c y.tab.h lex.yy.c
distclean: clean y.tab.c y.tab.h lex.yy.c
- rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
+ rm -f config.h config.cflags config.ldflags config.libs makefile.opts .config.log Makefile
realclean: distclean docsclean