Files

44 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

2021-12-23 09:01:11 +00:00
COMMENT = QR Code generator library
GH_ACCOUNT = nayuki
GH_PROJECT = QR-Code-generator
2022-04-22 16:05:18 +00:00
GH_TAGNAME = v1.8.0
2021-12-23 09:01:11 +00:00
PKGNAME = ${DISTNAME:L}
CATEGORIES = graphics
# upstream has no shared library versions
SHARED_LIBS += qrcodegen 0.0
SHARED_LIBS += qrcodegencpp 0.0
HOMEPAGE = https://www.nayuki.io/page/qr-code-generator-library
# MIT
PERMIT_PACKAGE = Yes
WANTLIB = ${COMPILER_LIBCXX} m
MAINTAINER = Klemens Nanni <kn@openbsd.org>
COMPILER = base-clang ports-gcc
SEPARATE_BUILD = Yes
2021-12-24 04:35:13 +00:00
SONAME_C = libqrcodegen.so.${LIBqrcodegen_VERSION}
SONAME_CPP = libqrcodegencpp.so.${LIBqrcodegen_VERSION}
2021-12-23 09:01:11 +00:00
do-build:
cd ${WRKSRC}/c && PATH=${PORTPATH} ${CC} ${CFLAGS} -shared -fPIC \
2022-01-06 00:07:44 +00:00
-Wl,-soname,${SONAME_C} -o ${WRKBUILD}/${SONAME_C} qrcodegen.c
cd ${WRKSRC}/cpp && PATH=${PORTPATH} ${CXX} ${CXXFLAGS} -shared -fPIC \
2021-12-24 04:35:13 +00:00
-Wl,-soname,${SONAME_CPP} -o ${WRKBUILD}/${SONAME_CPP} qrcodegen.cpp
2021-12-23 09:01:11 +00:00
do-install:
${INSTALL_DATA} ${WRKSRC}/{c/*.h,cpp/*.hpp} ${PREFIX}/include/
${INSTALL_DATA} ${WRKBUILD}/*.so* ${PREFIX}/lib/
do-test:
2022-01-06 00:07:44 +00:00
cd ${WRKSRC}/c && PATH=${PORTPATH} ${CC} ${CFLAGS} -DQRCODEGEN_TEST \
qrcodegen{,-test}.c -o ${WRKBUILD}/qrcodegen-test
2021-12-23 09:01:11 +00:00
${WRKBUILD}/qrcodegen-test
.include <bsd.port.mk>