Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2002 02:54:48 -0800 (PST)
From:      KATO Tsuguru <tkato@prontomail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/36288: Update port: audio/mp3stat
Message-ID:  <200203251054.g2PAsm116038@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         36288
>Category:       ports
>Synopsis:       Update port: audio/mp3stat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 25 03:00:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        4.4-RELEASE i386
>Organization:
>Environment:
>Description:
- Add optional Ogg/Vorbis support

New file:
files/patch-Makefile
files/patch-Makefile.rules

>How-To-Repeat:

>Fix:
diff -urN /usr/ports/audio/mp3stat/Makefile audio/mp3stat/Makefile
--- /usr/ports/audio/mp3stat/Makefile	Mon Mar 25 18:49:01 2002
+++ audio/mp3stat/Makefile	Mon Mar 25 19:40:27 2002
@@ -14,16 +14,22 @@
 
 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 -urN /usr/ports/audio/mp3stat/files/patch-Makefile audio/mp3stat/files/patch-Makefile
--- /usr/ports/audio/mp3stat/files/patch-Makefile	Thu Jan  1 09:00:00 1970
+++ audio/mp3stat/files/patch-Makefile	Sat Mar 23 02:53:04 2002
@@ -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 -urN /usr/ports/audio/mp3stat/files/patch-Makefile.rules audio/mp3stat/files/patch-Makefile.rules
--- /usr/ports/audio/mp3stat/files/patch-Makefile.rules	Thu Jan  1 09:00:00 1970
+++ audio/mp3stat/files/patch-Makefile.rules	Sat Mar 23 02:52:16 2002
@@ -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
+ 

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203251054.g2PAsm116038>