diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-03-25 11:44:20 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-03-25 11:44:20 +0000 |
commit | aa507797043485de15c086094e6b6024fa1c4951 (patch) | |
tree | 638de532b91e31a283fa0aa5cbf608ca9a6b3627 /audio | |
parent | add pdfmap 1.50 (diff) |
- Add optional Ogg/Vorbis support
PR: 36288
Submitted by: Ports Fury
Notes
Notes:
svn path=/head/; revision=56618
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mp3stat/Makefile | 22 | ||||
-rw-r--r-- | audio/mp3stat/files/patch-Makefile | 37 | ||||
-rw-r--r-- | audio/mp3stat/files/patch-Makefile.rules | 83 |
3 files changed, 134 insertions, 8 deletions
diff --git a/audio/mp3stat/Makefile b/audio/mp3stat/Makefile index 5d97054dee18..aa8e1d3350c4 100644 --- a/audio/mp3stat/Makefile +++ b/audio/mp3stat/Makefile @@ -14,16 +14,22 @@ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= ports@FreeBSD.org -USE_GTK= yes WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -CFLAGS+= -I${LOCALBASE}/include + +USE_GTK= yes USE_GMAKE= yes +MAKE_ENV= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" + +.if defined(WITH_VORBIS) +LIB_DEPENDS= vorbis.1:${PORTSDIR}/audio/libvorbis +MAKE_ENV+= WITH_VORBIS="${WITH_VORBIS}" +.endif -post-patch: - @${PERL} -pi -e "s,glib-config,${GLIB_CONFIG},g ; \ - s,gtk-config,${GTK_CONFIG},g ; \ - s,^CXXFLAGS *=,CXXFLAGS+=,g" ${WRKSRC}/Makefile -# current vorbis support is broken, dont know how to fix - @${PERL} -pi -e "s,^VORBIS,#VORBIS,g" ${WRKSRC}/Makefile +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "If you want to compile with Ogg/Vorbis support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_VORBIS=yes\"" + @${ECHO_MSG} +.endif .include <bsd.port.mk> diff --git a/audio/mp3stat/files/patch-Makefile b/audio/mp3stat/files/patch-Makefile new file mode 100644 index 000000000000..110d59ae2444 --- /dev/null +++ b/audio/mp3stat/files/patch-Makefile @@ -0,0 +1,37 @@ +--- Makefile.orig Fri Mar 22 17:00:23 2002 ++++ Makefile Sat Mar 23 02:46:59 2002 +@@ -4,26 +4,28 @@ + #since we're using c++, we use CXXFLAGS since that's standard. + #If you only set CFLAGS, you should also look into setting CXXFLAGS + +-TBUILDFLAGS = -Wall -lvorbis -lvorbisfile -lm $(CXXFLAGS) ++TBUILDFLAGS = -L${LOCALBASE}/lib -lvorbis -lvorbisfile -lm $(CXXFLAGS) + +-BUILDFLAGS = -Wall -lvorbis -lvorbisfile `glib-config --cflags` `gtk-config --cflags` `gtk-config --libs` `glib-config --libs` -lm $(CXXFLAGS) ++BUILDFLAGS = -L${LOCALBASE}/lib -lvorbis -lvorbisfile `${GTK_CONFIG} --cflags` `${GTK_CONFIG} --libs` -lm $(CXXFLAGS) + #comment out below and comment above to enable experimental gtk2 ui + #BUILDFLAGS = -Wall -lvorbis -lvorbisfile `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -lm $(CXXFLAGS) + +-TBUILD2FLAGS = -Wall -lm $(CXXFLAGS) ++TBUILD2FLAGS = -lm $(CXXFLAGS) + +-BUILD2FLAGS = -Wall `glib-config --cflags` `gtk-config --cflags` `gtk-config --libs` `glib-config --libs` -lm $(CXXFLAGS) ++BUILD2FLAGS = `${GTK_CONFIG} --cflags` `${GTK_CONFIG} --libs` -lm $(CXXFLAGS) + #comment out below and comment above to enable experimental gtk2 ui + #BUILD2FLAGS = -Wall `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -lm $(CXXFLAGS) + + #To disable Vorbis support, comment out next line +-VORBIS = -DVORBIS ++ifdef WITH_VORBIS ++VORBIS = -DVORBIS -I${LOCALBASE}/include ++endif + + #To compile text only utility, comment out next line + GTK = -DGTK + + CPPFLAGS = -Wall -DVERSION=\"$(VER)\" $(VORBIS) + +-CXX = g++ ++#CXX = g++ + + include Makefile.rules diff --git a/audio/mp3stat/files/patch-Makefile.rules b/audio/mp3stat/files/patch-Makefile.rules new file mode 100644 index 000000000000..fc8e80c7e473 --- /dev/null +++ b/audio/mp3stat/files/patch-Makefile.rules @@ -0,0 +1,83 @@ +--- Makefile.rules.orig Fri Mar 22 17:00:23 2002 ++++ Makefile.rules Sat Mar 23 02:51:37 2002 +@@ -18,63 +18,26 @@ + WEBPAGE = "http://safemode.homeip.net" + + all: +- @if test -n "$(VORBIS)"; then \ +- echo "";\ +- echo "___ building backend ___";\ +- echo "Using flags: $(CXXFLAGS)";\ +- echo "";\ +- echo "building $(OBJ)";\ +- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ) $(OBJSRC);\ +- echo "building $(OBJ2)";\ +- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ2) $(OBJ2SRC);\ +- echo "";\ +- echo "___ building frontend ___";\ +- if test -n "$(GTK)"; then \ +- echo "Using flags: $(CXXFLAGS) $(BUILDFLAGS)";\ +- echo "";\ +- echo "building and linking $(TARGET)";\ +- $(CXX) $(BUILDFLAGS) $(CPPFLAGS) -o $(TARGET) $(SRC) $(OBJ) $(OBJ2);\ +- else \ +- echo "Using flags: $(CXXFLAGS) $(TBUILDFLAGS)";\ +- echo "";\ +- echo "building and linking $(TARGET)";\ +- $(CXX) $(TBUILDFLAGS) $(CPPFLAGS) -o $(TARGET) $(TSRC) $(OBJ) $(OBJ2);\ +- fi\ +- else \ +- echo "";\ +- echo "___ building backend ___";\ +- echo "Using flags: $(CXXFLAGS)";\ +- echo "";\ +- echo "building $(OBJ)";\ +- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ) $(OBJSRC);\ +- echo "";\ +- echo "___ building frontend ___";\ +- if test -n "$(GTK)"; then \ +- echo "Using flags: $(CXXFLAGS) $(BUILD2FLAGS)";\ +- echo "";\ +- echo "building and linking $(TARGET)";\ +- $(CXX) $(BUILD2FLAGS) $(CPPFLAGS) -o $(TARGET) $(SRC) $(OBJ);\ +- else \ +- echo "Using flags: $(CXXFLAGS) $(TBUILD2FLAGS)";\ +- echo "";\ +- echo "building and linking $(TARGET)";\ +- $(CXX) $(TBUILD2FLAGS) $(CPPFLAGS) -o $(TARGET) $(TSRC) $(OBJ);\ +- fi\ +- fi +- @echo " " +- @echo "-------------------------------------------" +- @echo "Vorbis support is set by default." +- @echo "to disable edit Makefile and comment VORBIS" +- @echo " " +- @echo "gtk 1.2 ui built by default, to enable" +- @echo "gtk 2.0 ui, read the Makefile" +- @echo "To disable, edit Makefile and comment GTK" +- @echo "-------------------------------------------" ++ifdef VORBIS ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ) $(OBJSRC) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ2) $(OBJ2SRC) ++ifdef GTK ++ $(CXX) $(BUILDFLAGS) $(CPPFLAGS) -o $(TARGET) $(SRC) $(OBJ) $(OBJ2) ++else ++ $(CXX) $(TBUILDFLAGS) $(CPPFLAGS) -o $(TARGET) $(TSRC) $(OBJ) $(OBJ2) ++endif ++else ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ) $(OBJSRC) ++ifdef GTK ++ $(CXX) $(BUILD2FLAGS) $(CPPFLAGS) -o $(TARGET) $(SRC) $(OBJ) ++else ++ $(CXX) $(TBUILD2FLAGS) $(CPPFLAGS) -o $(TARGET) $(TSRC) $(OBJ) ++endif ++endif + + clean: + rm -f *.o mp3stat + + install: +- strip $(TARGET) +- cp $(TARGET) /usr/local/bin ++ ${BSD_INSTALL_PROGRAM} $(TARGET) ${PREFIX}/bin + |