Opened 6 years ago

Last modified 6 years ago

#55757 new submission

port submission: p5-opencl

Reported by: dsteck Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: p5-opencl

Description

I'm submitting a port file and 2 patch files for the OpenCL module for Perl 5. This allows one to run OpenCL kernels from within Perl. (See http://search.cpan.org/~mlehmann/OpenCL-1.01/OpenCL.pm)

A minor patch to the Makefile.PL allows for proper linking under os x, and a patch to a header file fills in some commonly defined values that are missing from os x's OpenCL headers.

Attachments (8)

Portfile (1.0 KB) - added by dsteck 6 years ago.
patch-src-Makefile.PL.diff (626 bytes) - added by dsteck 6 years ago.
patch-src-default.h.diff (995 bytes) - added by dsteck 6 years ago.
Portfile.2 (1.1 KB) - added by dsteck 6 years ago.
patch-src-Makefile.PL-choice.diff (393 bytes) - added by dsteck 6 years ago.
patch-src-Makefile.PL-framework.diff (285 bytes) - added by dsteck 6 years ago.
Portfile.3 (1.1 KB) - added by dsteck 6 years ago.
Portfile.4 (1.1 KB) - added by dsteck 6 years ago.

Download all attachments as: .zip

Change History (17)

Changed 6 years ago by dsteck

Attachment: Portfile added

Changed 6 years ago by dsteck

Attachment: patch-src-Makefile.PL.diff added

Changed 6 years ago by dsteck

Attachment: patch-src-default.h.diff added

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks.

The license field should be license {Artistic-1 GPL}.

5.22 should not be in perl5.branches; we've already phased perl 5.22 out of other ports.

It's unlikely that you should need to override the master_sites and distfiles set by the perl5 portgroup.

Please add the third checksum type, size (the file's size in bytes).

The patchfiles should be added inside the if {${perl5.major} != ""} {...} block.

The second part of the Makefile.PL patch is specific to Darwin (or possibly macOS), so it should be a separate file that's added inside a platform darwin {...} (or possibly platform macosx {...}) block.

comment:2 Changed 6 years ago by dsteck

Thanks for the feedback! I'm attaching a revised Portfile and two patch files with the requested changes, with a couple of caveats:

  • I left master_sites in place, since without it MacPorts tries to fetch it from >30 locations before failing with a timeout error (I removed distfiles).
  • I'm not quite sure if I did the platform darwin bit correctly for the second patch (in the sense of being inside the perl5.major block).

To summarize, the revised files are: Portfile patch-src-Makefile.PL-default.diff (suppresses an interactive choice during configuration, forcing OpenCL 1.2 over 1.1) patch-src-Makefile.PL-framework.diff (adds '-framework OpenCL' to Makefile.PL for proper linking in osx/darwin)

still needed: patch-src-default.h.diff (unchanged)

Changed 6 years ago by dsteck

Attachment: Portfile.2 added

Changed 6 years ago by dsteck

Changed 6 years ago by dsteck

comment:3 Changed 6 years ago by dsteck

One more Portfile version, as I managed to get the patch files mixed up.

Changed 6 years ago by dsteck

Attachment: Portfile.3 added

comment:4 Changed 6 years ago by mf2k (Frank Schima)

Keywords: haspatch removed
Version: 2.4.2

comment:5 Changed 6 years ago by mf2k (Frank Schima)

The license line is incorrect, it repeats the word "license" in it.

Last edited 6 years ago by mf2k (Frank Schima) (previous) (diff)

comment:6 Changed 6 years ago by dsteck

thanks, license line now fixed; new Portfile uploaded

Changed 6 years ago by dsteck

Attachment: Portfile.4 added

comment:7 Changed 6 years ago by dsteck

Hi all, is there anything else I can do to help get this port ready to be included in macports? If not, can it be committed? I have more ports to submit but am waiting to learn what I can learn from this first submission.

comment:8 Changed 6 years ago by mojca (Mojca Miklavec)

  • since the time you made the submission we retired perl 5.24 modules, so only the 5.26 should be kept
  • size is usually in the last line (port -v extract will automatically give you the output even if those lines are missing, but it only reports size if you use development version of MacPorts; I've never added size myself and it has not been a requirement yet, but we'll start introducing it soon, so it doesn't hurt to keep it)
  • are you willing to be a maintainer of the port
  • instead of setting up the master_sites, here's what other perl ports do (this is just for perl, not for other ports), you can try if that works for you:
    perl5.setup         Path-IsDev 1.001003 ../by-authors/id/K/KE/KENTNL
    
  • if you use patchfiles instead of patchfiles-append, the line with two patches will most likely delete the darwin-specific patch
  • whitespace in front of platform darwin should use 4 spaces, not two (some nitpicking)

Any of those things can also be fixed by the person committing your port (this is less true in case you submit a pull requests since there's a huge difference in just pushing the merge button and having to fix something).

Officially we support patch submission via Trac. But unofficial lesson learned is that there are some super active members of community that only ever look at pull requests on github and never check Trac. So if you want to increase your chances to get your patches accepted faster (probably by 10-fold?), your best bet is to submit a pull request.

comment:9 Changed 6 years ago by mojca (Mojca Miklavec)

Cc: mojca added
Note: See TracTickets for help on using tickets.