Bug 144337 - [PATCH] net-p2p/libtorrent-rasterbar-14: Build python bindings
Summary: [PATCH] net-p2p/libtorrent-rasterbar-14: Build python bindings
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 02:40 UTC by Mario Sergio Fujikawa Ferreira
Modified: 2010-07-01 10:26 UTC (History)
1 user (show)

See Also:


Attachments
libtorrent-rasterbar-0.14.8_1.patch (34.40 KB, patch)
2010-02-27 02:40 UTC, Mario Sergio Fujikawa Ferreira
no flags Details | Diff
patch-libtorrent-rasterbar-14 (2.35 KB, text/plain; charset=us-ascii)
2010-06-15 11:24 UTC, Mario Sergio Fujikawa Ferreira
no flags Details
libtorrent-rasterbar-14-python.shar (6.62 KB, application/x-shar)
2010-06-15 11:24 UTC, Mario Sergio Fujikawa Ferreira
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2010-02-27 02:40:01 UTC
- Build python bindings so that I can update net-p2p/deluge port
  to 1.2.0
	- Add patch and post pre.mk information to force python proper detection
- Bump PORTREVISION
- Move Makefile options around a little bit to appease portlint(1)
- Improve boost-libs detection (CONFIGURE_ARGS)
- Build with asio implementation from devel/boost-libs
- Tidy up the port a little bit:
	- Remove patches that are no longer needed (net-p2p/qbittorrent
	  now breaks with them)

	- Both CPPFLAGS and LDFLAGS only need PTHREAD additions

	- Optional documentation files are better handled by PORTDOCS
	  variable rather than PLIST substitutions

	- Since boost detection has been improved, remove post-configure
	  target

	- Identify the egg info with the full PORTNAME following
	  maintainer's intention to properly identify the port with
	  the full distribution name

	- Insure that the installed python binding (libtorrent.so)
	  has the proper permissions. The file was being installed
	  with u=rw,go= on my system due to restrictice umask.
	  Proper installation permissions have to be guaranteed by
	  the port.

- The python bindings build requires a specific devel/boost-libs
  port version so verify that on BUILD_DEPENDS.
	- Furthermore, this update depends upon PR ports/144336 so
	  we have to wait for that one to be committed.

	- Without that PR, we need USE_GCC=4.3+ on FreeBSD 8.x which
	  would force that needless dependency on all ports depending
	  on libtorrent-rasterbar-14

- Sanitize PLIST

- On a side note, net-p2p/qbittorrent still builds fine without a
  change after this update.

- The port is much simpler after this update

Added file(s):
- files/patch-m4__ax_python-fixed.m4

Removed file(s):
- files/patch-include__libtorrent__chained_buffer.hpp
- files/patch-include__libtorrent__error_code.hpp
- files/patch-include__libtorrent__proxy_base.hpp
- files/patch-include__libtorrent__socket.hpp
- files/patch-include__libtorrent__ssl_stream.hpp
- files/patch-include__libtorrent__time.hpp
- files/patch-include__libtorrent__variant_stream.hpp
- files/patch-src__broadcast_socket.cpp
- files/patch-src__enum_net.cpp
- files/patch-src__error_code.cpp
- files/patch-src__file_pool.cpp
- files/patch-src__lsd.cpp
- files/patch-src__natpmp.cpp
- files/patch-src__storage.cpp
- files/patch-src__udp_socket.cpp
- files/patch-src__upnp.cpp

