Portfile for binary only install
Ryan Schmidt
ryandesign at macports.org
Tue May 31 00:27:25 PDT 2016
On May 27, 2016, at 4:31 PM, Sean wrote:
> Looking to create a portfile for a package that only distributes pre-compiled binaries.
>
> In this case, package.tbz expands to:
>
> package
> └─ bin/
> └─ share/
> └─ lib/
>
> Is the most idiomatic way to eliminate the config, build, and test phases with {}, then
> move package/{bin,share,lib} to the correct location during destroot?
Eliminate the configure phase with "use_configure no".
Eliminate the build phase with "build {}".
The test phase is already disabled, unless you add "test.run yes" to the portfile, so don't add that.
If there are any libraries, make sure their install_names are fixed by using install_name_tool on them.
Don't forget to set supported_archs to the list of architectures the binary is built for, and to set configure.cxx_stdlib to the C++ stdlib the binary is built for, if it uses a C++ stdlib. Use "otool -L" to find out.
If the binary is distributed universal, add an empty universal variant and set configure.universal_archs to the list of architectures the binary is built for. Write code to strip out all but the requested arch, if the user did not request the universal variant.
The libxl port is a simply example of a port that does these things. The oracle-instantclient port is a more complicated example.
> I had a poke around the available PortGroups, but nothing caught my attention for this.
There's no portgroup for this. There's no standard for how binaries are distributed.
An entry in the PortfileRecipes wiki page would not be a bad idea though.
More information about the macports-dev
mailing list