Bug 267900 - net-p2p/libtorrent-rasterbar: fix python bindings
Summary: net-p2p/libtorrent-rasterbar: fix python bindings
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords: patch
: 267866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-21 18:56 UTC by Joakim Bergman
Modified: 2023-06-26 13:25 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
fix python bindings (5.44 KB, patch)
2022-11-21 18:56 UTC, Joakim Bergman
no flags Details | Diff
fix python bindings (6.22 KB, patch)
2023-01-06 17:38 UTC, Joakim Bergman
no flags Details | Diff
net-p2p/libtorrent-rasterbar: fix python bindings (6.22 KB, patch)
2023-05-07 07:50 UTC, Joakim Bergman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Bergman 2022-11-21 18:56:18 UTC
Created attachment 238226 [details]
fix python bindings

Fixes problems building the python bindings. This is my third bug report/patch on this topic (one via deluge-cli, one that fixes this and bump libtorrent-rasterbar), mainly to give options on how to proceed to maintainers.

Feel free to close any of these reports if they seem redundant.

Context:
https://github.com/arvidn/libtorrent/issues/6890
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264970
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267866


Thanks!
Joakim
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-21 23:04:33 UTC
Hi Joakim,

Thanks for the patch.

You also created https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267866 with a different patch and these two patches intersect.

Could you please leave one report open with the correct patch? You can close the other one as a duplicate.

Also please remove DOS eol characters from patches.


Yuri
Comment 2 Joakim Bergman 2022-11-22 22:03:33 UTC
(In reply to Yuri Victorovich from comment #1)

Hi Yuri!

Thanks for getting back to me!

The two reports are different so I cannot say which one is more correct. They overlap in that they both contain the same fix for the build problem that the port was marked BROKEN for, but then the other patch has a version bump in addition. I agree one of them should be closed but I will leave it up to you as maintainer to decide which one you want to proceed with. I am happy with either.

I couldn't find any DOS EOL characters (CRLF or ^M in vim I guess) in my patch. The patch was generated from a git worktree using the command `git format-patch main` from my branch. The code was written in vim on a FreeBSD 13.1 server with poudriere to test the port and build local pkg for my own use, so it would be unexpected to have anything DOS/Windows in there. Please advise, or feel free to modify the patch yourself if you think that may be quicker.


Lastly, do you have any idea how to make the python bindings build without requiring that specific name for the libtorrent.so.10.0.0 file? This whole patch feels very hacky, but I just want to get things working again and I am completely new to ports development.


Thanks!
Joakim
Comment 3 Joakim Bergman 2023-01-06 17:38:48 UTC
Created attachment 239308 [details]
fix python bindings

updated patch after libtorrent-rasterbar was updated to 1.2.18
Comment 4 Joakim Bergman 2023-01-06 17:40:49 UTC
*** Bug 267866 has been marked as a duplicate of this bug. ***
Comment 5 bro.development 2023-03-17 13:32:11 UTC
What is holding this back currently? The patch seems to work

----------
Joakim, 

In Makefile you could use:

-	/bin/ln -s libtorrent-rasterbar.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libtorrent-rasterbar.so.10.0.0
+	/bin/ln -s libtorrent-rasterbar.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libtorrent-rasterbar.so.${SHLIB_VER}.0.0

and in pkg-plist:
-lib/libtorrent-rasterbar.so.10.0.0
+lib/libtorrent-rasterbar.so.%%SHLIB_VER%%.0.0:
Comment 6 Joakim Bergman 2023-05-02 15:31:57 UTC
(In reply to bro.development from comment #5)
Hej! Thanks for the suggestion, and I can see how that works, but I am not sure of the semantics of that number. I can see that they match and it is likely the same number, but sinceI am not sure and was hoping someone could come up with a nicer solution in these comments, it seemed better to me to keep it explicitly hardcoded.


On the other topic, of what is holding this back, I have no idea. The problem with building the python bindings for this library has been around for about a year at this point and there seems to be no urgency to get a fix in, even with a proposed patch that has been working for me for the last year or so.
Comment 7 Joakim Bergman 2023-05-07 07:50:14 UTC
Created attachment 242035 [details]
net-p2p/libtorrent-rasterbar: fix python bindings

rebased on 08f6e47c647f (most recent HEAD on 2023-05-07)
Comment 8 Joakim Bergman 2023-06-26 13:25:22 UTC
Fixed as part of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264970#c22

URL: https://cgit.FreeBSD.org/ports/commit/?id=3773dbe7e18982a764e45c8bb0d8a4551be2febc

commit 3773dbe7e18982a764e45c8bb0d8a4551be2febc
Author:     Joakim Bergman <jocke@gipset.se>
AuthorDate: 2023-06-18 17:11:30 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-06-21 14:29:47 +0000

    net-p2p/{,py-}libtorrent-rasterbar: update to 1.2.18

    And fix python bindings in preparation for update of net-p2p/deluge-cli.

    PR:             264970
    Reported by:    jocke@gipset.se
    Approved by:    yuri@ (maintainer)

 net-p2p/libtorrent-rasterbar/Makefile    |  3 +++
 net-p2p/libtorrent-rasterbar/pkg-plist   |  1 +
 net-p2p/py-libtorrent-rasterbar/Makefile | 14 ++++++++------
 net-p2p/py-libtorrent-rasterbar/distinfo |  6 +++---
 4 files changed, 15 insertions(+), 9 deletions(-)