Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2012 02:30:41 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/174185: audio/autozen: Update MASTER_SITES
Message-ID:  <20121206023041.acd34d571ecdbece6f1c0c94@yahoo.com>
Resent-Message-ID: <201212051810.qB5IA8C1033632@freefall.freebsd.org>

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

>Number:         174185
>Category:       ports
>Synopsis:       audio/autozen: Update MASTER_SITES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 05 18:10:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- Update MASTER_SITES
- Add option for GTK2 support

Remove file:
files/patch-Makefile

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/audio/autozen/Makefile audio/autozen/Makefile
--- /usr/ports/audio/autozen/Makefile	2012-11-08 05:37:06.000000000 +0900
+++ audio/autozen/Makefile	2012-11-18 05:46:10.000000000 +0900
@@ -1,36 +1,66 @@
-# New ports collection makefile for:	autozen
-# Date created:				2000-09-16
-# Whom:					Trevor Johnson
-#
+# Created by: Trevor Johnson
 # $FreeBSD: head/audio/autozen/Makefile 300895 2012-07-14 12:56:14Z beat $
-#
 
 PORTNAME=	autozen
 PORTVERSION=	2.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	audio
-MASTER_SITES=	ftp://ftp.springdaemons.com/soft/
+MASTER_SITES=	ftp://ftp.springdaemons.com/soft/ \
+		http://www.sourcefiles.org/Miscellaneous/
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Adjust brain waves with sound
 
-MAKE_ENV+=	PTHREAD_FLAGS="${PTHREAD_CFLAGS} ${PTHREAD_LIBS}" \
-		DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}" MKDIR="${MKDIR}"
+LICENSE=	GPLv2
+
+OPTIONS_DEFINE=	GTK2
 
-USE_GNOME=	gtk12
 USE_PERL5_RUN=	yes
+MAKE_ENV=	PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+DESKTOP_ENTRIES="AutoZen" \
+		"BrainWave Generator/Synchronizator" \
+		"" \
+		"${PORTNAME}" \
+		"Application;GTK;AudioVideo;Player;" \
+		false
 
-PORTDOCS=	*
 MAN1=		autozen.1
+PORTDOCS=	*
 
-post-patch:
-	@${RM} -f ${WRKSRC}/autozen ${WRKSRC}/seq2wav
-.if exists(/usr/include/sys/soundcard.h)
-	@${REINPLACE_CMD} "s=machine/soundcard.h=sys/soundcard.h=g" \
-		${WRKSRC}/autozen.c
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGTK2}
+USE_GNOME=	gtk20
+USE_PKGCONFIG=	build
+MAKE_ENV+=	GTK_CONFIG="pkg-config gtk+-2.0"
+.else
+USE_GNOME=	gtk12
 .endif
+
+post-extract:
+	@cd ${WRKSRC} && ${RM} -f autozen seq2wav
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/^CC/s| =| ?=| ; \
+		 /^CFLAGS/s| =| ?=| ; \
+		 /^PREFIX/s| =| ?=| ; \
+		 s|share/AutoZen|${DATADIR_REL}| ; \
+		 s|gtk-config|$${GTK_CONFIG}|g ; \
+		 s|-pthread|$${PTHREAD_LIBS}| ; \
+		 s|$$(CC) seq2wav|$$(CC) $$(CFLAGS) seq2wav|' \
+		${WRKSRC}/Makefile
+
+do-install:
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} autozen seq2wav ${PREFIX}/bin)
+	(cd ${WRKSRC} && ${INSTALL_SCRIPT} zentime ${PREFIX}/bin)
+	(cd ${WRKSRC}/doc && ${INSTALL_MAN} autozen.1 ${MANPREFIX}/man/man1)
+	@${MKDIR} ${DATADIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} *.seq ${DATADIR})
 .if !defined(NOPORTDOCS)
-	@${REINPLACE_CMD} "s=#%%DOCS%%==g" ${WRKSRC}/Makefile
+	@${MKDIR} ${DOCSDIR}
+	@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} HTML ${DOCSDIR})
 .endif
 
 .include <bsd.port.mk>
