1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Update MASTER_SITES.

- Add option for GTK2 support.
- Add LICENSE.

PR:		ports/174185
Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
This commit is contained in:
Marcelo Araujo 2013-05-27 09:03:02 +00:00
parent 20659f6d09
commit 461a0d7bc6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319180
4 changed files with 87 additions and 67 deletions

View File

@ -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@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>

View File

@ -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

View File

@ -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);

View File

@ -9,5 +9,5 @@ all. The effect depends on each ear receiving a different tone,
and the combination of the inputs in the brain. If you are deaf
in one ear, it will not work.
Author: Steven James <pyro@linuxlabs.com>
Author: Steven James <pyro@linuxlabs.com>
WWW: http://www.linuxlabs.com/autozen.shtml