aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/licq/Makefile
blob: 4b39f8fef86cb9b44022ab8440b0b6ec98ca54c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# New ports collection makefile for:    licq
# Date created:                         2 July 1998
# Whom:                                 Brian Feldman & Matt Heckaman
#
# $FreeBSD$
#

PORTNAME=   base
PORTVERSION=    ${LICQ_VER}
PORTREVISION=   3
CATEGORIES= net-im
PKGNAMESUFFIX=  ${SOCKS_SUFFIX}${PKGNAMESUFFIX2}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    A popular ICQ-compatible plugin-based program

.if defined(WITH_SOCKS)
BUILD_DEPENDS=  ${LOCALBASE}/lib/libsocks5.a:${PORTSDIR}/net/socks5
.endif

USE_ICONV=  yes
WRKSRC=     ${WRKDIR}/${DISTNAME}
LICQ_PORT?= net-im/licq

# workaround for installed autoconf/automake
CONFIGURE_ARGS+=--program-transform-name=s,y,y,
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
LDFLAGS+=   ${PTHREAD_LIBS} -L${LOCALBASE}/lib -liconv
CPPFLAGS+=  -I${LOCALBASE}/include
CFLAGS+=    -I${LOCALBASE}/include

.if defined(WITH_SOCKS)
SOCKS_SUFFIX=   -socks
CONFIGURE_ARGS+=--enable-socks5
CONFIGURE_ARGS+=--with-socks5-inc=${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFLICTS?= licq-base-1.*
BROKEN=     does not compile
.else
CONFLICTS?= licq-base-socks-1.*
.endif

.if !defined(WITHOUT_OPENSSL)
USE_OPENSSL=    yes
CONFIGURE_ARGS+=--with-openssl-inc=${OPENSSLINC}
CONFIGURE_ARGS+=--with-openssl-lib=${OPENSSLLIB}
.endif

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.else
PLIST_SUB+= NLS=""
.endif

pre-configure:
    ${REINPLACE_CMD} -e 's=/usr/share/licq=${PREFIX}/share/licq=' \
        ${WRKSRC}/src/licq.conf.h
    @${ECHO_MSG} Ignoring existing libgnugetopt
    ${REINPLACE_CMD} -e 's=!/bin/bash=!${LOCALBASE}/bin/bash=' \
        ${WRKSRC}/bin/sidclean.sh
    ${REINPLACE_CMD} -e 's=getopt.h==' \
        -e 's=FLAGS -D_THREAD_SAFE=FLAGS ${PTHREAD_CFLAGS}=' \
        -e 's=FLAGS -pthread=FLAGS ${PTHREAD_CFLAGS}=' \
        -e "s=-lc_r=${PTHREAD_LIBS}=" \
        -e 's=-lc *$$LIBS=$$LIBS=' \
        ${WRKSRC}/configure

post-install:
    @${MKDIR} ${PREFIX}/lib/licq
    @${CAT} ${PKGMESSAGE}
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/sidclean.sh ${PREFIX}/bin/sidclean.bash

.include <bsd.port.pre.mk>
.include "${PORTSDIR}/${LICQ_PORT}/Makefile.inc"

.include <bsd.port.post.mk>