freebsd-ports/net/mldonkey-devel/Makefile
Pav Lucistnik dc33aa59f5 Move instant messaging related ports to newly created net-im category:
net/gaim -> net-im/gaim
  net/gaim-latex -> net-im/gaim-latex
  net/gaim-openq -> net-im/gaim-openq
  net/gaim-rss-reader -> net-im/gaim-rss-reader
  net/gicq -> net-im/gicq
  net/gnomeicu2 -> net-im/gnomeicu2
  net/gossip -> net-im/gossip
  net/ickle -> net-im/ickle
  net/jabber -> net-im/jabber
  net/jabber-aim -> net-im/jabber-aim
  net/jabber-conference -> net-im/jabber-conference
  net/jabber-jud -> net-im/jabber-jud
  net/jabber-msn -> net-im/jabber-msn
  net/jabber-users-agent -> net-im/jabber-users-agent
  net/jabber-yahoo -> net-im/jabber-yahoo
  net/jarl -> net-im/jarl
  net/kf -> net-im/kf
  net/libicq -> net-im/libicq
  net/libicq2000 -> net-im/libicq2000
  net/loudmouth -> net-im/loudmouth
  net/meanwhile -> net-im/meanwhile
  net/meanwhile-gaim -> net-im/meanwhile-gaim
  net/newsbot -> net-im/newsbot
  net/ocaml-jabbr -> net-im/ocaml-jabbr
  net/psi -> net-im/psi
  net/py-jabber -> net-im/py-jabber
  net/py-twistedWords -> net-im/py-twistedWords
  net/p5-Net-Jabber -> net-im/p5-Net-Jabber

Repocopied by:	marcus
2005-11-09 08:21:21 +00:00

183 lines
4.9 KiB
Makefile

