aboutsummaryrefslogtreecommitdiff
path: root/devel/libcrossguid/Makefile
blob: 0aaee9c5ca4625256c7f17a73f6f1540e13a25f1 (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
# $FreeBSD$

PORTNAME=	libcrossguid
PORTVERSION=	20150803
PORTREVISION=	2
CATEGORIES=	devel

MAINTAINER=	mickael.maillot@gmail.com
COMMENT=	Minimal and cross platform C++ GUID library

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libuuid.so:misc/e2fsprogs-libuuid

USE_GITHUB=	yes
GH_ACCOUNT=	graeme-hill
GH_PROJECT=	crossguid
GH_TAGNAME=	8f399e8

USES=		compiler:c++11-lang pkgconfig
USE_CXXSTD=	c++11
CXXFLAGS+=	`pkg-config --cflags uuid`
USE_LDCONFIG=	yes

PLIST_FILES=	include/guid.h \
		lib/libcrossguid.so \
		lib/libcrossguid.so.0 \
		libdata/pkgconfig/libcrossguid.pc

post-patch:
	@${SED} -e 's|%PREFIX%|${PREFIX}|' -e 's|%VERSION%|${PORTVERSION}|' \
		${FILESDIR}/libcrossguid.pc.in > ${WRKDIR}/libcrossguid.pc

do-build:
	cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -shared -fPIC \
		-Wl,-soname,libcrossguid.so.0 \
		-DGUID_LIBUUID -L${LOCALBASE}/lib guid.cpp \
		-o libcrossguid.so.0 -luuid

do-install:
	${INSTALL_DATA} ${WRKSRC}/guid.h ${STAGEDIR}${PREFIX}/include
	${INSTALL_LIB} ${WRKSRC}/libcrossguid.so.0 ${STAGEDIR}${PREFIX}/lib
	${INSTALL_DATA} ${WRKDIR}/libcrossguid.pc \
		${STAGEDIR}${PREFIX}/libdata/pkgconfig
	${LN} -sf libcrossguid.so.0 ${STAGEDIR}${PREFIX}/lib/libcrossguid.so

.include <bsd.port.mk>