freebsd-ports/deskutils/cdcat/Makefile
Jason E. Hale edf512ca2e Update security/cryptopp to 7.0.0
We now install a pkgconfig file which will allow ports to check whether
cryptopp was built with assembly instructions enabled or not. There are
a few functions that will be undefined if built without assembly and
-DCRYPTOPP_DISABLE_ASM needs to be passed to the compiler in that case
to avoid build failures. This is not new, but the pkgconf file should
make it easier to determine if the flag is needed or not.

Fix several ports due to API changes and to use the new pkgconf file
to determine cryptopp location and build flags. Special cases below.

deskutils/cdcat
- Use cryptopp shared library instead of static, detect with pkgconf

devel/xeus
- Fix dependencies and remove header-only libraries from RUN_DEPENDS
- Rework to use the cryptopp pkgconf file
- net/cppzmq CMake files were fixed in r477649, remove hacks for that
  as they were seemingly causing devel/xeus-cling to link to cryptopp
  unnecessarily
- Remove C++17 code from cryptopp checks for compatibility

devel/xeus-cling
- Fix dependencies
- Remove hacks for previously broken cppzmq CMake files and no longer
  needed cryptopp dependency

Changes:	https://www.cryptopp.com/#news
PR:		230579 (original patch, not used)
Submitted by:	yuri
2018-08-24 17:22:01 +00:00

89 lines
2.8 KiB
Makefile

# Created by: Aren Tyr <aren.tyr@gawab.com>
# $FreeBSD$
PORTNAME= cdcat
PORTVERSION= 2.3.1
PORTREVISION= 4
CATEGORIES= deskutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Qt based tool for offline CD/DVD/disk catalogs
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libtar.so:devel/libtar \
libexif.so:graphics/libexif \
libmediainfo.so:multimedia/libmediainfo \
libzen.so:multimedia/libzen \
libcryptopp.so:security/cryptopp
CONFIGURE_WRKSRC= ${WRKSRC}/src
BUILD_WRKSRC= ${CONFIGURE_WRKSRC}
USES= libtool pkgconfig qmake:norecursive qt:4 tar:bzip2
USE_QT= corelib gui xml linguisttools_build moc_build uic_build
QMAKE_ARGS= LIBS+="-lz -lbz2 -ltar -lexif -lmediainfo -lzen" \
CONFIG+="link_pkgconfig" \
PKGCONFIG+="libcryptopp" \
DEFINES+="MEDIAINFO_STATIC" \
DEFINES+="MEDIAINFO_UNICODE" \
DEFINES+="USE_LIBEXIF"
QMAKE_SOURCE_PATH= ${BUILD_WRKSRC}/${PORTNAME}.pro
INSTALLS_ICONS= yes
PORTDOCS= Authors ChangeLog README TRANSLATORS_README
PLIST_FILES= bin/${PORTNAME} %%DATADIR%%/${PORTNAME}.png
.for lang in cz de el es fr hu id it pl pt ru sk sr
PLIST_FILES+= %%DATADIR%%/translations/${PORTNAME}_${lang}.qm
.endfor
.for size in 16 22 32 48 64
PLIST_FILES+= share/icons/hicolor/${size}x${size}/apps/${PORTNAME}_logo.png
.endfor
PLIST_FILES+= share/icons/hicolor/scalable/apps/${PORTNAME}_logo.svg
DESKTOP_ENTRIES="CdCat" "Hyper's CD Catalog" "${DATADIR}/${PORTNAME}.png" \
"${PORTNAME}" "AudioVideo;Qt;" ""
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e \
'/USE_LIB7ZIP/s|^|#| ; \
/LIBS/s|^|#|' ${BUILD_WRKSRC}/${PORTNAME}.pro
@${REINPLACE_CMD} -e \
's|/dev/sr0|/dev/cd0|' ${BUILD_WRKSRC}/config.cpp
.for i in newdbdialog.cpp wdbfile.h
@${REINPLACE_CMD} -e \
's|crypto++/|cryptopp/|' ${BUILD_WRKSRC}/${i}
.endfor
pre-configure:
@${LRELEASE} ${BUILD_WRKSRC}/${PORTNAME}.pro
do-install:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png \
${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DATADIR}/translations
${INSTALL_DATA} ${BUILD_WRKSRC}/lang/*.qm \
${STAGEDIR}${DATADIR}/translations
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}_logo.svg \
${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
.for size in 16 22 32 48 64
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}_logo_${size}x${size}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps/${PORTNAME}_logo.png
.endfor
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>