# New ports collection makefile for:	amule2
# Date created:		Wed Nov 05 09:30:00 UTC 2003
# Whom:			Ganael LAPLANCHE <ganael.laplanche@martymac.com>
#
# $FreeBSD$
#

PORTNAME=	aMule
PORTVERSION=	2.1.0
CATEGORIES=	net
MASTER_SITES=	http://download.berlios.de/amule/

MAINTAINER=	ganael.laplanche@martymac.com
COMMENT=	The all-platform eMule p2p client

LIB_DEPENDS=	wx_gtk2u_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
		curl.3:${PORTSDIR}/ftp/curl
#		gd.4:${PORTSDIR}/graphics/gd
#		png.5:${PORTSDIR}/graphics/png

LATEST_LINK=	aMule2
CONFLICTS=	aMule-1.* aMule-devel-[0-9]*

USE_X_PREFIX=	yes
USE_GNOME=	gnomehier gnomehack gnomeprefix
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS=	--disable-debug \
		--without-included-gettext \
		--with-libintl-prefix=${LOCALBASE} \
		--with-libiconv-prefix=${LOCALBASE} \
		--with-wx-config=${WX_CONFIG} \
		--with-curl-config=${CURL_CONFIG} \
		--enable-embedded_crypto \
		--enable-monolithic
#		--with-gdlib-prefix=${LOCALBASE} \
#		--with-libpng-prefix=${LOCALBASE}

CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"

OPTIONS=	OPTIMIZE "Build with optimization" on \
		ED2K "Compile aMule ed2k links handler" on \
		AMULECMD "Compile aMule command line client" on \
		AMULEWEBSRV "Compile aMule WebServer" on \
		CAS "Compile C aMule Statistics (+GUI)" on \
		ALC "Compile aMule Link Creator (+GUI)" on \
		AMULEDAEMON "Compile aMule daemon version - EXPERIMENTAL" off

WX_CONFIG?=	${X11BASE}/bin/wxgtk2u-2.6-config
CURL_CONFIG?=	${LOCALBASE}/bin/curl-config

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
BROKEN=		"Won't compile on FreeBSD 4.x - See net/amule1 for 4.x compatibility."
.endif

# Configure options
.if defined(WITH_OPTIMIZE)
CONFIGURE_ARGS+=	--enable-optimize
.else
CONFIGURE_ARGS+=	--disable-optimize
.endif

.if defined(WITH_ED2K)
CONFIGURE_ARGS+=	--enable-ed2k
PLIST_SUB+=		PL_ED2K=""
.else
CONFIGURE_ARGS+=	--disable-ed2k
PLIST_SUB+=		PL_ED2K="@comment "
.endif

.if defined(WITH_AMULECMD)
CONFIGURE_ARGS+=	--enable-amulecmd
PLIST_SUB+=		PL_AMULECMD=""
.else
CONFIGURE_ARGS+=	--disable-amulecmd
PLIST_SUB+=		PL_AMULECMD="@comment "
.endif

.if defined(WITH_AMULEWEBSRV)
CONFIGURE_ARGS+=	--enable-webserver
PLIST_SUB+=		PL_AMULEWEBSRV=""
.else
CONFIGURE_ARGS+=	--disable-webserver
PLIST_SUB+=		PL_AMULEWEBSRV="@comment "
.endif

.if defined(WITH_CAS)
CONFIGURE_ARGS+=	--enable-cas --enable-wxcas
PLIST_SUB+=		PL_CAS=""
.else
CONFIGURE_ARGS+=	--disable-cas --disable-wxcas
PLIST_SUB+=		PL_CAS="@comment "
.endif

.if defined(WITH_ALC)
CONFIGURE_ARGS+=	--enable-alc --enable-alcc
PLIST_SUB+=		PL_ALC=""
.else
CONFIGURE_ARGS+=	--disable-alc --disable-alcc
PLIST_SUB+=		PL_ALC="@comment "
.endif

.if defined(WITH_AMULEDAEMON)
CONFIGURE_ARGS+=	--enable-amule-daemon --enable-amule-gui
PLIST_SUB+=		PL_AMULEDAEMON=""
USE_RC_SUBR=		yes
RCSCRIPT=		${PREFIX}/etc/rc.d/amuled.sh
.else
CONFIGURE_ARGS+=	--disable-amule-daemon --disable-amule-gui
PLIST_SUB+=		PL_AMULEDAEMON="@comment "
.endif

