svn commit: r319180 - in head/audio/autozen: . files
Marcelo Araujo
araujo at FreeBSD.org
Mon May 27 09:03:04 UTC 2013
Author: araujo
Date: Mon May 27 09:03:02 2013
New Revision: 319180
URL: http://svnweb.freebsd.org/changeset/ports/319180
Log:
- Update MASTER_SITES.
- Add option for GTK2 support.
- Add LICENSE.
PR: ports/174185
Submitted by: KATO Tsuguru <tkato432 at yahoo.com>
Deleted:
head/audio/autozen/files/patch-Makefile
Modified:
head/audio/autozen/Makefile
head/audio/autozen/files/patch-autozen.c (contents, props changed)
head/audio/autozen/pkg-descr (contents, props changed)
Modified: head/audio/autozen/Makefile
==============================================================================
--- head/audio/autozen/Makefile Mon May 27 08:57:05 2013 (r319179)
+++ head/audio/autozen/Makefile Mon May 27 09:03:02 2013 (r319180)
@@ -3,33 +3,65 @@
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 at 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 DOCS
USES= shebangfix
-USE_GNOME= gtk12
-USE_PERL5_RUN= yes
SHEBANG_FILES= zentime
+USE_PERL5_RUN= yes
+
+DESKTOP_ENTRIES="AutoZen" \
+ "BrainWave Generator/Synchronizator" \
+ "" \
+ "${PORTNAME}" \
+ "AudioVideo;Player;GTK;" \
+ false
-PORTDOCS= *
MAN1= autozen.1
+PORTDOCS= *
.include <bsd.port.options.mk>
-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
+
+.if ${PORT_OPTIONS:MGTK2}
+USES+= pkgconfig
+USE_GNOME= gtk20
+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|$$(CC) seq2wav|$$(CC) $$(CFLAGS) seq2wav|' \
+ ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/autozen ${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/seq2wav ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/zentime ${PREFIX}/bin/
+ ${INSTALL_MAN} ${WRKSRC}/doc/autozen.1 ${MANPREFIX}/man/man1/
+ ${MKDIR} ${DATADIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} *.seq ${DATADIR})
.if ${PORT_OPTIONS:MDOCS}
- @${REINPLACE_CMD} "s=#%%DOCS%%==g" ${WRKSRC}/Makefile
+ ${MKDIR} ${DOCSDIR}
+ ${COPYTREE_SHARE} ${WRKSRC}/doc/HTML ${DOCSDIR}
.endif
.include <bsd.port.mk>
Modified: head/audio/autozen/files/patch-autozen.c
==============================================================================
--- head/audio/autozen/files/patch-autozen.c Mon May 27 08:57:05 2013 (r319179)
+++ head/audio/autozen/files/patch-autozen.c Mon May 27 09:03:02 2013 (r319180)
@@ -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);
Modified: head/audio/autozen/pkg-descr
==============================================================================
--- head/audio/autozen/pkg-descr Mon May 27 08:57:05 2013 (r319179)
+++ head/audio/autozen/pkg-descr Mon May 27 09:03:02 2013 (r319180)
@@ -9,5 +9,5 @@ all. The effect depends on each ear rec
and the combination of the inputs in the brain. If you are deaf
in one ear, it will not work.
-Author: Steven James <pyro at linuxlabs.com>
+Author: Steven James <pyro at linuxlabs.com>
WWW: http://www.linuxlabs.com/autozen.shtml
More information about the svn-ports-head
mailing list