Port maintainer (dougb@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-02-27 02:40:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dougb

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Doug Barton freebsd_committer freebsd_triage 2010-02-27 03:06:04 UTC
State Changed
From-To: open->analyzed


I like most of what you've included, and I will be taking a more in-depth 
look at it. However, I will not include the python bindings unconditionally, 
can you please resubmit this patch (as a followup to the same PR) with 
the python stuff as an OPTION? 

Also, why do you have boost-libs under build_depends along with the (already 
existing) lib_depends? 


Thanks, 

Doug
Comment 3 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2010-02-27 03:40:36 UTC
On 27/02/2010 00:09, dougb@FreeBSD.org wrote:
[snip]

> I like most of what you've included, and I will be taking a more in-depth
> look at it. However, I will not include the python bindings unconditionally,
> can you please resubmit this patch (as a followup to the same PR) with
> the python stuff as an OPTION?

	Unfortunately, I cannot update net-p2p/deluge to 1.2.0 without python 
bindings and I cannot depend upon net-p2p/libtorrent-rasterbar-14 if 
python bindings are optional.

	The most desirable solution would be to create a
net-p2p/libtorrent-rasterbar-14-python port. However, the rasterbar's 
distfile Makefile/configure structure is not modular enough for me 
tostrip build only the python bindings (linking against a LOCALBASE 
installed net-p2p/libtorrent-rasterbar-14 port at the same time).

	Any ideas on how to circumvent that?

	I took a look around and it seems that the only "porting" system 
following our ideas is gentoo's. They are going for the rasterbar port 
building it all. I was hoping someone had done the library vs python 
port split already.

> Also, why do you have boost-libs under build_depends along with the (already
> existing) lib_depends?

	I know that is ugly but I wanted to make sure we had both "the exact 
port version >= 0.14.0_1" (PR 144336) and "the exact library version". 
Only the BUILD_DEPENDS plus a RUN_DEPENDS replacing the LIB_DEPENDS 
entry could do it.

	I will be waiting for your input before proceeding any further with 
patch changes.

	Regards,
		Mario Ferreira
Comment 4 Doug Barton freebsd_committer freebsd_triage 2010-02-27 04:14:46 UTC
On 02/26/10 19:40, Mario Sergio Fujikawa Ferreira wrote:
> On 27/02/2010 00:09, dougb@FreeBSD.org wrote:
> [snip]
> 
>> I like most of what you've included, and I will be taking a more in-depth
>> look at it. However, I will not include the python bindings
>> unconditionally,
>> can you please resubmit this patch (as a followup to the same PR) with
>> the python stuff as an OPTION?
> 
>     Unfortunately, I cannot update net-p2p/deluge to 1.2.0 without
> python bindings and I cannot depend upon net-p2p/libtorrent-rasterbar-14
> if python bindings are optional.
> 
>     The most desirable solution would be to create a
> net-p2p/libtorrent-rasterbar-14-python port. However, the rasterbar's
> distfile Makefile/configure structure is not modular enough for me
> tostrip build only the python bindings (linking against a LOCALBASE
> installed net-p2p/libtorrent-rasterbar-14 port at the same time).
> 
>     Any ideas on how to circumvent that?

Make a slave port with the additional stuff for the python bindings.
You'll have to modify some stuff in the master of course, but I'm
supportive of that.


Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/
Comment 5 dfilter service freebsd_committer freebsd_triage 2010-02-28 03:36:28 UTC
dougb       2010-02-28 03:36:14 UTC

  FreeBSD ports repository

  Modified files:
    net-p2p/libtorrent-rasterbar-14 Makefile distinfo pkg-plist 
    net-p2p/libtorrent-rasterbar-14/files patch-configure.in 
  Removed files:
    net-p2p/libtorrent-rasterbar-14/files 
                                          patch-include__libtorrent__chained_buffer.hpp 
                                          patch-include__libtorrent__error_code.hpp 
                                          patch-include__libtorrent__proxy_base.hpp 
                                          patch-include__libtorrent__socket.hpp 
                                          patch-include__libtorrent__ssl_stream.hpp 
                                          patch-include__libtorrent__time.hpp 
                                          patch-include__libtorrent__variant_stream.hpp 
                                          patch-src__broadcast_socket.cpp 
                                          patch-src__enum_net.cpp 
                                          patch-src__error_code.cpp 
                                          patch-src__file_pool.cpp 
                                          patch-src__lsd.cpp 
                                          patch-src__natpmp.cpp 
                                          patch-src__storage.cpp 
                                          patch-src__udp_socket.cpp 
                                          patch-src__upnp.cpp 
  Log:
  Update to version 0.14.9, which has the following:
   disabled feature to drop requests after having been skipped too many times
   fixed range request bug for files larger than 2 GB in web seeds
   don't crash when trying to create torrents with 0 files
   fixed optimistic unchoke timer
   fixed bug where torrents with incorrectly formatted web seed URLs
     would be connected multiple times
   fixed DHT bootstrapping issue
   fixed UDP over SOCKS5 issue
   added support for "corrupt" tracker announce
   made end-game mode less aggressive
  
  From the PR (with some tweaks/modifications, and many thanks!):
   Use MASTER_SITE_GOOGLE_CODE
   Sort MAKE_JOBS_SAFE and CONFLICTS for portlint
   Switch to using the boost_system asio which allows some major
     simplification, removal of lots of patches, etc.
   Simplify CPPFLAGS/LDFLAGS
   Use PORTDOCS macro (thus simplifying plist too)
   Update BROKEN message to be more accurate
   Simplify patches to Makefile.am
  
  PR:             ports/144337
  Submitted by:   lioux
  Feature safe:   yes
  
  Revision  Changes    Path
  1.36      +17 -15    ports/net-p2p/libtorrent-rasterbar-14/Makefile
  1.18      +3 -3      ports/net-p2p/libtorrent-rasterbar-14/distinfo
  1.4       +6 -34     ports/net-p2p/libtorrent-rasterbar-14/files/patch-configure.in
  1.3       +0 -20     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__chained_buffer.hpp (dead)
  1.3       +0 -20     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__error_code.hpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__proxy_base.hpp (dead)
  1.3       +0 -20     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__socket.hpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__ssl_stream.hpp (dead)
  1.3       +0 -29     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__time.hpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-include__libtorrent__variant_stream.hpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__broadcast_socket.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__enum_net.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__error_code.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__file_pool.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__lsd.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__natpmp.cpp (dead)
  1.6       +0 -114    ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__storage.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__udp_socket.cpp (dead)
  1.3       +0 -11     ports/net-p2p/libtorrent-rasterbar-14/files/patch-src__upnp.cpp (dead)
  1.21      +0 -243    ports/net-p2p/libtorrent-rasterbar-14/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2010-06-15 11:24:38 UTC
	I am attaching the final version of my
net-p2p/libtorrent-rasterbar-14 patch.

	The only odd thing about the patch is the dual {BUILD,LIB}_DEPENDS
on boost. I added the extra BUILD_DEPENDS to make sure we have the
proper version of boost port installed. Anything lower than that
and rasterbar should not work correctly.

	With this patch we can have a
net-p2p/libtorrent-rasterbar-14-python slave port that enables me
add an up to date net-p2p/deluge port. A shar archive of the slave
port is attached.

	You can grab the files at

http://people.freebsd.org/~lioux/libtorrent-rasterbar-14-python.shar
http://people.freebsd.org/~lioux/patch-libtorrent-rasterbar-14

in case something is wrong with the attachements.

	The sample updated deluge port depending on this PR can be
found at

http://people.freebsd.org/~lioux/deluge.tbz

	Regards,

-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
feature, n: a documented bug | bug, n: an undocumented feature
Comment 7 dfilter service freebsd_committer freebsd_triage 2010-07-01 08:16:17 UTC
dougb       2010-07-01 07:16:03 UTC

  FreeBSD ports repository

  Modified files:
    net-p2p/libtorrent-rasterbar-15 Makefile distinfo pkg-plist 
  Removed files:
    net-p2p/libtorrent-rasterbar-15/files 
                                          patch-include_libtorrent_bitfield.hpp 
  Log:
  Update to version 0.15.1, with numerous bug fixes:
  
   * fixed rare crash when purging the peer list
   * fixed race condition around m_abort in session_impl
   * fixed bug in web_peer_connection which could cause a hang when
     downloading
     from web servers
   * fixed bug in metadata extensions combined with encryption
   * refactored socket reading code to not use async. operations
     unnecessarily
   * some timer optimizations
   * removed the reuse-address flag on the listen socket
   * fixed bug where local peer discovery and DHT wouldn't be announced to
     without trackers
   * fixed bug in bdecoder when decoding invalid messages
   * added build warning when building with UNICODE but the standard library
     doesn't provide std::wstring
   * fixed add_node python binding
   * fixed issue where trackers wouldn't tried immediately when the previous
     one failed
   * fixed synchronization issue between download queue and piece picker
   * fixed bug in udp tracker scrape response parsing
   * fixed bug in the disk thread that could get triggered under heavy load
   * fixed bug in add_piece() that would trigger asserts
   * fixed vs 2010 build
   * recognizes more clients in identify_client()
   * fixed bug where trackers wouldn't be retried if they failed
   * slight performance fix in disk elevator algorithm
   * fixed potential issue where a piece could be checked twice
   * fixed build issue on windows related to GetCompressedSize()
   * fixed deadlock when starting torrents with certain invalid tracker URLs
   * fixed iterator bug in disk I/O thread
   * fixed FIEMAP support on linux
   * fixed strict aliasing warning on gcc
   * fixed inconsistency when creating torrents with symlinks
   * properly detect windows version to initialize half-open connection limit
   * fixed bug in url encoder where $ would not be encoded
  
  For the port:
  
   * Prepare for -python slave port for the python binding (In part from)[1]
   * Make LOCALBASE safe [2]
   * Python bindings require --enable-deprecated-functions
   * Stop building the static library
   * Patch is now incorporated into the distribution
  
  PR:             ports/144337 [1]
  Submitted by:   lioux [1]
  Submitted by:   swell.k@gmail.com [2]
  Feature safe:   yes
  
  Revision  Changes    Path
  1.6       +29 -11    ports/net-p2p/libtorrent-rasterbar-15/Makefile
  1.3       +3 -3      ports/net-p2p/libtorrent-rasterbar-15/distinfo
  1.2       +0 -10     ports/net-p2p/libtorrent-rasterbar-15/files/patch-include_libtorrent_bitfield.hpp (dead)
  1.3       +0 -2      ports/net-p2p/libtorrent-rasterbar-15/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-07-01 08:19:52 UTC
dougb       2010-07-01 07:19:45 UTC

  FreeBSD ports repository

  Modified files:
    net-p2p              Makefile 
  Added files:
    net-p2p/libtorrent-rasterbar-15-python Makefile pkg-plist 
  Log:
  Add a slave port for the python binding
  
  Major effort from the PR, tweaks and bugs from me
  
  PR:             ports/144337
  Submitted by:   lioux
  
  Feature safe:   yes
  
  Revision  Changes    Path
  1.84      +1 -0      ports/net-p2p/Makefile
  1.1       +48 -0     ports/net-p2p/libtorrent-rasterbar-15-python/Makefile (new)
  1.1       +1 -0      ports/net-p2p/libtorrent-rasterbar-15-python/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Doug Barton freebsd_committer freebsd_triage 2010-07-01 10:25:51 UTC
State Changed
From-To: analyzed->closed


Thanks again for your patience on this, while it took a different route 
than expected, I think the end result is a good one. :) 


Doug