# Man pages management
.include "Makefile.man"

# Copy startup script if needed (amuledaemon compiled)
post-install:
.if defined(WITH_AMULEDAEMON)
	${ECHO} "Installing ${RCSCRIPT} startup file."
	${INSTALL_SCRIPT} ${FILESDIR}/amuled.sh ${RCSCRIPT}
.endif

# fr manpages are still incomplete and can't be managed
# by MANLANG. Will be done when pages are complete.
.if defined(WITH_AMULECMD)
	${GZIP_CMD} ${PREFIX}/man/fr/man1/amulecmd.1
.endif
.if defined(WITH_AMULEWEBSRV)
	${GZIP_CMD} ${PREFIX}/man/fr/man1/amuleweb.1
.endif
	${GZIP_CMD} ${PREFIX}/man/fr/man1/amule.1
.if defined(WITH_AMULEDAEMON)
	${GZIP_CMD} ${PREFIX}/man/fr/man1/amuled.1
.endif
.if defined(WITH_ED2K)
	${GZIP_CMD} ${PREFIX}/man/fr/man1/ed2k.1
.endif
.if defined(WITH_ALC)
	${GZIP_CMD} ${PREFIX}/man/fr/man1/alcc.1
.endif

.include <bsd.port.post.mk>
ption value='dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2'>dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2</option>
<option value='gnome-3.22'>gnome-3.22</option>
<option value='gnome-3.24'>gnome-3.24</option>
<option value='gnome-3.26'>gnome-3.26</option>
<option value='gnome-3.28'>gnome-3.28</option>
<option value='gnome-3.32'>gnome-3.32</option>
<option value='gnome-3.36'>gnome-3.36</option>
<option value='gstreamer'>gstreamer</option>
<option value='gstreamer-1.16'>gstreamer-1.16</option>
<option value='gstreamer0.10-removal'>gstreamer0.10-removal</option>
<option value='main' selected='selected'>main</option>
<option value='master'>master</option>
<option value='mate-1.16'>mate-1.16</option>
<option value='mate-1.18'>mate-1.18</option>
<option value='mate-1.20'>mate-1.20</option>
<option value='mate-1.22'>mate-1.22</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/about/'>about</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/'>summary</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/refs/?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>refs</a><a class='active' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/mail/rftp'>log</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/tree/mail/rftp?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>tree</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>commit</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/diff/mail/rftp?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>diff</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/stats/mail/rftp'>stats</a></td><td class='form'><form class='right' method='get' action='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/mail/rftp'>
<input type='hidden' name='id' value='dcaf540fc621ceb3222f80b918f796a5c37aa866'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>root</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/mail?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>mail</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/mail/rftp?id=dcaf540fc621ceb3222f80b918f796a5c37aa866'>rftp</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th></th><th class='left'>Commit message (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/mail/rftp?id=dcaf540fc621ceb3222f80b918f796a5c37aa866&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Age</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=e4330d31a615709bee3a880edb9a47b2bd6c27ae'>Revert previous commit; maintainer is merely having email trouble.</a></td><td>linimon</td><td><span title='2004-05-19 20:29:21 +0800'>2004-05-19</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=2ce56e2a47d42be502ba1d0abaf25d362eddfa4c'>Reset bouncing maintainer address.</a></td><td>linimon</td><td><span title='2004-05-18 23:43:46 +0800'>2004-05-18</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=59e6adf4a32574137618e96c14fa28f42ba7759d'>SIZEify (maintainer timeout)</a></td><td>trevor</td><td><span title='2004-03-31 11:12:58 +0800'>2004-03-31</span></td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=614110cbfd295852ef70569becc46a98103642a8'>Add back previous maintainer: it seems the mail bounce was caused by</a></td><td>kris</td><td><span title='2003-10-16 13:15:18 +0800'>2003-10-16</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=ae6e798b91480c4cb60464a8974644307a90d4cc'>Reset bouncing maintainer address</a></td><td>kris</td><td><span title='2003-10-16 11:12:15 +0800'>2003-10-16</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=69b51a7eaaf4fb61d28b25ff2f8a100a8c3e9882'>De-pkg-comment.</a></td><td>knu</td><td><span title='2003-02-21 20:51:06 +0800'>2003-02-21</span></td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/mail/rftp?id=f625e2f723c4719baa6609459c355dd72ba95d55'>Master site updated</a></td><td>markp</td><td><span title='2001-07-08 14:17:33 +0800'>2001-07-08</span>