tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Progress on Minix port of pkgsrc
Hello,
I am happy to announce that Pkgsrc now bootstraps on Minix (using the GNU C
compiler). Patches for this can be found at [1]. These patches have only been
tested by me and I am writing this mail primarily for feedback. Below I
describe the changes I had to make to various packages/files.
bootstrap/bootstrap
~~~~~~~~~~~~~~~~~~~
This was fairly straight forward. Simply defining Minix related variables and
setting need_sed and need_bsd_install to yes did the trick.
devel/bmake
~~~~~~~~~~~
1) Minix does not have setpgid and setrlimit. I changed the autoconf files to
search for these functions.
2) MACHINE is already used in minix header files. The mk-bootstrap.sh file
has the following line:
MDEFS="-D@force_machine@MACHINE=\"@machine@\" -DMACHINE_ARCH=\"@machine_arch@\" -DMAKE_VERSION=\"$MAKE_VERSION\""
This causes MACHINE to be redefined when --force-machine is not passed to the
configure script. I changed the autoconf file to set force_machine to NOFORCE_
when --force-machine is not passed.
pkgtools/libnbcompat
~~~~~~~~~~~~~~~~~~~~
1) Minix has two versions of ar: Minix ar installed in /usr/bin/ar and GNU ar
installed in /usr/gnu/bin/gar. The two provide incompatible outputs. Since we
are using gcc we need gar. I changed the autoconf file to search for gar
before searching for ar.
2) Minix does not have stat->st_blksize field. I changed the configure file to
check if this field is present.
pkgtools/pkg_install
~~~~~~~~~~~~~~~~~~~~~~
Again changed the autoconf file to search for gar before ar.
pkgtools/bootstrap-mk-files
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) I Borrowed heavily from existing files. These files are likely to change as more
people test the system and as I try to build packages.
2) I also fixed a bug in bootstrap.sh: It was looking for mods/${OPSYS}.own.mk.in
instead of mods/${OPSYS}.bsd.own.mk.in.
archivers/libarchive
~~~~~~~~~~~~~~~~~~~~
1) Minix does not have getgrnam_r, getpwnam_r, getpwuid_r, getgrgid_r. I changed
the autoconf files to search for these.
2) Minix does not have poll.h. Libnbcompat however provides a poll function so
configure sets HAVE_POLL. This causes filter_fork.c to not compile as symbols
usually defined in poll.h (pollfd etc) are missing. I have changed
filter_fork.c to undefine HAVE_POLL if neither poll.h nor sys/poll.h is present.
net/libfetch
~~~~~~~~~~~~~
Minix does not have ENETRESET and ECONNABORTED defined. Changed the files
using these to check if they are defined.
mk/*
~~~~
Filled in OPSYS related definitions in bsd.prefs.mk, platform/Minix.mk and
platform/tools.Minix.mk. I also had to add ar to USE_TOOlS in bsd.prefs.mk and
set TOOLS_PLATFORM.ar to gar as some configure scripts were still picking up
ar instead of gar. These files are likely to change as I try to build more
packages.
Few questions:
1) I am also trying to add support for the Minix compiler (ack). The main
issue is that ack lacks a 64 bit type. So I am having to surround code that
uses long long or uint64_t with HAVE_LONG_LONG macro (Roughly 3-4 places per
package). Are these changes acceptable?
2) I find that quite a few packages use the dlopen framework. Minix does not
have dlopen and these packages fail to build. Is there a workaround for this?
I am asking because atleast pkg_config compiles without any trouble when I
remove the dlopen.buildlink3.mk line. It is likely that the configure file
detects the absence of dlopen and handles it correctly.
[1] http://github.com/downloads/gautambt/Pkgsrc-Minix/
--
Gautam
Home |
Main Index |
Thread Index |
Old Index