Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2013 05:48:23 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/185317: net-p2p/minder: Fix build
Message-ID:  <20131231054823.7f02075f79815d5a5f12daa4@yahoo.com>
Resent-Message-ID: <201312302110.rBULA2CJ098620@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         185317
>Category:       ports
>Synopsis:       net-p2p/minder: Fix build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 21:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build
- Add LICENSE

Remove file:
files/patch-Makefile

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/net-p2p/minder/Makefile net-p2p/minder/Makefile
--- /usr/ports/net-p2p/minder/Makefile	2013-12-07 06:50:00.000000000 +0900
+++ net-p2p/minder/Makefile	2013-12-31 00:00:00.000000000 +0900
@@ -7,44 +7,41 @@
 MASTER_SITES=	http://www.alhem.net/project/minder/
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A small network application for automatic maintenance of peer lists
+COMMENT=	Small network application for automatic maintenance of peer lists
 
-BROKEN=		Fails to link
+LICENSE=	GPLv2 # (or later)
 
-BUILD_DEPENDS=	${LOCALBASE}/lib/libSockets.a:${PORTSDIR}/net/Sockets
+LIB_DEPENDS=	libSockets.so:${PORTSDIR}/net/Sockets
 
-USE_GMAKE=	yes
+USES=		gmake pkgconfig
+USE_GNOME=	libxml2
 USE_OPENSSL=	yes
-WITH_OPENSSL_BASE=	yes
 
-# ssl support
-CFLAGS+=	${PTHREAD_CFLAGS} -DHAVE_OPENSSL
+CFLAGS+=	-DHAVE_OPENSSL
+CPPFLAGS+=	$$(pkg-config --cflags libxml-2.0) \
+		-I${LOCALBASE}/include/Sockets -I${LOCALBASE}/include
+LDFLAGS+=	$$(pkg-config --libs libxml-2.0) \
+		-L${LOCALBASE}/lib
 
-PLIST_DIRS=	\
-		%%EXAMPLESDIR%%
-PLIST_FILES=	\
-		%%EXAMPLESDIR%%/minder.cfg \
-		bin/${PORTNAME}
+PORTEXAMPLES=	minder.cfg
+PLIST_FILES=	bin/minder
 
-NO_STAGE=	yes
 post-patch:
-# CXX safeness
-# CXXFLAGS safeness
-# SSL include safeness
-	@${REINPLACE_CMD} -E \
-		-e 's|-O2||' \
-		-e 's|g\+\+|${CXX}|' \
-		-e 's|^INCLUDE.+$$|INCLUDE=-I${OPENSSLINC} -I${LOCALBASE}/include/Sockets|' \
-		-e 's|^LIBS.+$$|LIBS=-L${OPENSSLLIB} ${PTHREAD_LIBS} -L${LOCALBASE}/lib \\|' \
-		${BUILD_WRKSRC}/${MAKEFILE}
-	@${REINPLACE_CMD} -E \
-		-e 's|\(__sighandler_t\)||' \
-		${WRKSRC}/minder.cpp
+	@${REINPLACE_CMD} -e \
+		's|^CFLAGS|#CFLAGS| ; \
+		 s|^CPPFLAGS =|CPPFLAGS +=| ; \
+		 s|-L/usr/local/lib|$$(LDFLAGS)| ; \
+		 s|-luuid|| ; \
+		 s|-lpthread|-pthread| ; \
+		 s|g++|$$(CXX)|' ${BUILD_WRKSRC}/${MAKEFILE}
+	@${REINPLACE_CMD} -e \
+		's|(__sighandler_t)||' ${WRKSRC}/minder.cpp
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	@${MKDIR} ${EXAMPLESDIR}
-	@${INSTALL_DATA} ${FILESDIR}/minder.cfg.sample \
-		${EXAMPLESDIR}/minder.cfg
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} minder \
+		${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	(cd ${FILESDIR} && ${INSTALL_DATA} minder.cfg.sample \
+		${STAGEDIR}${EXAMPLESDIR}/minder.conf)
 
 .include <bsd.port.mk>
diff -urN /usr/ports/net-p2p/minder/files/patch-Makefile net-p2p/minder/files/patch-Makefile
--- /usr/ports/net-p2p/minder/files/patch-Makefile	2013-11-06 21:48:39.000000000 +0900
+++ net-p2p/minder/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -1,20 +0,0 @@
---- Makefile.orig	Sun Sep 25 02:56:46 2005
-+++ Makefile	Sun Sep 25 02:57:16 2005
-@@ -6,7 +6,7 @@
- CPPFLAGS =	$(CFLAGS)
- 
- LIBS =		-L/usr/local/lib -lSockets \
--		-lssl -lcrypto -luuid -lpthread
-+		-lssl -lcrypto -lSockets
- 
- PROGS =		minder 
- all:		$(PROGS)
-@@ -21,7 +21,7 @@
- 		rm -f *.o *~ *.d slask $(PROGS)
- 
- install:	all
--		install --strip $(PROGS) /usr/local/bin
-+		@${BSD_INSTALL_PROGRAM} $(PROGS) /usr/local/bin
- 
- -include	*.d
- 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131231054823.7f02075f79815d5a5f12daa4>