pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: OS X Porting packages for pkgin



* On 2016-06-10 at 06:42 BST, Jac Steiner wrote:

> Hello. Apologies, I'm a newbie.

No need for apologies, newbies are very much welcome!

> I'm using pkgin on OS X 10.11.4. There are some packages that I'd like to
> try to make work on OS X. I understand this might be too big of a project
> to start with, but is there low hanging fruit that someone could point me
> toward.

If it's low hanging fruit you're looking for, pkgsrc is probably the
perfect project to fit, there are literally thousands of easy fixes
available, once you have a development environment setup.

> My initial interest came when I found I couldn't install gptfdisk or vlc
> with pkgin. Gptfdisk I think is not included for any OS that pkgin works
> with, but looks like an easy win, I think. While vlc can be installed on
> other OS's with pkgin, some preliminary experimenting suggests to me that
> GUI dependent pkgs don’t build or sometimes don’t work on OS X with pkgsrc.
> Obviously, both apps can be built on OS X, or installed from pre-packaged
> binaries, but it’d be fun to get things like this to “just work” with
> pkgin. Where do I get started?

For the binary packages that I assume you are using, I perform a full
bulk build continuously.  The reports from those builds get sent to
this list:

  http://mail-index.netbsd.org/pkgsrc-bulk/

Look for the 'osx-trunk-x86_64' builds.  If a package isn't available
in pkgin, then this report will show if the package already exists in
pkgsrc but the build is currently failing, and will show logs
detailing the reason why.

> The recommended process (https://pkgsrc.joyent.com/docs/building/) for
> building packages with pkgsrc starts with cloning the entire git repo from
> github.com/joyent/pkgsrc.git. I think this repo includes much more than
> just what I need to start packaging, but I'm honestly not clear about that.
> Is there a more lean base to start with or is this the way to go? I’m
> dealing with bandwidth limitations (in Micronesia).

Note that this doc is somewhat SmartOS specific at this time, I am in
the process of writing a more generic and updated document which
includes how to get started on OSX, as well making use of our pkgbuild
repository (https://github.com/joyent/pkgbuild) which will give you
the same environment as I use to build inside a chroot.

The repository is large as it includes all the pkgsrc history going
back almost 20 years.  If you don't want/need that then you can use
the "--depth 1" argument to 'git clone' to ignore the history.  I
would also recommend adding a "-b joyent/osx/trunk" argument to fetch
the branch I build the packages from.

For the "Configuring mk.conf" section you'll want to edit
/opt/pkg/etc/mk.conf, and can ignore the FETCH_USING and BINPKG_SITES
variables as they will already be set.

After that, for a package that already exists in pkgsrc, you should be
able to start building with:

  $ cd pkgsrc/foo/bar
  $ bmake

and start fixing the issues.  Using DEPENDS_TARGET=bin-install in
mk.conf will use binary packages for dependencies if available and
save you a lot of time.

> Also, I’m a bit confused. If I want to bundle packages for pkgin,
> isn’t there some package I can install with “pkgin in” to help me do
> this?

pkgin is purely for managing binary packages built by pkgsrc.  The
process of building and developing pkgsrc is a lot more complex and
involves many different moving parts.  There are certainly a lot of
things we can do to make it easier, but it won't be as simple as just
installing some packages.  Packaging software in a portable way will
always involve getting down and dirty in the guts of the build as so
few programmers these days write software to work unmodified on all
pkgsrc platforms.

> I want to use the most standard way of doing this, observant of best
> practices, particularly regarding portability.

Great to have you onboard!  Feel free to hang out on IRC and prod me
questions about any of this stuff, I want to make this process as easy
as possible for newcomers.

Cheers,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index