freebsd-ports/net-p2p/amule/Makefile

248 lines
6 KiB
Makefile
Raw Normal View History

# Created by: Ganael LAPLANCHE <ganael.laplanche@martymac.org>
# $FreeBSD$
PORTNAME= amule
PORTVERSION= 2.3.1
2012-06-01 07:26:28 +02:00
PORTREVISION= 4
Populate newly create net-p2p category with these ports: ftp/jigdo net/amule1 net/amule2 net/apollon net/azureus net/bnbt net/btpeer net/btqueue net/cdonkey net/ctorrent net/dcd net/dclib net/dctc net/dctc-gui net/dctc-gui-qt net/edonkey-gui-gtk net/edonkey-gui-gtk-urlslave net/fcptools net/fidelio net/freenet net/frost net/giftcurs net/giftoxic net/giftui net/gift net/gift-fasttrack net/gift-gnutella net/gift-openft net/gkrellm-gift net/gnewtellium net/gnome-btdownload net/gnunet net/gtkhx net/gtk-gnutella net/gtorrentviewer net/hagelslag net/hx net/i2p net/javadc net/kmldonkey net/ktorrent net/libbt net/liberator net/libfreenet net/libpdtp net/libtorrent net/limewire net/linux-agsatellite net/linux-edonkey-core net/linux-edonkey-server net/linux-jigdo net/linux-overnet-core net/minder net/mldonkey net/mldonkey-core net/mldonkey-core-devel net/mldonkey-devel net/mldonkey-gui net/mldonkey-gui-devel net/mldonkey-perlreactor net/mldonkey-sancho net/mldonkey-serverspy net/mldonkey-urlslave net/mutella net/mute-net net/mute-net-gui net/mute-net-text net/napshare net/nicotine net/opendchub net/peercast net/phex net/pyslsk net/py-bittornado net/py-bittornado-core net/py-bittorrent net/py-bittorrent-core net/py-bittorrent-core-devel net/py-bittorrent-devel net/py-fngrab net/py-kenosis net/py-kenosis-bittorrent net/py-py2play net/p5-pdonkey net/qtella net/qtorrent net/rtorrent net/squall net/torrentflux net/torrentsniff net/trackerbt net/transmission net/valknut net/verlihub net/verlihub-plugins net/xmule net/xnap misc/ed2k misc/edonkey-tool-hash misc/linux-edonkey-tool-recovermet Repocopies by: marcus
2006-01-30 22:36:28 +01:00
CATEGORIES= net-p2p
MASTER_SITES= SF/${PORTNAME}/aMule/${PORTVERSION}
DISTNAME= aMule-${PORTVERSION}
MAINTAINER= bar@FreeBSD.org
COMMENT= The all-platform eMule p2p client
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
LICENSE_FILE_GPLv2=${WRKSRC}/docs/COPYING
BUILD_DEPENDS= ${FLEX}:${PORTSDIR}/textproc/flex \
${LOCALBASE}/lib/libcryptopp.a:${PORTSDIR}/security/cryptopp
CONFLICTS= amule-devel-[0-9]*
USE_BZIP2= yes
USES= bison pkgconfig
USE_GMAKE= yes
USE_WX= 2.8
WX_CONF_ARGS= absolute
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-denoise-level=0
CONFIGURE_ENV= LEX="${FLEX}" PKG_CONFIG="${PKG_CONFIG}" \
docdir='$${prefix}/${DOCSDIR_REL}'
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
OPTIONS_DEFINE= ALC ALCC AMULECMD AMULEDAEMON AMULEGUI CAS DOCS ED2K \
FILEVIEW GEOIP MMAP MONOLITHIC NLS PLASMAMULE UPNP \
WEBSERVER WXCAS WXUNICODE XAS
ALC_DESC= Compile aMule Link Creator for GUI
ALCC_DESC= Compile aMule Link Creator for console
AMULECMD_DESC= Compile aMule command line client
AMULEDAEMON_DESC= Compile aMule daemon version
AMULEGUI_DESC= Compile aMule remote GUI
CAS_DESC= Compile aMule Statistics for console
ED2K_DESC= Compile aMule ed2k links handler
FILEVIEW_DESC= Compile file viewer for console (EXPERIMENTAL)
MMAP_DESC= Use mapped memory
MONOLITHIC_DESC= Compile monolithic aMule
PLASMAMULE_DESC= Compile aMule plasma applet and engine
WXCAS_DESC= Compile aMule Statistics for GUI
WXUNICODE_DESC= Unicode support
XAS_DESC= Install XChat2 plugin
OPTIONS_DEFAULT=ALC ALCC AMULECMD AMULEDAEMON AMULEGUI CAS ED2K \
FILEVIEW MONOLITHIC WEBSERVER WXCAS WXUNICODE XAS
PORTDOCS= ABOUT-NLS Changelog EC_Protocol.txt INSTALL README TODO \
amulesig.txt license.txt
FLEX?= ${LOCALBASE}/bin/flex
.include <bsd.port.options.mk>
.if empty(PORT_OPTIONS:MDEBUG)
CONFIGURE_ARGS+=--disable-debug
.endif
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif
.if ${PORT_OPTIONS:MALC}
CONFIGURE_ARGS+= --enable-alc
PLIST_SUB+= ALC=""
.else
CONFIGURE_ARGS+= --disable-alc
PLIST_SUB+= ALC="@comment "
.endif
.if ${PORT_OPTIONS:MALCC}
CONFIGURE_ARGS+= --enable-alcc
PLIST_SUB+= ALCC=""
.else
CONFIGURE_ARGS+= --disable-alcc
PLIST_SUB+= ALCC="@comment "
.endif
.if ${PORT_OPTIONS:MAMULECMD}
CONFIGURE_ARGS+= --enable-amulecmd
PLIST_SUB+= AMULECMD=""
.else
CONFIGURE_ARGS+= --disable-amulecmd
PLIST_SUB+= AMULECMD="@comment "
.endif
.if ${PORT_OPTIONS:MAMULEDAEMON}
CONFIGURE_ARGS+= --enable-amule-daemon
PLIST_SUB+= AMULEDAEMON=""
USE_RC_SUBR= amuled
.else
CONFIGURE_ARGS+= --disable-amule-daemon
PLIST_SUB+= AMULEDAEMON="@comment "
.endif
.if ${PORT_OPTIONS:MAMULEGUI}
CONFIGURE_ARGS+= --enable-amule-gui
PLIST_SUB+= AMULEGUI=""
.else
CONFIGURE_ARGS+= --disable-amule-gui
PLIST_SUB+= AMULEGUI="@comment "
.endif
.if ${PORT_OPTIONS:MCAS}
CONFIGURE_ARGS+= --enable-cas
LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
PLIST_SUB+= CAS=""
.else
CONFIGURE_ARGS+= --disable-cas
PLIST_SUB+= CAS="@comment "
.endif
.if ${PORT_OPTIONS:MED2K}
CONFLICTS+= ed2k-hash*
CONFIGURE_ARGS+= --enable-ed2k
PLIST_SUB+= ED2K=""
.else
CONFIGURE_ARGS+= --disable-ed2k
PLIST_SUB+= ED2K="@comment "
.endif
.if ${PORT_OPTIONS:MFILEVIEW}
CONFIGURE_ARGS+= --enable-fileview
PLIST_SUB+= FILEVIEW=""
.else
CONFIGURE_ARGS+= --disable-fileview
PLIST_SUB+= FILEVIEW="@comment "
.endif
.if ${PORT_OPTIONS:MGEOIP}
CONFIGURE_ARGS+= --enable-geoip
LIB_DEPENDS+= GeoIP:${PORTSDIR}/net/GeoIP
.else
CONFIGURE_ARGS+= --disable-geoip
.endif
.if ${PORT_OPTIONS:MMMAP}
CONFIGURE_ARGS+= --enable-mmap
.else
CONFIGURE_ARGS+= --disable-mmap
.endif
.if ${PORT_OPTIONS:MMONOLITHIC}
CONFIGURE_ARGS+= --enable-monolithic
PLIST_SUB+= MONOLITHIC=""
.else
CONFIGURE_ARGS+= --disable-monolithic
PLIST_SUB+= MONOLITHIC="@comment "
.endif
.if ${PORT_OPTIONS:MPLASMAMULE}
CONFIGURE_ENV+= ac_cv_path_KDE4_CONFIG=${KDE4_PREFIX}/bin/kde4-config \
KBUILDSYCOCA=${KDE4_PREFIX}/bin/kbuildsycoca4 \
UPDATE_MIME_DATABASE=/usr/bin/true
CONFIGURE_ARGS+= --enable-plasmamule
USE_KDE4= kdelibs
USE_QT4+= dbus gui moc_build
PLIST_SUB+= PLASMAMULE=""
.else
CONFIGURE_ARGS+= --disable-plasmamule
PLIST_SUB+= PLASMAMULE="@comment "
.endif
.if ${PORT_OPTIONS:MUPNP}
LIB_DEPENDS+= upnp:${PORTSDIR}/devel/upnp
.else
CONFIGURE_ARGS+= --disable-upnp
.endif
.if ${PORT_OPTIONS:MWEBSERVER}
CONFIGURE_ARGS+= --enable-webserver
PLIST_SUB+= WEBSERVER=""
.else
CONFIGURE_ARGS+= --disable-webserver
PLIST_SUB+= WEBSERVER="@comment "
.endif
.if ${PORT_OPTIONS:MWXCAS}
CONFIGURE_ARGS+= --enable-wxcas
PLIST_SUB+= WXCAS=""
.else
CONFIGURE_ARGS+= --disable-wxcas
PLIST_SUB+= WXCAS="@comment "
.endif
.if ${PORT_OPTIONS:MWXUNICODE}
WX_UNICODE= yes
.endif
.if ${PORT_OPTIONS:MXAS}
CONFIGURE_ARGS+= --enable-xas
PLIST_SUB+= XAS=""
.else
CONFIGURE_ARGS+= --disable-xas
PLIST_SUB+= XAS="@comment "
.endif
# Man pages management
.include "Makefile.man"
post-patch: .SILENT
${REINPLACE_CMD} -e '/LDFLAGS/s/-lpthread/${PTHREAD_LIBS}/' \
-e 's/test.*-print-file-name.*`/true/' \
-e '/if.*test/s/==/=/' \
${WRKSRC}/configure
${FIND} ${WRKSRC} -name \*.pl -exec ${REINPLACE_CMD} \
's|/usr/bin/perl|${PERL}|' {} +
.if empty(PORT_OPTIONS:MDOCS)
${REINPLACE_CMD} 's/install-data-am:.*/install-data-am:/' \
${WRKSRC}/docs/Makefile.in
.endif
.if ${PORT_OPTIONS:MPLASMAMULE}
${REINPLACE_CMD} -e 's|@prefix@|${KDE4_PREFIX}|' \
-e 's|LDFLAGS =|& -L${KDE4_PREFIX}/lib |' \
${WRKSRC}/src/utils/plasmamule/Makefile.in
.endif
post-install:
.if ${PORT_OPTIONS:MFILEVIEW}
${INSTALL_PROGRAM} ${WRKSRC}/src/utils/fileview/mulefileview ${PREFIX}/bin
.endif
.if exists(${LOCALBASE}/bin/update-desktop-database)
. if ${PORT_OPTIONS:MPLASMAMULE}
-update-desktop-database ${KDE4_PREFIX}/share/applications
. if exists(${LOCALBASE}/bin/update-mime-database)
-update-mime-database ${KDE4_PREFIX}/share/mime
. endif
. endif
-update-desktop-database ${PREFIX}/share/applications
.endif
.include <bsd.port.mk>