1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
7 Name: mingw32-ocaml-lablgl
10 Summary: MinGW Windows port of LablGL is an OpenGL interface
13 Group: Development/Libraries
15 URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
16 Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%{version}.tar.gz
18 # Patches from native Fedora package:
19 Patch0: lablgl-tk8.5.patch
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24 BuildRequires: mingw32-filesystem >= 35
25 BuildRequires: mingw32-gcc
26 BuildRequires: mingw32-binutils
28 BuildRequires: mingw32-ocaml
30 # XXX This requires camlp4 which we don't yet have under MinGW.
31 BuildRequires: mingw32-ocaml-camlp4
33 # labltk is used by the native package, but is essentially optional.
34 #BuildRequires: mingw32-ocaml-labtk
38 LablGL is is an Objective Caml interface to OpenGL. Support is
39 included for use inside LablTk, and LablGTK also includes specific
40 support for LablGL. It can be used either with proprietary OpenGL
41 implementations (SGI, Digital Unix, Solaris...), with XFree86 GLX
42 extension, or with open-source Mesa.
46 %setup -q -n lablgl-%{version}
50 cat > Makefile.config <<__EOF__
51 CAMLC = %{_mingw32_target}-ocamlc
52 CAMLOPT = %{_mingw32_target}-ocamlopt
54 #XINCLUDES = -I%{_prefix}/X11R6/include
55 #XLIBS = -lXext -lXmu -lX11
56 #TKINCLUDES = -I%{_includedir}
57 GLINCLUDES = -DHAS_GLEXT_H -DGL_GLEXT_PROTOTYPES -DGLU_VERSION_1_3
58 GLLIBS = -lglu32 -lopengl32
60 RANLIB = i686-pc-mingw32-ranlib
66 MKDLL = i686-pc-mingw32-gcc -shared -o
67 LIBDIR = %{_libdir}/%{_mingw32_target}-ocaml
68 DLLDIR = %{_libdir}/%{_mingw32_target}-ocaml/stublibs
69 INSTALLDIR = %{_libdir}/%{_mingw32_target}-ocaml/lablGL
71 #COPTS = $RPM_OPT_FLAGS
80 rm -rf $RPM_BUILD_ROOT
81 make DESTDIR=$RPM_BUILD_ROOT install
83 # Remove static libraries but DON'T remove *.dll.a files.
84 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
88 rm -rf $RPM_BUILD_ROOT
93 %{_mingw32_bindir}/foo.dll
94 %{_mingw32_libdir}/foo.dll.a
99 * Thu Nov 13 2008 Your Name <you@example.com> - 1.2.3-1
100 - Initial RPM release.