aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/libunrar5/Makefile
blob: ace0a5260e0964818fc203f2c25d383fab3b826f (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
# $FreeBSD$

PORTNAME=   libunrar5
PORTVERSION=    5.6.8
CATEGORIES= archivers
MASTER_SITES=   http://www.rarlab.com/rar/
DISTNAME=   unrarsrc-${PORTVERSION}

MAINTAINER= jhale@FreeBSD.org
COMMENT=    RAR archive extraction library

LICENSE=    UNRAR
LICENSE_NAME=   UnRAR License
LICENSE_FILE=   ${WRKSRC}/license.txt
LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

USES=       gmake
USE_LDCONFIG=   yes

ALL_TARGET= lib
MAKEFILE=   makefile
MAKE_ARGS=  AR="${AR}" \
        CXX="${CXX}" \
        CXXFLAGS="${CXXFLAGS} -fPIC" \
        LDFLAGS="-Wl,-soname,${SONAME} -pthread ${LDFLAGS}" \
        STRIP="${STRIP_CMD}"
SONAME=     libunrar.so.5
WRKSRC=     ${WRKDIR}/unrar

CONFLICTS_INSTALL=  libunrar-3* libunrar4-4*

OPTIONS_DEFINE=     OPENSSL_AES
OPTIONS_DEFAULT=    OPENSSL_AES

OPENSSL_AES_DESC=   Use OpenSSL implementation of AES
OPENSSL_AES_CPPFLAGS=   -DOPENSSL_AES -I${OPENSSLINC}
OPENSSL_AES_LDFLAGS=    -L${OPENSSLLIB} -lcrypto
OPENSSL_AES_USES=   ssl
OPENSSL_AES_VARS=   BROKEN_SSL=openssl-devel

PLIST_FILES=    lib/libunrar.a \
        lib/libunrar.so \
        lib/${SONAME} \
        include/libunrar5/dll.hpp

do-install:
    ${INSTALL_DATA} ${WRKSRC}/libunrar.a ${STAGEDIR}${PREFIX}/lib/libunrar.a
    ${INSTALL_LIB} ${WRKSRC}/libunrar.so ${STAGEDIR}${PREFIX}/lib/${SONAME}
    (cd ${STAGEDIR}${PREFIX}/lib; ${LN} -sf ${SONAME} libunrar.so)
    @${MKDIR} ${STAGEDIR}${PREFIX}/include/libunrar5
    ${INSTALL_DATA} ${WRKSRC}/dll.hpp ${STAGEDIR}${PREFIX}/include/libunrar5/dll.hpp

.include <bsd.port.mk>