1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix bug that would prevent FreeBSD nodes from uploading files (obtained from Gtk-Gnutella SVN)

- Move from X11BASE to LOCALBASE
- New option to build without GUI
- Various readability changes to ./Configure options
- Update comments on configuration knobs

PR:		ports/105576
Submitted by:	Jonas Sonntag <jonas@schiebtsich.net> (maintainer)
This commit is contained in:
Martin Wilke 2006-11-17 08:41:01 +00:00
parent 16b4e3d02f
commit 27c05cfbd3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=177436
3 changed files with 69 additions and 17 deletions

View File

@ -13,18 +13,38 @@
# FreeBSD guidelines, this mode is useful if you have problems with the
# default Configure.
#
# WITH_GTK2: Configure and build for gtk2.
# WITH_X11: Disable this to build a headless version of Gtk-Gnutella. The
# resulting executable won't use or depend on any Gtk version and
# Gtk-Gnutella can only be controlled through the remote shell.
# Use with caution!
#
# WITH_GTK2: Enable to configure and build with GTK 2, disable to configure and
# build with GTK 1.2. Will be ignored if WITH_X11 is disabled!
#
# WITH_TLS: Enable support for scrambling GNet connections. Currently supported
# only by Gtk-Gnutella.
#
# WITH_NLS: Enable National Language Support for translation of User Interface.
#
# WITH_IPV6: Enable to support IPv6 connections. The real configuration takes
# place at run-time so keeping it enabled will not force IPv6 usage.
#
# WITH_DBUS: Enable D-Bus IPC support. No further information available.
#
# WITH_SQLITE: Enable to support storage of run-time information to a SQLite
# database file. Should ideally save some memory.
#
# WITH_DEBUG: Compile with debugging symbols. Useful if you intend to make
# a bug report.
#
# WITH_PORTABILITY: Configure code to use the PATH variable at run-time
# at a cost in performance. Useful if you intend to move the executable
# to multiple machines.
#
# WITH_DEBUG: Compile with debugging symbols. Useful if you intend to make
# a bug report.
#
PORTNAME= gtk-gnutella
PORTVERSION= 0.96.3
PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
http://gtk-gnutella.sourceforge.net/download/ \
@ -35,24 +55,24 @@ MAINTAINER= jonas@schiebtsich.net
COMMENT= GTK based Gnutella client
USE_PERL5= yes
USE_X_PREFIX= yes
USE_BZIP2= yes
USE_BISON= yes
USE_GNOME= libxml2
USE_GNOME= libxml2 glib20
INSTALL_TARGET= install install.man
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= Configure
CONFIGURE_ARGS= -Dyacc='bison -y' -Dofficial='true' -Dprefix=${PREFIX} \
CONFIGURE_ARGS= -O -Dyacc='bison -y' -Dprefix=${PREFIX} \
-Dprivlib=${PREFIX}/share/gtk-gnutella \
-Dsysman=${PREFIX}/man/man1 -Dlocale=${PREFIX}/share/locale \
-Dcc='${CC}' -Dccflags='${CFLAGS} -I${LOCALBASE}/include' \
-Doptimize='undef' -Dlibpth='/usr/lib ${LOCALBASE}/lib'
-Doptimize='undef'
MAN1= gtk-gnutella.1
OPTIONS= GTK2 "Build with GTK2 frontend" on \
OPTIONS= X11 "Build with GUI" on \
GTK2 "Build with GTK2 frontend" on \
TLS "Enable GNU TLS encryption support" on \
NLS "Enable native language support" on \
NLS "Enable national language support" on \
IPV6 "Enable IPv6 support" on \
DBUS "Enable D-BUS IPC support" off \
SQLITE "Enable SQLite support" off \
@ -62,23 +82,30 @@ OPTIONS= GTK2 "Build with GTK2 frontend" on \
.include <bsd.port.pre.mk>
.if !defined(INTERACTIVE_CONFIGURE)
CONFIGURE_ARGS+= -d -e
CONFIGURE_ARGS+= -ders
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= -Doptimize=-g -Uofficial=
CONFIGURE_ARGS+= -D optimize=-g -D official=false
.else
CONFIGURE_ARGS+= -D official=true
.endif
.if defined(WITH_X11)
USE_XLIB= yes
.if defined(WITH_GTK2)
CONFIGURE_ARGS+= -Dgtkversion=2
CONFIGURE_ARGS+= -D gtkversion=2
USE_GNOME+= gtk20
.else
CONFIGURE_ARGS+= -Dgtkversion=1
CONFIGURE_ARGS+= -D gtkversion=1
USE_GNOME+= gtk12
.endif
.else
CONFIGURE_ARGS+= -D d_headless
.endif
.if defined(WITH_PORTABILITY)
CONFIGURE_ARGS+= -Dd_portable=true
CONFIGURE_ARGS+= -D d_portable
.endif
.if defined(WITH_TLS)
@ -90,7 +117,6 @@ CONFIGURE_ARGS+= -U d_gnutls
.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+= -U d_enablenls
.else
CONFIGURE_ARGS+= -D d_enablenls
LIB_DEPENDS+= intl:${PORTSDIR}/devel/gettext
PLIST_FILES= share/locale/de/LC_MESSAGES/gtk-gnutella.mo \
share/locale/el/LC_MESSAGES/gtk-gnutella.mo \
@ -106,7 +132,7 @@ PLIST_FILES= share/locale/de/LC_MESSAGES/gtk-gnutella.mo \
share/locale/zh_CN/LC_MESSAGES/gtk-gnutella.mo
.endif
.if !defined(WITH_IPV6)
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= -D ipv6=false
.endif
@ -118,6 +144,8 @@ CONFIGURE_ARGS+= -D dbus=false
.if defined(WITH_SQLITE)
USE_SQLITE= yes
.else
CONFIGURE_ARGS+= -U d_sqlite
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,22 @@
--- src/core/bsched.c Fri Nov 10 00:01:26 2006
+++ src/core/bsched.c Tue Nov 14 12:19:18 2006
@@ -1591,16 +1591,11 @@
*/
{
- off_t written;
- int flags = 0;
+ off_t written = 0;
-#if defined(SF_NODISKIO)
- flags |= SF_NODISKIO;
-#endif /* SF_NODISKIO */
-
- r = sendfile(in_fd, out_fd, start, amount, NULL, &written, flags);
+ r = sendfile(in_fd, out_fd, start, amount, NULL, &written, 0);
if ((ssize_t) -1 == r) {
- if (is_temporary_error(errno) || EBUSY == errno)
+ if (is_temporary_error(errno))
r = written > 0 ? (ssize_t) written : (ssize_t) -1;
} else {
r = amount; /* Everything written, but returns 0 if OK */

View File

@ -44,7 +44,9 @@ share/applications/gtk-gnutella.desktop
%%DATADIR%%/pixmaps/warning.xpm
share/pixmaps/gtk-gnutella.png
share/pixmaps/gtk-gnutella.svg
@dirrmtry bin
@dirrmtry share/applications
@dirrmtry share/pixmaps
@dirrm %%DATADIR%%/pixmaps
@dirrm %%DATADIR%%/el
@dirrm %%DATADIR%%/en