Changeset View
Standalone View
net-im/telegram-desktop/Makefile
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# $FreeBSD$ | |||||
PORTNAME= telegram-desktop | |||||
DISTVERSIONPREFIX= v | |||||
DISTVERSION= 1.1.23 | |||||
CATEGORIES= net-im | |||||
MAINTAINER= henry.hu.sh@gmail.com | |||||
COMMENT= Telegram Desktop messaging app | |||||
LICENSE= GPLv3 | |||||
LICENSE_FILE= ${WRKSRC}/LICENSE | |||||
BUILD_DEPENDS= dee>0:devel/dee \ | |||||
gyp:devel/py-gyp@${PY_FLAVOR} | |||||
LIB_DEPENDS= libasound.so:audio/alsa-lib \ | |||||
mat: `@${PY_FLAVOR}` | |||||
libavformat.so:multimedia/ffmpeg \ | |||||
Done Inline Actions^ USES=python:build ? tcberner: ^ USES=python:build ? | |||||
libdbus-1.so:devel/dbus \ | |||||
libminizip.so:archivers/minizip \ | |||||
Done Inline Actions^ how are alsa and pulse only build depends? does it not link against libasound.so or libpulse.so? tcberner: ^ how are alsa and pulse only build depends? does it not link against libasound.so or libpulse. | |||||
Done Inline ActionsExecutable doesn't link with these. They load some things dynamically. yuri: Executable doesn't link with these. They load some things dynamically.
| |||||
Done Inline ActionsIt also loads gtk dynamically. yuri: It also loads gtk dynamically. | |||||
Done Inline Actionsbut how does that make any sense? if you need/want alsa&pulse at runtime, add it to the run depends, also :) tcberner: but how does that make any sense? if you need/want alsa&pulse at runtime, add it to the run… | |||||
Done Inline ActionsI am not really familiar with this app. But it can make sense if these are optional runtime dependencies. This means that it will use them if they are present, and will also happily work without them. At least that's what the submitter claims. And I myself did link projects this way. yuri: I am not really familiar with this app. But it can make sense if these are optional runtime… | |||||
Done Inline ActionsThis goes against everything we do in the Ports tree. Software must not tentatively try to use stuff that may, or not, be there. If you build with alsa or pulseaudio, then also add it as run dependencies, so that it is used. Or make them options so that users can choose which they want. mat: This goes against everything we do in the Ports tree. Software must not tentatively try to use… | |||||
Done Inline ActionsI made alsa and pulseaudio LIB_DEPENDS. yuri: I made alsa and pulseaudio LIB_DEPENDS.
| |||||
Done Inline Actions
@mat , Please look at USE_GNOME=glib20 gtk30 in this case. It only uses gtk to enable desktop notifications in case of gtk-based systems. Otherwise, this is a Qt app. Don't you think this is good to load gtk dynamically and ignore failures? This eliminates unnecessary dependencies. It doesn't have to install gtk when it isn't really needed just to enable notification that aren't shown anyway. So, it should really be USE_GNOME=glib20:build gtk30:build. Unfortunately, USE_GNOME=gtk30:build is broken. yuri: > Software must not tentatively try to use stuff that may, or not, be there.
@mat , Please… | |||||
Done Inline ActionsWhat are you talking about ? I simply asked a question, which you answered, leave it at that. Of course USE_GNOME=gtk30:build does not do what you ask, gtk30 is a shared library, it must not be used at build time only, otherwise the software will end up being broken in the end. (I don't care that it "dynamically links it at run-time" if it needs it, it needs it.) mat: What are you talking about ? I simply asked a question, which you answered, leave it at that. | |||||
libopenal.so:audio/openal-soft \ | |||||
libopus.so:audio/opus \ | |||||
libpulse.so:audio/pulseaudio | |||||
USES= cmake:noninja,outsource desktop-file-utils gmake pkgconfig python:build ssl | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= telegramdesktop | |||||
Done Inline Actions^ why does it not build with ninja? tcberner: ^ why does it not build with ninja? | |||||
Done Inline Actionsninja breaks with bad scripts. yuri: ninja breaks with bad scripts. | |||||
GH_PROJECT= tdesktop | |||||
GH_TUPLE= catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \ | |||||
mapbox:variant:550ac2f:variant/Telegram/ThirdParty/variant \ | |||||
Microsoft:GSL:c5851a8:gsl/Telegram/ThirdParty/GSL \ | |||||
telegramdesktop:libtgvoip:757a5d8e:libtgvoip/Telegram/ThirdParty/libtgvoip | |||||
USE_GNOME= glib20 gtk30 | |||||
USE_QT5= core gui imageformats network widgets buildtools_build qmake_build | |||||
matUnsubmitted Done Inline ActionsDoes this really need gtk3 and qt5 ? It feels strange to require both. mat: Does this really need gtk3 and qt5 ? It feels strange to require both. | |||||
yuriAuthorUnsubmitted Done Inline ActionsThey link to gtk for notifications to work on gtk systems. I guess, they try to cover both gtk2 and gtk3 based systems. For example, the qTox port also links to gtk20 for this reason. yuri: They link to gtk for notifications to work on gtk systems. I guess, they try to cover both gtk2… | |||||
USE_XORG= x11 xcb | |||||
CMAKE_SOURCE_PATH= ${WRKSRC}/out/Release | |||||
GYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME | |||||
.include <bsd.port.pre.mk> | |||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 | |||||
CC= clang40 | |||||
CXX= clang++40 | |||||
BUILD_DEPENDS+= clang++40:devel/llvm40 | |||||
RUN_DEPENDS+= clang++40:devel/llvm40 | |||||
.endif | |||||
post-patch: | |||||
@cd ${WRKSRC} && \ | |||||
(${SED} -e " \ | |||||
s|%%QT_VERSION%%|${QT5_VERSION}| ; \ | |||||
s|%%LOCALBASE%%|${LOCALBASE}| ; \ | |||||
s|%%CFLAGS%%|${CFLAGS:C/(.*)/'\1',/}| ; \ | |||||
s|%%CXXFLAGS%%|${CXXFLAGS:C/(.*)/'\1',/}| ; \ | |||||
s|%%LDFLAGS%%|${LDFLAGS:C/(.*)/'\1',/}| ; \ | |||||
s|%%QT_BINDIR%%|${QT_BINDIR}| ; \ | |||||
s|%%QT_INCDIR%%|${QT_INCDIR}| ; \ | |||||
s|%%QT_LIBDIR%%|${QT_LIBDIR}| ; \ | |||||
s|%%QMAKESPEC%%|${QMAKESPEC}| ; \ | |||||
s|%%PYTHON_CMD%%|${PYTHON_CMD}|" \ | |||||
${FILESDIR}/gyp-patches | \ | |||||
${PATCH} -z .bak -s) | |||||
@${ECHO} "#define FREEBSD_QT_PLUGINDIR \"${QT_PLUGINDIR}\"" > ${WRKSRC}/Telegram/SourceFiles/FREEBSD_QT_PLUGINDIR.h | |||||
pre-configure: | |||||
@cd ${WRKSRC} && gyp \ | |||||
-Dbuild_defines=${GYP_DEFINES} \ | |||||
-Gconfig=Release \ | |||||
--depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake | |||||
@TOT=`wc -l < ${WRKSRC}/out/Release/CMakeLists.txt` && NUM=`expr $$TOT - 2` && \ | |||||
${SED} -i -e "$$NUM r ${FILESDIR}/CMakeLists.inj" ${WRKSRC}/out/Release/CMakeLists.txt | |||||
do-install: | |||||
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Telegram ${STAGEDIR}${PREFIX}/bin/${PORTNAME} | |||||
${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop | |||||
${INSTALL} -d ${STAGEDIR}${PREFIX}/share/kservices5 | |||||
adamwUnsubmitted Done Inline Actions${MKDIR} adamw: ${MKDIR} | |||||
${INSTALL_DATA} ${WRKSRC}/lib/xdg/tg.protocol ${STAGEDIR}${PREFIX}/share/kservices5 | |||||
${INSTALL} -d ${STAGEDIR}${PREFIX}/share/appdata | |||||
adamwUnsubmitted Not Done Inline Actions${MKDIR} adamw: ${MKDIR} | |||||
${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata/${PORTNAME}.appdata.xml | |||||
.for icon_size in 16 32 48 64 128 256 512 | |||||
${INSTALL} -d ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps | |||||
adamwUnsubmitted Not Done Inline Actions${MKDIR} adamw: ${MKDIR} | |||||
${INSTALL_DATA} \ | |||||
${WRKSRC}/Telegram/Resources/art/icon${icon_size}.png \ | |||||
${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps/${PORTNAME}.png | |||||
.endfor | |||||
.include <bsd.port.post.mk> |
@${PY_FLAVOR}