diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2010-05-12 23:32:01 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 23:32:01 +0200 |
commit | a410fab5943ed411991068f5db2b548d9f521d3e (patch) | |
tree | 2cee518169bb5679b13925f63a666a983bc928d4 | |
parent | 1d64c3277d7442916773cf98e3a4bebc7fa2233b (diff) |
network/d4x: Added to 12.2 repository
-rw-r--r-- | network/d4x/README | 14 | ||||
-rw-r--r-- | network/d4x/d4x.SlackBuild | 95 | ||||
-rw-r--r-- | network/d4x/d4x.info | 9 | ||||
-rw-r--r-- | network/d4x/doinst.sh | 10 | ||||
-rw-r--r-- | network/d4x/patches/d4x-2.5.7.1-cd.patch | 19 | ||||
-rw-r--r-- | network/d4x/patches/d4x-2.5.7.1-gentoo.patch | 101 | ||||
-rw-r--r-- | network/d4x/patches/newftpd.diff | 12 | ||||
-rw-r--r-- | network/d4x/patches/newhttpd.diff | 12 | ||||
-rw-r--r-- | network/d4x/slack-desc | 19 |
9 files changed, 291 insertions, 0 deletions
diff --git a/network/d4x/README b/network/d4x/README new file mode 100644 index 0000000000000..5fbaad1dc8c80 --- /dev/null +++ b/network/d4x/README @@ -0,0 +1,14 @@ +Downloader For X (or simply D4X) is a download manager/accelerator +for Unix-like systems. + +This requires boost. + +Note: By default, the slackbuild script has sound functionality turned +off. This can be enabled by passing the following to the slackbuild: +D4X_LIBAO=yes ./d4x.SlackBuild + +D4X has been know to freeze up when sound is turned on. To alleviate this +then create a file /etc/libao.conf, or alternatively ~/.libao, and put in it: +default_driver=alsa + +In case alsa isn't your default audio driver, then change accordingly.
\ No newline at end of file diff --git a/network/d4x/d4x.SlackBuild b/network/d4x/d4x.SlackBuild new file mode 100644 index 0000000000000..4da7974158815 --- /dev/null +++ b/network/d4x/d4x.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware build script for d4x + +# Written by Larry Hajali <larryhaja[at]gmail[dot]com> + +PRGNAM=d4x +VERSION=${VERSION:-2.5.7.1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Patches needed for compilation +patch -p1 < $CWD/patches/d4x-2.5.7.1-gentoo.patch +patch -p1 < $CWD/patches/d4x-2.5.7.1-cd.patch +patch -p1 < $CWD/patches/newftpd.diff +patch -p1 < $CWD/patches/newhttpd.diff +sed -i "s:path\=d4x:\/\/path\=d4x:" main/addr.cc + +# Option to include libao library; default=no +if [ ${D4X_LIBAO:-no} == no ]; then + D4X_AO=dis +else + D4X_AO=en +fi + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --${D4X_AO}able-libao \ + --with-x=yes \ + --disable-openssl \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/man/man1 +gzip -9c DOC/nt.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ABOUT-NLS AUTHORS ChangeLog* COPYING INSTALL \ + NEWS PLANS README TODO DOC/FAQ* DOC/README.* \ + DOC/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Make a menu item +mkdir -p $PKG/usr/share/{applications,pixmaps} +sed -i "s:nt.png:$PRGNAM:" share/nt.desktop +echo "Categories=Application;Network;" >> share/nt.desktop +cp -a share/nt.desktop $PKG/usr/share/applications/$PRGNAM.desktop +cp -a share/nt.png $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/d4x/d4x.info b/network/d4x/d4x.info new file mode 100644 index 0000000000000..267f58a38e509 --- /dev/null +++ b/network/d4x/d4x.info @@ -0,0 +1,9 @@ +PRGNAM="d4x" +VERSION="2.5.7.1" +HOMEPAGE="http://en.wikipedia.org/wiki/Downloader_for_X" +DOWNLOAD="http://repository.slacky.eu/slackware-12.1/network/d4x/2.5.7.1/src/d4x-2.5.7.1.tar.bz2" +MD5SUM="68d6336c3749a7caabb0f5a5f84f4102" +MAINTAINER="Larry Hajali" +EMAIL="larryhaja[at]gmail[dot]com" +APPROVED="dsmoero" + diff --git a/network/d4x/doinst.sh b/network/d4x/doinst.sh new file mode 100644 index 0000000000000..b618e7cf115bc --- /dev/null +++ b/network/d4x/doinst.sh @@ -0,0 +1,10 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + diff --git a/network/d4x/patches/d4x-2.5.7.1-cd.patch b/network/d4x/patches/d4x-2.5.7.1-cd.patch new file mode 100644 index 0000000000000..e261ceb36ac36 --- /dev/null +++ b/network/d4x/patches/d4x-2.5.7.1-cd.patch @@ -0,0 +1,19 @@ +--- a/main/dlist.cc 2006-04-06 01:14:54.000000000 +0600 ++++ b/main/dlist.cc 2008-04-17 08:50:22.000000000 +0600 +@@ -1023,11 +1023,12 @@ + cpfrom=oldname; + }else + cpfrom=newname; +- +- WL->log_printf(LOG_WARNING,_("Trying to copy %s to %s due 'Content-Disposition'"), ++ if(strcmp(cpfrom,tmp)){ ++ WL->log_printf(LOG_WARNING,_("Trying to copy %s to %s due 'Content-Disposition'"), + cpfrom,tmp); +- if (file_copy(cpfrom,tmp,buf,1000)) +- WL->log(LOG_ERROR,_("Error during copying!")); ++ if (file_copy(cpfrom,tmp,buf,1000)) ++ WL->log(LOG_ERROR,_("Error during copying!")); ++ } + delete[] buf; + delete[] tmp; + delete[] newname; diff --git a/network/d4x/patches/d4x-2.5.7.1-gentoo.patch b/network/d4x/patches/d4x-2.5.7.1-gentoo.patch new file mode 100644 index 0000000000000..f0014ca81cf23 --- /dev/null +++ b/network/d4x/patches/d4x-2.5.7.1-gentoo.patch @@ -0,0 +1,101 @@ +diff -ur d4x-2.5.7.1.orig/configure d4x-2.5.7.1/configure +--- d4x-2.5.7.1.orig/configure 2006-04-12 19:48:29.000000000 +0300 ++++ d4x-2.5.7.1/configure 2007-10-28 10:56:11.000000000 +0200 +@@ -18398,11 +18398,6 @@ + + + cat >>confdefs.h <<\_ACEOF +-#define GTK_DISABLE_DEPRECATED +-_ACEOF +- +- +-cat >>confdefs.h <<\_ACEOF + #define _FILE_OFFSET_BITS 64 + _ACEOF + +diff -ur d4x-2.5.7.1.orig/configure.ac d4x-2.5.7.1/configure.ac +--- d4x-2.5.7.1.orig/configure.ac 2005-11-05 01:35:38.000000000 +0200 ++++ d4x-2.5.7.1/configure.ac 2007-10-28 10:56:11.000000000 +0200 +@@ -298,7 +298,6 @@ + + # Other needed defines + AC_DEFINE(_REENTRANT, , [Enable reenrant code of glibc]) +-AC_DEFINE(GTK_DISABLE_DEPRECATED, , [Enable warnings about deprecated functions usage]) + AC_DEFINE(_FILE_OFFSET_BITS, 64, [To support files over 2GB]) + + # Prepare all requiered flags +Only in d4x-2.5.7.1: de.po +diff -ur d4x-2.5.7.1.orig/main/face/list.cc d4x-2.5.7.1/main/face/list.cc +--- d4x-2.5.7.1.orig/main/face/list.cc 2006-03-20 02:29:41.000000000 +0200 ++++ d4x-2.5.7.1/main/face/list.cc 2007-10-28 10:56:11.000000000 +0200 +@@ -8,7 +8,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +-#define GTK_DISABLE_DEPRECATED + + #include <stdio.h> + #include <gtk/gtk.h> +diff -ur d4x-2.5.7.1.orig/main/face/prefs.cc d4x-2.5.7.1/main/face/prefs.cc +--- d4x-2.5.7.1.orig/main/face/prefs.cc 2005-11-05 21:03:19.000000000 +0200 ++++ d4x-2.5.7.1/main/face/prefs.cc 2007-10-28 11:04:15.000000000 +0200 +@@ -9,6 +9,7 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + ++#include <libintl.h> + #include <gtk/gtk.h> + #include <gdk/gdkkeysyms.h> + #include "../ntlocale.h" +diff -ur d4x-2.5.7.1.orig/main/signal.cc d4x-2.5.7.1/main/signal.cc +--- d4x-2.5.7.1.orig/main/signal.cc 2006-04-05 23:11:43.000000000 +0300 ++++ d4x-2.5.7.1/main/signal.cc 2007-10-28 10:56:11.000000000 +0200 +@@ -89,7 +89,7 @@ + + + void my_pthreads_mutex_init(pthread_mutex_t *lock){ +-#if defined(__linux__) ++#if defined(__linux__) || defined(__GLIBC__) + /* manual page for mutexes said that mutexes in linux is fast by + default... + */ +diff -ur d4x-2.5.7.1.orig/main/socket.cc d4x-2.5.7.1/main/socket.cc +--- d4x-2.5.7.1.orig/main/socket.cc 2006-04-09 15:39:25.000000000 +0300 ++++ d4x-2.5.7.1/main/socket.cc 2007-10-28 10:56:11.000000000 +0200 +@@ -165,10 +165,10 @@ + return(SOCKET_CANT_ALLOCATE); + int a=1; + setsockopt(fd,SOL_SOCKET,SO_KEEPALIVE,(char *)&a,sizeof(a)); +- setsockopt(fd,SOL_SOCKET,SO_KEEPALIVE,(char *)&a,sizeof(a)); ++ //setsockopt(fd,SOL_SOCKET,SO_KEEPALIVE,(char *)&a,sizeof(a)); + + size_t sl=2000; //set receive buffer to default+30% MTU size +- setsockopt(fd,SOL_SOCKET,SO_RCVBUF,(char *)&sl,sizeof(sl)); ++ //setsockopt(fd,SOL_SOCKET,SO_RCVBUF,(char *)&sl,sizeof(sl)); + + if (!connect_impl()) + return(SOCKET_CANT_CONNECT); +diff -ur d4x-2.5.7.1.orig/Makefile.am d4x-2.5.7.1/Makefile.am +--- d4x-2.5.7.1.orig/Makefile.am 2005-08-30 04:48:55.000000000 +0300 ++++ d4x-2.5.7.1/Makefile.am 2007-10-28 11:28:02.000000000 +0200 +@@ -4,7 +4,7 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = DOC intl main po share ++SUBDIRS = intl main po share + + # Extra files/dirs to be included in distribution + EXTRA_DIST = $(top_srcdir)/admin/Makefile.template \ +diff -ur d4x-2.5.7.1.orig/Makefile.in d4x-2.5.7.1/Makefile.in +--- d4x-2.5.7.1.orig/Makefile.in 2006-04-12 19:48:32.000000000 +0300 ++++ d4x-2.5.7.1/Makefile.in 2007-10-28 11:27:53.000000000 +0200 +@@ -256,7 +256,7 @@ + target_os = @target_os@ + target_vendor = @target_vendor@ + ACLOCAL_AMFLAGS = -I m4 +-SUBDIRS = DOC intl main po share ++SUBDIRS = intl main po share + + # Extra files/dirs to be included in distribution + EXTRA_DIST = $(top_srcdir)/admin/Makefile.template \ diff --git a/network/d4x/patches/newftpd.diff b/network/d4x/patches/newftpd.diff new file mode 100644 index 0000000000000..4afa95f284d5b --- /dev/null +++ b/network/d4x/patches/newftpd.diff @@ -0,0 +1,12 @@ +--- d4x-2.5.7.1/main/ftpd.cc 2006-04-05 21:02:36.000000000 +0200 ++++ d4x-2.5.7.1.src/main/ftpd.cc 2006-04-27 20:44:51.000000000 +0200 +@@ -663,7 +663,8 @@ + + SocketPtr tFtpDownload::export_ctrl_socket(){ + if (FTP) return(FTP->export_ctrl_socket()); +- return(SocketPtr()); ++ SocketPtr dummy = SocketPtr(); ++ return(dummy); + }; + + tFtpDownload::~tFtpDownload() { diff --git a/network/d4x/patches/newhttpd.diff b/network/d4x/patches/newhttpd.diff new file mode 100644 index 0000000000000..ce5388adc5f14 --- /dev/null +++ b/network/d4x/patches/newhttpd.diff @@ -0,0 +1,12 @@ +--- d4x-2.5.7.1/main/httpd.cc 2006-04-05 21:01:41.000000000 +0200 ++++ d4x-2.5.7.1.src/main/httpd.cc 2006-04-27 20:55:24.000000000 +0200 +@@ -581,7 +581,8 @@ + + SocketPtr tHttpDownload::export_ctrl_socket(){ + if (HTTP) return(HTTP->export_ctrl_socket()); +- return(SocketPtr()); ++ SocketPtr dummy = SocketPtr(); ++ return(dummy); + }; + + tHttpDownload::~tHttpDownload() { diff --git a/network/d4x/slack-desc b/network/d4x/slack-desc new file mode 100644 index 0000000000000..a856f653eeef6 --- /dev/null +++ b/network/d4x/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +d4x: d4x (Download for X) +d4x: +d4x: Downloader For X (or simply D4X) is a download manager/accelerator +d4x: for Unix-like systems. +d4x: +d4x: Info: http://en.wikipedia.org/wiki/Downloader_for_X +d4x: +d4x: +d4x: +d4x: +d4x: |