# New ports collection makefile for: mldonkey
# Date created: 21 August 2002
# Whom: Holger Lamm <holger@e-gitt.net>
#
# $FreeBSD$
#
PORTNAME= mldonkey
PORTVERSION= 2.6.7
CATEGORIES+= net
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMESUFFIX= -devel
MAINTAINER?= lioux@FreeBSD.org
COMMENT?= A OCAML client for multiple peer-to-peer networks
BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
NO_LATEST_LINK= yes
CONFLICTS= mldonkey-[0-9]*
USE_BZIP2= yes
USE_ICONV= yes
USE_RC_SUBR= yes
WANT_AUTOCONF_VER= 259
USE_REINPLACE= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
ALL_TARGET= opt
CONFIGURE_ARGS+=\
--enable-ocamlver=3 \
--with-libiconv-prefix=${LOCALBASE}
CONFIGURE_ENV+= \
NEWCXX="${CXX}" \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
###
## Options activation
###
.if defined(WITHOUT_GUI)
.if defined(WITHOUT_CORE)
.error "Cool, you defined both WITHOUT_GUI and WITHOUT_CORE. I think I'll do nothing."
.endif
# have no 'without-' flag
CONFIGURE_ARGS+=--disable-gui \
--disable-gd
PLIST_SUB+= CORE="" GUI="@comment " GUICORE="@comment "
CONFLICTS+= mldonkey-core-[0.9]* mldonkey-core-stable-[0.9]* \
mldonkey-devel-[0-9]*
PKGNAMESUFFIX= -core-devel
.else
PLIST_SUB+= GUI=""
CONFLICTS+= mldonkey-gui-[0.9]*
.if !defined(WITHOUT_CORE)
CONFLICTS+= mldonkey-devel-[0-9]*
.endif
BUILD_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk \
${LOCALBASE}/lib/ocaml/jabbr.cma:${PORTSDIR}/net-im/ocaml-jabbr
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
CONFIGURE_ARGS+=--enable-gui=newgui1
# we don't need lablgtk as RUN dependency, but we need gtk+glib
USE_GNOME= gtk12
MAKE_ENV+= OCAMLRUNPARAM="l=256M"
.if defined(WITHOUT_CORE)
PKGNAMESUFFIX= -gui-devel
PLIST_SUB+= CORE="@comment " GUICORE="@comment "
.else
PLIST_SUB+= CORE="" GUICORE=""
.endif
.endif
DOCFILES= Authors.txt Bugs.txt ChangeLog Developers.txt FAQ.html \
Install.txt Readme.txt Todo.txt ed2k_links.txt
PORTDOCS= ${DOCFILES}
PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
BROKEN= "Does not compile on ${ARCH}"
.endif
# Fix build on 4.x
.if ${OSVERSION} < 500000
USE_GCC= 3.4
.endif
### Development version
## Thus, we will use non standard threading library
## We will switch from libpthread to libthr which should produce
## better results in some scenarios. You can read more at pthread(3)
.if defined(WITH_THR_THREAD_MODEL)
PTHREAD_CFLAGS= -D_THREAD_SAFE
PTHREAD_LIBS= -lthr
.endif
pre-everything::
.if !defined(WITHOUT_GUI) && !defined(WITHOUT_CORE)
@${ECHO_MSG} "You can disable the GUI by defining WITHOUT_GUI."
@${ECHO_MSG} "You can disable the CORE by defining WITHOUT_CORE."
@${ECHO_MSG}
.endif
.ifndef(WITH_THR_THREAD_MODEL)
@${ECHO_MSG} "Define WITH_THR_THREAD_MODEL to switch from"
@${ECHO_MSG} "pthread to thr threading model which could produce better"
@${ECHO_MSG} "results in some scenarios. Use at your discretion."
.endif
post-patch:
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${FILESDIR}/wrapper.sh > \
${WRKDIR}/wrapper.sh
@${REINPLACE_CMD} -E \
-e 's|%%AUTOCONF%%|${AUTOCONF}|' \
${BUILD_WRKSRC}/config/Makefile.in
# rc.d
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" \
${FILESDIR}/mlnet.sh > ${WRKDIR}/mlnet.sh
pre-configure:
cd ${WRKSRC}/config && ${AUTOCONF}
post-configure:
@${REINPLACE_CMD} -E \
-e 's|^(PTHREAD_CFLAGS[^=]*=).*$$|\1${PTHREAD_CFLAGS}|' \
-e 's|^(PTHREAD_LIBS[^=]*=).*$$|\1${PTHREAD_LIBS}|' \
${BUILD_WRKSRC}/config/Makefile.config
pre-install:
.if exists(${.CURDIR}/pkg-message)
@${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
< ${.CURDIR}/pkg-message > ${PKGMESSAGE}
.elif exists(${MASTERDIR}/pkg-message)
@${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
< ${MASTERDIR}/pkg-message > ${PKGMESSAGE}
.endif
do-install:
.ifndef(WITHOUT_CORE)
@${INSTALL_PROGRAM} ${WRKSRC}/mlnet ${PREFIX}/bin/mlnet-real
@${INSTALL_SCRIPT} ${FILESDIR}/kill_mldonkey ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/mlnet
.endif
.ifndef(WITHOUT_GUI)
@${INSTALL_PROGRAM} ${WRKSRC}/mlchat ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlgui ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlim ${PREFIX}/bin
.endif
.ifndef(WITHOUT_CORE && WITHOUT_GUI)
@${INSTALL_SCRIPT} ${WRKSRC}/distrib/mldonkey_previewer ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlguistarter ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlnet+gui ${PREFIX}/bin
.endif
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for file in ${DOCFILES}
@${INSTALL_DATA} ${WRKSRC}/distrib/${file} ${DOCSDIR}
.endfor
.endif
# rc.d
@${INSTALL_SCRIPT} ${WRKDIR}/mlnet.sh \
${PREFIX}/etc/rc.d
post-install:
@${CAT} ${PKGMESSAGE}
install-user: extract
.if !defined(LANG)
@${ECHO_MSG} "Please call as: make install-user LANG=<lang>"
@${ECHO_MSG} "with <lang> one of en,de,fr,fr.noaccents,sp !"
.else
@${CP} ${WRKSRC}/distrib/i18n/gui_messages.ini.${LANG}\
${HOME}/.mldonkey_gui_messages.ini
.endif
.include <bsd.port.post.mk>