Github messages for voidlinux
 help / color / mirror / Atom feed
From: kartikynwa <kartikynwa@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] transmission: build with cmake
Date: Thu, 28 May 2020 09:57:53 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22373@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

There is a new pull request by kartikynwa against master on the void-packages repository

https://github.com/kartikynwa/void-packages transmission-cmake
https://github.com/void-linux/void-packages/pull/22373

transmission: build with cmake
Creating a second PR which fixes cross builds. Sorry for polluting the PR queue.

- Updated template to use `build_style=cmake` instead of `gnu-configure`. This is because upstream recommends building with `cmake` and localisation doesn't work with `gnu-configure`.
- Fixed broken Qt translations from previous revision

Right now the official tarball from [transmission/transmission-releases](https://github.com/transmission/transmission-releases) is broken as mentioned in [this issue](https://github.com/transmission/transmission/issues/1248). User @floppym has rolled their own tarball with [this fix](https://github.com/transmission/transmission/pull/1247) applied. I have used that tarball for now but hopefully we can revert to official tarballs for future versions.

Thanks a lot @floppym 

A patch file from https://github.com/void-linux/void-packages/pull/22373.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-transmission-cmake-22373.patch --]
[-- Type: text/x-diff, Size: 4073 bytes --]

From edcfd0c961d49cf0215aee4dbe3bcc85b493ef23 Mon Sep 17 00:00:00 2001
From: Kartik Singh <kartik.ynwa@gmail.com>
Date: Thu, 28 May 2020 12:12:59 +0530
Subject: [PATCH] transmission: build with cmake

---
 srcpkgs/transmission/template | 56 ++++++++++-------------------------
 1 file changed, 15 insertions(+), 41 deletions(-)

diff --git a/srcpkgs/transmission/template b/srcpkgs/transmission/template
index 0bfa526d9d6..aa554ce337d 100644
--- a/srcpkgs/transmission/template
+++ b/srcpkgs/transmission/template
@@ -1,19 +1,20 @@
 # Template file for 'transmission'
 pkgname=transmission
 version=3.00
-revision=1
-build_style=gnu-configure
-configure_args="--enable-nls --enable-cli --enable-daemon --enable-utp
- --without-systemd-daemon"
-hostmakedepends="intltool pkg-config qt5-host-tools"
+revision=2
+build_style=cmake
+configure_args="-DENABLE_CLI=ON"
+hostmakedepends="autoconf automake intltool glib-devel libtool pkg-config
+ qt5-host-tools qt5-qmake"
 makedepends="dbus-glib-devel gtk+3-devel libcurl-devel libevent-devel
  qt5-tools-devel"
 short_desc="Fast, easy and free BitTorrent client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT, GPL-2.0-or-later"
 homepage="https://www.transmissionbt.com"
-distfiles="https://github.com/transmission/transmission-releases/raw/master/${pkgname}-${version}.tar.xz"
-checksum=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
+distfiles="https://dev.gentoo.org/~floppym/dist/transmission-${version}.tar.xz"
+# distfiles="https://github.com/transmission/transmission-releases/raw/master/${pkgname}-${version}.tar.xz"
+checksum=825710fd4235d0727d4bdad439b30176d52263b264251ece0ba6fe449cbe8c6b
 
 # Create transmission system user/group
 system_accounts="transmission"
@@ -37,35 +38,6 @@ post_configure() {
 		 -e "/#include <inttypes.h>.*/i #include <stdio.h> /* off_t */"
 }
 
-do_build() {
-	make CXXFLAGS="${CXXFLAGS} -std=c++17" LDFLAGS="${LDFLAGS}" ${makejobs}
-	if [ -z "$CROSS_BUILD" ]; then
-		# Build the Qt frontend
-		cd qt
-		qmake-qt5 MOC=moc-qt5 QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" qtr.pro
-		lrelease-qt5 translations/*.ts
-		make ${makejobs} CXXFLAGS="${CXXFLAGS} -fPIC -std=c++17" LDFLAGS="${LDFLAGS}"
-	fi
-}
-
-do_install() {
-	# Install CLI tools, daemon and web client
-	for dir in cli daemon utils web; do
-		make -C ${dir} DESTDIR=${DESTDIR} install
-	done
-
-	# Install GTK+ frontend
-	make -C gtk DESTDIR=${DESTDIR} install
-	make -C po DESTDIR=${DESTDIR} install
-
-	if [ -z "$CROSS_BUILD" ]; then
-		# Install Qt frontend
-		make -C qt INSTALL_ROOT=${DESTDIR}/usr install
-		vmkdir usr/share/qt5/translations
-		vcopy qt/translations/*.qm usr/share/qt5/translations
-	fi
-}
-
 post_install() {
 	rm -f ${DESTDIR}/usr/share/${pkgname}/web/LICENSE
 	vsv transmission-daemon
@@ -78,10 +50,12 @@ transmission-qt_package() {
 	pkg_install() {
 		vmove usr/bin/transmission-qt
 		vmove usr/share/man/man1/transmission-qt.1
-		vmove usr/share/qt5/translations
-		sed -i '/Icon=/s/transmission/&-qt/' ${wrksrc}/qt/transmission-qt.desktop
+		vmove usr/share/transmission/translations
+		sed -i '/Icon=/s/transmission/&-qt/' ${DESTDIR}/usr/share/applications/transmission-qt.desktop
 		vinstall ${wrksrc}/qt/icons/transmission.png 644 usr/share/pixmaps transmission-qt.png
-		vinstall ${wrksrc}/qt/transmission-qt.desktop 644 usr/share/applications
+		vinstall ${wrksrc}/gtk/icons/hicolor_apps_scalable_transmission.svg \
+			644 usr/share/icons/hicolor/scalable/apps transmission-qt.svg
+		vmove usr/share/applications/transmission-qt.desktop
 	}
 }
 
@@ -92,8 +66,8 @@ transmission-gtk_package() {
 		vmove usr/bin/transmission-gtk
 		vmove usr/share/man/man1/transmission-gtk.1
 		vmove usr/share/icons/hicolor
-		vmove usr/share/applications
-		vmove usr/share/pixmaps
+		vmove usr/share/applications/transmission-gtk.desktop
+		vinstall ${wrksrc}/qt/icons/transmission.png 644 usr/share/pixmaps
 		# This install path seems to be used with musl libc
 		if [ -d ${DESTDIR}/usr/lib/locale ]; then
 			mv ${DESTDIR}/usr/lib/locale ${DESTDIR}/usr/share

             reply	other threads:[~2020-05-28  7:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  7:57 kartikynwa [this message]
2020-05-31 15:35 ` [PR PATCH] [Updated] " kartikynwa
2020-05-31 15:48 ` kartikynwa
2020-05-31 15:57 ` [PR PATCH] [Updated] " kartikynwa
2020-05-31 15:58 ` kartikynwa
2020-05-31 16:14 ` floppym
2020-05-31 16:15 ` [PR PATCH] [Updated] " kartikynwa
2020-06-01  8:01 ` [PR PATCH] [Merged]: " Hoshpak
  -- strict thread matches above, loose matches on Subject: below --
2020-05-27 10:56 [PR PATCH] " kartikynwa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22373@inbox.vuxu.org \
    --to=kartikynwa@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).