diff -urN /usr/ports/audio/autozen/files/patch-Makefile audio/autozen/files/patch-Makefile
--- /usr/ports/audio/autozen/files/patch-Makefile	2012-11-08 05:37:06.000000000 +0900
+++ audio/autozen/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -1,53 +0,0 @@
---- Makefile.orig	Sun Sep 16 20:10:02 2001
-+++ Makefile	Sun Jul 30 15:38:35 2006
-@@ -1,10 +1,10 @@
- 
--CC = gcc
--CFLAGS = -g
-+#CC = gcc
-+#CFLAGS = -g
- #CFLAGS = -g -DDEBUG
- 
--PREFIX = /usr
--PUBLIC_SEQUENCES = $(PREFIX)/share/AutoZen
-+PREFIX = ${LOCALBASE}
-+PUBLIC_SEQUENCES = $(PREFIX)/share/autozen
- 
- # uncomment one of the OS= lines below if you're compiling on one of those OSen. 
- #OS= -D__FreeBSD__
-@@ -19,7 +19,7 @@
- 	strip autozen seq2wav
- 
- autozen: autozen.c *.xpm
--	$(CC) $(OS) -D_REENTRANT -DPUBLIC_SEQUENCES='"$(PUBLIC_SEQUENCES)"' $(CFLAGS) `gtk-config --cflags` `gtk-config  --libs` -pthread autozen.c -o autozen $(DEBUG_LIBS)
-+	$(CC) $(OS) -D_REENTRANT -DPUBLIC_SEQUENCES='"$(PUBLIC_SEQUENCES)"' $(CFLAGS) `gtk-config --cflags` `gtk-config  --libs` ${PTHREAD_FLAGS} autozen.c -o autozen $(DEBUG_LIBS)
- 
- seq2wav: seq2wav.c
- 	$(CC) seq2wav.c -o seq2wav -lm
-@@ -27,17 +27,15 @@
- 	rm -f autozen seq2wav
- 
- install: all
--	install -d $(PREFIX)/bin
--	install zentime $(PREFIX)/bin
--	install -s seq2wav $(PREFIX)/bin
--	install -s autozen $(PREFIX)/bin
--	install -d $(PREFIX)/share/AutoZen
--	install -m 644 *.seq $(PREFIX)/share/AutoZen
--	install -d $(PREFIX)/share/doc/AutoZen/HTML/images
--	install -m 644 doc/HTML/*.html $(PREFIX)/share/doc/AutoZen/HTML
--	install -m 644 doc/HTML/images/* $(PREFIX)/share/doc/AutoZen/HTML/images
--	install -d $(PREFIX)/man/man1
--	install -m 644 doc/autozen.1 $(PREFIX)/man/man1
-+	${BSD_INSTALL_SCRIPT} zentime ${PREFIX}/bin
-+	${BSD_INSTALL_PROGRAM} seq2wav ${PREFIX}/bin
-+	${BSD_INSTALL_PROGRAM} autozen ${PREFIX}/bin
-+	${MKDIR} ${DATADIR}
-+	${BSD_INSTALL_DATA} *.seq ${DATADIR}
-+#%%DOCS%%	${MKDIR} ${DOCSDIR}/images
-+#%%DOCS%%	${BSD_INSTALL_DATA} doc/HTML/*.html ${DOCSDIR}
-+#%%DOCS%%	${BSD_INSTALL_DATA} doc/HTML/images/* ${DOCSDIR}/images
-+	${BSD_INSTALL_MAN} doc/autozen.1 ${PREFIX}/man/man1
- 
- tags: *.[ch] *.xpm
- 	ctags *.[ch] *.xpm
diff -urN /usr/ports/audio/autozen/files/patch-autozen.c audio/autozen/files/patch-autozen.c
--- /usr/ports/audio/autozen/files/patch-autozen.c	2012-11-08 05:37:06.000000000 +0900
+++ audio/autozen/files/patch-autozen.c	2012-11-17 23:31:38.000000000 +0900
@@ -36,3 +36,44 @@
  }
  
  gint volTimeOut(gpointer data) {
+@@ -729,6 +729,11 @@
+ 	GtkWidget *help_text;
+ 	GtkWidget *HelpQuit;
+ 
++#if GTK_MAJOR_VERSION >= 2
++	GtkTextIter help_text_iter;
++	GtkTextBuffer *help_text_buf;
++#endif
++
+ 	HelpWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ 	gtk_object_set_data (GTK_OBJECT (HelpWindow), "HelpWindow", HelpWindow);
+ 	gtk_window_set_title (GTK_WINDOW (HelpWindow), "AutoZen Help");
+@@ -740,9 +745,16 @@
+ 	gtk_widget_show (vbox1);
+ 	gtk_container_add (GTK_CONTAINER (HelpWindow), vbox1);
+ 
++#if GTK_MAJOR_VERSION >= 2
++	help_text = gtk_text_view_new ();
++	help_text_buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (help_text));
++	gtk_text_buffer_get_iter_at_offset (help_text_buf, &help_text_iter, 0);
++	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW (help_text), GTK_WRAP_WORD);
++#else
+ 	help_text = gtk_text_new (NULL, NULL);
+ 	gtk_text_set_word_wrap( GTK_TEXT( help_text ), TRUE);
+ 	gtk_text_set_line_wrap( GTK_TEXT( help_text ), TRUE);
++#endif
+ 
+ 
+ 	gtk_object_set_data (GTK_OBJECT (HelpWindow), "help_text", help_text);
+@@ -751,7 +763,11 @@
+ //	gtk_widget_set_sensitive (help_text, FALSE);
+ 	GTK_WIDGET_UNSET_FLAGS (help_text, GTK_CAN_FOCUS);
+ 	gtk_widget_realize (help_text);
++#if GTK_MAJOR_VERSION >= 2
++	gtk_text_buffer_insert (help_text_buf, &help_text_iter, text, strlen(text));
++#else
+ 	gtk_text_insert (GTK_TEXT (help_text), NULL, NULL, NULL, text, strlen(text));
++#endif
+ 
+ 	HelpQuit = gtk_button_new_with_label ("Close");
+ 	gtk_object_set_data (GTK_OBJECT (HelpWindow), "HelpQuit", HelpQuit);
>Release-Note:
>Audit-Trail:
>Unformatted:



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