Hi Chris,
First, our software requires: libxml2, SDL, SDL_image, SDL_mixer and
FTGL. SDL and libxml2 already have MinGW packages on Fedora and they
worked very well. SDL_image and SDL_mixer did not but they compiled fine
simply using mingw-configure, make, make install. Be that as it is, is
there much else involved in package management for this sort of
software? If not, I'd be interested in volunteering to maintain Fedora
MinGW packages for SDL_image and SDL_mixer if they're not already on the
way.
New mingw32 packages are always welcome! I don't know if you're already
familiar with maintaining regular RPMs for Fedora, but we tried to keep
the packaging of mingw32 packages as easy as possible. In order to port
a native Fedora package to a mingw32 package, there are some steps which
need to be done:
- Calls to the macro %configure need to be replaced with
%{_mingw32_configure}.
- File lists will need to be updated to use macro's like
%{_mingw32_bindir} and %{_mingw32_libdir} instead of %{_bindir} and
%{_libdir}
- The package needs to be made noarch, so a 'BuildArch: noarch' needs to
be added
- Some mingw32 specific BuildRequires need to be added. At least ones
should be added for mingw32-filesystem, mingw32-gcc and
mingw32-binutils. Depending on the dependencies of the package itself
more mingw32-specific BR's might be needed
- The top of the .spec file should begin with these set of macro's:
%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
When putting a new package up for review, don't forget to CC
fedora-mingw(a)lists.fedoraproject.org so that you have a better chance
that somebody reviews the package soon.
Their configure script fails to find OpenGL, attempting to link
against
-lGL. I understand for MinGW it's proper to link against -lopengl32 and
add -mwindows to the compiler flags. Would the proper thing to do here
be to add a check for the mingw system type in configure.ac and change
the CFLAGS and LIBS to -lopengl32 instead of -lGL?
The '-mwindows' compiler flag is used to indicate that the resulting
executable shouldn't show a console window when it's started. When the
compiler flag '-mconsole' is used a console window will be shown where
all stdout/stderr-output gets shown.
Applying a change in the configure.ac file which adds a special check
for mingw32 environments seems like the correct approach to me.
I don't know if the Windows opengl32 library contains all the OpenGL
functions you want to use, but there's also a mingw32-freeglut package
in the Fedora repositories which offers additional OpenGL functions.
If you've got any more questions, feel free to drop them on this list
Kind regards,
Erik van Pienbroek