ports/160012: [maintainer-update] [patch] net-p2p/lopster portlint cleanup
Conrad J. Sabatier
conrads at cox.net
Wed Aug 31 14:10:12 UTC 2011
The following reply was made to PR ports/160012; it has been noted by GNATS.
From: "Conrad J. Sabatier" <conrads at cox.net>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/160012: [maintainer-update] [patch] net-p2p/lopster
portlint cleanup
Date: Wed, 31 Aug 2011 08:53:13 -0500
--MP_/+315PFIPi7AuoTOu6tFPOcb
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I've further revised this port to incorporate the following changes:
1) Move CPPFLAGS out of the CONFIGURE_ENV variable, as per portlint
1) Convert all of the "ad hoc" WITH* variable handling to use the
standard OPTIONS scheme instead, and ensure that LIB_DEPENDS are
all declared.
2) Remove the post-patch: target (which did a few sed substitutions)
and add patch files in its place.
3) Rename the non-standard patch file patch-src::global.c to
patch-src-global.c to conform to conventions for patch filenames.
I believe this should be the final set of changes needed to bring this
port into full compliance with port standards.
Conrad J. Sabatier
[lopster.diff attached]
--MP_/+315PFIPi7AuoTOu6tFPOcb
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=lopster.diff
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net-p2p/lopster/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- Makefile 13 Aug 2011 06:47:33 -0000 1.44
+++ Makefile 31 Aug 2011 12:34:13 -0000
@@ -7,7 +7,7 @@
PORTNAME= lopster
PORTVERSION= 1.2.2
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= net-p2p
MASTER_SITES= SF \
http://lopster.sourceforge.net/download/
@@ -19,35 +19,33 @@
USE_GMAKE= yes
USE_GNOME= gtk12
CONFIGURE_ARGS= --with-pthread=yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
+CPPFLAGS+= "-I${LOCALBASE}/include"
+
+OPTIONS= FLAC "Include FLAC support" On \
+ OGG "Include OGG support" On \
+ ZLIB "Enable ZLIB compression" On
.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if exists(${LOCALBASE}/lib/libogg.so.7)
-WITH_OGG= yes
+# --with-flac is on by default
+.if defined(WITH_FLAC)
+LIB_DEPENDS+= FLAC.10:${PORTSDIR}/audio/flac
+.else
+CONFIGURE_ARGS+= --without-flac
.endif
+# --with-ogg is on by default
.if defined(WITH_OGG)
-LIB_DEPENDS+= ogg.7:${PORTSDIR}/audio/libogg
-.endif
-
-.if !defined(WITHOUT_ZLIB)
-CONFIGURE_ARGS+= --with-zlib=yes
+LIB_DEPENDS+= ogg.7:${PORTSDIR}/audio/libogg
.else
-CONFIGURE_ARGS+= --with-zlib=no
+CONFIGURE_ARGS+= --without-ogg
.endif
-pre-everything::
-.ifndef WITH_OGG
- @${ECHO_MSG} "You can specify WITH_OGG to include Ogg support"
-.endif
-.ifndef WITHOUT_ZLIB
- @${ECHO_MSG} "You can specify WITHOUT_ZLIB to disable compression for old servers"
+# --with-zlib is on by default
+.if defined(WITHOUT_ZLIB)
+CONFIGURE_ARGS+= --without-zlib
.endif
-post-patch:
- @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" ${WRKSRC}/configure
- @${REINPLACE_CMD} -e "s/www.naplist.com/www.gotnap.com/" \
- ${WRKSRC}/src/lopster.h
-
.include <bsd.port.post.mk>
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-configure 31 Aug 2011 11:13:22 -0000
@@ -0,0 +1,20 @@
+--- configure.orig 2004-08-29 13:38:43.000000000 -0500
++++ configure 2011-08-31 06:08:59.000000000 -0500
+@@ -2245,14 +2245,14 @@
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+
+- echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
+-echo "configure:2250: checking for pthread_attr_init in -lpthread" >&5
++ echo $ac_n "checking for pthread_attr_init in ${PTHREAD_LIBS}""... $ac_c" 1>&6
++echo "configure:2250: checking for pthread_attr_init in ${PTHREAD_LIBS}" >&5
+ ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lpthread $LIBS"
++LIBS="${PTHREAD_LIBS} $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 2258 "configure"
+ #include "confdefs.h"
Index: files/patch-src-global.c
===================================================================
RCS file: files/patch-src-global.c
diff -N files/patch-src-global.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-src-global.c 31 Aug 2011 09:28:18 -0000
@@ -0,0 +1,11 @@
+--- src/global.c.orig Sat Jul 3 19:19:19 2004
++++ src/global.c Thu Jul 22 14:03:01 2004
+@@ -3588,7 +3588,7 @@
+ global.allowed_ports = NULL;
+
+ global.auto_save = NULL;
+- global.ping_command = g_strdup("/bin/ping -c 3 $IP");
++ global.ping_command = g_strdup("/sbin/ping -c 3 $IP");
+
+ global.browse_width[0] = 369;
+ global.browse_width[1] = 80;
Index: files/patch-src-lopster.h
===================================================================
RCS file: files/patch-src-lopster.h
diff -N files/patch-src-lopster.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-src-lopster.h 31 Aug 2011 12:57:48 -0000
@@ -0,0 +1,11 @@
+--- src/lopster.h.orig 2004-08-29 10:33:39.000000000 -0500
++++ src/lopster.h 2011-08-31 07:56:39.000000000 -0500
+@@ -807,7 +807,7 @@
+ long bytes[2];
+ };
+
+-#define NAPLIST_HOST "www.naplist.com"
++#define NAPLIST_HOST "www.gotnap.com"
+ #define NAPLIST_DOC "servers.txt"
+ struct _naplist_t {
+ int use_proxy;
Index: files/patch-src::global.c
===================================================================
RCS file: files/patch-src::global.c
diff -N files/patch-src::global.c
--- files/patch-src::global.c 23 Jul 2004 07:18:36 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- src/global.c.orig Sat Jul 3 19:19:19 2004
-+++ src/global.c Thu Jul 22 14:03:01 2004
-@@ -3588,7 +3588,7 @@
- global.allowed_ports = NULL;
-
- global.auto_save = NULL;
-- global.ping_command = g_strdup("/bin/ping -c 3 $IP");
-+ global.ping_command = g_strdup("/sbin/ping -c 3 $IP");
-
- global.browse_width[0] = 369;
- global.browse_width[1] = 80;
--MP_/+315PFIPi7AuoTOu6tFPOcb--
More information about the freebsd-ports-bugs
mailing list