diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-15 09:12:25 +0200 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2012-09-16 19:44:40 -0400 |
commit | b91b25e175a26b20319259e3dc7a432ead5af5fb (patch) | |
tree | 76866d78062a5945cd93a1c99c58c0918c0c97c0 /audio | |
parent | 7967c79891a3d523a160dfb559cd571e1768c666 (diff) | |
download | slackbuilds-b91b25e175a26b20319259e3dc7a432ead5af5fb.tar.gz |
audio/audtty: Updated for version 0.1.12.
Added also some patches from git.
Rewritten the gcc/DESTDIR patch
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audtty/audtty-0.1.9a-cc-and-destdir.patch | 30 | ||||
-rw-r--r-- | audio/audtty/audtty.SlackBuild | 24 | ||||
-rw-r--r-- | audio/audtty/audtty.info | 6 | ||||
-rw-r--r-- | audio/audtty/patches/01-fix_segfault_in_playlist_creation.patch | 36 | ||||
-rw-r--r-- | audio/audtty/patches/02-fix_possible_overflow.patch | 22 | ||||
-rw-r--r-- | audio/audtty/patches/03-fix_segfault_and_possible_overflow.patch | 37 | ||||
-rw-r--r-- | audio/audtty/patches/04-code_refactoring.patch | 91 | ||||
-rw-r--r-- | audio/audtty/patches/audtty-0.1.12-cc-and-destdir.patch | 49 |
8 files changed, 249 insertions, 46 deletions
diff --git a/audio/audtty/audtty-0.1.9a-cc-and-destdir.patch b/audio/audtty/audtty-0.1.9a-cc-and-destdir.patch deleted file mode 100644 index fb78cf75f4..0000000000 --- a/audio/audtty/audtty-0.1.9a-cc-and-destdir.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ur audtty.orig/Makefile.in audtty/Makefile.in ---- audtty.orig/Makefile.in 2008-05-08 09:50:26.000000000 +0300 -+++ audtty/Makefile.in 2008-07-05 09:36:31.000000000 +0300 -@@ -20,18 +20,18 @@ - all: audtty - - audtty: ${BINS} -- cc -Wall -lncurses -laudclient ${LDFLAGS} -o audtty $(BINS) -+ $(CC) -Wall ${LDFLAGS} -o audtty $(BINS) -lncurses -laudclient - - .c.o: -- cc -Wall ${AUDACIOUS_CFLAGS} ${CFLAGS} -o $@ -c $< -+ $(CC) -Wall ${AUDACIOUS_CFLAGS} ${CFLAGS} -o $@ -c $< - - install: audtty -- mkdir -p ${bindir} -- install -m 0755 audtty ${bindir}/audtty -- mkdir -p ${mandir} -- install -m 0644 audtty.1 ${mandir}/audtty.1 -- mkdir -p ${sysconfdir} -- install -m 0644 audtty.conf ${sysconfdir}/audtty.conf -+ mkdir -p $(DESTDIR)${bindir} -+ install -m 0755 audtty $(DESTDIR)${bindir}/audtty -+ mkdir -p $(DESTDIR)${mandir} -+ install -m 0644 audtty.1 $(DESTDIR)${mandir}/audtty.1 -+ mkdir -p $(DESTDIR)${sysconfdir} -+ install -m 0644 audtty.conf $(DESTDIR)${sysconfdir}/audtty.conf - - uninstall: - rm ${bindir}/audtty || false diff --git a/audio/audtty/audtty.SlackBuild b/audio/audtty/audtty.SlackBuild index 33c0df0908..efe0bc6dfc 100644 --- a/audio/audtty/audtty.SlackBuild +++ b/audio/audtty/audtty.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=audtty -VERSION=${VERSION:-0.1.9a} +VERSION=${VERSION:-0.1.12} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -63,8 +63,6 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -# Since audtty-0.1.9a.tar.gz unpacks as 'auddty' fix it by: -mv $TMP/$PRGNAM $TMP/$PRGNAM-$VERSION cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -73,8 +71,13 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Patch from Gentoo Linux (fixes DESTDIR) -patch -p1 < $CWD/audtty-0.1.9a-cc-and-destdir.patch || exit 1 +# Add latest patches from git and one fixing DESTDIR from gentoo (adapted) +for i in $CWD/patches/* ; do patch -p1 < $i ; done + +sed -i \ + -e "s|@LIBDIRSUFFIX@|${LIBDIRSUFFIX}|" \ + -e "s|@SLKCFLAGS@|${SLKCFLAGS}|" \ + Makefile.in CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -89,16 +92,11 @@ CXXFLAGS="$SLKCFLAGS" \ make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -# Move man pages to /usr/man manually -mv $PKG/usr/share/man $PKG/usr/ - -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ diff --git a/audio/audtty/audtty.info b/audio/audtty/audtty.info index 67178a12a4..4bd76c682a 100644 --- a/audio/audtty/audtty.info +++ b/audio/audtty/audtty.info @@ -1,8 +1,8 @@ PRGNAM="audtty" -VERSION="0.1.9a" +VERSION="0.1.12" HOMEPAGE="http://audtty.alioth.debian.org" -DOWNLOAD="http://audtty.alioth.debian.org/audtty/audtty-0.1.9a.tar.gz" -MD5SUM="4f4de3c31ef90885eb8bea71d69ca653" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/audtty-0.1.12.tar.gz" +MD5SUM="d14d996c0425748c73bb009f6d78121b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/audio/audtty/patches/01-fix_segfault_in_playlist_creation.patch b/audio/audtty/patches/01-fix_segfault_in_playlist_creation.patch new file mode 100644 index 0000000000..c0b426c91d --- /dev/null +++ b/audio/audtty/patches/01-fix_segfault_in_playlist_creation.patch @@ -0,0 +1,36 @@ +From 3122210cbe3ccd5e83d1a2d1415d370d46834052 Mon Sep 17 00:00:00 2001 +From: Chris Taylor <chris@code-monkeys.org> +Date: Fri, 05 Mar 2010 06:09:20 +0000 +Subject: Fix segfault in playlist creation. + +Audtty would segfault if buffer length was 0 and ENTER was pressed. + + +Signed-off-by: Chris Taylor <chris@code-monkeys.org> +--- +diff --git a/playlist_create.c b/playlist_create.c +index 0cd0088..475a494 100644 +--- a/playlist_create.c ++++ b/playlist_create.c +@@ -48,6 +48,11 @@ void playlist_create( void ) + case ESCAPE: + return; + case ENTER: ++ ++ if(strlen(buffer)==0) { ++ return; ++ } ++ else { + file=fopen(buffer,"w"); + for(i=0;i<list.length;i++) + { +@@ -55,6 +60,7 @@ void playlist_create( void ) + fputs("\n",file); + } + fclose(file); ++ } + return; + case KEY_BACKSPACE: + if (len == 0) break; +-- +cgit v0.8.3.4-115-g1759 diff --git a/audio/audtty/patches/02-fix_possible_overflow.patch b/audio/audtty/patches/02-fix_possible_overflow.patch new file mode 100644 index 0000000000..2d71ee304f --- /dev/null +++ b/audio/audtty/patches/02-fix_possible_overflow.patch @@ -0,0 +1,22 @@ +From 92bcd204331ba673073acc25c7480cddce1e2b87 Mon Sep 17 00:00:00 2001 +From: Chris Taylor <chris@code-monkeys.org> +Date: Fri, 05 Mar 2010 06:11:41 +0000 +Subject: Fix possible overflow. + +Signed-off-by: Chris Taylor <chris@code-monkeys.org> +--- +diff --git a/playlist_create.c b/playlist_create.c +index 475a494..f8f84c5 100644 +--- a/playlist_create.c ++++ b/playlist_create.c +@@ -67,7 +67,7 @@ void playlist_create( void ) + buffer[--len] = '\0'; + break; + default: +- if (len == 1025) break; ++ if (len >= 1024) break; + if (c < 32) break; + buffer[len] = c; + buffer[++len] = '\0'; +-- +cgit v0.8.3.4-115-g1759 diff --git a/audio/audtty/patches/03-fix_segfault_and_possible_overflow.patch b/audio/audtty/patches/03-fix_segfault_and_possible_overflow.patch new file mode 100644 index 0000000000..e196954c9b --- /dev/null +++ b/audio/audtty/patches/03-fix_segfault_and_possible_overflow.patch @@ -0,0 +1,37 @@ +From c688fa3851263dc29075182ffdb1ab83051a7213 Mon Sep 17 00:00:00 2001 +From: Chris Taylor <chris@code-monkeys.org> +Date: Fri, 05 Mar 2010 06:13:15 +0000 +Subject: Fix segfault and possible overflow. + +-Fix segfault when opening directory, and the buffer length is 0. +-Fix possible overflow in buffer. + +Signed-off-by: Chris Taylor <chris@code-monkeys.org> +--- +diff --git a/browse.c b/browse.c +index fd06dee..c736e64 100644 +--- a/browse.c ++++ b/browse.c +@@ -399,16 +399,19 @@ void open_directory( void ) + get_contents(); + return; + case ENTER: ++ if(strlen(buffer)==0) return; ++ else { + cont.location=g_strdup(buffer); + g_chdir(buffer); + get_contents(); ++ } + return; + case KEY_BACKSPACE: + if (len == 0) break; + buffer[--len] = '\0'; + break; + default: +- if (len == 1025) break; ++ if (len >= 1024) break; + if (c < 32) break; + buffer[len] = c; + buffer[++len] = '\0'; +-- +cgit v0.8.3.4-115-g1759 diff --git a/audio/audtty/patches/04-code_refactoring.patch b/audio/audtty/patches/04-code_refactoring.patch new file mode 100644 index 0000000000..022d68c7c2 --- /dev/null +++ b/audio/audtty/patches/04-code_refactoring.patch @@ -0,0 +1,91 @@ +From ead43f353675d4c8952facf57920ce79533955a6 Mon Sep 17 00:00:00 2001 +From: Chris Taylor <chris@code-monkeys.org> +Date: Fri, 05 Mar 2010 06:24:05 +0000 +Subject: Code refactoring. + +-Split browser creation code off into its own object. update_browser. +-If exiting from opening creation use update_browser() to repaint browser. + + +Signed-off-by: Chris Taylor <chris@code-monkeys.org> +--- +diff --git a/browse.c b/browse.c +index c736e64..232d374 100644 +--- a/browse.c ++++ b/browse.c +@@ -50,7 +50,7 @@ void add_file(gboolean dir); + void remove_win( void ); + void display_error(gchar *message, gchar *name, gboolean type); + void open_directory( void ); +- ++void update_browser(void); + + void file_browser(gint height) + { +@@ -63,28 +63,15 @@ void file_browser(gint height) + cont.length = 1; + cont.first=0; + cont.pos_height=0; +- clear(); ++ clear(); + refresh(); +- ++ + browser.location = newwin(1, 0, 0, 0); + browser.title = newwin(1, 0, 1, 0); + browser.list = newwin(cont.height, 0, 3, 0); + +- +- wcolor_set(browser.location, 1, NULL); +- wcolor_set(browser.title, 1, NULL); +- wcolor_set(browser.list, 1, NULL); +- +- mvwtitledhline(browser.title, 0, "File Browser"); +- wnoutrefresh(browser.title); +- wnoutrefresh(browser.list); +- +- doupdate(); +- +- +- get_contents(); +- browser_paint(&cont); +- ++ update_browser(); ++ + while((c=getch())) + { + switch(c) +@@ -399,7 +386,10 @@ void open_directory( void ) + get_contents(); + return; + case ENTER: +- if(strlen(buffer)==0) return; ++ if(strlen(buffer)==0) { ++ update_browser(); ++ return; ++ } + else { + cont.location=g_strdup(buffer); + g_chdir(buffer); +@@ -429,4 +419,18 @@ void open_directory( void ) + doupdate(); + } + return; ++} ++ ++void update_browser(void) ++{ ++ wcolor_set(browser.location, 1, NULL); ++ wcolor_set(browser.title, 1, NULL); ++ wcolor_set(browser.list, 1, NULL); ++ mvwtitledhline(browser.title, 0, "File Browser"); ++ wnoutrefresh(browser.title); ++ wnoutrefresh(browser.list); ++ doupdate(); ++ get_contents(); ++ browser_paint(&cont); ++ return; + } +\ No newline at end of file +-- +cgit v0.8.3.4-115-g1759 diff --git a/audio/audtty/patches/audtty-0.1.12-cc-and-destdir.patch b/audio/audtty/patches/audtty-0.1.12-cc-and-destdir.patch new file mode 100644 index 0000000000..7ffdedba08 --- /dev/null +++ b/audio/audtty/patches/audtty-0.1.12-cc-and-destdir.patch @@ -0,0 +1,49 @@ +diff -Naur audtty-0.1.12.orig/Makefile.in audtty-0.1.12/Makefile.in +--- audtty-0.1.12.orig/Makefile.in 2010-02-28 19:10:48.000000000 +0100 ++++ audtty-0.1.12/Makefile.in 2012-09-15 09:06:34.570080268 +0200 +@@ -2,15 +2,14 @@ + # + # A fork of xmms-curses + +-DESTDIR= + # autoconf is dumb. +-prefix=${DESTDIR} ++prefix=/usr + exec_prefix=@prefix@ + bindir=@bindir@ +-mandir=@prefix@/share/man/man1 ++mandir=@prefix@/man/man1 + sysconfdir=@sysconfdir@ + +-AUDACIOUS_CFLAGS=@AUDACIOUS_CFLAGS@ -I/usr/include/dbus-1.0 ++AUDACIOUS_CFLAGS=@AUDACIOUS_CFLAGS@ -I/usr/include/dbus-1.0 -I/usr/lib@LIBDIRSUFFIX@/glib-2.0/include -I/usr/include/glib-2.0 + + SOURCES=main.c curses_printf.c playlist.c playlist_jump.c playlist_addurl.c settings.c connect.c browse.c playlist_create.c + BINS=$(SOURCES:.c=.o) +@@ -20,18 +19,18 @@ + all: audtty + + audtty: ${BINS} +- cc -g -O2 -g2 -Wall -Werror -lncursesw -laudclient ${LDFLAGS} -o audtty $(BINS) ++ $(CC) @SLKCFLAGS@ -Wall ${LDFLAGS} -lncursesw -laudclient -lglib-2.0 -ldbus-glib-1 -lgobject-2.0 -o audtty $(BINS) + + .c.o: +- cc -g -Wall ${AUDACIOUS_CFLAGS} ${CFLAGS} -o $@ -c $< ++ $(CC) -g -Wall ${AUDACIOUS_CFLAGS} ${CFLAGS} -o $@ -c $< + + install: audtty +- mkdir -p ${bindir} +- install -m 0755 audtty ${bindir}/audtty +- mkdir -p ${mandir} +- install -m 0644 audtty.1 ${mandir}/audtty.1 +- mkdir -p ${sysconfdir} +- install -m 0644 audtty.conf ${sysconfdir}/audtty.conf ++ mkdir -p $(DESTDIR)${bindir} ++ install -m 0755 audtty $(DESTDIR)${bindir}/audtty ++ mkdir -p $(DESTDIR)${mandir} ++ install -m 0644 audtty.1 $(DESTDIR)${mandir}/audtty.1 ++ mkdir -p $(DESTDIR)${sysconfdir} ++ install -m 0644 audtty.conf $(DESTDIR)${sysconfdir}/audtty.conf + + uninstall: + rm ${bindir}/audtty || false |